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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  26.9k|        {
  117|  26.9k|            return size_;
  118|  26.9k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|  2.48k|        {
   59|  2.48k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|  6.68k|            : data_(data), size_(size)
   62|  6.68k|        {
   63|  6.68k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  8.88k|        {
  112|  8.88k|            return data_;
  113|  8.88k|        }

_ZN8jsoncons26basic_default_json_visitorIcEC2Ev:
  811|  1.90k|        basic_default_json_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|  1.90k|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|  1.90k|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons26basic_default_json_visitorIcE15visit_end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  833|    766|        {
  834|    766|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    766|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  835|    766|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  858|    367|        {
  859|    367|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    367|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  860|    367|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  863|  1.70k|        {
  864|  1.70k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.70k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  865|  1.70k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  873|    602|        {
  874|    602|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    602|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  875|    602|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_flushEv:
  814|      8|        {
  815|      8|        }
_ZN8jsoncons26basic_default_json_visitorIcE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  818|  4.54k|        {
  819|  4.54k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.54k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  820|  4.54k|        }
_ZN8jsoncons26basic_default_json_visitorIcE16visit_end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  823|    568|        {
  824|    568|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    568|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  825|    568|        }
_ZN8jsoncons26basic_default_json_visitorIcE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  828|  31.5k|        {
  829|  31.5k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  31.5k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  830|  31.5k|        }
_ZN8jsoncons26basic_default_json_visitorIcE9visit_keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  838|  17.8k|        {
  839|  17.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  17.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  840|  17.8k|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  843|  2.34k|        {
  844|  2.34k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.34k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  845|  2.34k|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  878|  1.08k|        {
  879|  1.08k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.08k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  880|  1.08k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_stringERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  848|  16.9k|        {
  849|  16.9k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  16.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  850|  16.9k|        }
_ZN8jsoncons26basic_default_json_visitorIcE17visit_byte_stringERKNS_16byte_string_viewENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  853|  2.43k|        {
  854|  2.43k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.43k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  855|  2.43k|        }
_ZN8jsoncons18basic_json_visitorIcE17visit_byte_stringERKNS_16byte_string_viewEmRKNS_11ser_contextERNSt3__110error_codeE:
  595|  2.43k|        {
  596|  2.43k|            visit_byte_string(value, semantic_tag::none, context, ec);
  597|  2.43k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.43k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  598|  2.43k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|    367|        {
  415|    367|            visit_uint64(value, tag, context, ec);
  416|    367|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    367|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|    367|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|    766|        {
  352|    766|            visit_end_array(context, ec);
  353|    766|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    766|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|    766|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  1.70k|        {
  424|  1.70k|            visit_int64(value, tag, context, ec);
  425|  1.70k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.70k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  1.70k|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|    602|        {
  442|    602|            visit_double(value, tag, context, ec);
  443|    602|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    602|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|    602|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  4.54k|        {
  319|  4.54k|            visit_begin_object(tag, context, ec);
  320|  4.54k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.54k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  4.54k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|  17.8k|        {
  358|  17.8k|            visit_key(name, context, ec);
  359|  17.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  17.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|  17.8k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|    568|        {
  334|    568|            visit_end_object(context, ec);
  335|    568|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|    568|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|    568|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  16.9k|        {
  384|  16.9k|            visit_string(value, tag, context, ec);
  385|  16.9k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  16.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  16.9k|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  31.5k|        {
  340|  31.5k|            visit_begin_array(tag, context, ec);
  341|  31.5k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  31.5k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  31.5k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  2.34k|        {
  366|  2.34k|            visit_null(tag, context, ec);
  367|  2.34k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.34k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  2.34k|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|  1.08k|        {
  375|  1.08k|            visit_bool(value, tag, context, ec);
  376|  1.08k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.08k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|  1.08k|        }
_ZN8jsoncons18basic_json_visitorIcE17byte_string_valueINS_16byte_string_viewEEEbRKT_mRKNS_11ser_contextERNSt3__110error_codeENSA_9enable_ifIXsr10ext_traits18is_bytes_view_likeIS4_EE5valueEiE4typeE:
  405|  2.43k|        {
  406|  2.43k|            visit_byte_string(byte_string_view(reinterpret_cast<const uint8_t*>(b.data()),b.size()), raw_tag, context, ec);
  407|  2.43k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.43k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  408|  2.43k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|      8|        {
  109|      8|            visit_flush();
  110|      8|        }

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|  1.90k|    {
  194|  1.90k|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 1.90k, False: 0]
  ------------------
  195|  1.90k|        {
  196|  1.90k|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|  1.90k|        }
  198|  1.90k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|  1.90k|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|  1.90k|          chunk_size_(default_max_chunk_size)
  178|  1.90k|    {
  179|  1.90k|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|  1.90k|        data_ = chunk_;
  181|  1.90k|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|  1.90k|      : std::basic_istream<CharT>(&nb_)
   58|  1.90k|    {
   59|  1.90k|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|  1.90k|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  1.90k|    {
  277|  1.90k|        return stream_ptr_->bad();  
  278|  1.90k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  372|  8.73M|    {
  373|  8.73M|        std::size_t len = 0;
  374|  8.73M|        if (count_ > 0)
  ------------------
  |  Branch (374:13): [True: 8.72M, False: 3.47k]
  ------------------
  375|  8.72M|        {
  376|  8.72M|            len = (std::min)(count_, length);
  377|  8.72M|            std::memcpy(p, data_, len*sizeof(value_type));
  378|  8.72M|            data_ += len;
  379|  8.72M|            count_ -= len;
  380|  8.72M|            position_ += len;
  381|  8.72M|        }
  382|  8.73M|        if (length - len == 0)
  ------------------
  |  Branch (382:13): [True: 8.72M, False: 4.47k]
  ------------------
  383|  8.72M|        {
  384|  8.72M|            return len;
  385|  8.72M|        }
  386|  4.47k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (386:18): [True: 4.47k, False: 0]
  ------------------
  387|  4.47k|        {
  388|  4.47k|            data_ = chunk_;
  389|  4.47k|            count_ = fill_buffer(chunk_, chunk_size_);
  390|  4.47k|            if (count_ > 0)
  ------------------
  |  Branch (390:17): [True: 3.14k, False: 1.32k]
  ------------------
  391|  3.14k|            {
  392|  3.14k|                std::size_t len2 = (std::min)(count_, length-len);
  393|  3.14k|                std::memcpy(p+len, data_, len2*sizeof(value_type));
  394|  3.14k|                data_ += len2;
  395|  3.14k|                count_ -= len2;
  396|  3.14k|                position_ += len2;
  397|  3.14k|                len += len2;
  398|  3.14k|            }
  399|  4.47k|            return len;
  400|  4.47k|        }
  401|      0|        else
  402|      0|        {
  403|      0|            if (stream_ptr_->eof())
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  ------------------
  404|      0|            {
  405|      0|                count_ = 0;
  406|      0|                return 0;
  407|      0|            }
  408|      0|            JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  409|      0|            {
  410|      0|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  411|      0|                std::size_t len2 = static_cast<std::size_t>(count);
  412|      0|                if (len2 < length-len)
  ------------------
  |  Branch (412:21): [True: 0, False: 0]
  ------------------
  413|      0|                {
  414|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|      0|                }
  416|      0|                len += len2;
  417|      0|                position_ += len2;
  418|      0|                return len;
  419|      0|            }
  420|      0|            JSONCONS_CATCH(const std::exception&)     
  421|      0|            {
  422|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  423|      0|                return 0;
  424|      0|            }
  425|      0|        }
  426|  8.73M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  430|  4.85k|    {
  431|  4.85k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (431:13): [True: 1.31k, False: 3.54k]
  ------------------
  432|  1.31k|        {
  433|  1.31k|            return 0;
  434|  1.31k|        }
  435|       |
  436|  3.54k|        JSONCONS_TRY
  ------------------
  |  |   37|  3.54k|    #define JSONCONS_TRY try
  ------------------
  437|  3.54k|        {
  438|  3.54k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  439|  3.54k|            std::size_t length = static_cast<std::size_t>(count);
  440|       |
  441|  3.54k|            if (length < chunk_size)
  ------------------
  |  Branch (441:17): [True: 1.88k, False: 1.65k]
  ------------------
  442|  1.88k|            {
  443|  1.88k|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  444|  1.88k|            }
  445|  3.54k|            return length;
  446|  3.54k|        }
  447|  3.54k|        JSONCONS_CATCH(const std::exception&)     
  448|  3.54k|        {
  449|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  450|      0|            return 0;
  451|      0|        }
  452|  3.54k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|  6.60k|    {
  353|  6.60k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|  6.60k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2.08k, False: 4.52k]
  |  |  ------------------
  ------------------
  354|  2.08k|        {
  355|  2.08k|            return span<const value_type>{};
  356|  2.08k|        }
  357|  4.52k|        if (length > count_)
  ------------------
  |  Branch (357:13): [True: 197, False: 4.32k]
  ------------------
  358|    197|        {
  359|    197|            buffer.clear();
  360|    197|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  361|    197|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  362|    197|        }
  363|       |
  364|  4.32k|        const value_type* data = data_;
  365|  4.32k|        data_ += length;
  366|  4.32k|        count_ -= length;
  367|  4.32k|        position_ += length;
  368|  4.32k|        return span<const value_type>(data, length);
  369|  4.52k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  996|    197|    {
  997|    197|        std::size_t unread = length;
  998|       |
  999|    853|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (999:16): [True: 788, False: 65]
  |  Branch (999:30): [True: 656, False: 132]
  ------------------
 1000|    656|        {
 1001|    656|            if (source.count() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (1001:17): [True: 152, False: 504]
  |  Branch (1001:40): [True: 152, False: 0]
  ------------------
 1002|    152|            {
 1003|    152|                std::size_t n = source.chunk_size();
 1004|    152|                std::size_t offset = buffer.size();
 1005|    152|                buffer.resize(buffer.size()+n);
 1006|    152|                std::size_t actual = source.fill_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1007|    152|                unread -= actual;
 1008|    152|            }
 1009|    504|            else
 1010|    504|            {
 1011|    504|                std::size_t n = (std::min)(source.chunk_size(), unread);
 1012|    504|                std::size_t offset = buffer.size();
 1013|    504|                buffer.resize(buffer.size()+n);
 1014|    504|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1015|    504|                unread -= actual;
 1016|    504|            }
 1017|    656|        }
 1018|    197|        return length - unread;
 1019|    197|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  1.75k|    {
  272|  1.75k|        return count_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 735, False: 1.02k]
  |  Branch (272:31): [True: 353, False: 382]
  ------------------
  273|  1.75k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE5countEv:
  346|  1.40k|    {
  347|  1.40k|        return count_;
  348|  1.40k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  1.78k|    {
  262|  1.78k|        return chunk_size_;
  263|  1.78k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_6vectorIhS3_EEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|  2.56k|    {
  353|  2.56k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|  2.56k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 403, False: 2.16k]
  |  |  ------------------
  ------------------
  354|    403|        {
  355|    403|            return span<const value_type>{};
  356|    403|        }
  357|  2.16k|        if (length > count_)
  ------------------
  |  Branch (357:13): [True: 241, False: 1.92k]
  ------------------
  358|    241|        {
  359|    241|            buffer.clear();
  360|    241|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  361|    241|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  362|    241|        }
  363|       |
  364|  1.92k|        const value_type* data = data_;
  365|  1.92k|        data_ += length;
  366|  1.92k|        count_ -= length;
  367|  1.92k|        position_ += length;
  368|  1.92k|        return span<const value_type>(data, length);
  369|  2.16k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_6vectorIhS4_EEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSD_m:
  996|    241|    {
  997|    241|        std::size_t unread = length;
  998|       |
  999|    991|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (999:16): [True: 971, False: 20]
  |  Branch (999:30): [True: 750, False: 221]
  ------------------
 1000|    750|        {
 1001|    750|            if (source.count() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (1001:17): [True: 230, False: 520]
  |  Branch (1001:40): [True: 230, False: 0]
  ------------------
 1002|    230|            {
 1003|    230|                std::size_t n = source.chunk_size();
 1004|    230|                std::size_t offset = buffer.size();
 1005|    230|                buffer.resize(buffer.size()+n);
 1006|    230|                std::size_t actual = source.fill_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1007|    230|                unread -= actual;
 1008|    230|            }
 1009|    520|            else
 1010|    520|            {
 1011|    520|                std::size_t n = (std::min)(source.chunk_size(), unread);
 1012|    520|                std::size_t offset = buffer.size();
 1013|    520|                buffer.resize(buffer.size()+n);
 1014|    520|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1015|    520|                unread -= actual;
 1016|    520|            }
 1017|    750|        }
 1018|    241|        return length - unread;
 1019|    241|    }

_ZN8jsoncons6binary16little_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  197|  45.9k|    {
  198|  45.9k|        if (sizeof(T) > count)
  ------------------
  |  Branch (198:13): [True: 0, False: 45.9k]
  ------------------
  199|      0|        {
  200|      0|            return T{};
  201|      0|        }
  202|  45.9k|        T val;
  203|  45.9k|        std::memcpy(&val,first,sizeof(T));
  204|  45.9k|        return val;
  205|  45.9k|    }
_ZN8jsoncons6binary16little_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  197|    602|    {
  198|    602|        if (sizeof(T) > count)
  ------------------
  |  Branch (198:13): [True: 0, False: 602]
  ------------------
  199|      0|        {
  200|      0|            return T{};
  201|      0|        }
  202|    602|        T val;
  203|    602|        std::memcpy(&val,first,sizeof(T));
  204|    602|        return val;
  205|    602|    }
_ZN8jsoncons6binary16little_to_nativeImNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  197|  18.0k|    {
  198|  18.0k|        if (sizeof(T) > count)
  ------------------
  |  Branch (198:13): [True: 0, False: 18.0k]
  ------------------
  199|      0|        {
  200|      0|            return T{};
  201|      0|        }
  202|  18.0k|        T val;
  203|  18.0k|        std::memcpy(&val,first,sizeof(T));
  204|  18.0k|        return val;
  205|  18.0k|    }
_ZN8jsoncons6binary16little_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  197|  1.16k|    {
  198|  1.16k|        if (sizeof(T) > count)
  ------------------
  |  Branch (198:13): [True: 0, False: 1.16k]
  ------------------
  199|      0|        {
  200|      0|            return T{};
  201|      0|        }
  202|  1.16k|        T val;
  203|  1.16k|        std::memcpy(&val,first,sizeof(T));
  204|  1.16k|        return val;
  205|  1.16k|    }

_ZNK8jsoncons16byte_string_view4dataEv:
  399|  2.43k|        {
  400|  2.43k|            return data_;
  401|  2.43k|        }
_ZNK8jsoncons16byte_string_view4sizeEv:
  403|  2.43k|        {
  404|  2.43k|            return size_;
  405|  2.43k|        }
_ZN8jsoncons16byte_string_viewC2EPKhm:
  362|  4.87k|            : data_(data), size_(length)
  363|  4.87k|        {
  364|  4.87k|        }

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  24.5k|    {
 1148|  24.5k|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  24.5k|        const uint8_t* end = it + length;
 1150|       |
 1151|  24.5k|        unicode_errc  result{};
 1152|   237k|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 213k, False: 24.3k]
  ------------------
 1153|   213k|        {
 1154|   213k|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 172k, False: 41.0k]
  ------------------
 1155|   172k|            {
 1156|  1.15M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|   344k|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 169k, False: 2.91k]
  |  |  |  Branch (281:34): [True: 167k, False: 2.31k]
  |  |  |  Branch (281:36): [True: 165k, False: 1.18k]
  |  |  |  Branch (281:38): [True: 165k, False: 563]
  |  |  |  Branch (281:40): [True: 164k, False: 844]
  |  |  |  Branch (281:42): [True: 162k, False: 1.59k]
  |  |  |  Branch (281:44): [True: 162k, False: 713]
  |  |  |  Branch (281:46): [True: 152k, False: 9.79k]
  |  |  ------------------
  ------------------
 1157|   152k|                continue;
 1158|  1.15M|            }
 1159|  60.9k|    non_ascii:
 1160|  60.9k|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  60.9k|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 49, False: 60.8k]
  ------------------
 1162|     49|            {
 1163|     49|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|     49|            }
 1165|  60.8k|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 178, False: 60.7k]
  ------------------
 1166|    178|            {
 1167|    178|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|    178|            }
 1169|  60.7k|            it += len;
 1170|  60.7k|        }
 1171|  24.3k|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  24.5k|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  60.8k|    {
  306|  60.8k|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  60.8k|        const uint8_t* end = it+length;
  308|       |
  309|  60.8k|        uint8_t byte;
  310|  60.8k|        switch (length) {
  311|     27|        default:
  ------------------
  |  Branch (311:9): [True: 27, False: 60.8k]
  ------------------
  312|     27|            return unicode_errc::over_long_utf8_sequence;
  313|    864|        case 4:
  ------------------
  |  Branch (313:9): [True: 864, False: 60.0k]
  ------------------
  314|    864|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 11, False: 853]
  ------------------
  315|     11|                return unicode_errc::bad_continuation_byte;
  316|    853|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|    853|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  1.60k|        case 3:
  ------------------
  |  Branch (317:9): [True: 756, False: 60.1k]
  ------------------
  318|  1.60k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 14, False: 1.59k]
  ------------------
  319|     14|                return unicode_errc::bad_continuation_byte;
  320|  1.59k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  1.59k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  19.9k|        case 2:
  ------------------
  |  Branch (321:9): [True: 18.3k, False: 42.5k]
  ------------------
  322|  19.9k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 40, False: 19.8k]
  ------------------
  323|     40|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  19.8k|            switch (*it) 
  326|  19.8k|            {
  327|       |                // no fall-through in this inner switch
  328|    206|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 206, False: 19.6k]
  |  Branch (328:32): [True: 8, False: 198]
  ------------------
  329|    486|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 486, False: 19.4k]
  |  Branch (329:32): [True: 4, False: 482]
  ------------------
  330|    491|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 491, False: 19.4k]
  |  Branch (330:32): [True: 5, False: 486]
  ------------------
  331|    486|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 337, False: 19.5k]
  |  Branch (331:32): [True: 4, False: 333]
  ------------------
  332|  18.3k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 18.3k, False: 1.52k]
  |  Branch (332:32): [True: 0, False: 18.3k]
  ------------------
  333|  19.8k|            }
  334|       |
  335|  19.8k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  19.8k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  60.7k|        case 1:
  ------------------
  |  Branch (336:9): [True: 40.8k, False: 19.9k]
  ------------------
  337|  60.7k|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 19.9k, False: 40.8k]
  |  Branch (337:32): [True: 63, False: 19.8k]
  ------------------
  338|     63|                return unicode_errc::source_illegal;
  339|  60.7k|            break;
  340|  60.8k|        }
  341|  60.7k|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 2, False: 60.7k]
  ------------------
  342|      2|            return unicode_errc::source_illegal;
  343|       |
  344|  60.7k|        return unicode_errc();
  345|  60.7k|    }

_ZN8jsoncons12from_integerIiNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS1_9enable_ifIXsr10ext_traits10is_integerIT_EE5valueEmE4typeES9_RT0_:
   42|  6.10k|{
   43|  6.10k|    using char_type = typename Result::value_type;
   44|       |
   45|  6.10k|    char_type buf[255];
   46|  6.10k|    char_type *p = buf;
   47|  6.10k|    const char_type* last = buf+255;
   48|       |
   49|  6.10k|    bool is_negative = value < 0;
   50|       |
   51|  6.10k|    if (value < 0)
  ------------------
  |  Branch (51:9): [True: 4.53k, False: 1.56k]
  ------------------
   52|  4.53k|    {
   53|  4.53k|        do
   54|  17.3k|        {
   55|  17.3k|            *p++ = static_cast<char_type>(48 - (value % 10));
   56|  17.3k|        }
   57|  17.3k|        while ((value /= 10) && (p < last));
  ------------------
  |  Branch (57:16): [True: 12.8k, False: 4.53k]
  |  Branch (57:33): [True: 12.8k, False: 0]
  ------------------
   58|  4.53k|    }
   59|  1.56k|    else
   60|  1.56k|    {
   61|       |
   62|  1.56k|        do
   63|  5.24k|        {
   64|  5.24k|            *p++ = static_cast<char_type>(48 + value % 10);
   65|  5.24k|        }
   66|  5.24k|        while ((value /= 10) && (p < last));
  ------------------
  |  Branch (66:16): [True: 3.67k, False: 1.56k]
  |  Branch (66:33): [True: 3.67k, False: 0]
  ------------------
   67|  1.56k|    }
   68|  6.10k|    JSONCONS_ASSERT(p != last);
  ------------------
  |  |   49|  6.10k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 6.10k]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
   69|       |
   70|  6.10k|    std::size_t count = (p - buf);
   71|  6.10k|    if (is_negative)
  ------------------
  |  Branch (71:9): [True: 4.53k, False: 1.56k]
  ------------------
   72|  4.53k|    {
   73|  4.53k|        result.push_back('-');
   74|  4.53k|        ++count;
   75|  4.53k|    }
   76|  28.7k|    while (--p >= buf)
  ------------------
  |  Branch (76:12): [True: 22.6k, False: 6.10k]
  ------------------
   77|  22.6k|    {
   78|  22.6k|        result.push_back(*p);
   79|  22.6k|    }
   80|       |
   81|  6.10k|    return count;
   82|  6.10k|}

_ZN8jsoncons4bson3TP1C2Ev:
   78|  8.83k|        constexpr TP1() : low(0), high(0) {}
_ZN8jsoncons4bson19decimal128_to_charsEPcS1_RKNS0_3TP1E:
  335|  8.83k|    {
  336|  8.83k|        static const std::string bson_decimal128_inf = "Infinity";
  337|  8.83k|        static const std::string bson_decimal128_nan = "NaN";
  338|       |
  339|  8.83k|        static constexpr uint32_t combination_mask = 0x1f;   /* Extract least significant 5 bits */
  340|  8.83k|        static constexpr uint32_t exponent_mask = 0x3fff;    /* Extract least significant 14 bits */
  341|  8.83k|        static constexpr uint32_t combination_infinity = 30; /* Value of combination field for Inf */
  342|  8.83k|        static constexpr uint32_t combination_nan = 31;      /* Value of combination field for NaN */
  343|  8.83k|        static constexpr uint32_t exponent_bias = 6176;      /* decimal128 exponent bias */
  344|       |
  345|  8.83k|        char* str_out = first;      /* output pointer in string */
  346|  8.83k|        char significand_str[35]; /* decoded significand digits */
  347|       |
  348|       |        /* Note: bits in this routine are referred to starting at 0, */
  349|       |        /* from the sign bit, towards the coefficient. */
  350|  8.83k|        uint32_t high;                   /* bits 0 - 31 */
  351|  8.83k|        uint32_t midh;                   /* bits 32 - 63 */
  352|  8.83k|        uint32_t midl;                   /* bits 64 - 95 */
  353|  8.83k|        uint32_t low;                    /* bits 96 - 127 */
  354|  8.83k|        uint32_t combination;            /* bits 1 - 5 */
  355|  8.83k|        uint32_t biased_exponent;        /* decoded biased exponent (14 bits) */
  356|  8.83k|        uint32_t significand_digits = 0; /* the number of significand digits */
  357|  8.83k|        uint32_t significand[36] = {0};  /* the base-10 digits in the significand */
  358|  8.83k|        uint32_t *significand_read = significand; /* read pointer into significand */
  359|  8.83k|        int32_t exponent;                         /* unbiased exponent */
  360|  8.83k|        int32_t scientific_exponent; /* the exponent if scientific notation is
  361|       |                                      * used */
  362|  8.83k|        bool is_zero = false;        /* true if the number is zero */
  363|       | 
  364|  8.83k|        uint8_t significand_msb; /* the most signifcant significand bits (50-46) */
  365|  8.83k|        bson_uint128_t
  366|  8.83k|           significand128; /* temporary storage for significand decoding */
  367|       | 
  368|  8.83k|        memset (significand_str, 0, sizeof (significand_str));
  369|       | 
  370|  8.83k|        if ((int64_t) dec.high < 0) { /* negative */
  ------------------
  |  Branch (370:13): [True: 3.00k, False: 5.83k]
  ------------------
  371|  3.00k|           *(str_out++) = '-';
  372|  3.00k|        }
  373|       | 
  374|  8.83k|        low = (uint32_t) dec.low, midl = (uint32_t) (dec.low >> 32),
  375|  8.83k|        midh = (uint32_t) dec.high, high = (uint32_t) (dec.high >> 32);
  376|       | 
  377|       |        /* Decode combination field and exponent */
  378|  8.83k|        combination = (high >> 26) & combination_mask;
  379|       | 
  380|  8.83k|        if (JSONCONS_UNLIKELY ((combination >> 3) == 3)) {
  ------------------
  |  |   78|  8.83k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1.93k, False: 6.90k]
  |  |  ------------------
  ------------------
  381|       |           /* Check for 'special' values */
  382|  1.93k|           if (combination == combination_infinity) { /* Infinity */
  ------------------
  |  Branch (382:16): [True: 376, False: 1.56k]
  ------------------
  383|    376|               if (last-str_out >= static_cast<ptrdiff_t >(bson_decimal128_inf.size())) 
  ------------------
  |  Branch (383:20): [True: 376, False: 0]
  ------------------
  384|    376|               {
  385|    376|                   std::memcpy(str_out, bson_decimal128_inf.data(), bson_decimal128_inf.size());
  386|    376|                   str_out += bson_decimal128_inf.size();
  387|    376|               }
  388|    376|               *str_out = 0;
  389|       |              //strcpy_s (str_out, last-str_out, bson_decimal128_inf.c_str());
  390|    376|              return decimal128_to_chars_result{str_out, std::errc{}};
  391|  1.56k|           } else if (combination == combination_nan) { /* NaN */
  ------------------
  |  Branch (391:23): [True: 585, False: 976]
  ------------------
  392|       |               /* first, not str_out, to erase the sign */
  393|    585|               str_out = first;
  394|    585|               if (last-str_out >= static_cast<ptrdiff_t >(bson_decimal128_nan.size())) 
  ------------------
  |  Branch (394:20): [True: 585, False: 0]
  ------------------
  395|    585|               {
  396|    585|                   std::memcpy(str_out, bson_decimal128_nan.data(), bson_decimal128_nan.size());
  397|    585|                   str_out += bson_decimal128_nan.size();
  398|    585|               }
  399|    585|               *str_out = 0;
  400|       |              //strcpy_s (first, last-first, bson_decimal128_nan.c_str());
  401|       |              /* we don't care about the NaN payload. */
  402|    585|               return decimal128_to_chars_result{str_out, std::errc{}};
  403|    976|           } else {
  404|    976|              biased_exponent = (high >> 15) & exponent_mask;
  405|    976|              significand_msb = 0x8 + ((high >> 14) & 0x1);
  406|    976|           }
  407|  6.90k|        } else {
  408|  6.90k|           significand_msb = (high >> 14) & 0x7;
  409|  6.90k|           biased_exponent = (high >> 17) & exponent_mask;
  410|  6.90k|        }
  411|       | 
  412|  7.87k|        exponent = biased_exponent - exponent_bias;
  413|       |        /* Create string of significand digits */
  414|       | 
  415|       |        /* Convert the 114-bit binary number represented by */
  416|       |        /* (high, midh, midl, low) to at most 34 decimal */
  417|       |        /* digits through modulo and division. */
  418|  7.87k|        significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
  419|  7.87k|        significand128.parts[1] = midh;
  420|  7.87k|        significand128.parts[2] = midl;
  421|  7.87k|        significand128.parts[3] = low;
  422|       | 
  423|  7.87k|        if (significand128.parts[0] == 0 && significand128.parts[1] == 0 &&
  ------------------
  |  Branch (423:13): [True: 2.90k, False: 4.97k]
  |  Branch (423:45): [True: 1.47k, False: 1.43k]
  ------------------
  424|  1.47k|            significand128.parts[2] == 0 && significand128.parts[3] == 0) {
  ------------------
  |  Branch (424:13): [True: 698, False: 777]
  |  Branch (424:45): [True: 197, False: 501]
  ------------------
  425|    197|           is_zero = true;
  426|  7.68k|        } else if (significand128.parts[0] >= (1 << 17)) {
  ------------------
  |  Branch (426:20): [True: 976, False: 6.70k]
  ------------------
  427|       |           /* The significand is non-canonical or zero.
  428|       |            * In order to preserve compatibility with the densely packed decimal
  429|       |            * format, the maximum value for the significand of decimal128 is
  430|       |            * 1e34 - 1.  If the value is greater than 1e34 - 1, the IEEE 754
  431|       |            * standard dictates that the significand is interpreted as zero.
  432|       |            */
  433|    976|           is_zero = true;
  434|  6.70k|        } else {
  435|  33.5k|           for (int k = 3; k >= 0; k--) {
  ------------------
  |  Branch (435:28): [True: 26.8k, False: 6.70k]
  ------------------
  436|  26.8k|              uint32_t least_digits = 0;
  437|  26.8k|              detail::bson_uint128_divide1B (
  438|  26.8k|                 significand128, &significand128, &least_digits);
  439|       | 
  440|       |              /* We now have the 9 least significant digits (in base 2). */
  441|       |              /* Convert and output to string. */
  442|  26.8k|              if (!least_digits) {
  ------------------
  |  Branch (442:19): [True: 2.62k, False: 24.1k]
  ------------------
  443|  2.62k|                 continue;
  444|  2.62k|              }
  445|       | 
  446|   241k|              for (int j = 8; j >= 0; j--) {
  ------------------
  |  Branch (446:31): [True: 217k, False: 24.1k]
  ------------------
  447|   217k|                 significand[k * 9 + j] = least_digits % 10;
  448|   217k|                 least_digits /= 10;
  449|   217k|              }
  450|  24.1k|           }
  451|  6.70k|        }
  452|       | 
  453|       |        /* Output format options: */
  454|       |        /* Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd */
  455|       |        /* Regular    - ddd.ddd */
  456|       | 
  457|  7.87k|        if (is_zero) {
  ------------------
  |  Branch (457:13): [True: 1.17k, False: 6.70k]
  ------------------
  458|  1.17k|           significand_digits = 1;
  459|  1.17k|           *significand_read = 0;
  460|  6.70k|        } else {
  461|  6.70k|           significand_digits = 36;
  462|  54.1k|           while (!(*significand_read)) {
  ------------------
  |  Branch (462:19): [True: 47.4k, False: 6.70k]
  ------------------
  463|  47.4k|              significand_digits--;
  464|  47.4k|              significand_read++;
  465|  47.4k|           }
  466|  6.70k|        }
  467|       | 
  468|  7.87k|        scientific_exponent = significand_digits - 1 + exponent;
  469|       | 
  470|       |        /* The scientific exponent checks are dictated by the string conversion
  471|       |         * specification and are somewhat arbitrary cutoffs.
  472|       |         *
  473|       |         * We must check exponent > 0, because if this is the case, the number
  474|       |         * has trailing zeros.  However, we *cannot* output these trailing zeros,
  475|       |         * because doing so would change the precision of the value, and would
  476|       |         * change stored data if the string converted number is round tripped.
  477|       |         */
  478|  7.87k|        if (scientific_exponent < -6 || exponent > 0) {
  ------------------
  |  Branch (478:13): [True: 4.53k, False: 3.34k]
  |  Branch (478:41): [True: 1.56k, False: 1.77k]
  ------------------
  479|       |           /* Scientific format */
  480|  6.10k|           *(str_out++) = char(*(significand_read++)) + '0';
  481|  6.10k|           significand_digits--;
  482|       | 
  483|  6.10k|           if (significand_digits) {
  ------------------
  |  Branch (483:16): [True: 5.21k, False: 883]
  ------------------
  484|  5.21k|              *(str_out++) = '.';
  485|  5.21k|           }
  486|       | 
  487|   152k|           for (std::size_t i = 0; i < significand_digits && (str_out - first) < 36; i++) {
  ------------------
  |  Branch (487:36): [True: 146k, False: 6.08k]
  |  Branch (487:62): [True: 146k, False: 18]
  ------------------
  488|   146k|              *(str_out++) = char(*(significand_read++)) + '0';
  489|   146k|           }
  490|       |           /* Exponent */
  491|  6.10k|           *(str_out++) = 'E';
  492|       |
  493|  6.10k|           std::string s;
  494|  6.10k|           if (scientific_exponent >= 0) {
  ------------------
  |  Branch (494:16): [True: 1.56k, False: 4.53k]
  ------------------
  495|  1.56k|               s.push_back('+');
  496|  1.56k|           }
  497|  6.10k|           jsoncons::from_integer(scientific_exponent, s);
  498|  6.10k|           if (str_out + s.size() < last) 
  ------------------
  |  Branch (498:16): [True: 5.54k, False: 559]
  ------------------
  499|  5.54k|           {
  500|  5.54k|               std::memcpy(str_out, s.data(), s.size());
  501|  5.54k|           }
  502|    559|           else
  503|    559|           {
  504|    559|               return decimal128_to_chars_result{str_out, std::errc::value_too_large};
  505|    559|           }
  506|  5.54k|           str_out += s.size();
  507|  5.54k|        } else {
  508|       |           /* Regular format with no decimal place */
  509|  1.77k|           if (exponent >= 0) {
  ------------------
  |  Branch (509:16): [True: 505, False: 1.27k]
  ------------------
  510|  3.91k|              for (std::size_t i = 0; i < significand_digits && (str_out - first) < 36; i++) {
  ------------------
  |  Branch (510:39): [True: 3.41k, False: 505]
  |  Branch (510:65): [True: 3.41k, False: 0]
  ------------------
  511|  3.41k|                 *(str_out++) = char(*(significand_read++)) + '0';
  512|  3.41k|              }
  513|  1.27k|           } else {
  514|  1.27k|              int32_t radix_position = significand_digits + exponent;
  515|       | 
  516|  1.27k|              if (radix_position > 0) { /* non-zero digits before radix */
  ------------------
  |  Branch (516:19): [True: 557, False: 715]
  ------------------
  517|    557|                 for (int32_t i = 0;
  518|  3.05k|                      i < radix_position && (str_out < last);
  ------------------
  |  Branch (518:23): [True: 2.49k, False: 557]
  |  Branch (518:45): [True: 2.49k, False: 0]
  ------------------
  519|  2.49k|                      i++) {
  520|  2.49k|                    *(str_out++) = char(*(significand_read++)) + '0';
  521|  2.49k|                 }
  522|    715|              } else { /* leading zero before radix point */
  523|    715|                 *(str_out++) = '0';
  524|    715|              }
  525|       | 
  526|  1.27k|              *(str_out++) = '.';
  527|  3.45k|              while (radix_position++ < 0) { /* add leading zeros after radix */
  ------------------
  |  Branch (527:22): [True: 2.17k, False: 1.27k]
  ------------------
  528|  2.17k|                 *(str_out++) = '0';
  529|  2.17k|              }
  530|       | 
  531|  1.27k|              for (std::size_t i = 0;
  532|  38.0k|                   (i < significand_digits - (std::max) (radix_position - 1, 0)) &&
  ------------------
  |  Branch (532:20): [True: 36.7k, False: 1.27k]
  |  Branch (532:20): [True: 36.7k, False: 1.27k]
  ------------------
  533|  36.7k|                   (str_out < last);
  ------------------
  |  Branch (533:20): [True: 36.7k, False: 0]
  ------------------
  534|  36.7k|                   i++) {
  535|  36.7k|                 *(str_out++) = char(*(significand_read++)) + '0';
  536|  36.7k|              }
  537|  1.27k|           }
  538|  1.77k|        }
  539|  7.31k|        return decimal128_to_chars_result{str_out, std::errc{}};
  540|  7.87k|    }
_ZN8jsoncons4bson6detail21bson_uint128_divide1BENS0_14bson_uint128_tEPS2_Pj:
  178|  26.8k|        {
  179|  26.8k|            static constexpr uint32_t DIVISOR = 1000 * 1000 * 1000;
  180|  26.8k|            uint64_t _rem = 0;
  181|  26.8k|            int i = 0;
  182|       |            
  183|  26.8k|            if (!value.parts[0] && !value.parts[1] && !value.parts[2] &&
  ------------------
  |  Branch (183:17): [True: 22.8k, False: 3.99k]
  |  Branch (183:36): [True: 16.9k, False: 5.84k]
  |  Branch (183:55): [True: 9.77k, False: 7.20k]
  ------------------
  184|  9.77k|                !value.parts[3]) {
  ------------------
  |  Branch (184:17): [True: 2.62k, False: 7.14k]
  ------------------
  185|  2.62k|               *quotient = value;
  186|  2.62k|               *rem = 0;
  187|  2.62k|               return;
  188|  2.62k|            }
  189|       |            
  190|   120k|            for (i = 0; i <= 3; i++) {
  ------------------
  |  Branch (190:25): [True: 96.7k, False: 24.1k]
  ------------------
  191|  96.7k|               _rem <<= 32; /* Adjust remainder to match value of next dividend */
  192|  96.7k|               _rem += value.parts[i]; /* Add the divided to _rem */
  193|  96.7k|               value.parts[i] = (uint32_t) (_rem / DIVISOR);
  194|  96.7k|               _rem %= DIVISOR; /* Store the remainder */
  195|  96.7k|            }
  196|       |            
  197|  24.1k|            *quotient = value;
  198|  24.1k|            *rem = (uint32_t) _rem;
  199|  24.1k|        }

_ZN8jsoncons4bson15make_error_codeENS0_9bson_errcE:
   91|  1.95k|{
   92|  1.95k|    return std::error_code(static_cast<int>(result),bson_error_category());
   93|  1.95k|}
_ZN8jsoncons4bson19bson_error_categoryEv:
   84|  1.95k|{
   85|  1.95k|  static bson_error_category_impl instance;
   86|  1.95k|  return instance;
   87|  1.95k|}

_ZN8jsoncons4bson5oid_tC2EPh:
   53|    599|        {
   54|    599|            std::memcpy(bytes_.data(),data,12);
   55|    599|        }
_ZN8jsoncons4bson9to_stringINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEvRKNS0_5oid_tERT_:
  236|    599|    {
  237|    599|        s.resize(24);
  238|    599|        detail::init_hex_char_pairs(oid, reinterpret_cast<uint16_t*>(&s[0]));
  239|    599|    }
_ZN8jsoncons4bson6detail19init_hex_char_pairsERKNS0_5oid_tEPt:
  213|    599|        {
  214|    599|            const uint8_t* bytes = oid.data();
  215|    599|            const uint16_t* gHexCharPairs = get_hex_char_pairs(std::integral_constant<bool, jsoncons::endian::native == jsoncons::endian::big>());
  216|       |
  217|    599|            data[0] = gHexCharPairs[bytes[0]];
  218|    599|            data[1] = gHexCharPairs[bytes[1]];
  219|    599|            data[2] = gHexCharPairs[bytes[2]];
  220|    599|            data[3] = gHexCharPairs[bytes[3]];
  221|    599|            data[4] = gHexCharPairs[bytes[4]];
  222|    599|            data[5] = gHexCharPairs[bytes[5]];
  223|    599|            data[6] = gHexCharPairs[bytes[6]];
  224|    599|            data[7] = gHexCharPairs[bytes[7]];
  225|    599|            data[8] = gHexCharPairs[bytes[8]];
  226|    599|            data[9] = gHexCharPairs[bytes[9]];
  227|    599|            data[10] = gHexCharPairs[bytes[10]];
  228|    599|            data[11] = gHexCharPairs[bytes[11]];
  229|    599|        }
_ZNK8jsoncons4bson5oid_t4dataEv:
   67|    599|        {
   68|    599|            return bytes_.data();
   69|    599|        }
_ZN8jsoncons4bson6detail18get_hex_char_pairsENSt3__117integral_constantIbLb0EEE:
  181|    599|        {
  182|    599|            static constexpr uint16_t hex_char_pairs[] = {
  183|    599|                12336, 12592, 12848, 13104, 13360, 13616, 13872, 14128, 14384, 14640, 24880,
  184|    599|                25136, 25392, 25648, 25904, 26160, 12337, 12593, 12849, 13105, 13361, 13617,
  185|    599|                13873, 14129, 14385, 14641, 24881, 25137, 25393, 25649, 25905, 26161, 12338,
  186|    599|                12594, 12850, 13106, 13362, 13618, 13874, 14130, 14386, 14642, 24882, 25138,
  187|    599|                25394, 25650, 25906, 26162, 12339, 12595, 12851, 13107, 13363, 13619, 13875,
  188|    599|                14131, 14387, 14643, 24883, 25139, 25395, 25651, 25907, 26163, 12340, 12596,
  189|    599|                12852, 13108, 13364, 13620, 13876, 14132, 14388, 14644, 24884, 25140, 25396,
  190|    599|                25652, 25908, 26164, 12341, 12597, 12853, 13109, 13365, 13621, 13877, 14133,
  191|    599|                14389, 14645, 24885, 25141, 25397, 25653, 25909, 26165, 12342, 12598, 12854,
  192|    599|                13110, 13366, 13622, 13878, 14134, 14390, 14646, 24886, 25142, 25398, 25654,
  193|    599|                25910, 26166, 12343, 12599, 12855, 13111, 13367, 13623, 13879, 14135, 14391,
  194|    599|                14647, 24887, 25143, 25399, 25655, 25911, 26167, 12344, 12600, 12856, 13112,
  195|    599|                13368, 13624, 13880, 14136, 14392, 14648, 24888, 25144, 25400, 25656, 25912,
  196|    599|                26168, 12345, 12601, 12857, 13113, 13369, 13625, 13881, 14137, 14393, 14649,
  197|    599|                24889, 25145, 25401, 25657, 25913, 26169, 12385, 12641, 12897, 13153, 13409,
  198|    599|                13665, 13921, 14177, 14433, 14689, 24929, 25185, 25441, 25697, 25953, 26209,
  199|    599|                12386, 12642, 12898, 13154, 13410, 13666, 13922, 14178, 14434, 14690, 24930,
  200|    599|                25186, 25442, 25698, 25954, 26210, 12387, 12643, 12899, 13155, 13411, 13667,
  201|    599|                13923, 14179, 14435, 14691, 24931, 25187, 25443, 25699, 25955, 26211, 12388,
  202|    599|                12644, 12900, 13156, 13412, 13668, 13924, 14180, 14436, 14692, 24932, 25188,
  203|    599|                25444, 25700, 25956, 26212, 12389, 12645, 12901, 13157, 13413, 13669, 13925,
  204|    599|                14181, 14437, 14693, 24933, 25189, 25445, 25701, 25957, 26213, 12390, 12646,
  205|    599|                12902, 13158, 13414, 13670, 13926, 14182, 14438, 14694, 24934, 25190, 25446,
  206|    599|                25702, 25958, 26214};
  207|       |
  208|    599|            return hex_char_pairs;
  209|    599|        }

_ZN8jsoncons4bson19bson_decode_optionsC1Ev:
   40|  1.90k|    bson_decode_options() = default;
_ZN8jsoncons4bson19bson_options_commonC2Ev:
   23|  1.90k|    bson_options_common() = default;
_ZN8jsoncons4bson19bson_options_commonD2Ev:
   25|  1.90k|    virtual ~bson_options_common() = default;
_ZNK8jsoncons4bson19bson_options_common17max_nesting_depthEv:
   31|  1.90k|    {
   32|  1.90k|        return max_nesting_depth_;
   33|  1.90k|    }

_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEEC2IRNS3_19basic_istringstreamIcNS3_11char_traitsIcEES7_EEEEOT_RKNS0_19bson_decode_optionsERKS7_:
   85|  1.90k|       : source_(std::forward<Sourceable>(source)), 
   86|  1.90k|         max_nesting_depth_(options.max_nesting_depth()),
   87|  1.90k|         bytes_buffer_(temp_alloc),
   88|  1.90k|         name_buffer_(temp_alloc),
   89|  1.90k|         text_buffer_(temp_alloc),
   90|  1.90k|         state_stack_(temp_alloc)
   91|  1.90k|    {
   92|  1.90k|        state_stack_.emplace_back(parse_mode::root,0,0);
   93|  1.90k|    }
_ZN8jsoncons4bson11parse_stateC2ENS0_10parse_modeEmmh:
   48|  39.9k|        : mode(mode_), length(length_), pos(pos_), type(type_)
   49|  39.9k|    {
   50|  39.9k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5resetEv:
  101|  1.90k|    {
  102|  1.90k|        more_ = true;
  103|  1.90k|        done_ = false;
  104|  1.90k|        bytes_buffer_.clear();
  105|  1.90k|        name_buffer_.clear();
  106|  1.90k|        text_buffer_.clear();
  107|  1.90k|        state_stack_.clear();
  108|  1.90k|        state_stack_.emplace_back(parse_mode::root,0,0);
  109|  1.90k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5parseERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  169|  1.90k|    {
  170|  1.90k|        if (JSONCONS_UNLIKELY(source_.is_error()))
  ------------------
  |  |   78|  1.90k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 1.90k]
  |  |  ------------------
  ------------------
  171|      0|        {
  172|      0|            ec = bson_errc::source_error;
  173|      0|            more_ = false;
  174|      0|            return;
  175|      0|        }
  176|       |        
  177|  83.6k|        while (!done_ && more_)
  ------------------
  |  Branch (177:16): [True: 83.6k, False: 8]
  |  Branch (177:26): [True: 82.4k, False: 1.19k]
  ------------------
  178|  82.4k|        {
  179|  82.4k|            switch (state_stack_.back().mode)
  ------------------
  |  Branch (179:21): [True: 82.4k, False: 0]
  ------------------
  180|  82.4k|            {
  181|  1.90k|                case parse_mode::root:
  ------------------
  |  Branch (181:17): [True: 1.90k, False: 80.5k]
  ------------------
  182|  1.90k|                    state_stack_.back().mode = parse_mode::accept;
  183|  1.90k|                    begin_document(visitor, ec);
  184|  1.90k|                    break;
  185|  19.3k|                case parse_mode::document:
  ------------------
  |  Branch (185:17): [True: 19.3k, False: 63.1k]
  ------------------
  186|  19.3k|                {
  187|  19.3k|                    uint8_t type;
  188|  19.3k|                    std::size_t n = source_.read(&type, 1);
  189|  19.3k|                    state_stack_.back().pos += n;
  190|  19.3k|                    if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  19.3k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 660, False: 18.7k]
  |  |  ------------------
  ------------------
  191|    660|                    {
  192|    660|                        ec = bson_errc::unexpected_eof;
  193|    660|                        more_ = false;
  194|    660|                        return;
  195|    660|                    }
  196|  18.7k|                    if (type != 0x00)
  ------------------
  |  Branch (196:25): [True: 18.1k, False: 568]
  ------------------
  197|  18.1k|                    {
  198|  18.1k|                        read_e_name(visitor,jsoncons::bson::bson_container_type::document,ec);
  199|  18.1k|                        state_stack_.back().mode = parse_mode::value;
  200|  18.1k|                        state_stack_.back().type = type;
  201|  18.1k|                    }
  202|    568|                    else
  203|    568|                    {
  204|    568|                        end_document(visitor,ec);
  205|    568|                    }
  206|  18.7k|                    break;
  207|  19.3k|                }
  208|  43.3k|                case parse_mode::array:
  ------------------
  |  Branch (208:17): [True: 43.3k, False: 39.1k]
  ------------------
  209|  43.3k|                {
  210|  43.3k|                    uint8_t type;
  211|  43.3k|                    std::size_t n = source_.read(&type, 1);
  212|  43.3k|                    state_stack_.back().pos += n;
  213|  43.3k|                    if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  43.3k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 45, False: 43.2k]
  |  |  ------------------
  ------------------
  214|     45|                    {
  215|     45|                        ec = bson_errc::unexpected_eof;
  216|     45|                        more_ = false;
  217|     45|                        return;
  218|     45|                    }
  219|  43.2k|                    if (type != 0x00)
  ------------------
  |  Branch (219:25): [True: 42.5k, False: 766]
  ------------------
  220|  42.5k|                    {
  221|  42.5k|                        read_e_name(visitor,jsoncons::bson::bson_container_type::array,ec);
  222|  42.5k|                        read_value(visitor, type, ec);
  223|  42.5k|                    }
  224|    766|                    else
  225|    766|                    {
  226|    766|                        end_array(visitor,ec);
  227|    766|                    }
  228|  43.2k|                    break;
  229|  43.3k|                }
  230|  17.8k|                case parse_mode::value:
  ------------------
  |  Branch (230:17): [True: 17.8k, False: 64.6k]
  ------------------
  231|  17.8k|                    state_stack_.back().mode = parse_mode::document;
  232|  17.8k|                    read_value(visitor,state_stack_.back().type,ec);
  233|  17.8k|                    break;
  234|      8|                case parse_mode::accept:
  ------------------
  |  Branch (234:17): [True: 8, False: 82.4k]
  ------------------
  235|      8|                {
  236|      8|                    JSONCONS_ASSERT(state_stack_.size() == 1);
  ------------------
  |  |   49|      8|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 8]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  237|      8|                    state_stack_.clear();
  238|      8|                    more_ = false;
  239|      8|                    done_ = true;
  240|      8|                    visitor.flush();
  241|      8|                    break;
  242|      8|                }
  243|  82.4k|            }
  244|  82.4k|        }
  245|  1.90k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE14begin_documentERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  250|  4.58k|    {
  251|  4.58k|        if (JSONCONS_UNLIKELY(static_cast<int>(state_stack_.size()) > max_nesting_depth_))
  ------------------
  |  |   78|  4.58k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2, False: 4.58k]
  |  |  ------------------
  ------------------
  252|      2|        {
  253|      2|            ec = bson_errc::max_nesting_depth_exceeded;
  254|      2|            more_ = false;
  255|      2|            return;
  256|      2|        } 
  257|       |
  258|  4.58k|        uint8_t buf[sizeof(int32_t)]; 
  259|  4.58k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  260|  4.58k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  4.58k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 34, False: 4.54k]
  |  |  ------------------
  ------------------
  261|     34|        {
  262|     34|            ec = bson_errc::unexpected_eof;
  263|     34|            more_ = false;
  264|     34|            return;
  265|     34|        }
  266|       |
  267|  4.54k|        auto length = binary::little_to_native<int32_t>(buf, sizeof(buf));
  268|       |
  269|  4.54k|        visitor.begin_object(semantic_tag::none, *this, ec);
  270|  4.54k|        more_ = !cursor_mode_;
  271|  4.54k|        state_stack_.emplace_back(parse_mode::document,length,n);
  272|  4.54k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11read_e_nameERNS_18basic_json_visitorIcEENS0_19bson_container_typeERNS3_10error_codeE:
  344|  60.6k|    {
  345|  60.6k|        name_buffer_.clear();
  346|  60.6k|        read_cstring(name_buffer_, ec);
  347|  60.6k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  60.6k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 108, False: 60.5k]
  |  |  ------------------
  ------------------
  348|    108|        {
  349|    108|            return;
  350|    108|        }
  351|  60.5k|        if (type == jsoncons::bson::bson_container_type::document)
  ------------------
  |  Branch (351:13): [True: 18.0k, False: 42.4k]
  ------------------
  352|  18.0k|        {
  353|  18.0k|            auto result = unicode_traits::validate(name_buffer_.data(),name_buffer_.size());
  354|  18.0k|            if (JSONCONS_UNLIKELY(result.ec != unicode_traits::unicode_errc()))
  ------------------
  |  |   78|  18.0k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 206, False: 17.8k]
  |  |  ------------------
  ------------------
  355|    206|            {
  356|    206|                ec = bson_errc::invalid_utf8_text_string;
  357|    206|                more_ = false;
  358|    206|                return;
  359|    206|            }
  360|  17.8k|            visitor.key(jsoncons::basic_string_view<char>(name_buffer_.data(),name_buffer_.length()), *this, ec);
  361|  17.8k|            more_ = !cursor_mode_;
  362|  17.8k|        }
  363|  60.5k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE12read_cstringERNS3_12basic_stringIcNS3_11char_traitsIcEES7_EERNS3_10error_codeE:
  641|  62.8k|    {
  642|  62.8k|        uint8_t c = 0xff;
  643|  8.59M|        while (true)
  ------------------
  |  Branch (643:16): [True: 8.59M, Folded]
  ------------------
  644|  8.59M|        {
  645|  8.59M|            std::size_t n = source_.read(&c, 1);
  646|  8.59M|            state_stack_.back().pos += n;
  647|  8.59M|            if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  8.59M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 161, False: 8.59M]
  |  |  ------------------
  ------------------
  648|    161|            {
  649|    161|                ec = bson_errc::unexpected_eof;
  650|    161|                more_ = false;
  651|    161|                return;
  652|    161|            }
  653|  8.59M|            if (c == 0)
  ------------------
  |  Branch (653:17): [True: 62.6k, False: 8.53M]
  ------------------
  654|  62.6k|            {
  655|  62.6k|                break;
  656|  62.6k|            }
  657|  8.53M|            buffer.push_back(c);
  658|  8.53M|        }
  659|  62.8k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE12end_documentERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  275|    568|    {
  276|    568|        JSONCONS_ASSERT(state_stack_.size() >= 2);
  ------------------
  |  |   49|    568|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 568]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  277|       |
  278|    568|        visitor.end_object(*this,ec);
  279|    568|        more_ = !cursor_mode_;
  280|    568|        if (level() == mark_level_)
  ------------------
  |  Branch (280:13): [True: 0, False: 568]
  ------------------
  281|      0|        {
  282|      0|            more_ = false;
  283|      0|        }
  284|    568|        if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
  ------------------
  |  |   78|    568|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 109, False: 459]
  |  |  ------------------
  ------------------
  285|    109|        {
  286|    109|            ec = bson_errc::size_mismatch;
  287|    109|            more_ = false;
  288|    109|            return;
  289|    109|        }
  290|    459|        std::size_t pos = state_stack_.back().pos;
  291|    459|        state_stack_.pop_back();
  292|    459|        state_stack_.back().pos += pos;
  293|    459|    }
_ZNK8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5levelEv:
  124|  1.33k|    {
  125|  1.33k|        return static_cast<int>(state_stack_.size());
  126|  1.33k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE10read_valueERNS_18basic_json_visitorIcEEhRNS3_10error_codeE:
  366|  60.4k|    {
  367|  60.4k|        switch (type)
  368|  60.4k|        {
  369|    607|            case jsoncons::bson::bson_type::double_type:
  ------------------
  |  Branch (369:13): [True: 607, False: 59.7k]
  ------------------
  370|    607|            {
  371|    607|                uint8_t buf[sizeof(double)]; 
  372|    607|                std::size_t n = source_.read(buf, sizeof(double));
  373|    607|                state_stack_.back().pos += n;
  374|    607|                if (JSONCONS_UNLIKELY(n != sizeof(double)))
  ------------------
  |  |   78|    607|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 5, False: 602]
  |  |  ------------------
  ------------------
  375|      5|                {
  376|      5|                    ec = bson_errc::unexpected_eof;
  377|      5|                    more_ = false;
  378|      5|                    return;
  379|      5|                }
  380|    602|                double res = binary::little_to_native<double>(buf, sizeof(buf));
  381|    602|                visitor.double_value(res, semantic_tag::none, *this, ec);
  382|    602|                more_ = !cursor_mode_;
  383|    602|                break;
  384|    607|            }
  385|    751|            case jsoncons::bson::bson_type::symbol_type:
  ------------------
  |  Branch (385:13): [True: 751, False: 59.6k]
  ------------------
  386|  1.49k|            case jsoncons::bson::bson_type::min_key_type:
  ------------------
  |  Branch (386:13): [True: 743, False: 59.6k]
  ------------------
  387|  5.06k|            case jsoncons::bson::bson_type::max_key_type:
  ------------------
  |  Branch (387:13): [True: 3.57k, False: 56.8k]
  ------------------
  388|  5.59k|            case jsoncons::bson::bson_type::string_type:
  ------------------
  |  Branch (388:13): [True: 529, False: 59.8k]
  ------------------
  389|  5.59k|            {
  390|  5.59k|                auto sv = read_string(ec);
  391|  5.59k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  5.59k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 210, False: 5.38k]
  |  |  ------------------
  ------------------
  392|    210|                {
  393|    210|                    return;
  394|    210|                }
  395|  5.38k|                auto result = unicode_traits::validate(sv.data(), sv.size());
  396|  5.38k|                if (JSONCONS_UNLIKELY(result.ec != unicode_traits::unicode_errc()))
  ------------------
  |  |   78|  5.38k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 11, False: 5.37k]
  |  |  ------------------
  ------------------
  397|     11|                {
  398|     11|                    ec = bson_errc::invalid_utf8_text_string;
  399|     11|                    more_ = false;
  400|     11|                    return;
  401|     11|                }
  402|  5.37k|                visitor.string_value(sv, semantic_tag::none, *this, ec);
  403|  5.37k|                more_ = !cursor_mode_;
  404|  5.37k|                break;
  405|  5.38k|            }
  406|  1.11k|            case jsoncons::bson::bson_type::javascript_type:
  ------------------
  |  Branch (406:13): [True: 1.11k, False: 59.2k]
  ------------------
  407|  1.11k|            {
  408|  1.11k|                auto sv = read_string(ec);
  409|  1.11k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.11k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 46, False: 1.06k]
  |  |  ------------------
  ------------------
  410|     46|                {
  411|     46|                    return;
  412|     46|                }
  413|  1.06k|                auto result = unicode_traits::validate(sv.data(), sv.size());
  414|  1.06k|                if (JSONCONS_UNLIKELY(result.ec != unicode_traits::unicode_errc()))
  ------------------
  |  |   78|  1.06k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 10, False: 1.05k]
  |  |  ------------------
  ------------------
  415|     10|                {
  416|     10|                    ec = bson_errc::invalid_utf8_text_string;
  417|     10|                    more_ = false;
  418|     10|                    return;
  419|     10|                }
  420|  1.05k|                visitor.string_value(sv, semantic_tag::code, *this, ec);
  421|  1.05k|                more_ = !cursor_mode_;
  422|  1.05k|                break;
  423|  1.06k|            }
  424|  1.09k|            case jsoncons::bson::bson_type::regex_type:
  ------------------
  |  Branch (424:13): [True: 1.09k, False: 59.3k]
  ------------------
  425|  1.09k|            {
  426|  1.09k|                text_buffer_.clear();
  427|  1.09k|                text_buffer_.push_back('/');
  428|  1.09k|                read_cstring(text_buffer_, ec);
  429|  1.09k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.09k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 31, False: 1.06k]
  |  |  ------------------
  ------------------
  430|     31|                {
  431|     31|                    return;
  432|     31|                }
  433|  1.06k|                text_buffer_.push_back('/');
  434|  1.06k|                read_cstring(text_buffer_, ec);
  435|  1.06k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.06k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 22, False: 1.04k]
  |  |  ------------------
  ------------------
  436|     22|                {
  437|     22|                    return;
  438|     22|                }
  439|  1.04k|                visitor.string_value(text_buffer_, semantic_tag::regex, *this, ec);
  440|  1.04k|                more_ = !cursor_mode_;
  441|  1.04k|                break;
  442|  1.06k|            }
  443|  2.68k|            case jsoncons::bson::bson_type::document_type: 
  ------------------
  |  Branch (443:13): [True: 2.68k, False: 57.7k]
  ------------------
  444|  2.68k|            {
  445|  2.68k|                begin_document(visitor,ec);
  446|  2.68k|                break;
  447|  1.06k|            }
  448|       |
  449|  31.6k|            case jsoncons::bson::bson_type::array_type: 
  ------------------
  |  Branch (449:13): [True: 31.6k, False: 28.7k]
  ------------------
  450|  31.6k|            {
  451|  31.6k|                begin_array(visitor,ec);
  452|  31.6k|                break;
  453|  1.06k|            }
  454|  1.30k|            case jsoncons::bson::bson_type::undefined_type: 
  ------------------
  |  Branch (454:13): [True: 1.30k, False: 59.0k]
  ------------------
  455|  1.30k|                {
  456|  1.30k|                    visitor.null_value(semantic_tag::undefined, *this, ec);
  457|  1.30k|                    more_ = !cursor_mode_;
  458|  1.30k|                    break;
  459|  1.06k|                }
  460|  1.04k|            case jsoncons::bson::bson_type::null_type: 
  ------------------
  |  Branch (460:13): [True: 1.04k, False: 59.3k]
  ------------------
  461|  1.04k|            {
  462|  1.04k|                visitor.null_value(semantic_tag::none, *this, ec);
  463|  1.04k|                more_ = !cursor_mode_;
  464|  1.04k|                break;
  465|  1.06k|            }
  466|  1.08k|            case jsoncons::bson::bson_type::bool_type:
  ------------------
  |  Branch (466:13): [True: 1.08k, False: 59.3k]
  ------------------
  467|  1.08k|            {
  468|  1.08k|                uint8_t c;
  469|  1.08k|                std::size_t n = source_.read(&c, 1);
  470|  1.08k|                state_stack_.back().pos += n;
  471|  1.08k|                if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  1.08k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 6, False: 1.08k]
  |  |  ------------------
  ------------------
  472|      6|                {
  473|      6|                    ec = bson_errc::unexpected_eof;
  474|      6|                    more_ = false;
  475|      6|                    return;
  476|      6|                }
  477|  1.08k|                visitor.bool_value(c != 0, semantic_tag::none, *this, ec);
  478|  1.08k|                more_ = !cursor_mode_;
  479|  1.08k|                break;
  480|  1.08k|            }
  481|    541|            case jsoncons::bson::bson_type::int32_type: 
  ------------------
  |  Branch (481:13): [True: 541, False: 59.8k]
  ------------------
  482|    541|            {
  483|    541|                uint8_t buf[sizeof(int32_t)]; 
  484|    541|                std::size_t n = source_.read(buf, sizeof(int32_t));
  485|    541|                state_stack_.back().pos += n;
  486|    541|                if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|    541|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 4, False: 537]
  |  |  ------------------
  ------------------
  487|      4|                {
  488|      4|                    ec = bson_errc::unexpected_eof;
  489|      4|                    more_ = false;
  490|      4|                    return;
  491|      4|                }
  492|    537|                auto val = binary::little_to_native<int32_t>(buf, sizeof(buf));
  493|    537|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  494|    537|                more_ = !cursor_mode_;
  495|    537|                break;
  496|    541|            }
  497|       |
  498|    376|            case jsoncons::bson::bson_type::timestamp_type: 
  ------------------
  |  Branch (498:13): [True: 376, False: 60.0k]
  ------------------
  499|    376|            {
  500|    376|                uint8_t buf[sizeof(uint64_t)]; 
  501|    376|                std::size_t n = source_.read(buf, sizeof(uint64_t));
  502|    376|                state_stack_.back().pos += n;
  503|    376|                if (JSONCONS_UNLIKELY(n != sizeof(uint64_t)))
  ------------------
  |  |   78|    376|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 367]
  |  |  ------------------
  ------------------
  504|      9|                {
  505|      9|                    ec = bson_errc::unexpected_eof;
  506|      9|                    more_ = false;
  507|      9|                    return;
  508|      9|                }
  509|    367|                auto val = binary::little_to_native<uint64_t>(buf, sizeof(buf));
  510|    367|                visitor.uint64_value(val, semantic_tag::none, *this, ec);
  511|    367|                more_ = !cursor_mode_;
  512|    367|                break;
  513|    376|            }
  514|       |
  515|    971|            case jsoncons::bson::bson_type::int64_type: 
  ------------------
  |  Branch (515:13): [True: 971, False: 59.4k]
  ------------------
  516|    971|            {
  517|    971|                uint8_t buf[sizeof(int64_t)]; 
  518|    971|                std::size_t n = source_.read(buf, sizeof(int64_t));
  519|    971|                state_stack_.back().pos += n;
  520|    971|                if (JSONCONS_UNLIKELY(n != sizeof(int64_t)))
  ------------------
  |  |   78|    971|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 5, False: 966]
  |  |  ------------------
  ------------------
  521|      5|                {
  522|      5|                    ec = bson_errc::unexpected_eof;
  523|      5|                    more_ = false;
  524|      5|                    return;
  525|      5|                }
  526|    966|                auto val = binary::little_to_native<int64_t>(buf, sizeof(buf));
  527|    966|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  528|    966|                more_ = !cursor_mode_;
  529|    966|                break;
  530|    971|            }
  531|       |
  532|    205|            case jsoncons::bson::bson_type::datetime_type: 
  ------------------
  |  Branch (532:13): [True: 205, False: 60.1k]
  ------------------
  533|    205|            {
  534|    205|                uint8_t buf[sizeof(int64_t)]; 
  535|    205|                std::size_t n = source_.read(buf, sizeof(int64_t));
  536|    205|                state_stack_.back().pos += n;
  537|    205|                if (JSONCONS_UNLIKELY(n != sizeof(int64_t)))
  ------------------
  |  |   78|    205|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 6, False: 199]
  |  |  ------------------
  ------------------
  538|      6|                {
  539|      6|                    ec = bson_errc::unexpected_eof;
  540|      6|                    more_ = false;
  541|      6|                    return;
  542|      6|                }
  543|    199|                auto val = binary::little_to_native<int64_t>(buf, sizeof(buf));
  544|    199|                visitor.int64_value(val, semantic_tag::epoch_milli, *this, ec);
  545|    199|                more_ = !cursor_mode_;
  546|    199|                break;
  547|    205|            }
  548|  2.62k|            case jsoncons::bson::bson_type::binary_type: 
  ------------------
  |  Branch (548:13): [True: 2.62k, False: 57.7k]
  ------------------
  549|  2.62k|            {
  550|  2.62k|                uint8_t buf[sizeof(int32_t)]; 
  551|  2.62k|                std::size_t n = source_.read(buf, sizeof(int32_t));
  552|  2.62k|                state_stack_.back().pos += n;
  553|  2.62k|                if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  2.62k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 8, False: 2.61k]
  |  |  ------------------
  ------------------
  554|      8|                {
  555|      8|                    ec = bson_errc::unexpected_eof;
  556|      8|                    more_ = false;
  557|      8|                    return;
  558|      8|                }
  559|  2.61k|                const auto len = binary::little_to_native<int32_t>(buf, sizeof(buf));
  560|  2.61k|                if (JSONCONS_UNLIKELY(len < 0))
  ------------------
  |  |   78|  2.61k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 38, False: 2.57k]
  |  |  ------------------
  ------------------
  561|     38|                {
  562|     38|                    ec = bson_errc::length_is_negative;
  563|     38|                    more_ = false;
  564|     38|                    return;
  565|     38|                }
  566|  2.57k|                uint8_t subtype;
  567|  2.57k|                n = source_.read(&subtype, 1);
  568|  2.57k|                state_stack_.back().pos += n;
  569|  2.57k|                if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  2.57k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 2.56k]
  |  |  ------------------
  ------------------
  570|      9|                {
  571|      9|                    ec = bson_errc::unexpected_eof;
  572|      9|                    more_ = false;
  573|      9|                    return;
  574|      9|                }
  575|       |
  576|  2.56k|                auto data = source_.read_span(len, bytes_buffer_);
  577|  2.56k|                if (JSONCONS_UNLIKELY(data.size() != static_cast<std::size_t>(len)))
  ------------------
  |  |   78|  2.56k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 130, False: 2.43k]
  |  |  ------------------
  ------------------
  578|    130|                {
  579|    130|                    ec = bson_errc::unexpected_eof;
  580|    130|                    more_ = false;
  581|    130|                    return;
  582|    130|                }
  583|  2.43k|                state_stack_.back().pos += data.size();
  584|       |
  585|  2.43k|                visitor.byte_string_value(byte_string_view(data.data(), data.size()), subtype, *this, ec);
  586|  2.43k|                more_ = !cursor_mode_;
  587|  2.43k|                break;
  588|  2.56k|            }
  589|  8.85k|            case jsoncons::bson::bson_type::decimal128_type: 
  ------------------
  |  Branch (589:13): [True: 8.85k, False: 51.5k]
  ------------------
  590|  8.85k|            {
  591|  8.85k|                uint8_t buf[sizeof(uint64_t)*2]; 
  592|  8.85k|                std::size_t n = source_.read(buf, sizeof(buf));
  593|  8.85k|                state_stack_.back().pos += n;
  594|  8.85k|                if (JSONCONS_UNLIKELY(n != sizeof(buf)))
  ------------------
  |  |   78|  8.85k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 17, False: 8.83k]
  |  |  ------------------
  ------------------
  595|     17|                {
  596|     17|                    ec = bson_errc::unexpected_eof;
  597|     17|                    more_ = false;
  598|     17|                    return;
  599|     17|                }
  600|       |
  601|  8.83k|                decimal128_t dec;
  602|  8.83k|                dec.low = binary::little_to_native<uint64_t>(buf, sizeof(uint64_t));
  603|  8.83k|                dec.high = binary::little_to_native<uint64_t>(buf+sizeof(uint64_t), sizeof(uint64_t));
  604|       |
  605|  8.83k|                text_buffer_.clear();
  606|  8.83k|                text_buffer_.resize(bson::decimal128_limits::buf_size);
  607|  8.83k|                auto r = bson::decimal128_to_chars(&text_buffer_[0], &text_buffer_[0]+text_buffer_.size(), dec);
  608|  8.83k|                visitor.string_value(string_view(text_buffer_.data(),static_cast<std::size_t>(r.ptr-text_buffer_.data())), semantic_tag::float128, *this, ec);
  609|  8.83k|                more_ = !cursor_mode_;
  610|  8.83k|                break;
  611|  8.85k|            }
  612|    606|            case jsoncons::bson::bson_type::object_id_type: 
  ------------------
  |  Branch (612:13): [True: 606, False: 59.7k]
  ------------------
  613|    606|            {
  614|    606|                uint8_t buf[12]; 
  615|    606|                std::size_t n = source_.read(buf, sizeof(buf));
  616|    606|                state_stack_.back().pos += n;
  617|    606|                if (JSONCONS_UNLIKELY(n != sizeof(buf)))
  ------------------
  |  |   78|    606|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 7, False: 599]
  |  |  ------------------
  ------------------
  618|      7|                {
  619|      7|                    ec = bson_errc::unexpected_eof;
  620|      7|                    more_ = false;
  621|      7|                    return;
  622|      7|                }
  623|       |
  624|    599|                oid_t oid(buf);
  625|    599|                to_string(oid, text_buffer_);
  626|       |
  627|    599|                visitor.string_value(text_buffer_, semantic_tag::id, *this, ec);
  628|    599|                more_ = !cursor_mode_;
  629|    599|                break;
  630|    606|            }
  631|     85|            default:
  ------------------
  |  Branch (631:13): [True: 85, False: 60.3k]
  ------------------
  632|     85|            {
  633|     85|                ec = bson_errc::unknown_type;
  634|     85|                more_ = false;
  635|     85|                return;
  636|    606|            }
  637|  60.4k|        }
  638|  60.4k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11read_stringERNS3_10error_codeE:
  662|  6.70k|    {
  663|  6.70k|        std::size_t offset = 0;
  664|       |
  665|  6.70k|        uint8_t buf[sizeof(int32_t)]; 
  666|  6.70k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  667|  6.70k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  6.70k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 71, False: 6.63k]
  |  |  ------------------
  ------------------
  668|     71|        {
  669|     71|            ec = bson_errc::unexpected_eof;
  670|     71|            more_ = false;
  671|     71|            return string_view{};
  672|     71|        }
  673|  6.63k|        offset += n;
  674|       |
  675|  6.63k|        auto len = binary::little_to_native<int32_t>(buf, sizeof(buf));
  676|  6.63k|        if (JSONCONS_UNLIKELY(len < 1))
  ------------------
  |  |   78|  6.63k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 36, False: 6.60k]
  |  |  ------------------
  ------------------
  677|     36|        {
  678|     36|            ec = bson_errc::string_length_is_non_positive;
  679|     36|            more_ = false;
  680|     36|            return string_view{};
  681|     36|        }
  682|       |
  683|  6.60k|        std::size_t size = static_cast<std::size_t>(len) - static_cast<std::size_t>(1);
  684|  6.60k|        auto data = source_.read_span(size, text_buffer_);
  685|  6.60k|        if (JSONCONS_UNLIKELY(data.size() != size))
  ------------------
  |  |   78|  6.60k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 103, False: 6.49k]
  |  |  ------------------
  ------------------
  686|    103|        {
  687|    103|            ec = bson_errc::unexpected_eof;
  688|    103|            more_ = false;
  689|    103|            return string_view{};
  690|    103|        }
  691|  6.49k|        offset += data.size();
  692|       |
  693|  6.49k|        uint8_t c;
  694|  6.49k|        if (JSONCONS_UNLIKELY(source_.read(&c, 1) != 1))
  ------------------
  |  |   78|  6.49k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 46, False: 6.45k]
  |  |  ------------------
  ------------------
  695|     46|        {
  696|     46|            ec = bson_errc::unexpected_eof;
  697|     46|            more_ = false;
  698|     46|            return string_view{};
  699|     46|        }
  700|  6.45k|        ++offset;
  701|       |
  702|  6.45k|        state_stack_.back().pos += offset;
  703|  6.45k|        return string_view{reinterpret_cast<const char*>(data.data()), data.size()};
  704|  6.49k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11begin_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  296|  31.6k|    {
  297|  31.6k|        if (JSONCONS_UNLIKELY(static_cast<int>(state_stack_.size()) > max_nesting_depth_))
  ------------------
  |  |   78|  31.6k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 31.6k]
  |  |  ------------------
  ------------------
  298|      1|        {
  299|      1|            ec = bson_errc::max_nesting_depth_exceeded;
  300|      1|            more_ = false;
  301|      1|            return;
  302|      1|        } 
  303|  31.6k|        uint8_t buf[sizeof(int32_t)]; 
  304|  31.6k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  305|  31.6k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  31.6k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 25, False: 31.5k]
  |  |  ------------------
  ------------------
  306|     25|        {
  307|     25|            ec = bson_errc::unexpected_eof;
  308|     25|            more_ = false;
  309|     25|            return;
  310|     25|        }
  311|  31.5k|        auto length = binary::little_to_native<int32_t>(buf, sizeof(buf));
  312|       |
  313|  31.5k|        visitor.begin_array(semantic_tag::none, *this, ec);
  314|  31.5k|        more_ = !cursor_mode_;
  315|  31.5k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  31.5k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 31.5k]
  |  |  ------------------
  ------------------
  316|      0|        {
  317|      0|            return;
  318|      0|        }
  319|  31.5k|        state_stack_.emplace_back(parse_mode::array, length, n);
  320|  31.5k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE9end_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  323|    766|    {
  324|    766|        JSONCONS_ASSERT(state_stack_.size() >= 2);
  ------------------
  |  |   49|    766|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 766]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  325|       |
  326|    766|        visitor.end_array(*this, ec);
  327|    766|        more_ = !cursor_mode_;
  328|    766|        if (level() == mark_level_)
  ------------------
  |  Branch (328:13): [True: 0, False: 766]
  ------------------
  329|      0|        {
  330|      0|            more_ = false;
  331|      0|        }
  332|    766|        if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
  ------------------
  |  |   78|    766|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 103, False: 663]
  |  |  ------------------
  ------------------
  333|    103|        {
  334|    103|            ec = bson_errc::size_mismatch;
  335|    103|            more_ = false;
  336|    103|            return;
  337|    103|        }
  338|    663|        std::size_t pos = state_stack_.back().pos;
  339|    663|        state_stack_.pop_back();
  340|    663|        state_stack_.back().pos += pos;
  341|    663|    }

_ZN8jsoncons4bson17basic_bson_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEEC2IRNS3_19basic_istringstreamIcNS3_11char_traitsIcEES7_EEEEOT_RNS_18basic_json_visitorIcEERKNS0_19bson_decode_optionsERKS7_:
   46|  1.90k|       : parser_(std::forward<Sourceable>(source), options, temp_alloc),
   47|  1.90k|         visitor_(visitor)
   48|  1.90k|    {
   49|  1.90k|    }
_ZN8jsoncons4bson17basic_bson_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE4readERNS3_10error_codeE:
   62|  1.90k|    {
   63|  1.90k|        parser_.reset();
   64|  1.90k|        parser_.parse(visitor_, ec);
   65|  1.90k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.90k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1.89k, False: 8]
  |  |  ------------------
  ------------------
   66|  1.89k|        {
   67|  1.89k|            return;
   68|  1.89k|        }
   69|  1.90k|    }

