_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEC2Ev:
   68|  1.50k|    DepGraph() noexcept = default;
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE7TxCountEv:
  118|  4.95k|    auto TxCount() const noexcept { return m_used.Count(); }
_ZN17cluster_linearize7SetInfoIN13bitset_detail9IntBitSetIjEEEC2Ev:
  324|  2.79k|    SetInfo() noexcept = default;
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE9PositionsEv:
  114|  3.00k|    const SetType& Positions() const noexcept { return m_used; }
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE9AncestorsEj:
  124|  64.9k|    const SetType& Ancestors(ClusterIndex i) const noexcept { return entries[i].ancestors; }
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE14AddTransactionERK7FeeFrac:
  134|  4.01k|    {
  135|  4.01k|        static constexpr auto ALL_POSITIONS = SetType::Fill(SetType::Size());
  136|  4.01k|        auto available = ALL_POSITIONS - m_used;
  137|  4.01k|        Assume(available.Any());
  ------------------
  |  |   97|  4.01k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  138|  4.01k|        ClusterIndex new_idx = available.First();
  139|  4.01k|        if (new_idx == entries.size()) {
  ------------------
  |  Branch (139:13): [True: 4.01k, False: 0]
  ------------------
  140|  4.01k|            entries.emplace_back(feefrac, SetType::Singleton(new_idx), SetType::Singleton(new_idx));
  141|  4.01k|        } else {
  142|      0|            entries[new_idx] = Entry(feefrac, SetType::Singleton(new_idx), SetType::Singleton(new_idx));
  143|      0|        }
  144|  4.01k|        m_used.Set(new_idx);
  145|  4.01k|        return new_idx;
  146|  4.01k|    }
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE5EntryC2ERK7FeeFracRKS3_SA_:
   46|  4.01k|        Entry(const FeeFrac& f, const SetType& a, const SetType& d) noexcept : feerate(f), ancestors(a), descendants(d) {}
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE15AddDependenciesERKS3_j:
  178|  8.03k|    {
  179|  8.03k|        Assume(m_used[child]);
  ------------------
  |  |   97|  8.03k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  180|  8.03k|        Assume(parents.IsSubsetOf(m_used));
  ------------------
  |  |   97|  8.03k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  181|       |        // Compute the ancestors of parents that are not already ancestors of child.
  182|  8.03k|        SetType par_anc;
  183|  8.03k|        for (auto par : parents - Ancestors(child)) {
  ------------------
  |  Branch (183:23): [True: 3.17k, False: 8.03k]
  ------------------
  184|  3.17k|            par_anc |= Ancestors(par);
  185|  3.17k|        }
  186|  8.03k|        par_anc -= Ancestors(child);
  187|       |        // Bail out if there are no such ancestors.
  188|  8.03k|        if (par_anc.None()) return;
  ------------------
  |  Branch (188:13): [True: 7.25k, False: 778]
  ------------------
  189|       |        // To each such ancestor, add as descendants the descendants of the child.
  190|    778|        const auto& chl_des = entries[child].descendants;
  191|  4.16k|        for (auto anc_of_par : par_anc) {
  ------------------
  |  Branch (191:30): [True: 4.16k, False: 778]
  ------------------
  192|  4.16k|            entries[anc_of_par].descendants |= chl_des;
  193|  4.16k|        }
  194|       |        // To each descendant of the child, add those ancestors.
  195|    778|        for (auto dec_of_chl : Descendants(child)) {
  ------------------
  |  Branch (195:30): [True: 778, False: 778]
  ------------------
  196|    778|            entries[dec_of_chl].ancestors |= par_anc;
  197|    778|        }
  198|    778|    }
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE7FeeRateEj:
  120|  15.6k|    const FeeFrac& FeeRate(ClusterIndex i) const noexcept { return entries[i].feerate; }
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEaSEOS4_:
   72|    750|    DepGraph& operator=(DepGraph&&) noexcept = default;
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEC2ERKS4_4SpanIKjEj:
   89|    750|    DepGraph(const DepGraph<SetType>& depgraph, Span<const ClusterIndex> mapping, ClusterIndex pos_range) noexcept : entries(pos_range)
   90|    750|    {
   91|    750|        Assume(mapping.size() == depgraph.PositionRange());
  ------------------
  |  |   97|    750|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   92|    750|        Assume((pos_range == 0) == (depgraph.TxCount() == 0));
  ------------------
  |  |   97|    750|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   93|  4.01k|        for (ClusterIndex i : depgraph.Positions()) {
  ------------------
  |  Branch (93:29): [True: 4.01k, False: 750]
  ------------------
   94|  4.01k|            auto new_idx = mapping[i];
   95|  4.01k|            Assume(new_idx < pos_range);
  ------------------
  |  |   97|  4.01k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   96|       |            // Add transaction.
   97|  4.01k|            entries[new_idx].ancestors = SetType::Singleton(new_idx);
   98|  4.01k|            entries[new_idx].descendants = SetType::Singleton(new_idx);
   99|  4.01k|            m_used.Set(new_idx);
  100|       |            // Fill in fee and size.
  101|  4.01k|            entries[new_idx].feerate = depgraph.entries[i].feerate;
  102|  4.01k|        }
  103|  4.01k|        for (ClusterIndex i : depgraph.Positions()) {
  ------------------
  |  Branch (103:29): [True: 4.01k, False: 750]
  ------------------
  104|       |            // Fill in dependencies by mapping direct parents.
  105|  4.01k|            SetType parents;
  106|  4.01k|            for (auto j : depgraph.GetReducedParents(i)) parents.Set(mapping[j]);
  ------------------
  |  Branch (106:25): [True: 1.09k, False: 4.01k]
  ------------------
  107|  4.01k|            AddDependencies(parents, mapping[i]);
  108|  4.01k|        }
  109|       |        // Verify that the provided pos_range was correct (no unused positions at the end).
  110|    750|        Assume(m_used.None() ? (pos_range == 0) : (pos_range == m_used.Last() + 1));
  ------------------
  |  |   97|  1.50k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  |  |  ------------------
  |  |  |  Branch (97:51): [True: 238, False: 512]
  |  |  ------------------
  ------------------
  111|    750|    }
_ZN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE5EntryC2Ev:
   44|  12.7k|        Entry() noexcept = default;
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE11DescendantsEj:
  126|    778|    const SetType& Descendants(ClusterIndex i) const noexcept { return entries[i].descendants; }
_ZN17cluster_linearize18ChunkLinearizationIN13bitset_detail9IntBitSetIjEEEENSt3__16vectorI7FeeFracNS4_9allocatorIS6_EEEERKNS_8DepGraphIT_EE4SpanIKjE:
  375|    750|{
  376|    750|    std::vector<FeeFrac> ret;
  377|  4.01k|    for (ClusterIndex i : linearization) {
  ------------------
  |  Branch (377:25): [True: 4.01k, False: 750]
  ------------------
  378|       |        /** The new chunk to be added, initially a singleton. */
  379|  4.01k|        auto new_chunk = depgraph.FeeRate(i);
  380|       |        // As long as the new chunk has a higher feerate than the last chunk so far, absorb it.
  381|  6.63k|        while (!ret.empty() && new_chunk >> ret.back()) {
  ------------------
  |  Branch (381:16): [True: 5.49k, False: 1.14k]
  |  Branch (381:32): [True: 2.62k, False: 2.87k]
  ------------------
  382|  2.62k|            new_chunk += ret.back();
  383|  2.62k|            ret.pop_back();
  384|  2.62k|        }
  385|       |        // Actually move that new chunk into the chunking.
  386|  4.01k|        ret.push_back(std::move(new_chunk));
  387|  4.01k|    }
  388|    750|    return ret;
  389|    750|}
_ZN17cluster_linearize7SetInfoIN13bitset_detail9IntBitSetIjEEE3SetERKNS_8DepGraphIS3_EEj:
  339|  11.6k|    {
  340|  11.6k|        Assume(!transactions[pos]);
  ------------------
  |  |   97|  11.6k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  341|  11.6k|        transactions.Set(pos);
  342|  11.6k|        feerate += depgraph.FeeRate(pos);
  343|  11.6k|    }
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE13PositionRangeEv:
  116|    750|    ClusterIndex PositionRange() const noexcept { return entries.size(); }
_ZNK17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEE17GetReducedParentsEj:
  209|  4.01k|    {
  210|  4.01k|        SetType parents = Ancestors(i);
  211|  4.01k|        parents.Reset(i);
  212|  4.01k|        for (auto parent : parents) {
  ------------------
  |  Branch (212:26): [True: 2.08k, False: 4.01k]
  ------------------
  213|  2.08k|            if (parents[parent]) {
  ------------------
  |  Branch (213:17): [True: 2.08k, False: 0]
  ------------------
  214|  2.08k|                parents -= Ancestors(parent);
  215|  2.08k|                parents.Set(parent);
  216|  2.08k|            }
  217|  2.08k|        }
  218|  4.01k|        return parents;
  219|  4.01k|    }

_ZN15CheckVarIntModeIL10VarIntMode0EmEC2Ev:
  410|  13.3k|    {
  411|  13.3k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  13.3k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  13.3k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmEC2ES3_:
  481|  13.3k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN15CheckVarIntModeIL10VarIntMode1EiEC2Ev:
  410|  4.52k|    {
  411|  4.52k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  4.52k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  4.52k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode1EERiEC2ES3_:
  481|  4.52k|    explicit Wrapper(T obj) : m_object(obj) {}
cluster_linearize.cpp:_ZL5UsingIN12_GLOBAL__N_117DepGraphFormatterERN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEEE7WrapperIT_RT0_EOSB_:
  497|    750|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
cluster_linearize.cpp:_ZN7WrapperIN12_GLOBAL__N_117DepGraphFormatterERN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEEEC2ES8_:
  481|    750|    explicit Wrapper(T obj) : m_object(obj) {}
cluster_linearize.cpp:_Z11UnserializeI10SpanReaderR7WrapperIN12_GLOBAL__N_117DepGraphFormatterERN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEEEQ14UnserializableIT0_T_EEvRSE_OSD_:
  762|    750|{
  763|    750|    a.Unserialize(is);
  764|    750|}
cluster_linearize.cpp:_ZN7WrapperIN12_GLOBAL__N_117DepGraphFormatterERN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEEE11UnserializeI10SpanReaderEEvRT_:
  483|    750|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_Z11UnserializeI10SpanReaderR7WrapperI15VarIntFormatterIL10VarIntMode1EERiEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  4.52k|{
  763|  4.52k|    a.Unserialize(is);
  764|  4.52k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode1EERiE11UnserializeI10SpanReaderEEvRT_:
  483|  4.52k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode1EE5UnserI10SpanReaderiEEvRT_RT0_:
  514|  4.52k|    {
  515|  4.52k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  4.52k|    }
_Z10ReadVarIntI10SpanReaderL10VarIntMode1EiET1_RT_:
  453|  4.52k|{
  454|  4.52k|    CheckVarIntMode<Mode, I>();
  455|  4.52k|    I n = 0;
  456|  5.23k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  5.23k|        unsigned char chData = ser_readdata8(is);
  458|  5.23k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 11, False: 5.22k]
  ------------------
  459|     11|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|     11|        }
  461|  5.22k|        n = (n << 7) | (chData & 0x7F);
  462|  5.22k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 712, False: 4.51k]
  ------------------
  463|    712|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 1, False: 711]
  ------------------
  464|      1|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|      1|            }
  466|    711|            n++;
  467|  4.51k|        } else {
  468|  4.51k|            return n;
  469|  4.51k|        }
  470|  5.22k|    }
  471|  4.52k|}
_Z13ser_readdata8I10SpanReaderEhRT_:
   84|  22.0k|{
   85|  22.0k|    uint8_t obj;
   86|  22.0k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|  22.0k|    return obj;
   88|  22.0k|}
cluster_linearize.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode1EERiE7WrapperIT_RT0_EOS6_:
  497|  4.52k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
cluster_linearize.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERmE7WrapperIT_RT0_EOS6_:
  497|  13.3k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z11UnserializeI10SpanReaderR7WrapperI15VarIntFormatterIL10VarIntMode0EERmEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  13.3k|{
  763|  13.3k|    a.Unserialize(is);
  764|  13.3k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmE11UnserializeI10SpanReaderEEvRT_:
  483|  13.3k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode0EE5UnserI10SpanReadermEEvRT_RT0_:
  514|  13.3k|    {
  515|  13.3k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  13.3k|    }
_Z10ReadVarIntI10SpanReaderL10VarIntMode0EmET1_RT_:
  453|  13.3k|{
  454|  13.3k|    CheckVarIntMode<Mode, I>();
  455|  13.3k|    I n = 0;
  456|  16.7k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  16.7k|        unsigned char chData = ser_readdata8(is);
  458|  16.7k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 111, False: 16.6k]
  ------------------
  459|    111|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|    111|        }
  461|  16.6k|        n = (n << 7) | (chData & 0x7F);
  462|  16.6k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 3.49k, False: 13.1k]
  ------------------
  463|  3.49k|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 38, False: 3.45k]
  ------------------
  464|     38|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|     38|            }
  466|  3.45k|            n++;
  467|  13.1k|        } else {
  468|  13.1k|            return n;
  469|  13.1k|        }
  470|  16.6k|    }
  471|  13.3k|}

_ZNK4SpanIKhE4sizeEv:
  187|  22.0k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIhE4dataEv:
  174|  22.0k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE4dataEv:
  174|  17.9k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanISt4byteE4sizeEv:
  187|  79.9k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanISt4byteE4dataEv:
  174|  17.9k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE7subspanEm:
  196|  17.9k|    {
  197|  17.9k|        ASSERT_IF_DEBUG(size() >= offset);
  198|  17.9k|        return Span<C>(m_data + offset, m_size - offset);
  199|  17.9k|    }
_ZNK4SpanIhE10size_bytesEv:
  188|  22.0k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZN4SpanIKhEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  17.9k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanISt4byteEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  22.0k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIhE4SpanISt4byteES0_IT_E:
  264|  22.0k|{
  265|  22.0k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|  22.0k|}
_ZN4SpanIhEC2IhTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_hEE5valueEiE4typeELi0EEEPS4_m:
  119|  22.0k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanIKhEC2INSt3__14spanIS0_Lm18446744073709551615EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|    750|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKjEC2INSt3__16vectorIjNS3_9allocatorIjEEEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.50k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIKjE4sizeEv:
  187|    750|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKjEixEm:
  191|  9.13k|    {
  192|  9.13k|        ASSERT_IF_DEBUG(size() > pos);
  193|  9.13k|        return m_data[pos];
  194|  9.13k|    }
_ZNK4SpanIKjE5beginEv:
  175|    750|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKjE3endEv:
  176|    750|    constexpr C* end() const noexcept { return m_data + m_size; }

_ZN10SpanReaderC2E4SpanIKhE:
  109|    750|    explicit SpanReader(Span<const unsigned char> data) : m_data{data} {}
_ZN10SpanReader4readE4SpanISt4byteE:
  122|  22.0k|    {
  123|  22.0k|        if (dst.size() == 0) {
  ------------------
  |  Branch (123:13): [True: 0, False: 22.0k]
  ------------------
  124|      0|            return;
  125|      0|        }
  126|       |
  127|       |        // Read from the beginning of the buffer
  128|  22.0k|        if (dst.size() > m_data.size()) {
  ------------------
  |  Branch (128:13): [True: 4.08k, False: 17.9k]
  ------------------
  129|  4.08k|            throw std::ios_base::failure("SpanReader::read(): end of data");
  130|  4.08k|        }
  131|  17.9k|        memcpy(dst.data(), m_data.data(), dst.size());
  132|  17.9k|        m_data = m_data.subspan(dst.size());
  133|  17.9k|    }
cluster_linearize.cpp:_ZN10SpanReaderrsI7WrapperIN12_GLOBAL__N_117DepGraphFormatterERN17cluster_linearize8DepGraphIN13bitset_detail9IntBitSetIjEEEEEEERS_OT_:
  113|    750|    {
  114|    750|        ::Unserialize(*this, obj);
  115|    750|        return (*this);
  116|    750|    }
_ZN10SpanReaderrsI7WrapperI15VarIntFormatterIL10VarIntMode1EERiEEERS_OT_:
  113|  4.52k|    {
  114|  4.52k|        ::Unserialize(*this, obj);
  115|  4.52k|        return (*this);
  116|  4.52k|    }
_ZN10SpanReaderrsI7WrapperI15VarIntFormatterIL10VarIntMode0EERmEEERS_OT_:
  113|  13.3k|    {
  114|  13.3k|        ::Unserialize(*this, obj);
  115|  13.3k|        return (*this);
  116|  13.3k|    }

_Z31clusterlin_chunking_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
  503|    750|{
  504|       |    // Verify the correctness of the ChunkLinearization function.
  505|       |
  506|       |    // Construct a graph by deserializing.
  507|    750|    SpanReader reader(buffer);
  508|    750|    DepGraph<TestBitSet> depgraph;
  509|    750|    try {
  510|    750|        reader >> Using<DepGraphFormatter>(depgraph);
  511|    750|    } catch (const std::ios_base::failure&) {}
  512|       |
  513|       |    // Read a valid linearization for depgraph.
  514|    750|    auto linearization = ReadLinearization(depgraph, reader);
  515|       |
  516|       |    // Invoke the chunking function.
  517|    750|    auto chunking = ChunkLinearization(depgraph, linearization);
  518|       |
  519|       |    // Verify that chunk feerates are monotonically non-increasing.
  520|  1.63k|    for (size_t i = 1; i < chunking.size(); ++i) {
  ------------------
  |  Branch (520:24): [True: 883, False: 750]
  ------------------
  521|    883|        assert(!(chunking[i] >> chunking[i - 1]));
  522|    883|    }
  523|       |
  524|       |    // Naively recompute the chunks (each is the highest-feerate prefix of what remains).
  525|    750|    auto todo = depgraph.Positions();
  526|  1.39k|    for (const auto& chunk_feerate : chunking) {
  ------------------
  |  Branch (526:36): [True: 1.39k, False: 750]
  ------------------
  527|  1.39k|        assert(todo.Any());
  528|  1.39k|        SetInfo<TestBitSet> accumulator, best;
  529|  18.7k|        for (ClusterIndex idx : linearization) {
  ------------------
  |  Branch (529:31): [True: 18.7k, False: 1.39k]
  ------------------
  530|  18.7k|            if (todo[idx]) {
  ------------------
  |  Branch (530:17): [True: 11.6k, False: 7.13k]
  ------------------
  531|  11.6k|                accumulator.Set(depgraph, idx);
  532|  11.6k|                if (best.feerate.IsEmpty() || accumulator.feerate >> best.feerate) {
  ------------------
  |  Branch (532:21): [True: 1.39k, False: 10.2k]
  |  Branch (532:47): [True: 1.42k, False: 8.82k]
  ------------------
  533|  2.81k|                    best = accumulator;
  534|  2.81k|                }
  535|  11.6k|            }
  536|  18.7k|        }
  537|  1.39k|        assert(chunk_feerate == best.feerate);
  538|  1.39k|        assert(best.transactions.IsSubsetOf(todo));
  539|  1.39k|        todo -= best.transactions;
  540|  1.39k|    }
  541|    750|    assert(todo.None());
  542|    750|}
cluster_linearize.cpp:_ZN12_GLOBAL__N_117ReadLinearizationIN13bitset_detail9IntBitSetIjEEEENSt3__16vectorIjNS4_9allocatorIjEEEERKN17cluster_linearize8DepGraphIT_EER10SpanReader:
  207|    750|{
  208|    750|    std::vector<ClusterIndex> linearization;
  209|    750|    TestBitSet todo = depgraph.Positions();
  210|       |    // In every iteration one topologically-valid transaction is appended to linearization.
  211|  4.76k|    while (todo.Any()) {
  ------------------
  |  Branch (211:12): [True: 4.01k, False: 750]
  ------------------
  212|       |        // Compute the set of transactions with no not-yet-included ancestors.
  213|  4.01k|        TestBitSet potential_next;
  214|  38.5k|        for (auto j : todo) {
  ------------------
  |  Branch (214:21): [True: 38.5k, False: 4.01k]
  ------------------
  215|  38.5k|            if ((depgraph.Ancestors(j) & todo) == TestBitSet::Singleton(j)) {
  ------------------
  |  Branch (215:17): [True: 35.5k, False: 3.00k]
  ------------------
  216|  35.5k|                potential_next.Set(j);
  217|  35.5k|            }
  218|  38.5k|        }
  219|       |        // There must always be one (otherwise there is a cycle in the graph).
  220|  4.01k|        assert(potential_next.Any());
  221|       |        // Read a number from reader, and interpret it as index into potential_next.
  222|  4.01k|        uint64_t idx{0};
  223|  4.01k|        try {
  224|  4.01k|            reader >> VARINT(idx);
  ------------------
  |  |  500|  4.01k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  225|  4.01k|        } catch (const std::ios_base::failure&) {}
  226|  4.01k|        idx %= potential_next.Count();
  227|       |        // Find out which transaction that corresponds to.
  228|  6.13k|        for (auto j : potential_next) {
  ------------------
  |  Branch (228:21): [True: 6.13k, False: 0]
  ------------------
  229|  6.13k|            if (idx == 0) {
  ------------------
  |  Branch (229:17): [True: 4.01k, False: 2.12k]
  ------------------
  230|       |                // When found, add it to linearization and remove it from todo.
  231|  4.01k|                linearization.push_back(j);
  232|  4.01k|                assert(todo[j]);
  233|  4.01k|                todo.Reset(j);
  234|  4.01k|                break;
  235|  4.01k|            }
  236|  2.12k|            --idx;
  237|  2.12k|        }
  238|  4.01k|    }
  239|    750|    return linearization;
  240|    750|}

LLVMFuzzerTestOneInput:
  222|    750|{
  223|    750|    test_one_input({data, size});
  224|    750|    return 0;
  225|    750|}
fuzz.cpp:_ZL14test_one_inputNSt3__14spanIKhLm18446744073709551615EEE:
   83|    750|{
   84|    750|    CheckGlobals check{};
   85|    750|    (*Assert(g_test_one_input))(buffer);
  ------------------
  |  |   85|    750|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   86|    750|}

_ZN12CheckGlobalsC2Ev:
   56|    750|CheckGlobals::CheckGlobals() : m_impl(std::make_unique<CheckGlobalsImpl>()) {}
_ZN12CheckGlobalsD2Ev:
   57|    750|CheckGlobals::~CheckGlobals() = default;
_ZN16CheckGlobalsImplC2Ev:
   17|    750|    {
   18|    750|        g_used_g_prng = false;
   19|    750|        g_seeded_g_prng_zero = false;
   20|    750|        g_used_system_time = false;
   21|    750|        SetMockTime(0s);
   22|    750|    }
_ZN16CheckGlobalsImplD2Ev:
   24|    750|    {
   25|    750|        if (g_used_g_prng && !g_seeded_g_prng_zero) {
  ------------------
  |  Branch (25:13): [True: 0, False: 750]
  |  Branch (25:30): [True: 0, False: 0]
  ------------------
   26|      0|            std::cerr << "\n\n"
   27|      0|                         "The current fuzz target used the global random state.\n\n"
   28|       |
   29|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   30|      0|                         "SeedRandomStateForTest(SeedRand::ZEROS) in the first line \n"
   31|      0|                         "of the FUZZ_TARGET function.\n\n"
   32|       |
   33|      0|                         "An alternative solution would be to avoid any use of globals.\n\n"
   34|       |
   35|      0|                         "Without a solution, fuzz instability and non-determinism can lead \n"
   36|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   37|      0|                      << std::endl;
   38|      0|            std::abort(); // Abort, because AFL may try to recover from a std::exit
   39|      0|        }
   40|       |
   41|    750|        if (g_used_system_time) {
  ------------------
  |  Branch (41:13): [True: 0, False: 750]
  ------------------
   42|      0|            std::cerr << "\n\n"
   43|      0|                         "The current fuzz target accessed system time.\n\n"
   44|       |
   45|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   46|      0|                         "SetMockTime() at the beginning of processing the fuzz input.\n\n"
   47|       |
   48|      0|                         "Without setting mock time, time-dependent behavior can lead \n"
   49|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   50|      0|                      << std::endl;
   51|      0|            std::abort();
   52|      0|        }
   53|    750|    }

cluster_linearize.cpp:_ZN12_GLOBAL__N_117DepGraphFormatter5UnserI10SpanReaderN13bitset_detail9IntBitSetIjEEEEvRT_RN17cluster_linearize8DepGraphIT0_EE:
  200|    750|    {
  201|       |        /** The dependency graph which we deserialize into first, with transactions in
  202|       |         *  topological serialization order, not original cluster order. */
  203|    750|        DepGraph<SetType> topo_depgraph;
  204|       |        /** Mapping from serialization order to cluster order, used later to reconstruct the
  205|       |         *  cluster order. */
  206|    750|        std::vector<ClusterIndex> reordering;
  207|       |        /** How big the entries vector in the reconstructed depgraph will be (including holes). */
  208|    750|        ClusterIndex total_size{0};
  209|       |
  210|       |        // Read transactions in topological order.
  211|  4.52k|        while (true) {
  ------------------
  |  Branch (211:16): [Folded - Ignored]
  ------------------
  212|  4.52k|            FeeFrac new_feerate; //!< The new transaction's fee and size.
  213|  4.52k|            SetType new_ancestors; //!< The new transaction's ancestors (excluding itself).
  214|  4.52k|            uint64_t diff{0}; //!< How many potential parents/insertions we have to skip.
  215|  4.52k|            bool read_error{false};
  216|  4.52k|            try {
  217|       |                // Read size. Size 0 signifies the end of the DepGraph.
  218|  4.52k|                int32_t size;
  219|  4.52k|                s >> VARINT_MODE(size, VarIntMode::NONNEGATIVE_SIGNED);
  ------------------
  |  |  499|  4.52k|#define VARINT_MODE(obj, mode) Using<VarIntFormatter<mode>>(obj)
  ------------------
  220|  4.52k|                size &= 0x3FFFFF; // Enough for size up to 4M.
  221|  4.52k|                static_assert(0x3FFFFF >= 4000000);
  222|  4.52k|                if (size == 0 || topo_depgraph.TxCount() == SetType::Size()) break;
  ------------------
  |  Branch (222:21): [True: 325, False: 4.20k]
  |  Branch (222:34): [True: 8, False: 4.19k]
  ------------------
  223|       |                // Read fee, encoded as an unsigned varint (odd=negative, even=non-negative).
  224|  4.45k|                uint64_t coded_fee;
  225|  4.45k|                s >> VARINT(coded_fee);
  ------------------
  |  |  500|  4.45k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  226|  4.45k|                coded_fee &= 0xFFFFFFFFFFFFF; // Enough for fee between -21M...21M BTC.
  227|  4.45k|                static_assert(0xFFFFFFFFFFFFF > uint64_t{2} * 21000000 * 100000000);
  228|  4.45k|                new_feerate = {UnsignedToSigned(coded_fee), size};
  229|       |                // Read dependency information.
  230|  4.45k|                auto topo_idx = reordering.size();
  231|  4.45k|                s >> VARINT(diff);
  ------------------
  |  |  500|  4.45k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  232|  37.6k|                for (ClusterIndex dep_dist = 0; dep_dist < topo_idx; ++dep_dist) {
  ------------------
  |  Branch (232:49): [True: 33.2k, False: 4.45k]
  ------------------
  233|       |                    /** Which topo_depgraph index we are currently considering as parent of topo_idx. */
  234|  33.2k|                    ClusterIndex dep_topo_idx = topo_idx - 1 - dep_dist;
  235|       |                    // Ignore transactions which are already known ancestors of topo_idx.
  236|  33.2k|                    if (new_ancestors[dep_topo_idx]) continue;
  ------------------
  |  Branch (236:25): [True: 886, False: 32.3k]
  ------------------
  237|  32.3k|                    if (diff == 0) {
  ------------------
  |  Branch (237:25): [True: 1.09k, False: 31.2k]
  ------------------
  238|       |                        // When the skip counter has reached 0, add an actual dependency.
  239|  1.09k|                        new_ancestors |= topo_depgraph.Ancestors(dep_topo_idx);
  240|       |                        // And read the number of skips after it.
  241|  1.09k|                        s >> VARINT(diff);
  ------------------
  |  |  500|  1.09k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  242|  31.2k|                    } else {
  243|       |                        // Otherwise, dep_topo_idx is not a parent. Decrement and continue.
  244|  31.2k|                        --diff;
  245|  31.2k|                    }
  246|  32.3k|                }
  247|  4.45k|            } catch (const std::ios_base::failure&) {
  248|       |                // Continue even if a read error was encountered.
  249|    677|                read_error = true;
  250|    677|            }
  251|       |            // Construct a new transaction whenever we made it past the new_feerate construction.
  252|  4.45k|            if (new_feerate.IsEmpty()) break;
  ------------------
  |  Branch (252:17): [True: 436, False: 4.01k]
  ------------------
  253|  4.01k|            assert(reordering.size() < SetType::Size());
  254|  4.01k|            auto topo_idx = topo_depgraph.AddTransaction(new_feerate);
  255|  4.01k|            topo_depgraph.AddDependencies(new_ancestors, topo_idx);
  256|  4.01k|            if (total_size < SetType::Size()) {
  ------------------
  |  Branch (256:17): [True: 1.75k, False: 2.25k]
  ------------------
  257|       |                // Normal case.
  258|  1.75k|                diff %= SetType::Size();
  259|  1.75k|                if (diff <= total_size) {
  ------------------
  |  Branch (259:21): [True: 1.09k, False: 662]
  ------------------
  260|       |                    // Insert the new transaction at distance diff back from the end.
  261|  5.75k|                    for (auto& pos : reordering) {
  ------------------
  |  Branch (261:36): [True: 5.75k, False: 1.09k]
  ------------------
  262|  5.75k|                        pos += (pos >= total_size - diff);
  263|  5.75k|                    }
  264|  1.09k|                    reordering.push_back(total_size++ - diff);
  265|  1.09k|                } else {
  266|       |                    // Append diff - total_size holes at the end, plus the new transaction.
  267|    662|                    total_size = diff;
  268|    662|                    reordering.push_back(total_size++);
  269|    662|                }
  270|  2.25k|            } else {
  271|       |                // In case total_size == SetType::Size, it is not possible to insert the new
  272|       |                // transaction without exceeding SetType's size. Instead, interpret diff as an
  273|       |                // index into the holes, and overwrite a position there. This branch is never used
  274|       |                // when deserializing the output of the serializer, but gives meaning to otherwise
  275|       |                // invalid input.
  276|  2.25k|                diff %= (SetType::Size() - reordering.size());
  277|  2.25k|                SetType holes = SetType::Fill(SetType::Size());
  278|  28.2k|                for (auto pos : reordering) holes.Reset(pos);
  ------------------
  |  Branch (278:31): [True: 28.2k, False: 2.25k]
  ------------------
  279|  32.6k|                for (auto pos : holes) {
  ------------------
  |  Branch (279:31): [True: 32.6k, False: 0]
  ------------------
  280|  32.6k|                    if (diff == 0) {
  ------------------
  |  Branch (280:25): [True: 2.25k, False: 30.3k]
  ------------------
  281|  2.25k|                        reordering.push_back(pos);
  282|  2.25k|                        break;
  283|  2.25k|                    }
  284|  30.3k|                    --diff;
  285|  30.3k|                }
  286|  2.25k|            }
  287|       |            // Stop if a read error was encountered during deserialization.
  288|  4.01k|            if (read_error) break;
  ------------------
  |  Branch (288:17): [True: 241, False: 3.77k]
  ------------------
  289|  4.01k|        }
  290|       |
  291|       |        // Construct the original cluster order depgraph.
  292|    750|        depgraph = DepGraph(topo_depgraph, reordering, total_size);
  293|    750|    }
cluster_linearize.cpp:_ZN12_GLOBAL__N_117DepGraphFormatter16UnsignedToSignedEm:
  125|  4.01k|    {
  126|  4.01k|        if (x & 1) {
  ------------------
  |  Branch (126:13): [True: 2.59k, False: 1.42k]
  ------------------
  127|  2.59k|            return -int64_t(x / 2) - 1;
  128|  2.59k|        } else {
  129|  1.42k|            return int64_t(x / 2);
  130|  1.42k|        }
  131|  4.01k|    }

_ZN13bitset_detail9IntBitSetIjE4SizeEv:
  177|  18.5k|    static constexpr unsigned Size() noexcept { return MAX_SIZE; }
_ZNK13bitset_detail9IntBitSetIjEixEj:
  170|  77.7k|    {
  171|  77.7k|        Assume(pos < MAX_SIZE);
  ------------------
  |  |   97|  77.7k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  172|  77.7k|        return (m_val >> pos) & 1U;
  173|  77.7k|    }
_ZN13bitset_detail9IntBitSetIjE3SetEj:
  152|  58.3k|    {
  153|  58.3k|        Assume(pos < MAX_SIZE);
  ------------------
  |  |   97|  58.3k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  154|  58.3k|        m_val |= I{1U} << pos;
  155|  58.3k|    }
_ZN13bitset_detail9IntBitSetIjE5ResetEj:
  164|  36.3k|    {
  165|  36.3k|        Assume(pos < MAX_SIZE);
  ------------------
  |  |   97|  36.3k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  166|  36.3k|        m_val &= ~I(I{1U} << pos);
  167|  36.3k|    }
_ZN13bitset_detail9IntBitSetIjE9SingletonEj:
  138|  54.6k|    {
  139|  54.6k|        Assume(i < MAX_SIZE);
  ------------------
  |  |   97|  54.6k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  140|  54.6k|        return IntBitSet(I(1U) << i);
  141|  54.6k|    }
_ZN13bitset_detail9IntBitSetIjEC2Ej:
   71|   105k|    IntBitSet(I val) noexcept : m_val{val} {}
_ZNK13bitset_detail9IntBitSetIjE3AnyEv:
  181|  14.1k|    constexpr bool Any() const noexcept { return !None(); }
_ZNK13bitset_detail9IntBitSetIjE4NoneEv:
  179|  23.7k|    constexpr bool None() const noexcept { return m_val == 0; }
_ZNK13bitset_detail9IntBitSetIjE5FirstEv:
  188|  4.01k|    {
  189|  4.01k|        Assume(m_val != 0);
  ------------------
  |  |   97|  4.01k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  190|  4.01k|        return std::countr_zero(m_val);
  191|  4.01k|    }
_ZNK13bitset_detail9IntBitSetIjE4LastEv:
  194|    512|    {
  195|    512|        Assume(m_val != 0);
  ------------------
  |  |   97|    512|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  196|    512|        return std::bit_width(m_val) - 1;
  197|    512|    }
_ZNK13bitset_detail9IntBitSetIjE5CountEv:
  175|  8.96k|    constexpr unsigned Count() const noexcept { return PopCount(m_val); }
_ZN13bitset_detail8PopCountIjEEjT_:
   39|  8.96k|{
   40|  8.96k|    static_assert(std::is_integral_v<I> && std::is_unsigned_v<I> && std::numeric_limits<I>::radix == 2);
   41|  8.96k|    constexpr auto BITS = std::numeric_limits<I>::digits;
   42|       |    // Algorithms from https://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation.
   43|       |    // These seem to be faster than std::popcount when compiling for non-SSE4 on x86_64.
   44|  8.96k|    if constexpr (BITS <= 32) {
   45|  8.96k|        v -= (v >> 1) & 0x55555555;
   46|  8.96k|        v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
   47|  8.96k|        v = (v + (v >> 4)) & 0x0f0f0f0f;
   48|  8.96k|        if constexpr (BITS > 8) v += v >> 8;
   49|  8.96k|        if constexpr (BITS > 16) v += v >> 16;
   50|  8.96k|        return v & 0x3f;
   51|       |    } else {
   52|       |        static_assert(BITS <= 64);
   53|       |        v -= (v >> 1) & 0x5555555555555555;
   54|       |        v = (v & 0x3333333333333333) + ((v >> 2) & 0x3333333333333333);
   55|       |        v = (v + (v >> 4)) & 0x0f0f0f0f0f0f0f0f;
   56|       |        return (v * uint64_t{0x0101010101010101}) >> 56;
   57|       |    }
   58|  8.96k|}
_ZN13bitset_detail9IntBitSetIjEC2Ev:
  119|  53.3k|    constexpr IntBitSet() noexcept : m_val{0} {}
_ZN13bitset_detail9IntBitSetIjE4FillEj:
  144|  2.25k|    {
  145|  2.25k|        IntBitSet ret;
  146|  2.25k|        Assume(count <= MAX_SIZE);
  ------------------
  |  |   97|  2.25k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  147|  2.25k|        if (count) ret.m_val = I(~I{0}) >> (MAX_SIZE - count);
  ------------------
  |  Branch (147:13): [True: 2.25k, False: 0]
  ------------------
  148|  2.25k|        return ret;
  149|  2.25k|    }
_ZNK13bitset_detail9IntBitSetIjE5beginEv:
  183|  29.4k|    constexpr Iterator begin() const noexcept { return Iterator(m_val); }
_ZN13bitset_detail9IntBitSetIjE8IteratorC2Ej:
   86|  29.4k|        constexpr Iterator(I val) noexcept : m_val(val), m_pos(0)
   87|  29.4k|        {
   88|  29.4k|            if (m_val != 0) m_pos = std::countr_zero(m_val);
  ------------------
  |  Branch (88:17): [True: 14.4k, False: 14.9k]
  ------------------
   89|  29.4k|        }
_ZN13bitset_detaileqERKNS_9IntBitSetIjE8IteratorERKNS1_11IteratorEndE:
   98|   119k|        {
   99|   119k|            return a.m_val == 0;
  100|   119k|        }
_ZNK13bitset_detail9IntBitSetIjE3endEv:
  185|  29.4k|    constexpr IteratorEnd end() const noexcept { return IteratorEnd(); }
_ZNK13bitset_detail9IntBitSetIjE8IteratordeEv:
  111|  96.6k|        {
  112|  96.6k|            Assume(m_val != 0);
  ------------------
  |  |   97|  96.6k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  113|  96.6k|            return m_pos;
  114|  96.6k|        }
_ZN13bitset_detail9IntBitSetIjE8IteratorppEv:
  103|  90.3k|        {
  104|  90.3k|            Assume(m_val != 0);
  ------------------
  |  |   97|  90.3k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  105|  90.3k|            m_val &= m_val - I{1U};
  106|  90.3k|            if (m_val != 0) m_pos = std::countr_zero(m_val);
  ------------------
  |  Branch (106:17): [True: 82.2k, False: 8.15k]
  ------------------
  107|  90.3k|            return *this;
  108|  90.3k|        }
_ZN13bitset_detail9IntBitSetIjEoRERKS1_:
  199|  9.21k|    constexpr IntBitSet& operator|=(const IntBitSet& a) noexcept { m_val |= a.m_val; return *this; }
_ZN13bitset_detail9IntBitSetIjEmIERKS1_:
  203|  11.5k|    constexpr IntBitSet& operator-=(const IntBitSet& a) noexcept { m_val &= ~a.m_val; return *this; }
_ZN13bitset_detailanERKNS_9IntBitSetIjEES3_:
  209|  38.5k|    friend constexpr IntBitSet operator&(const IntBitSet& a, const IntBitSet& b) noexcept { return I(a.m_val & b.m_val); }
_ZN13bitset_detailmiERKNS_9IntBitSetIjEES3_:
  213|  12.0k|    friend constexpr IntBitSet operator-(const IntBitSet& a, const IntBitSet& b) noexcept { return I(a.m_val & ~b.m_val); }
_ZNK13bitset_detail9IntBitSetIjE10IsSubsetOfERKS1_:
  221|  9.42k|    constexpr bool IsSubsetOf(const IntBitSet& a) const noexcept { return (m_val & ~a.m_val) == 0; }
_ZN13bitset_detaileqERKNS_9IntBitSetIjEES3_:
  217|  38.5k|    friend constexpr bool operator==(const IntBitSet& a, const IntBitSet& b) noexcept = default;

_Z22inline_assertion_checkILb0EbEOT0_S1_PKciS3_S3_:
   52|   458k|{
   53|   458k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|   458k|    ) {
   58|   458k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 458k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|   458k|    }
   62|   458k|    return std::forward<T>(val);
   63|   458k|}
_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|    750|{
   53|    750|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|    750|    ) {
   58|    750|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 750]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|    750|    }
   62|    750|    return std::forward<T>(val);
   63|    750|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|    750|{
   53|    750|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|    750|    ) {
   58|    750|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 750]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|    750|    }
   62|    750|    return std::forward<T>(val);
   63|    750|}

_ZN7FeeFrac3MulEli:
   55|  33.2k|    {
   56|       |        // If __int128 is available, use 128-bit wide multiply.
   57|  33.2k|        return __int128{a} * b;
   58|  33.2k|    }
_ZN7FeeFracC2Ev:
   67|  20.0k|    constexpr inline FeeFrac() noexcept : fee{0}, size{0} {}
_ZN7FeeFracC2Eli:
   70|  4.01k|    constexpr inline FeeFrac(int64_t f, int32_t s) noexcept : fee{f}, size{s} {}
_ZNK7FeeFrac7IsEmptyEv:
   76|  16.0k|    bool inline IsEmpty() const noexcept {
   77|  16.0k|        return size == 0;
   78|  16.0k|    }
_ZN7FeeFracpLERKS_:
   82|  14.2k|    {
   83|  14.2k|        fee += other.fee;
   84|  14.2k|        size += other.size;
   85|  14.2k|    }
_ZeqRK7FeeFracS1_:
  108|  1.39k|    {
  109|  1.39k|        return a.fee == b.fee && a.size == b.size;
  ------------------
  |  Branch (109:16): [True: 1.39k, False: 0]
  |  Branch (109:34): [True: 1.39k, False: 0]
  ------------------
  110|  1.39k|    }
_ZrsRK7FeeFracS1_:
  128|  16.6k|    {
  129|  16.6k|        auto cross_a = Mul(a.fee, b.size), cross_b = Mul(b.fee, a.size);
  130|  16.6k|        return cross_a > cross_b;
  131|  16.6k|    }

_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   42|    750|{
   43|    750|    Assert(mock_time_in >= 0s);
  ------------------
  |  |   85|    750|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   44|    750|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   45|    750|}

