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

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  188|  1.94k|        {
  189|  1.94k|            if (buffer_)
  ------------------
  |  Branch (189:17): [True: 1.94k, False: 0]
  ------------------
  190|  1.94k|            {
  191|  1.94k|                std::allocator_traits<char_allocator_type>::deallocate(alloc_, buffer_, buffer_size_);
  192|  1.94k|            }
  193|  1.94k|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  171|  1.94k|            : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  172|  1.94k|              buffer_size_(default_max_buffer_size)
  173|  1.94k|        {
  174|  1.94k|            buffer_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, buffer_size_);
  175|  1.94k|            data_ = buffer_;
  176|  1.94k|        }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   54|  1.94k|          : std::basic_istream<CharT>(&nb_)
   55|  1.94k|        {
   56|  1.94k|        }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   40|  1.94k|            null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  1.94k|        {
  277|  1.94k|            return stream_ptr_->bad();  
  278|  1.94k|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  343|  20.4M|        {
  344|  20.4M|            std::size_t len = 0;
  345|  20.4M|            if (length_ > 0)
  ------------------
  |  Branch (345:17): [True: 20.4M, False: 4.57k]
  ------------------
  346|  20.4M|            {
  347|  20.4M|                len = (std::min)(length_, length);
  348|  20.4M|                std::memcpy(p, data_, len*sizeof(value_type));
  349|  20.4M|                data_ += len;
  350|  20.4M|                length_ -= len;
  351|  20.4M|                position_ += len;
  352|  20.4M|            }
  353|  20.4M|            if (length - len == 0)
  ------------------
  |  Branch (353:17): [True: 20.4M, False: 5.21k]
  ------------------
  354|  20.4M|            {
  355|  20.4M|                return len;
  356|  20.4M|            }
  357|  5.21k|            else if (length - len < buffer_size_)
  ------------------
  |  Branch (357:22): [True: 4.88k, False: 335]
  ------------------
  358|  4.88k|            {
  359|  4.88k|                fill_buffer();
  360|  4.88k|                if (length_ > 0)
  ------------------
  |  Branch (360:21): [True: 3.60k, False: 1.28k]
  ------------------
  361|  3.60k|                {
  362|  3.60k|                    std::size_t len2 = (std::min)(length_, length-len);
  363|  3.60k|                    std::memcpy(p+len, data_, len2*sizeof(value_type));
  364|  3.60k|                    data_ += len2;
  365|  3.60k|                    length_ -= len2;
  366|  3.60k|                    position_ += len2;
  367|  3.60k|                    len += len2;
  368|  3.60k|                }
  369|  4.88k|                return len;
  370|  4.88k|            }
  371|    335|            else
  372|    335|            {
  373|    335|                if (stream_ptr_->eof())
  ------------------
  |  Branch (373:21): [True: 0, False: 335]
  ------------------
  374|      0|                {
  375|      0|                    length_ = 0;
  376|      0|                    return 0;
  377|      0|                }
  378|    335|                JSONCONS_TRY
  ------------------
  |  |   37|    335|    #define JSONCONS_TRY try
  ------------------
  379|    335|                {
  380|    335|                    std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  381|    335|                    std::size_t len2 = static_cast<std::size_t>(count);
  382|    335|                    if (len2 < length-len)
  ------------------
  |  Branch (382:25): [True: 28, False: 307]
  ------------------
  383|     28|                    {
  384|     28|                        stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  385|     28|                    }
  386|    335|                    len += len2;
  387|    335|                    position_ += len2;
  388|    335|                    return len;
  389|    335|                }
  390|    335|                JSONCONS_CATCH(const std::exception&)     
  391|    335|                {
  392|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  393|      0|                    return 0;
  394|      0|                }
  395|    335|            }
  396|  20.4M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEv:
  399|  4.88k|        {
  400|  4.88k|            if (stream_ptr_->eof())
  ------------------
  |  Branch (400:17): [True: 1.25k, False: 3.62k]
  ------------------
  401|  1.25k|            {
  402|  1.25k|                length_ = 0;
  403|  1.25k|                return;
  404|  1.25k|            }
  405|       |
  406|  3.62k|            data_ = buffer_;
  407|  3.62k|            JSONCONS_TRY
  ------------------
  |  |   37|  3.62k|    #define JSONCONS_TRY try
  ------------------
  408|  3.62k|            {
  409|  3.62k|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(buffer_), buffer_size_);
  410|  3.62k|                length_ = static_cast<std::size_t>(count);
  411|       |
  412|  3.62k|                if (length_ < buffer_size_)
  ------------------
  |  Branch (412:21): [True: 1.89k, False: 1.73k]
  ------------------
  413|  1.89k|                {
  414|  1.89k|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|  1.89k|                }
  416|  3.62k|            }
  417|  3.62k|            JSONCONS_CATCH(const std::exception&)     
  418|  3.62k|            {
  419|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  420|      0|                length_ = 0;
  421|      0|            }
  422|  3.62k|        }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaaasr3std14is_convertibleIhNT_10value_typeEEE5valuesr10ext_traits11has_reserveISE_EE5valuentsr10ext_traits14has_data_exactIPhSE_EE5valueEmE4typeERS5_RSE_m:
  882|  6.91k|        {
  883|  6.91k|            std::size_t unread = length;
  884|       |
  885|  6.91k|            std::size_t n = (std::min)(max_buffer_length, unread);
  886|  12.0k|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (886:20): [True: 5.23k, False: 6.76k]
  |  Branch (886:29): [True: 5.09k, False: 144]
  ------------------
  887|  5.09k|            {
  888|  5.09k|                v.reserve(v.size()+n);
  889|  5.09k|                std::size_t actual = 0;
  890|  11.1M|                while (actual < n)
  ------------------
  |  Branch (890:24): [True: 11.1M, False: 5.00k]
  ------------------
  891|  11.1M|                {
  892|  11.1M|                    typename Source::value_type c{};
  893|  11.1M|                    if (source.read(&c,1) != 1)
  ------------------
  |  Branch (893:25): [True: 83, False: 11.1M]
  ------------------
  894|     83|                    {
  895|     83|                        break;
  896|     83|                    }
  897|  11.1M|                    v.push_back(c);
  898|  11.1M|                    ++actual;
  899|  11.1M|                }
  900|  5.09k|                unread -= actual;
  901|  5.09k|                n = (std::min)(max_buffer_length, unread);
  902|  5.09k|            }
  903|       |
  904|  6.91k|            return length - unread;
  905|  6.91k|        }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  8.39k|        {
  272|  8.39k|            return length_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:20): [True: 913, False: 7.48k]
  |  Branch (272:36): [True: 386, False: 527]
  ------------------
  273|  8.39k|        }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_6vectorIhS4_EEEENS2_9enable_ifIXaaaasr3std14is_convertibleIhNT_10value_typeEEE5valuesr10ext_traits11has_reserveISB_EE5valuesr10ext_traits14has_data_exactIPhSB_EE5valueEmE4typeERS5_RSB_m:
  859|  2.85k|        {
  860|  2.85k|            std::size_t unread = length;
  861|       |
  862|  2.85k|            std::size_t n = (std::min)(max_buffer_length, unread);
  863|  5.77k|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (863:20): [True: 3.16k, False: 2.61k]
  |  Branch (863:29): [True: 2.91k, False: 242]
  ------------------
  864|  2.91k|            {
  865|  2.91k|                std::size_t offset = v.size();
  866|  2.91k|                v.resize(v.size()+n);
  867|  2.91k|                std::size_t actual = source.read(v.data()+offset, n);
  868|  2.91k|                unread -= actual;
  869|  2.91k|                n = (std::min)(max_buffer_length, unread);
  870|  2.91k|            }
  871|       |
  872|  2.85k|            return length - unread;
  873|  2.85k|        }

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

_ZN8jsoncons16byte_string_viewC2EPKhm:
  362|  2.61k|            : data_(data), size_(length)
  363|  2.61k|        {
  364|  2.61k|        }

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14convert_resultIS4_EEE4typeEPKS4_m:
 1136|  24.6k|    {
 1137|  24.6k|        conv_errc  result = conv_errc();
 1138|  24.6k|        const CharT* last = data + length;
 1139|  1.18M|        while (data != last) 
  ------------------
  |  Branch (1139:16): [True: 1.15M, False: 24.4k]
  ------------------
 1140|  1.15M|        {
 1141|  1.15M|            std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[static_cast<uint8_t>(*data)]) + 1;
 1142|  1.15M|            if (len > (std::size_t)(last - data))
  ------------------
  |  Branch (1142:17): [True: 15, False: 1.15M]
  ------------------
 1143|     15|            {
 1144|     15|                return convert_result<CharT>{data, conv_errc::source_exhausted};
 1145|     15|            }
 1146|  1.15M|            if ((result=is_legal_utf8(data, len)) != conv_errc())
  ------------------
  |  Branch (1146:17): [True: 149, False: 1.15M]
  ------------------
 1147|    149|            {
 1148|    149|                return convert_result<CharT>{data,result} ;
 1149|    149|            }
 1150|  1.15M|            data += len;
 1151|  1.15M|        }
 1152|  24.4k|        return convert_result<CharT>{data,result} ;
 1153|  24.6k|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8IcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_9conv_errcEE4typeEPKS4_m:
  305|  1.15M|    {
  306|  1.15M|        uint8_t a;
  307|  1.15M|        const CharT* srcptr = first+length;
  308|  1.15M|        switch (length) {
  309|     54|        default:
  ------------------
  |  Branch (309:9): [True: 54, False: 1.15M]
  ------------------
  310|     54|            return conv_errc::over_long_utf8_sequence;
  311|    917|        case 4:
  ------------------
  |  Branch (311:9): [True: 917, False: 1.15M]
  ------------------
  312|    917|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (312:17): [True: 12, False: 905]
  ------------------
  313|     12|                return conv_errc::expected_continuation_byte;
  314|    905|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|    905|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  315|  1.39k|        case 3:
  ------------------
  |  Branch (315:9): [True: 492, False: 1.15M]
  ------------------
  316|  1.39k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (316:17): [True: 7, False: 1.39k]
  ------------------
  317|      7|                return conv_errc::expected_continuation_byte;
  318|  1.39k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  1.39k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  319|  1.68k|        case 2:
  ------------------
  |  Branch (319:9): [True: 296, False: 1.15M]
  ------------------
  320|  1.68k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (320:17): [True: 18, False: 1.66k]
  ------------------
  321|     18|                return conv_errc::expected_continuation_byte;
  322|       |
  323|  1.66k|            switch (static_cast<uint8_t>(*first)) 
  324|  1.66k|            {
  325|       |                // no fall-through in this inner switch
  326|    217|                case 0xE0: if (a < 0xA0) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (326:17): [True: 217, False: 1.45k]
  |  Branch (326:32): [True: 8, False: 209]
  ------------------
  327|    220|                case 0xED: if (a > 0x9F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (327:17): [True: 220, False: 1.44k]
  |  Branch (327:32): [True: 5, False: 215]
  ------------------
  328|    465|                case 0xF0: if (a < 0x90) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 465, False: 1.20k]
  |  Branch (328:32): [True: 6, False: 459]
  ------------------
  329|    459|                case 0xF4: if (a > 0x8F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 415, False: 1.25k]
  |  Branch (329:32): [True: 6, False: 409]
  ------------------
  330|    409|                default:   if (a < 0x80) return conv_errc::source_illegal;
  ------------------
  |  Branch (330:17): [True: 351, False: 1.31k]
  |  Branch (330:32): [True: 0, False: 351]
  ------------------
  331|  1.66k|            }
  332|       |
  333|  1.64k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  1.64k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  334|  1.15M|        case 1:
  ------------------
  |  Branch (334:9): [True: 1.15M, False: 1.75k]
  ------------------
  335|  1.15M|            if (static_cast<uint8_t>(*first) >= 0x80 && static_cast<uint8_t>(*first) < 0xC2)
  ------------------
  |  Branch (335:17): [True: 1.67k, False: 1.15M]
  |  Branch (335:57): [True: 32, False: 1.64k]
  ------------------
  336|     32|                return conv_errc::source_illegal;
  337|  1.15M|            break;
  338|  1.15M|        }
  339|  1.15M|        if (static_cast<uint8_t>(*first) > 0xF4) 
  ------------------
  |  Branch (339:13): [True: 1, False: 1.15M]
  ------------------
  340|      1|            return conv_errc::source_illegal;
  341|       |
  342|  1.15M|        return conv_errc();
  343|  1.15M|    }

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

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

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

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

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

_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEEC2IRNS3_19basic_istringstreamIcNS3_11char_traitsIcEES7_EEEEOT_RKNS0_19bson_decode_optionsERKS7_:
   85|  1.94k|       : source_(std::forward<Sourceable>(source)), 
   86|  1.94k|         max_nesting_depth_(options.max_nesting_depth()),
   87|  1.94k|         bytes_buffer_(temp_alloc),
   88|  1.94k|         name_buffer_(temp_alloc),
   89|  1.94k|         text_buffer_(temp_alloc),
   90|  1.94k|         state_stack_(temp_alloc)
   91|  1.94k|    {
   92|  1.94k|        state_stack_.emplace_back(parse_mode::root,0,0);
   93|  1.94k|    }
_ZN8jsoncons4bson11parse_stateC2ENS0_10parse_modeEmmh:
   48|  38.3k|        : mode(mode_), length(length_), pos(pos_), type(type_)
   49|  38.3k|    {
   50|  38.3k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5resetEv:
  101|  1.94k|    {
  102|  1.94k|        more_ = true;
  103|  1.94k|        done_ = false;
  104|  1.94k|        bytes_buffer_.clear();
  105|  1.94k|        name_buffer_.clear();
  106|  1.94k|        text_buffer_.clear();
  107|  1.94k|        state_stack_.clear();
  108|  1.94k|        state_stack_.emplace_back(parse_mode::root,0,0);
  109|  1.94k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5parseERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  169|  1.94k|    {
  170|  1.94k|        if (JSONCONS_UNLIKELY(source_.is_error()))
  ------------------
  |  |   78|  1.94k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 1.94k]
  |  |  ------------------
  ------------------
  171|      0|        {
  172|      0|            ec = bson_errc::source_error;
  173|      0|            more_ = false;
  174|      0|            return;
  175|      0|        }
  176|       |        
  177|  90.9k|        while (!done_ && more_)
  ------------------
  |  Branch (177:16): [True: 90.9k, False: 7]
  |  Branch (177:26): [True: 89.7k, False: 1.28k]
  ------------------
  178|  89.7k|        {
  179|  89.7k|            switch (state_stack_.back().mode)
  ------------------
  |  Branch (179:21): [True: 89.7k, False: 0]
  ------------------
  180|  89.7k|            {
  181|  1.94k|                case parse_mode::root:
  ------------------
  |  Branch (181:17): [True: 1.94k, False: 87.7k]
  ------------------
  182|  1.94k|                    state_stack_.back().mode = parse_mode::accept;
  183|  1.94k|                    begin_document(visitor, ec);
  184|  1.94k|                    break;
  185|  19.2k|                case parse_mode::document:
  ------------------
  |  Branch (185:17): [True: 19.2k, False: 70.4k]
  ------------------
  186|  19.2k|                {
  187|  19.2k|                    uint8_t type;
  188|  19.2k|                    std::size_t n = source_.read(&type, 1);
  189|  19.2k|                    state_stack_.back().pos += n;
  190|  19.2k|                    if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  19.2k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 623, False: 18.6k]
  |  |  ------------------
  ------------------
  191|    623|                    {
  192|    623|                        ec = bson_errc::unexpected_eof;
  193|    623|                        more_ = false;
  194|    623|                        return;
  195|    623|                    }
  196|  18.6k|                    if (type != 0x00)
  ------------------
  |  Branch (196:25): [True: 17.9k, False: 724]
  ------------------
  197|  17.9k|                    {
  198|  17.9k|                        read_e_name(visitor,jsoncons::bson::bson_container_type::document,ec);
  199|  17.9k|                        state_stack_.back().mode = parse_mode::value;
  200|  17.9k|                        state_stack_.back().type = type;
  201|  17.9k|                    }
  202|    724|                    else
  203|    724|                    {
  204|    724|                        end_document(visitor,ec);
  205|    724|                    }
  206|  18.6k|                    break;
  207|  19.2k|                }
  208|  50.7k|                case parse_mode::array:
  ------------------
  |  Branch (208:17): [True: 50.7k, False: 39.0k]
  ------------------
  209|  50.7k|                {
  210|  50.7k|                    uint8_t type;
  211|  50.7k|                    std::size_t n = source_.read(&type, 1);
  212|  50.7k|                    state_stack_.back().pos += n;
  213|  50.7k|                    if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  50.7k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 31, False: 50.6k]
  |  |  ------------------
  ------------------
  214|     31|                    {
  215|     31|                        ec = bson_errc::unexpected_eof;
  216|     31|                        more_ = false;
  217|     31|                        return;
  218|     31|                    }
  219|  50.6k|                    if (type != 0x00)
  ------------------
  |  Branch (219:25): [True: 48.9k, False: 1.72k]
  ------------------
  220|  48.9k|                    {
  221|  48.9k|                        read_e_name(visitor,jsoncons::bson::bson_container_type::array,ec);
  222|  48.9k|                        read_value(visitor, type, ec);
  223|  48.9k|                    }
  224|  1.72k|                    else
  225|  1.72k|                    {
  226|  1.72k|                        end_array(visitor,ec);
  227|  1.72k|                    }
  228|  50.6k|                    break;
  229|  50.7k|                }
  230|  17.7k|                case parse_mode::value:
  ------------------
  |  Branch (230:17): [True: 17.7k, False: 71.9k]
  ------------------
  231|  17.7k|                    state_stack_.back().mode = parse_mode::document;
  232|  17.7k|                    read_value(visitor,state_stack_.back().type,ec);
  233|  17.7k|                    break;
  234|      7|                case parse_mode::accept:
  ------------------
  |  Branch (234:17): [True: 7, False: 89.7k]
  ------------------
  235|      7|                {
  236|      7|                    JSONCONS_ASSERT(state_stack_.size() == 1);
  ------------------
  |  |   45|      7|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (45:32): [True: 0, False: 7]
  |  |  ------------------
  |  |   46|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   47|      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|  89.7k|            }
  244|  89.7k|        }
  245|  1.94k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE14begin_documentERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  250|  3.99k|    {
  251|  3.99k|        if (JSONCONS_UNLIKELY(static_cast<int>(state_stack_.size()) > max_nesting_depth_))
  ------------------
  |  |   78|  3.99k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 3.99k]
  |  |  ------------------
  ------------------
  252|      1|        {
  253|      1|            ec = bson_errc::max_nesting_depth_exceeded;
  254|      1|            more_ = false;
  255|      1|            return;
  256|      1|        } 
  257|       |
  258|  3.99k|        uint8_t buf[sizeof(int32_t)]; 
  259|  3.99k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  260|  3.99k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  3.99k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 30, False: 3.96k]
  |  |  ------------------
  ------------------
  261|     30|        {
  262|     30|            ec = bson_errc::unexpected_eof;
  263|     30|            more_ = false;
  264|     30|            return;
  265|     30|        }
  266|       |
  267|  3.96k|        auto length = binary::little_to_native<int32_t>(buf, sizeof(buf));
  268|       |
  269|  3.96k|        visitor.begin_object(semantic_tag::none, *this, ec);
  270|  3.96k|        more_ = !cursor_mode_;
  271|  3.96k|        state_stack_.emplace_back(parse_mode::document,length,n);
  272|  3.96k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11read_e_nameERNS_18basic_json_visitorIcEENS0_19bson_container_typeERNS3_10error_codeE:
  344|  66.8k|    {
  345|  66.8k|        name_buffer_.clear();
  346|  66.8k|        read_cstring(name_buffer_, ec);
  347|  66.8k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  66.8k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 108, False: 66.7k]
  |  |  ------------------
  ------------------
  348|    108|        {
  349|    108|            return;
  350|    108|        }
  351|  66.7k|        if (type == jsoncons::bson::bson_container_type::document)
  ------------------
  |  Branch (351:13): [True: 17.8k, False: 48.8k]
  ------------------
  352|  17.8k|        {
  353|  17.8k|            auto result = unicode_traits::validate(name_buffer_.data(),name_buffer_.size());
  354|  17.8k|            if (JSONCONS_UNLIKELY(result.ec != unicode_traits::conv_errc()))
  ------------------
  |  |   78|  17.8k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 95, False: 17.7k]
  |  |  ------------------
  ------------------
  355|     95|            {
  356|     95|                ec = bson_errc::invalid_utf8_text_string;
  357|     95|                more_ = false;
  358|     95|                return;
  359|     95|            }
  360|  17.7k|            visitor.key(jsoncons::basic_string_view<char>(name_buffer_.data(),name_buffer_.length()), *this, ec);
  361|  17.7k|            more_ = !cursor_mode_;
  362|  17.7k|        }
  363|  66.7k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE12read_cstringERNS3_12basic_stringIcNS3_11char_traitsIcEES7_EERNS3_10error_codeE:
  647|  70.1k|    {
  648|  70.1k|        uint8_t c = 0xff;
  649|  9.19M|        while (true)
  ------------------
  |  Branch (649:16): [True: 9.19M, Folded]
  ------------------
  650|  9.19M|        {
  651|  9.19M|            std::size_t n = source_.read(&c, 1);
  652|  9.19M|            state_stack_.back().pos += n;
  653|  9.19M|            if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  9.19M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 166, False: 9.19M]
  |  |  ------------------
  ------------------
  654|    166|            {
  655|    166|                ec = bson_errc::unexpected_eof;
  656|    166|                more_ = false;
  657|    166|                return;
  658|    166|            }
  659|  9.19M|            if (c == 0)
  ------------------
  |  Branch (659:17): [True: 70.0k, False: 9.12M]
  ------------------
  660|  70.0k|            {
  661|  70.0k|                break;
  662|  70.0k|            }
  663|  9.12M|            buffer.push_back(c);
  664|  9.12M|        }
  665|  70.1k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE12end_documentERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  275|    724|    {
  276|    724|        JSONCONS_ASSERT(state_stack_.size() >= 2);
  ------------------
  |  |   45|    724|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (45:32): [True: 0, False: 724]
  |  |  ------------------
  |  |   46|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   47|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  277|       |
  278|    724|        visitor.end_object(*this,ec);
  279|    724|        more_ = !cursor_mode_;
  280|    724|        if (level() == mark_level_)
  ------------------
  |  Branch (280:13): [True: 0, False: 724]
  ------------------
  281|      0|        {
  282|      0|            more_ = false;
  283|      0|        }
  284|    724|        if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
  ------------------
  |  |   78|    724|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 117, False: 607]
  |  |  ------------------
  ------------------
  285|    117|        {
  286|    117|            ec = bson_errc::size_mismatch;
  287|    117|            more_ = false;
  288|    117|            return;
  289|    117|        }
  290|    607|        std::size_t pos = state_stack_.back().pos;
  291|    607|        state_stack_.pop_back();
  292|    607|        state_stack_.back().pos += pos;
  293|    607|    }
_ZNK8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5levelEv:
  124|  2.45k|    {
  125|  2.45k|        return static_cast<int>(state_stack_.size());
  126|  2.45k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE10read_valueERNS_18basic_json_visitorIcEEhRNS3_10error_codeE:
  366|  66.7k|    {
  367|  66.7k|        switch (type)
  368|  66.7k|        {
  369|    529|            case jsoncons::bson::bson_type::double_type:
  ------------------
  |  Branch (369:13): [True: 529, False: 66.1k]
  ------------------
  370|    529|            {
  371|    529|                uint8_t buf[sizeof(double)]; 
  372|    529|                std::size_t n = source_.read(buf, sizeof(double));
  373|    529|                state_stack_.back().pos += n;
  374|    529|                if (JSONCONS_UNLIKELY(n != sizeof(double)))
  ------------------
  |  |   78|    529|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 6, False: 523]
  |  |  ------------------
  ------------------
  375|      6|                {
  376|      6|                    ec = bson_errc::unexpected_eof;
  377|      6|                    more_ = false;
  378|      6|                    return;
  379|      6|                }
  380|    523|                double res = binary::little_to_native<double>(buf, sizeof(buf));
  381|    523|                visitor.double_value(res, semantic_tag::none, *this, ec);
  382|    523|                more_ = !cursor_mode_;
  383|    523|                break;
  384|    529|            }
  385|  1.03k|            case jsoncons::bson::bson_type::symbol_type:
  ------------------
  |  Branch (385:13): [True: 1.03k, False: 65.6k]
  ------------------
  386|  1.72k|            case jsoncons::bson::bson_type::min_key_type:
  ------------------
  |  Branch (386:13): [True: 687, False: 66.0k]
  ------------------
  387|  4.93k|            case jsoncons::bson::bson_type::max_key_type:
  ------------------
  |  Branch (387:13): [True: 3.21k, False: 63.5k]
  ------------------
  388|  5.86k|            case jsoncons::bson::bson_type::string_type:
  ------------------
  |  Branch (388:13): [True: 925, False: 65.8k]
  ------------------
  389|  5.86k|            {
  390|  5.86k|                text_buffer_.clear();
  391|  5.86k|                read_string(text_buffer_, ec);
  392|  5.86k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  5.86k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 232, False: 5.62k]
  |  |  ------------------
  ------------------
  393|    232|                {
  394|    232|                    return;
  395|    232|                }
  396|  5.62k|                auto result = unicode_traits::validate(text_buffer_.data(), text_buffer_.size());
  397|  5.62k|                if (JSONCONS_UNLIKELY(result.ec != unicode_traits::conv_errc()))
  ------------------
  |  |   78|  5.62k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 33, False: 5.59k]
  |  |  ------------------
  ------------------
  398|     33|                {
  399|     33|                    ec = bson_errc::invalid_utf8_text_string;
  400|     33|                    more_ = false;
  401|     33|                    return;
  402|     33|                }
  403|  5.59k|                visitor.string_value(text_buffer_, semantic_tag::none, *this, ec);
  404|  5.59k|                more_ = !cursor_mode_;
  405|  5.59k|                break;
  406|  5.62k|            }
  407|  1.17k|            case jsoncons::bson::bson_type::javascript_type:
  ------------------
  |  Branch (407:13): [True: 1.17k, False: 65.5k]
  ------------------
  408|  1.17k|            {
  409|  1.17k|                text_buffer_.clear();
  410|  1.17k|                read_string(text_buffer_, ec);
  411|  1.17k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.17k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 46, False: 1.12k]
  |  |  ------------------
  ------------------
  412|     46|                {
  413|     46|                    return;
  414|     46|                }
  415|  1.12k|                auto result = unicode_traits::validate(text_buffer_.data(), text_buffer_.size());
  416|  1.12k|                if (JSONCONS_UNLIKELY(result.ec != unicode_traits::conv_errc()))
  ------------------
  |  |   78|  1.12k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 36, False: 1.08k]
  |  |  ------------------
  ------------------
  417|     36|                {
  418|     36|                    ec = bson_errc::invalid_utf8_text_string;
  419|     36|                    more_ = false;
  420|     36|                    return;
  421|     36|                }
  422|  1.08k|                visitor.string_value(text_buffer_, semantic_tag::code, *this, ec);
  423|  1.08k|                more_ = !cursor_mode_;
  424|  1.08k|                break;
  425|  1.12k|            }
  426|  1.66k|            case jsoncons::bson::bson_type::regex_type:
  ------------------
  |  Branch (426:13): [True: 1.66k, False: 65.0k]
  ------------------
  427|  1.66k|            {
  428|  1.66k|                text_buffer_.clear();
  429|  1.66k|                text_buffer_.push_back('/');
  430|  1.66k|                read_cstring(text_buffer_, ec);
  431|  1.66k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.66k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 33, False: 1.63k]
  |  |  ------------------
  ------------------
  432|     33|                {
  433|     33|                    return;
  434|     33|                }
  435|  1.63k|                text_buffer_.push_back('/');
  436|  1.63k|                read_cstring(text_buffer_, ec);
  437|  1.63k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.63k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 25, False: 1.60k]
  |  |  ------------------
  ------------------
  438|     25|                {
  439|     25|                    return;
  440|     25|                }
  441|  1.60k|                visitor.string_value(text_buffer_, semantic_tag::regex, *this, ec);
  442|  1.60k|                more_ = !cursor_mode_;
  443|  1.60k|                break;
  444|  1.63k|            }
  445|  2.05k|            case jsoncons::bson::bson_type::document_type: 
  ------------------
  |  Branch (445:13): [True: 2.05k, False: 64.6k]
  ------------------
  446|  2.05k|            {
  447|  2.05k|                begin_document(visitor,ec);
  448|  2.05k|                break;
  449|  1.63k|            }
  450|       |
  451|  30.4k|            case jsoncons::bson::bson_type::array_type: 
  ------------------
  |  Branch (451:13): [True: 30.4k, False: 36.2k]
  ------------------
  452|  30.4k|            {
  453|  30.4k|                begin_array(visitor,ec);
  454|  30.4k|                break;
  455|  1.63k|            }
  456|  2.63k|            case jsoncons::bson::bson_type::undefined_type: 
  ------------------
  |  Branch (456:13): [True: 2.63k, False: 64.0k]
  ------------------
  457|  2.63k|                {
  458|  2.63k|                    visitor.null_value(semantic_tag::undefined, *this, ec);
  459|  2.63k|                    more_ = !cursor_mode_;
  460|  2.63k|                    break;
  461|  1.63k|                }
  462|  1.14k|            case jsoncons::bson::bson_type::null_type: 
  ------------------
  |  Branch (462:13): [True: 1.14k, False: 65.5k]
  ------------------
  463|  1.14k|            {
  464|  1.14k|                visitor.null_value(semantic_tag::none, *this, ec);
  465|  1.14k|                more_ = !cursor_mode_;
  466|  1.14k|                break;
  467|  1.63k|            }
  468|  1.25k|            case jsoncons::bson::bson_type::bool_type:
  ------------------
  |  Branch (468:13): [True: 1.25k, False: 65.4k]
  ------------------
  469|  1.25k|            {
  470|  1.25k|                uint8_t c;
  471|  1.25k|                std::size_t n = source_.read(&c, 1);
  472|  1.25k|                state_stack_.back().pos += n;
  473|  1.25k|                if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  1.25k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 6, False: 1.25k]
  |  |  ------------------
  ------------------
  474|      6|                {
  475|      6|                    ec = bson_errc::unexpected_eof;
  476|      6|                    more_ = false;
  477|      6|                    return;
  478|      6|                }
  479|  1.25k|                visitor.bool_value(c != 0, semantic_tag::none, *this, ec);
  480|  1.25k|                more_ = !cursor_mode_;
  481|  1.25k|                break;
  482|  1.25k|            }
  483|    748|            case jsoncons::bson::bson_type::int32_type: 
  ------------------
  |  Branch (483:13): [True: 748, False: 65.9k]
  ------------------
  484|    748|            {
  485|    748|                uint8_t buf[sizeof(int32_t)]; 
  486|    748|                std::size_t n = source_.read(buf, sizeof(int32_t));
  487|    748|                state_stack_.back().pos += n;
  488|    748|                if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|    748|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 6, False: 742]
  |  |  ------------------
  ------------------
  489|      6|                {
  490|      6|                    ec = bson_errc::unexpected_eof;
  491|      6|                    more_ = false;
  492|      6|                    return;
  493|      6|                }
  494|    742|                auto val = binary::little_to_native<int32_t>(buf, sizeof(buf));
  495|    742|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  496|    742|                more_ = !cursor_mode_;
  497|    742|                break;
  498|    748|            }
  499|       |
  500|    308|            case jsoncons::bson::bson_type::timestamp_type: 
  ------------------
  |  Branch (500:13): [True: 308, False: 66.4k]
  ------------------
  501|    308|            {
  502|    308|                uint8_t buf[sizeof(uint64_t)]; 
  503|    308|                std::size_t n = source_.read(buf, sizeof(uint64_t));
  504|    308|                state_stack_.back().pos += n;
  505|    308|                if (JSONCONS_UNLIKELY(n != sizeof(uint64_t)))
  ------------------
  |  |   78|    308|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 8, False: 300]
  |  |  ------------------
  ------------------
  506|      8|                {
  507|      8|                    ec = bson_errc::unexpected_eof;
  508|      8|                    more_ = false;
  509|      8|                    return;
  510|      8|                }
  511|    300|                auto val = binary::little_to_native<uint64_t>(buf, sizeof(buf));
  512|    300|                visitor.uint64_value(val, semantic_tag::none, *this, ec);
  513|    300|                more_ = !cursor_mode_;
  514|    300|                break;
  515|    308|            }
  516|       |
  517|  1.15k|            case jsoncons::bson::bson_type::int64_type: 
  ------------------
  |  Branch (517:13): [True: 1.15k, False: 65.5k]
  ------------------
  518|  1.15k|            {
  519|  1.15k|                uint8_t buf[sizeof(int64_t)]; 
  520|  1.15k|                std::size_t n = source_.read(buf, sizeof(int64_t));
  521|  1.15k|                state_stack_.back().pos += n;
  522|  1.15k|                if (JSONCONS_UNLIKELY(n != sizeof(int64_t)))
  ------------------
  |  |   78|  1.15k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 1.14k]
  |  |  ------------------
  ------------------
  523|      9|                {
  524|      9|                    ec = bson_errc::unexpected_eof;
  525|      9|                    more_ = false;
  526|      9|                    return;
  527|      9|                }
  528|  1.14k|                auto val = binary::little_to_native<int64_t>(buf, sizeof(buf));
  529|  1.14k|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  530|  1.14k|                more_ = !cursor_mode_;
  531|  1.14k|                break;
  532|  1.15k|            }
  533|       |
  534|    230|            case jsoncons::bson::bson_type::datetime_type: 
  ------------------
  |  Branch (534:13): [True: 230, False: 66.4k]
  ------------------
  535|    230|            {
  536|    230|                uint8_t buf[sizeof(int64_t)]; 
  537|    230|                std::size_t n = source_.read(buf, sizeof(int64_t));
  538|    230|                state_stack_.back().pos += n;
  539|    230|                if (JSONCONS_UNLIKELY(n != sizeof(int64_t)))
  ------------------
  |  |   78|    230|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 7, False: 223]
  |  |  ------------------
  ------------------
  540|      7|                {
  541|      7|                    ec = bson_errc::unexpected_eof;
  542|      7|                    more_ = false;
  543|      7|                    return;
  544|      7|                }
  545|    223|                auto val = binary::little_to_native<int64_t>(buf, sizeof(buf));
  546|    223|                visitor.int64_value(val, semantic_tag::epoch_milli, *this, ec);
  547|    223|                more_ = !cursor_mode_;
  548|    223|                break;
  549|    230|            }
  550|  2.91k|            case jsoncons::bson::bson_type::binary_type: 
  ------------------
  |  Branch (550:13): [True: 2.91k, False: 63.8k]
  ------------------
  551|  2.91k|            {
  552|  2.91k|                uint8_t buf[sizeof(int32_t)]; 
  553|  2.91k|                std::size_t n = source_.read(buf, sizeof(int32_t));
  554|  2.91k|                state_stack_.back().pos += n;
  555|  2.91k|                if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  2.91k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 7, False: 2.91k]
  |  |  ------------------
  ------------------
  556|      7|                {
  557|      7|                    ec = bson_errc::unexpected_eof;
  558|      7|                    more_ = false;
  559|      7|                    return;
  560|      7|                }
  561|  2.91k|                const auto len = binary::little_to_native<int32_t>(buf, sizeof(buf));
  562|  2.91k|                if (JSONCONS_UNLIKELY(len < 0))
  ------------------
  |  |   78|  2.91k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 46, False: 2.86k]
  |  |  ------------------
  ------------------
  563|     46|                {
  564|     46|                    ec = bson_errc::length_is_negative;
  565|     46|                    more_ = false;
  566|     46|                    return;
  567|     46|                }
  568|  2.86k|                uint8_t subtype;
  569|  2.86k|                n = source_.read(&subtype, 1);
  570|  2.86k|                state_stack_.back().pos += n;
  571|  2.86k|                if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  2.86k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 2.85k]
  |  |  ------------------
  ------------------
  572|      9|                {
  573|      9|                    ec = bson_errc::unexpected_eof;
  574|      9|                    more_ = false;
  575|      9|                    return;
  576|      9|                }
  577|       |
  578|  2.85k|                bytes_buffer_.clear();
  579|  2.85k|                n = source_reader<Source>::read(source_, bytes_buffer_, len);
  580|  2.85k|                state_stack_.back().pos += n;
  581|  2.85k|                if (JSONCONS_UNLIKELY(n != static_cast<std::size_t>(len)))
  ------------------
  |  |   78|  2.85k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 242, False: 2.61k]
  |  |  ------------------
  ------------------
  582|    242|                {
  583|    242|                    ec = bson_errc::unexpected_eof;
  584|    242|                    more_ = false;
  585|    242|                    return;
  586|    242|                }
  587|       |
  588|  2.61k|                visitor.byte_string_value(bytes_buffer_, 
  589|  2.61k|                                                  subtype, 
  590|  2.61k|                                                  *this,
  591|  2.61k|                                                  ec);
  592|  2.61k|                more_ = !cursor_mode_;
  593|  2.61k|                break;
  594|  2.85k|            }
  595|  13.6k|            case jsoncons::bson::bson_type::decimal128_type: 
  ------------------
  |  Branch (595:13): [True: 13.6k, False: 53.1k]
  ------------------
  596|  13.6k|            {
  597|  13.6k|                uint8_t buf[sizeof(uint64_t)*2]; 
  598|  13.6k|                std::size_t n = source_.read(buf, sizeof(buf));
  599|  13.6k|                state_stack_.back().pos += n;
  600|  13.6k|                if (JSONCONS_UNLIKELY(n != sizeof(buf)))
  ------------------
  |  |   78|  13.6k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 16, False: 13.5k]
  |  |  ------------------
  ------------------
  601|     16|                {
  602|     16|                    ec = bson_errc::unexpected_eof;
  603|     16|                    more_ = false;
  604|     16|                    return;
  605|     16|                }
  606|       |
  607|  13.5k|                decimal128_t dec;
  608|  13.5k|                dec.low = binary::little_to_native<uint64_t>(buf, sizeof(uint64_t));
  609|  13.5k|                dec.high = binary::little_to_native<uint64_t>(buf+sizeof(uint64_t), sizeof(uint64_t));
  610|       |
  611|  13.5k|                text_buffer_.clear();
  612|  13.5k|                text_buffer_.resize(bson::decimal128_limits::buf_size);
  613|  13.5k|                auto r = bson::decimal128_to_chars(&text_buffer_[0], &text_buffer_[0]+text_buffer_.size(), dec);
  614|  13.5k|                visitor.string_value(string_view(text_buffer_.data(),static_cast<std::size_t>(r.ptr-text_buffer_.data())), semantic_tag::float128, *this, ec);
  615|  13.5k|                more_ = !cursor_mode_;
  616|  13.5k|                break;
  617|  13.6k|            }
  618|    881|            case jsoncons::bson::bson_type::object_id_type: 
  ------------------
  |  Branch (618:13): [True: 881, False: 65.8k]
  ------------------
  619|    881|            {
  620|    881|                uint8_t buf[12]; 
  621|    881|                std::size_t n = source_.read(buf, sizeof(buf));
  622|    881|                state_stack_.back().pos += n;
  623|    881|                if (JSONCONS_UNLIKELY(n != sizeof(buf)))
  ------------------
  |  |   78|    881|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 8, False: 873]
  |  |  ------------------
  ------------------
  624|      8|                {
  625|      8|                    ec = bson_errc::unexpected_eof;
  626|      8|                    more_ = false;
  627|      8|                    return;
  628|      8|                }
  629|       |
  630|    873|                oid_t oid(buf);
  631|    873|                to_string(oid, text_buffer_);
  632|       |
  633|    873|                visitor.string_value(text_buffer_, semantic_tag::id, *this, ec);
  634|    873|                more_ = !cursor_mode_;
  635|    873|                break;
  636|    881|            }
  637|     78|            default:
  ------------------
  |  Branch (637:13): [True: 78, False: 66.6k]
  ------------------
  638|     78|            {
  639|     78|                ec = bson_errc::unknown_type;
  640|     78|                more_ = false;
  641|     78|                return;
  642|    881|            }
  643|  66.7k|        }
  644|  66.7k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11read_stringERNS3_12basic_stringIcNS3_11char_traitsIcEES7_EERNS3_10error_codeE:
  668|  7.03k|    {
  669|  7.03k|        uint8_t buf[sizeof(int32_t)]; 
  670|  7.03k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  671|  7.03k|        state_stack_.back().pos += n;
  672|  7.03k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  7.03k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 81, False: 6.95k]
  |  |  ------------------
  ------------------
  673|     81|        {
  674|     81|            ec = bson_errc::unexpected_eof;
  675|     81|            more_ = false;
  676|     81|            return;
  677|     81|        }
  678|  6.95k|        auto len = binary::little_to_native<int32_t>(buf, sizeof(buf));
  679|  6.95k|        if (JSONCONS_UNLIKELY(len < 1))
  ------------------
  |  |   78|  6.95k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 37, False: 6.91k]
  |  |  ------------------
  ------------------
  680|     37|        {
  681|     37|            ec = bson_errc::string_length_is_non_positive;
  682|     37|            more_ = false;
  683|     37|            return;
  684|     37|        }
  685|       |
  686|  6.91k|        std::size_t size = static_cast<std::size_t>(len) - static_cast<std::size_t>(1);
  687|  6.91k|        n = source_reader<Source>::read(source_, buffer, size);
  688|  6.91k|        state_stack_.back().pos += n;
  689|       |
  690|  6.91k|        if (JSONCONS_UNLIKELY(n != size))
  ------------------
  |  |   78|  6.91k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 144, False: 6.76k]
  |  |  ------------------
  ------------------
  691|    144|        {
  692|    144|            ec = bson_errc::unexpected_eof;
  693|    144|            more_ = false;
  694|    144|            return;
  695|    144|        }
  696|  6.76k|        uint8_t c;
  697|  6.76k|        n = source_.read(&c, 1);
  698|  6.76k|        state_stack_.back().pos += n;
  699|  6.76k|        if (JSONCONS_UNLIKELY(n != 1))
  ------------------
  |  |   78|  6.76k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 16, False: 6.75k]
  |  |  ------------------
  ------------------
  700|     16|        {
  701|     16|            ec = bson_errc::unexpected_eof;
  702|     16|            more_ = false;
  703|     16|            return;
  704|     16|        }
  705|  6.76k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11begin_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  296|  30.4k|    {
  297|  30.4k|        if (JSONCONS_UNLIKELY(static_cast<int>(state_stack_.size()) > max_nesting_depth_))
  ------------------
  |  |   78|  30.4k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 30.4k]
  |  |  ------------------
  ------------------
  298|      1|        {
  299|      1|            ec = bson_errc::max_nesting_depth_exceeded;
  300|      1|            more_ = false;
  301|      1|            return;
  302|      1|        } 
  303|  30.4k|        uint8_t buf[sizeof(int32_t)]; 
  304|  30.4k|        std::size_t n = source_.read(buf, sizeof(int32_t));
  305|  30.4k|        if (JSONCONS_UNLIKELY(n != sizeof(int32_t)))
  ------------------
  |  |   78|  30.4k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 26, False: 30.4k]
  |  |  ------------------
  ------------------
  306|     26|        {
  307|     26|            ec = bson_errc::unexpected_eof;
  308|     26|            more_ = false;
  309|     26|            return;
  310|     26|        }
  311|  30.4k|        auto length = binary::little_to_native<int32_t>(buf, sizeof(buf));
  312|       |
  313|  30.4k|        visitor.begin_array(semantic_tag::none, *this, ec);
  314|  30.4k|        more_ = !cursor_mode_;
  315|  30.4k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  30.4k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 30.4k]
  |  |  ------------------
  ------------------
  316|      0|        {
  317|      0|            return;
  318|      0|        }
  319|  30.4k|        state_stack_.emplace_back(parse_mode::array, length, n);
  320|  30.4k|    }
_ZN8jsoncons4bson17basic_bson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE9end_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  323|  1.72k|    {
  324|  1.72k|        JSONCONS_ASSERT(state_stack_.size() >= 2);
  ------------------
  |  |   45|  1.72k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (45:32): [True: 0, False: 1.72k]
  |  |  ------------------
  |  |   46|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   47|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  325|       |
  326|  1.72k|        visitor.end_array(*this, ec);
  327|  1.72k|        more_ = !cursor_mode_;
  328|  1.72k|        if (level() == mark_level_)
  ------------------
  |  Branch (328:13): [True: 0, False: 1.72k]
  ------------------
  329|      0|        {
  330|      0|            more_ = false;
  331|      0|        }
  332|  1.72k|        if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
  ------------------
  |  |   78|  1.72k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 105, False: 1.62k]
  |  |  ------------------
  ------------------
  333|    105|        {
  334|    105|            ec = bson_errc::size_mismatch;
  335|    105|            more_ = false;
  336|    105|            return;
  337|    105|        }
  338|  1.62k|        std::size_t pos = state_stack_.back().pos;
  339|  1.62k|        state_stack_.pop_back();
  340|  1.62k|        state_stack_.back().pos += pos;
  341|  1.62k|    }

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

