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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|   276k|        {
  117|   276k|            return size_;
  118|   276k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|  2.80k|        {
   59|  2.80k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|  89.7k|            : data_(data), size_(size)
   62|  89.7k|        {
   63|  89.7k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  91.8k|        {
  112|  91.8k|            return data_;
  113|  91.8k|        }

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|  2.03k|    {
  194|  2.03k|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 2.03k, False: 0]
  ------------------
  195|  2.03k|        {
  196|  2.03k|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|  2.03k|        }
  198|  2.03k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|  2.03k|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|  2.03k|          chunk_size_(default_max_chunk_size)
  178|  2.03k|    {
  179|  2.03k|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|  2.03k|        data_end_ = chunk_;
  181|  2.03k|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|  2.03k|      : std::basic_istream<CharT>(&nb_)
   58|  2.03k|    {
   59|  2.03k|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|  2.03k|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  2.03k|    {
  277|  2.03k|        return stream_ptr_->bad();  
  278|  2.03k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  377|  12.4M|    {
  378|  12.4M|        std::size_t len = 0;
  379|  12.4M|        if (remaining_ > 0)
  ------------------
  |  Branch (379:13): [True: 12.4M, False: 3.38k]
  ------------------
  380|  12.4M|        {
  381|  12.4M|            len = (std::min)(remaining_, length);
  382|  12.4M|            std::memcpy(p, data_end_, len*sizeof(value_type));
  383|  12.4M|            data_end_ += len;
  384|  12.4M|            remaining_ -= len;
  385|  12.4M|            position_ += len;
  386|  12.4M|        }
  387|  12.4M|        if (length - len == 0)
  ------------------
  |  Branch (387:13): [True: 12.4M, False: 5.70k]
  ------------------
  388|  12.4M|        {
  389|  12.4M|            return len;
  390|  12.4M|        }
  391|  5.70k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (391:18): [True: 5.70k, False: 0]
  ------------------
  392|  5.70k|        {
  393|  5.70k|            data_end_ = chunk_;
  394|  5.70k|            remaining_ = fill_buffer(chunk_, chunk_size_);
  395|  5.70k|            if (remaining_ > 0)
  ------------------
  |  Branch (395:17): [True: 4.51k, False: 1.18k]
  ------------------
  396|  4.51k|            {
  397|  4.51k|                std::size_t len2 = (std::min)(remaining_, length-len);
  398|  4.51k|                std::memcpy(p+len, data_end_, len2*sizeof(value_type));
  399|  4.51k|                data_end_ += len2;
  400|  4.51k|                remaining_ -= len2;
  401|  4.51k|                position_ += len2;
  402|  4.51k|                len += len2;
  403|  4.51k|            }
  404|  5.70k|            return len;
  405|  5.70k|        }
  406|      0|        else
  407|      0|        {
  408|      0|            if (stream_ptr_->eof())
  ------------------
  |  Branch (408:17): [True: 0, False: 0]
  ------------------
  409|      0|            {
  410|      0|                remaining_ = 0;
  411|      0|                return 0;
  412|      0|            }
  413|      0|            JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  414|      0|            {
  415|      0|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  416|      0|                std::size_t len2 = static_cast<std::size_t>(count);
  417|      0|                if (len2 < length-len)
  ------------------
  |  Branch (417:21): [True: 0, False: 0]
  ------------------
  418|      0|                {
  419|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  420|      0|                }
  421|      0|                len += len2;
  422|      0|                position_ += len2;
  423|      0|                return len;
  424|      0|            }
  425|      0|            JSONCONS_CATCH(const std::exception&)     
  426|      0|            {
  427|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  428|      0|                return 0;
  429|      0|            }
  430|      0|        }
  431|  12.4M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  442|  6.60k|    {
  443|  6.60k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (443:13): [True: 1.20k, False: 5.39k]
  ------------------
  444|  1.20k|        {
  445|  1.20k|            return 0;
  446|  1.20k|        }
  447|       |
  448|  5.39k|        JSONCONS_TRY
  ------------------
  |  |   37|  5.39k|    #define JSONCONS_TRY try
  ------------------
  449|  5.39k|        {
  450|  5.39k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  451|  5.39k|            std::size_t length = static_cast<std::size_t>(count);
  452|       |
  453|  5.39k|            if (length < chunk_size)
  ------------------
  |  Branch (453:17): [True: 2.02k, False: 3.37k]
  ------------------
  454|  2.02k|            {
  455|  2.02k|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  456|  2.02k|            }
  457|  5.39k|            return length;
  458|  5.39k|        }
  459|  5.39k|        JSONCONS_CATCH(const std::exception&)     
  460|  5.39k|        {
  461|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  462|      0|            return 0;
  463|      0|        }
  464|  5.39k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|  67.6k|    {
  353|  67.6k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|  67.6k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2.03k, False: 65.5k]
  |  |  ------------------
  ------------------
  354|  2.03k|        {
  355|  2.03k|            return span<const value_type>{};
  356|  2.03k|        }
  357|  65.5k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 181, False: 65.4k]
  |  Branch (357:32): [True: 51, False: 130]
  ------------------
  358|     51|        {
  359|     51|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     51|            data_end_ = chunk_;
  361|     51|        }
  362|  65.5k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 529, False: 65.0k]
  ------------------
  363|    529|        {
  364|    529|            buffer.clear();
  365|    529|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    529|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    529|        }
  368|       |
  369|  65.0k|        const value_type* data = data_end_;
  370|  65.0k|        data_end_ += length;
  371|  65.0k|        remaining_ -= length;
  372|  65.0k|        position_ += length;
  373|  65.0k|        return span<const value_type>(data, length);
  374|  65.5k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  746|    529|    {
  747|    529|        std::size_t unread = length;
  748|       |
  749|  1.80k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 1.53k, False: 275]
  |  Branch (749:30): [True: 1.27k, False: 254]
  ------------------
  750|  1.27k|        {
  751|  1.27k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 403, False: 874]
  |  Branch (751:44): [True: 401, False: 2]
  ------------------
  752|    401|            {
  753|    401|                std::size_t n = source.chunk_size();
  754|    401|                std::size_t offset = buffer.size();
  755|    401|                buffer.resize(offset+n);
  756|    401|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    401|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    401|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 74, False: 327]
  |  |  ------------------
  ------------------
  758|     74|                {
  759|     74|                    buffer.resize(offset+actual);
  760|     74|                }
  761|    401|                unread -= actual;
  762|    401|            }
  763|    876|            else
  764|    876|            {
  765|    876|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|    876|                std::size_t offset = buffer.size();
  767|    876|                buffer.resize(offset+n);
  768|    876|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|    876|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    876|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 104, False: 772]
  |  |  ------------------
  ------------------
  770|    104|                {
  771|    104|                    buffer.resize(offset + actual);
  772|    104|                }
  773|    876|                unread -= actual;
  774|    876|            }
  775|  1.27k|        }
  776|    529|        return length - unread;
  777|    529|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  3.95k|    {
  272|  3.95k|        return remaining_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 1.41k, False: 2.53k]
  |  Branch (272:35): [True: 614, False: 804]
  ------------------
  273|  3.95k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9remainingEv:
  346|  3.33k|    {
  347|  3.33k|        return remaining_;
  348|  3.33k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  4.14k|    {
  262|  4.14k|        return chunk_size_;
  263|  4.14k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11read_bufferEPhm:
  435|    793|    {
  436|    793|        auto len = fill_buffer(chunk, chunk_size);
  437|    793|        position_ += len;
  438|    793|        return len;
  439|    793|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_6vectorIhS3_EEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|  24.8k|    {
  353|  24.8k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|  24.8k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 768, False: 24.1k]
  |  |  ------------------
  ------------------
  354|    768|        {
  355|    768|            return span<const value_type>{};
  356|    768|        }
  357|  24.1k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 193, False: 23.9k]
  |  Branch (357:32): [True: 57, False: 136]
  ------------------
  358|     57|        {
  359|     57|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     57|            data_end_ = chunk_;
  361|     57|        }
  362|  24.1k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 753, False: 23.3k]
  ------------------
  363|    753|        {
  364|    753|            buffer.clear();
  365|    753|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    753|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    753|        }
  368|       |
  369|  23.3k|        const value_type* data = data_end_;
  370|  23.3k|        data_end_ += length;
  371|  23.3k|        remaining_ -= length;
  372|  23.3k|        position_ += length;
  373|  23.3k|        return span<const value_type>(data, length);
  374|  24.1k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_6vectorIhS4_EEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSD_m:
  746|    753|    {
  747|    753|        std::size_t unread = length;
  748|       |
  749|  2.81k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 2.42k, False: 393]
  |  Branch (749:30): [True: 2.06k, False: 360]
  ------------------
  750|  2.06k|        {
  751|  2.06k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 401, False: 1.66k]
  |  Branch (751:44): [True: 392, False: 9]
  ------------------
  752|    392|            {
  753|    392|                std::size_t n = source.chunk_size();
  754|    392|                std::size_t offset = buffer.size();
  755|    392|                buffer.resize(offset+n);
  756|    392|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    392|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    392|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 77, False: 315]
  |  |  ------------------
  ------------------
  758|     77|                {
  759|     77|                    buffer.resize(offset+actual);
  760|     77|                }
  761|    392|                unread -= actual;
  762|    392|            }
  763|  1.66k|            else
  764|  1.66k|            {
  765|  1.66k|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|  1.66k|                std::size_t offset = buffer.size();
  767|  1.66k|                buffer.resize(offset+n);
  768|  1.66k|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|  1.66k|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|  1.66k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 211, False: 1.45k]
  |  |  ------------------
  ------------------
  770|    211|                {
  771|    211|                    buffer.resize(offset + actual);
  772|    211|                }
  773|  1.66k|                unread -= actual;
  774|  1.66k|            }
  775|  2.06k|        }
  776|    753|        return length - unread;
  777|    753|    }

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

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

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|   111k|    {
 1148|   111k|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|   111k|        const uint8_t* end = it + length;
 1150|       |
 1151|   111k|        unicode_errc  result{};
 1152|  1.07M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 961k, False: 111k]
  ------------------
 1153|   961k|        {
 1154|   961k|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 487k, False: 473k]
  ------------------
 1155|   487k|            {
 1156|  3.33M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|   975k|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 484k, False: 3.71k]
  |  |  |  Branch (281:34): [True: 480k, False: 3.92k]
  |  |  |  Branch (281:36): [True: 477k, False: 2.89k]
  |  |  |  Branch (281:38): [True: 476k, False: 825]
  |  |  |  Branch (281:40): [True: 475k, False: 696]
  |  |  |  Branch (281:42): [True: 472k, False: 3.00k]
  |  |  |  Branch (281:44): [True: 472k, False: 571]
  |  |  |  Branch (281:46): [True: 440k, False: 32.0k]
  |  |  ------------------
  ------------------
 1157|   440k|                continue;
 1158|  3.33M|            }
 1159|   521k|    non_ascii:
 1160|   521k|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|   521k|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 41, False: 521k]
  ------------------
 1162|     41|            {
 1163|     41|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|     41|            }
 1165|   521k|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 179, False: 520k]
  ------------------
 1166|    179|            {
 1167|    179|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|    179|            }
 1169|   520k|            it += len;
 1170|   520k|        }
 1171|   111k|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|   111k|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|   521k|    {
  306|   521k|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|   521k|        const uint8_t* end = it+length;
  308|       |
  309|   521k|        uint8_t byte;
  310|   521k|        switch (length) {
  311|     35|        default:
  ------------------
  |  Branch (311:9): [True: 35, False: 521k]
  ------------------
  312|     35|            return unicode_errc::over_long_utf8_sequence;
  313|  1.10k|        case 4:
  ------------------
  |  Branch (313:9): [True: 1.10k, False: 519k]
  ------------------
  314|  1.10k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 11, False: 1.09k]
  ------------------
  315|     11|                return unicode_errc::bad_continuation_byte;
  316|  1.09k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  1.09k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  2.00k|        case 3:
  ------------------
  |  Branch (317:9): [True: 915, False: 520k]
  ------------------
  318|  2.00k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 16, False: 1.99k]
  ------------------
  319|     16|                return unicode_errc::bad_continuation_byte;
  320|  1.99k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  1.99k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  47.6k|        case 2:
  ------------------
  |  Branch (321:9): [True: 45.6k, False: 475k]
  ------------------
  322|  47.6k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 34, False: 47.6k]
  ------------------
  323|     34|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  47.6k|            switch (*it) 
  326|  47.6k|            {
  327|       |                // no fall-through in this inner switch
  328|    383|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 383, False: 47.2k]
  |  Branch (328:32): [True: 8, False: 375]
  ------------------
  329|    439|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 439, False: 47.1k]
  |  Branch (329:32): [True: 3, False: 436]
  ------------------
  330|    668|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 668, False: 46.9k]
  |  Branch (330:32): [True: 5, False: 663]
  ------------------
  331|    663|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 406, False: 47.2k]
  |  Branch (331:32): [True: 5, False: 401]
  ------------------
  332|  45.7k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 45.7k, False: 1.89k]
  |  Branch (332:32): [True: 0, False: 45.7k]
  ------------------
  333|  47.6k|            }
  334|       |
  335|  47.6k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  47.6k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|   520k|        case 1:
  ------------------
  |  Branch (336:9): [True: 473k, False: 47.7k]
  ------------------
  337|   520k|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 47.6k, False: 473k]
  |  Branch (337:32): [True: 61, False: 47.6k]
  ------------------
  338|     61|                return unicode_errc::source_illegal;
  339|   520k|            break;
  340|   521k|        }
  341|   520k|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 1, False: 520k]
  ------------------
  342|      1|            return unicode_errc::source_illegal;
  343|       |
  344|   520k|        return unicode_errc();
  345|   520k|    }

_ZN8jsoncons12from_integerIiNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS1_9enable_ifIXsr10ext_traits10is_integerIT_EE5valueEmE4typeES9_RT0_:
   42|  15.4k|{
   43|  15.4k|    using char_type = typename Result::value_type;
   44|       |
   45|  15.4k|    char_type buf[255];
   46|  15.4k|    char_type *p = buf;
   47|  15.4k|    const char_type* last = buf+255;
   48|       |
   49|  15.4k|    bool is_negative = value < 0;
   50|       |
   51|  15.4k|    if (value < 0)
  ------------------
  |  Branch (51:9): [True: 12.6k, False: 2.81k]
  ------------------
   52|  12.6k|    {
   53|  12.6k|        do
   54|  49.3k|        {
   55|  49.3k|            *p++ = static_cast<char_type>(48 - (value % 10));
   56|  49.3k|        }
   57|  49.3k|        while ((value /= 10) && (p < last));
  ------------------
  |  Branch (57:16): [True: 36.7k, False: 12.6k]
  |  Branch (57:33): [True: 36.7k, False: 0]
  ------------------
   58|  12.6k|    }
   59|  2.81k|    else
   60|  2.81k|    {
   61|       |
   62|  2.81k|        do
   63|  8.83k|        {
   64|  8.83k|            *p++ = static_cast<char_type>(48 + value % 10);
   65|  8.83k|        }
   66|  8.83k|        while ((value /= 10) && (p < last));
  ------------------
  |  Branch (66:16): [True: 6.01k, False: 2.81k]
  |  Branch (66:33): [True: 6.01k, False: 0]
  ------------------
   67|  2.81k|    }
   68|  15.4k|    JSONCONS_ASSERT(p != last);
  ------------------
  |  |   49|  15.4k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 15.4k]
  |  |  ------------------
  |  |   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|  15.4k|    std::size_t count = (p - buf);
   71|  15.4k|    if (is_negative)
  ------------------
  |  Branch (71:9): [True: 12.6k, False: 2.81k]
  ------------------
   72|  12.6k|    {
   73|  12.6k|        result.push_back('-');
   74|  12.6k|        ++count;
   75|  12.6k|    }
   76|  73.5k|    while (--p >= buf)
  ------------------
  |  Branch (76:12): [True: 58.1k, False: 15.4k]
  ------------------
   77|  58.1k|    {
   78|  58.1k|        result.push_back(*p);
   79|  58.1k|    }
   80|       |
   81|  15.4k|    return count;
   82|  15.4k|}

_ZN8jsoncons4bson3TP1C2Ev:
   78|  19.3k|        constexpr TP1() : low(0), high(0) {}
_ZN8jsoncons4bson19decimal128_to_charsEPcS1_RKNS0_3TP1E:
  335|  19.3k|    {
  336|  19.3k|        static const std::string bson_decimal128_inf = "Infinity";
  337|  19.3k|        static const std::string bson_decimal128_nan = "NaN";
  338|       |
  339|  19.3k|        static constexpr uint32_t combination_mask = 0x1f;   /* Extract least significant 5 bits */
  340|  19.3k|        static constexpr uint32_t exponent_mask = 0x3fff;    /* Extract least significant 14 bits */
  341|  19.3k|        static constexpr uint32_t combination_infinity = 30; /* Value of combination field for Inf */
  342|  19.3k|        static constexpr uint32_t combination_nan = 31;      /* Value of combination field for NaN */
  343|  19.3k|        static constexpr uint32_t exponent_bias = 6176;      /* decimal128 exponent bias */
  344|       |
  345|  19.3k|        char* str_out = first;      /* output pointer in string */
  346|  19.3k|        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|  19.3k|        uint32_t high;                   /* bits 0 - 31 */
  351|  19.3k|        uint32_t midh;                   /* bits 32 - 63 */
  352|  19.3k|        uint32_t midl;                   /* bits 64 - 95 */
  353|  19.3k|        uint32_t low;                    /* bits 96 - 127 */
  354|  19.3k|        uint32_t combination;            /* bits 1 - 5 */
  355|  19.3k|        uint32_t biased_exponent;        /* decoded biased exponent (14 bits) */
  356|  19.3k|        uint32_t significand_digits = 0; /* the number of significand digits */
  357|  19.3k|        uint32_t significand[36] = {0};  /* the base-10 digits in the significand */
  358|  19.3k|        uint32_t *significand_read = significand; /* read pointer into significand */
  359|  19.3k|        int32_t exponent;                         /* unbiased exponent */
  360|  19.3k|        int32_t scientific_exponent; /* the exponent if scientific notation is
  361|       |                                      * used */
  362|  19.3k|        bool is_zero = false;        /* true if the number is zero */
  363|       | 
  364|  19.3k|        uint8_t significand_msb; /* the most signifcant significand bits (50-46) */
  365|  19.3k|        bson_uint128_t
  366|  19.3k|           significand128; /* temporary storage for significand decoding */
  367|       | 
  368|  19.3k|        memset (significand_str, 0, sizeof (significand_str));
  369|       | 
  370|  19.3k|        if ((int64_t) dec.high < 0) { /* negative */
  ------------------
  |  Branch (370:13): [True: 4.08k, False: 15.2k]
  ------------------
  371|  4.08k|           *(str_out++) = '-';
  372|  4.08k|        }
  373|       | 
  374|  19.3k|        low = (uint32_t) dec.low, midl = (uint32_t) (dec.low >> 32),
  375|  19.3k|        midh = (uint32_t) dec.high, high = (uint32_t) (dec.high >> 32);
  376|       | 
  377|       |        /* Decode combination field and exponent */
  378|  19.3k|        combination = (high >> 26) & combination_mask;
  379|       | 
  380|  19.3k|        if (JSONCONS_UNLIKELY ((combination >> 3) == 3)) {
  ------------------
  |  |   78|  19.3k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 3.61k, False: 15.6k]
  |  |  ------------------
  ------------------
  381|       |           /* Check for 'special' values */
  382|  3.61k|           if (combination == combination_infinity) { /* Infinity */
  ------------------
  |  Branch (382:16): [True: 963, False: 2.65k]
  ------------------
  383|    963|               if (last-str_out >= static_cast<ptrdiff_t >(bson_decimal128_inf.size())) 
  ------------------
  |  Branch (383:20): [True: 963, False: 0]
  ------------------
  384|    963|               {
  385|    963|                   std::memcpy(str_out, bson_decimal128_inf.data(), bson_decimal128_inf.size());
  386|    963|                   str_out += bson_decimal128_inf.size();
  387|    963|               }
  388|    963|               *str_out = 0;
  389|       |              //strcpy_s (str_out, last-str_out, bson_decimal128_inf.c_str());
  390|    963|              return decimal128_to_chars_result{str_out, std::errc{}};
  391|  2.65k|           } else if (combination == combination_nan) { /* NaN */
  ------------------
  |  Branch (391:23): [True: 810, False: 1.84k]
  ------------------
  392|       |               /* first, not str_out, to erase the sign */
  393|    810|               str_out = first;
  394|    810|               if (last-str_out >= static_cast<ptrdiff_t >(bson_decimal128_nan.size())) 
  ------------------
  |  Branch (394:20): [True: 810, False: 0]
  ------------------
  395|    810|               {
  396|    810|                   std::memcpy(str_out, bson_decimal128_nan.data(), bson_decimal128_nan.size());
  397|    810|                   str_out += bson_decimal128_nan.size();
  398|    810|               }
  399|    810|               *str_out = 0;
  400|       |              //strcpy_s (first, last-first, bson_decimal128_nan.c_str());
  401|       |              /* we don't care about the NaN payload. */
  402|    810|               return decimal128_to_chars_result{str_out, std::errc{}};
  403|  1.84k|           } else {
  404|  1.84k|              biased_exponent = (high >> 15) & exponent_mask;
  405|  1.84k|              significand_msb = 0x8 + ((high >> 14) & 0x1);
  406|  1.84k|           }
  407|  15.6k|        } else {
  408|  15.6k|           significand_msb = (high >> 14) & 0x7;
  409|  15.6k|           biased_exponent = (high >> 17) & exponent_mask;
  410|  15.6k|        }
  411|       | 
  412|  17.5k|        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|  17.5k|        significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
  419|  17.5k|        significand128.parts[1] = midh;
  420|  17.5k|        significand128.parts[2] = midl;
  421|  17.5k|        significand128.parts[3] = low;
  422|       | 
  423|  17.5k|        if (significand128.parts[0] == 0 && significand128.parts[1] == 0 &&
  ------------------
  |  Branch (423:13): [True: 3.69k, False: 13.8k]
  |  Branch (423:45): [True: 1.69k, False: 1.99k]
  ------------------
  424|  1.69k|            significand128.parts[2] == 0 && significand128.parts[3] == 0) {
  ------------------
  |  Branch (424:13): [True: 817, False: 882]
  |  Branch (424:45): [True: 199, False: 618]
  ------------------
  425|    199|           is_zero = true;
  426|  17.3k|        } else if (significand128.parts[0] >= (1 << 17)) {
  ------------------
  |  Branch (426:20): [True: 1.84k, False: 15.4k]
  ------------------
  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|  1.84k|           is_zero = true;
  434|  15.4k|        } else {
  435|  77.4k|           for (int k = 3; k >= 0; k--) {
  ------------------
  |  Branch (435:28): [True: 61.9k, False: 15.4k]
  ------------------
  436|  61.9k|              uint32_t least_digits = 0;
  437|  61.9k|              detail::bson_uint128_divide1B (
  438|  61.9k|                 significand128, &significand128, &least_digits);
  439|       | 
  440|       |              /* We now have the 9 least significant digits (in base 2). */
  441|       |              /* Convert and output to string. */
  442|  61.9k|              if (!least_digits) {
  ------------------
  |  Branch (442:19): [True: 3.00k, False: 58.9k]
  ------------------
  443|  3.00k|                 continue;
  444|  3.00k|              }
  445|       | 
  446|   589k|              for (int j = 8; j >= 0; j--) {
  ------------------
  |  Branch (446:31): [True: 530k, False: 58.9k]
  ------------------
  447|   530k|                 significand[k * 9 + j] = least_digits % 10;
  448|   530k|                 least_digits /= 10;
  449|   530k|              }
  450|  58.9k|           }
  451|  15.4k|        }
  452|       | 
  453|       |        /* Output format options: */
  454|       |        /* Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd */
  455|       |        /* Regular    - ddd.ddd */
  456|       | 
  457|  17.5k|        if (is_zero) {
  ------------------
  |  Branch (457:13): [True: 2.04k, False: 15.4k]
  ------------------
  458|  2.04k|           significand_digits = 1;
  459|  2.04k|           *significand_read = 0;
  460|  15.4k|        } else {
  461|  15.4k|           significand_digits = 36;
  462|  90.6k|           while (!(*significand_read)) {
  ------------------
  |  Branch (462:19): [True: 75.2k, False: 15.4k]
  ------------------
  463|  75.2k|              significand_digits--;
  464|  75.2k|              significand_read++;
  465|  75.2k|           }
  466|  15.4k|        }
  467|       | 
  468|  17.5k|        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|  17.5k|        if (scientific_exponent < -6 || exponent > 0) {
  ------------------
  |  Branch (478:13): [True: 12.6k, False: 4.92k]
  |  Branch (478:41): [True: 2.81k, False: 2.11k]
  ------------------
  479|       |           /* Scientific format */
  480|  15.4k|           *(str_out++) = char(*(significand_read++)) + '0';
  481|  15.4k|           significand_digits--;
  482|       | 
  483|  15.4k|           if (significand_digits) {
  ------------------
  |  Branch (483:16): [True: 13.5k, False: 1.87k]
  ------------------
  484|  13.5k|              *(str_out++) = '.';
  485|  13.5k|           }
  486|       | 
  487|   427k|           for (std::size_t i = 0; i < significand_digits && (str_out - first) < 36; i++) {
  ------------------
  |  Branch (487:36): [True: 411k, False: 15.3k]
  |  Branch (487:62): [True: 411k, False: 67]
  ------------------
  488|   411k|              *(str_out++) = char(*(significand_read++)) + '0';
  489|   411k|           }
  490|       |           /* Exponent */
  491|  15.4k|           *(str_out++) = 'E';
  492|       |
  493|  15.4k|           std::string s;
  494|  15.4k|           if (scientific_exponent >= 0) {
  ------------------
  |  Branch (494:16): [True: 2.81k, False: 12.6k]
  ------------------
  495|  2.81k|               s.push_back('+');
  496|  2.81k|           }
  497|  15.4k|           jsoncons::from_integer(scientific_exponent, s);
  498|  15.4k|           if (str_out + s.size() < last) 
  ------------------
  |  Branch (498:16): [True: 14.4k, False: 967]
  ------------------
  499|  14.4k|           {
  500|  14.4k|               std::memcpy(str_out, s.data(), s.size());
  501|  14.4k|           }
  502|    967|           else
  503|    967|           {
  504|    967|               return decimal128_to_chars_result{str_out, std::errc::value_too_large};
  505|    967|           }
  506|  14.4k|           str_out += s.size();
  507|  14.4k|        } else {
  508|       |           /* Regular format with no decimal place */
  509|  2.11k|           if (exponent >= 0) {
  ------------------
  |  Branch (509:16): [True: 502, False: 1.61k]
  ------------------
  510|  7.36k|              for (std::size_t i = 0; i < significand_digits && (str_out - first) < 36; i++) {
  ------------------
  |  Branch (510:39): [True: 6.86k, False: 502]
  |  Branch (510:65): [True: 6.86k, False: 0]
  ------------------
  511|  6.86k|                 *(str_out++) = char(*(significand_read++)) + '0';
  512|  6.86k|              }
  513|  1.61k|           } else {
  514|  1.61k|              int32_t radix_position = significand_digits + exponent;
  515|       | 
  516|  1.61k|              if (radix_position > 0) { /* non-zero digits before radix */
  ------------------
  |  Branch (516:19): [True: 789, False: 824]
  ------------------
  517|    789|                 for (int32_t i = 0;
  518|  4.67k|                      i < radix_position && (str_out < last);
  ------------------
  |  Branch (518:23): [True: 3.88k, False: 789]
  |  Branch (518:45): [True: 3.88k, False: 0]
  ------------------
  519|  3.88k|                      i++) {
  520|  3.88k|                    *(str_out++) = char(*(significand_read++)) + '0';
  521|  3.88k|                 }
  522|    824|              } else { /* leading zero before radix point */
  523|    824|                 *(str_out++) = '0';
  524|    824|              }
  525|       | 
  526|  1.61k|              *(str_out++) = '.';
  527|  3.78k|              while (radix_position++ < 0) { /* add leading zeros after radix */
  ------------------
  |  Branch (527:22): [True: 2.16k, False: 1.61k]
  ------------------
  528|  2.16k|                 *(str_out++) = '0';
  529|  2.16k|              }
  530|       | 
  531|  1.61k|              for (std::size_t i = 0;
  532|  47.7k|                   (i < significand_digits - (std::max) (radix_position - 1, 0)) &&
  ------------------
  |  Branch (532:20): [True: 46.1k, False: 1.61k]
  |  Branch (532:20): [True: 46.1k, False: 1.61k]
  ------------------
  533|  46.1k|                   (str_out < last);
  ------------------
  |  Branch (533:20): [True: 46.1k, False: 0]
  ------------------
  534|  46.1k|                   i++) {
  535|  46.1k|                 *(str_out++) = char(*(significand_read++)) + '0';
  536|  46.1k|              }
  537|  1.61k|           }
  538|  2.11k|        }
  539|  16.5k|        return decimal128_to_chars_result{str_out, std::errc{}};
  540|  17.5k|    }
_ZN8jsoncons4bson6detail21bson_uint128_divide1BENS0_14bson_uint128_tEPS2_Pj:
  178|  61.9k|        {
  179|  61.9k|            static constexpr uint32_t DIVISOR = 1000 * 1000 * 1000;
  180|  61.9k|            uint64_t _rem = 0;
  181|  61.9k|            int i = 0;
  182|       |            
  183|  61.9k|            if (!value.parts[0] && !value.parts[1] && !value.parts[2] &&
  ------------------
  |  Branch (183:17): [True: 49.9k, False: 11.9k]
  |  Branch (183:36): [True: 35.5k, False: 14.3k]
  |  Branch (183:55): [True: 19.5k, False: 15.9k]
  ------------------
  184|  19.5k|                !value.parts[3]) {
  ------------------
  |  Branch (184:17): [True: 3.00k, False: 16.5k]
  ------------------
  185|  3.00k|               *quotient = value;
  186|  3.00k|               *rem = 0;
  187|  3.00k|               return;
  188|  3.00k|            }
  189|       |            
  190|   294k|            for (i = 0; i <= 3; i++) {
  ------------------
  |  Branch (190:25): [True: 235k, False: 58.9k]
  ------------------
  191|   235k|               _rem <<= 32; /* Adjust remainder to match value of next dividend */
  192|   235k|               _rem += value.parts[i]; /* Add the divided to _rem */
  193|   235k|               value.parts[i] = (uint32_t) (_rem / DIVISOR);
  194|   235k|               _rem %= DIVISOR; /* Store the remainder */
  195|   235k|            }
  196|       |            
  197|  58.9k|            *quotient = value;
  198|  58.9k|            *rem = (uint32_t) _rem;
  199|  58.9k|        }

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

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

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

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

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

