_Z16htole32_internalj:
   39|   241k|{
   40|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(host_32bits);
   41|   241k|        else return host_32bits;
   42|   241k|}
_Z16htole64_internalm:
   59|  1.07G|{
   60|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(host_64bits);
   61|  1.07G|        else return host_64bits;
   62|  1.07G|}

_Z9WriteLE64ITk8ByteTypeSt4byteEvPT_m:
   58|  1.07G|{
   59|  1.07G|    uint64_t v = htole64_internal(x);
   60|  1.07G|    memcpy(ptr, &v, 8);
   61|  1.07G|}
_Z9WriteLE32ITk8ByteTypeSt4byteEvPT_j:
   51|   241k|{
   52|   241k|    uint32_t v = htole32_internal(x);
   53|   241k|    memcpy(ptr, &v, 4);
   54|   241k|}

_ZN21InsecureRandomContext10SplitMix64ERm:
  421|  8.08M|    {
  422|  8.08M|        uint64_t z = (seedval += 0x9e3779b97f4a7c15);
  423|  8.08M|        z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9;
  424|  8.08M|        z = (z ^ (z >> 27)) * 0x94d049bb133111eb;
  425|  8.08M|        return z ^ (z >> 31);
  426|  8.08M|    }
_ZN21InsecureRandomContextC2Em:
  430|  4.04M|        : m_s0(SplitMix64(seedval)), m_s1(SplitMix64(seedval)) {}
_ZN21InsecureRandomContext6rand64Ev:
  440|  1.08G|    {
  441|  1.08G|        uint64_t s0 = m_s0, s1 = m_s1;
  442|  1.08G|        const uint64_t result = std::rotl(s0 + s1, 17) + s0;
  443|  1.08G|        s1 ^= s0;
  444|  1.08G|        m_s0 = std::rotl(s0, 49) ^ s1 ^ (s1 << 21);
  445|  1.08G|        m_s1 = std::rotl(s1, 28);
  446|  1.08G|        return result;
  447|  1.08G|    }
_ZN11RandomMixinI21InsecureRandomContextEC2Ev:
  195|  4.04M|    constexpr RandomMixin() noexcept = default;
_ZN11RandomMixinI21InsecureRandomContextE4ImplEv:
  185|  1.08G|    RandomNumberGenerator auto& Impl() noexcept { return static_cast<T&>(*this); }
_ZN11RandomMixinI21InsecureRandomContextE8fillrandE4SpanISt4byteE:
  268|  4.04M|    {
  269|  1.08G|        while (span.size() >= 8) {
  ------------------
  |  Branch (269:16): [True: 1.07G, False: 4.04M]
  ------------------
  270|  1.07G|            uint64_t gen = Impl().rand64();
  271|  1.07G|            WriteLE64(span.data(), gen);
  272|  1.07G|            span = span.subspan(8);
  273|  1.07G|        }
  274|  4.04M|        if (span.size() >= 4) {
  ------------------
  |  Branch (274:13): [True: 241k, False: 3.80M]
  ------------------
  275|   241k|            uint32_t gen = Impl().rand32();
  276|   241k|            WriteLE32(span.data(), gen);
  277|   241k|            span = span.subspan(4);
  278|   241k|        }
  279|  6.27M|        while (span.size()) {
  ------------------
  |  Branch (279:16): [True: 2.23M, False: 4.04M]
  ------------------
  280|  2.23M|            span[0] = std::byte(Impl().template randbits<8>());
  281|  2.23M|            span = span.subspan(1);
  282|  2.23M|        }
  283|  4.04M|    }
_ZN11RandomMixinI21InsecureRandomContextE6rand32Ev:
  305|   241k|    uint32_t rand32() noexcept { return Impl().template randbits<32>(); }
_ZN11RandomMixinI21InsecureRandomContextE8randbitsILi32EEEmv:
  231|   241k|    {
  232|   241k|        static_assert(Bits >= 0 && Bits <= 64);
  233|       |        if constexpr (Bits == 64) {
  234|       |            return Impl().rand64();
  235|   241k|        } else {
  236|   241k|            uint64_t ret;
  237|   241k|            if (Bits <= bitbuf_size) {
  ------------------
  |  Branch (237:17): [True: 0, False: 241k]
  ------------------
  238|      0|                ret = bitbuf;
  239|      0|                bitbuf >>= Bits;
  240|      0|                bitbuf_size -= Bits;
  241|   241k|            } else {
  242|   241k|                uint64_t gen = Impl().rand64();
  243|   241k|                ret = (gen << bitbuf_size) | bitbuf;
  244|   241k|                bitbuf = gen >> (Bits - bitbuf_size);
  245|   241k|                bitbuf_size = 64 + bitbuf_size - Bits;
  246|   241k|            }
  247|   241k|            constexpr uint64_t MASK = (uint64_t{1} << Bits) - 1;
  248|   241k|            return ret & MASK;
  249|   241k|        }
  250|   241k|    }
_ZN11RandomMixinI21InsecureRandomContextE8randbitsILi8EEEmv:
  231|  2.23M|    {
  232|  2.23M|        static_assert(Bits >= 0 && Bits <= 64);
  233|       |        if constexpr (Bits == 64) {
  234|       |            return Impl().rand64();
  235|  2.23M|        } else {
  236|  2.23M|            uint64_t ret;
  237|  2.23M|            if (Bits <= bitbuf_size) {
  ------------------
  |  Branch (237:17): [True: 523k, False: 1.70M]
  ------------------
  238|   523k|                ret = bitbuf;
  239|   523k|                bitbuf >>= Bits;
  240|   523k|                bitbuf_size -= Bits;
  241|  1.70M|            } else {
  242|  1.70M|                uint64_t gen = Impl().rand64();
  243|  1.70M|                ret = (gen << bitbuf_size) | bitbuf;
  244|  1.70M|                bitbuf = gen >> (Bits - bitbuf_size);
  245|  1.70M|                bitbuf_size = 64 + bitbuf_size - Bits;
  246|  1.70M|            }
  247|  2.23M|            constexpr uint64_t MASK = (uint64_t{1} << Bits) - 1;
  248|  2.23M|            return ret & MASK;
  249|  2.23M|        }
  250|  2.23M|    }

_ZNK4SpanISt4byteE4sizeEv:
  187|  1.10G|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanISt4byteEixEm:
  191|  2.23M|    {
  192|  2.23M|        ASSERT_IF_DEBUG(size() > pos);
  193|  2.23M|        return m_data[pos];
  194|  2.23M|    }
_ZNK4SpanISt4byteE4dataEv:
  174|  1.08G|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanISt4byteE7subspanEm:
  196|  1.08G|    {
  197|  1.08G|        ASSERT_IF_DEBUG(size() >= offset);
  198|  1.08G|        return Span<C>(m_data + offset, m_size - offset);
  199|  1.08G|    }
_ZN4SpanISt4byteEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  1.08G|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanISt4byteEC2INSt3__16vectorIS0_NS3_9allocatorIS0_EEEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  165|  2.02M|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanISt4byteE5beginEv:
  175|  2.02M|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanISt4byteE3endEv:
  176|  2.02M|    constexpr C* end() const noexcept { return m_data + m_size; }

_ZN12PoolResourceILm128ELm1EEC2Em:
  178|    479|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    479|    {
  180|    479|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    479|        AllocateChunk();
  182|    479|    }
_ZN12PoolResourceILm128ELm1EE17NumElemAlignBytesEm:
  127|   403k|    {
  128|   403k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   403k|    }
_ZN12PoolResourceILm128ELm1EE13AllocateChunkEv:
  154|  92.2k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  92.2k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  92.2k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 83.5k, False: 8.67k]
  ------------------
  158|  83.5k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|  83.5k|        }
  160|       |
  161|  92.2k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  92.2k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  92.2k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  92.2k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  92.2k|    }
_ZN12PoolResourceILm128ELm1EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   284k|    {
  144|   284k|        node = new (p) ListNode{node};
  145|   284k|    }
_ZN12PoolResourceILm128ELm1EE8ListNodeC2EPS1_:
   81|   284k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm128ELm1EE8AllocateEmm:
  213|   209k|    {
  214|   209k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 201k, False: 7.74k]
  ------------------
  215|   201k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   201k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 1.92k, False: 199k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  1.92k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  1.92k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   199k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   199k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 91.7k, False: 107k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  91.7k|                AllocateChunk();
  228|  91.7k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   199k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   201k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  7.74k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   209k|    }
_ZN12PoolResourceILm128ELm1EE16IsFreeListUsableEmm:
  135|   418k|    {
  136|   418k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 413k, False: 4.73k]
  |  Branch (136:49): [True: 402k, False: 10.7k]
  ------------------
  137|   418k|    }
_ZN12PoolResourceILm128ELm1EE10DeallocateEPvmm:
  242|   209k|    {
  243|   209k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 201k, False: 7.74k]
  ------------------
  244|   201k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   201k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   201k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  7.74k|            ::operator delete (p, std::align_val_t{alignment});
  251|  7.74k|        }
  252|   209k|    }
_ZNK12PoolResourceILm128ELm1EE14ChunkSizeBytesEv:
  266|  92.2k|    {
  267|  92.2k|        return m_chunk_size_bytes;
  268|  92.2k|    }
_ZN12PoolResourceILm128ELm1EED2Ev:
  201|    479|    {
  202|  92.2k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 92.2k, False: 479]
  ------------------
  203|  92.2k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  92.2k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  92.2k|        }
  206|    479|    }
_ZN12PoolResourceILm128ELm2EEC2Em:
  178|    443|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    443|    {
  180|    443|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    443|        AllocateChunk();
  182|    443|    }
_ZN12PoolResourceILm128ELm2EE17NumElemAlignBytesEm:
  127|   351k|    {
  128|   351k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   351k|    }
_ZN12PoolResourceILm128ELm2EE13AllocateChunkEv:
  154|  77.2k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  77.2k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  77.2k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 73.0k, False: 4.18k]
  ------------------
  158|  73.0k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|  73.0k|        }
  160|       |
  161|  77.2k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  77.2k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  77.2k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  77.2k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  77.2k|    }
_ZN12PoolResourceILm128ELm2EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   248k|    {
  144|   248k|        node = new (p) ListNode{node};
  145|   248k|    }
_ZN12PoolResourceILm128ELm2EE8ListNodeC2EPS1_:
   81|   248k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm128ELm2EE8AllocateEmm:
  213|   183k|    {
  214|   183k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 175k, False: 7.64k]
  ------------------
  215|   175k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   175k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 2.59k, False: 173k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  2.59k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  2.59k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   173k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   173k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 76.7k, False: 96.3k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  76.7k|                AllocateChunk();
  228|  76.7k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   173k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   175k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  7.64k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   183k|    }
_ZN12PoolResourceILm128ELm2EE16IsFreeListUsableEmm:
  135|   366k|    {
  136|   366k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 361k, False: 4.91k]
  |  Branch (136:49): [True: 351k, False: 10.3k]
  ------------------
  137|   366k|    }
_ZN12PoolResourceILm128ELm2EE10DeallocateEPvmm:
  242|   183k|    {
  243|   183k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 175k, False: 7.64k]
  ------------------
  244|   175k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   175k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   175k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  7.64k|            ::operator delete (p, std::align_val_t{alignment});
  251|  7.64k|        }
  252|   183k|    }
_ZNK12PoolResourceILm128ELm2EE14ChunkSizeBytesEv:
  266|  77.2k|    {
  267|  77.2k|        return m_chunk_size_bytes;
  268|  77.2k|    }
_ZN12PoolResourceILm128ELm2EED2Ev:
  201|    443|    {
  202|  77.2k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 77.2k, False: 443]
  ------------------
  203|  77.2k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  77.2k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  77.2k|        }
  206|    443|    }
_ZN12PoolResourceILm128ELm4EEC2Em:
  178|    422|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    422|    {
  180|    422|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    422|        AllocateChunk();
  182|    422|    }
_ZN12PoolResourceILm128ELm4EE17NumElemAlignBytesEm:
  127|   294k|    {
  128|   294k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   294k|    }
_ZN12PoolResourceILm128ELm4EE13AllocateChunkEv:
  154|  77.0k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  77.0k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  77.0k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 73.4k, False: 3.65k]
  ------------------
  158|  73.4k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|  73.4k|        }
  160|       |
  161|  77.0k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  77.0k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  77.0k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  77.0k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  77.0k|    }
_ZN12PoolResourceILm128ELm4EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   220k|    {
  144|   220k|        node = new (p) ListNode{node};
  145|   220k|    }
_ZN12PoolResourceILm128ELm4EE8ListNodeC2EPS1_:
   81|   220k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm128ELm4EE8AllocateEmm:
  213|   157k|    {
  214|   157k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 147k, False: 10.1k]
  ------------------
  215|   147k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   147k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 2.29k, False: 144k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  2.29k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  2.29k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   144k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   144k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 76.6k, False: 68.1k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  76.6k|                AllocateChunk();
  228|  76.6k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   144k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   147k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  10.1k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   157k|    }
_ZN12PoolResourceILm128ELm4EE16IsFreeListUsableEmm:
  135|   314k|    {
  136|   314k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 306k, False: 8.20k]
  |  Branch (136:49): [True: 294k, False: 12.0k]
  ------------------
  137|   314k|    }
_ZN12PoolResourceILm128ELm4EE10DeallocateEPvmm:
  242|   157k|    {
  243|   157k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 147k, False: 10.1k]
  ------------------
  244|   147k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   147k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   147k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  10.1k|            ::operator delete (p, std::align_val_t{alignment});
  251|  10.1k|        }
  252|   157k|    }
_ZNK12PoolResourceILm128ELm4EE14ChunkSizeBytesEv:
  266|  77.0k|    {
  267|  77.0k|        return m_chunk_size_bytes;
  268|  77.0k|    }
_ZN12PoolResourceILm128ELm4EED2Ev:
  201|    422|    {
  202|  77.0k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 77.0k, False: 422]
  ------------------
  203|  77.0k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  77.0k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  77.0k|        }
  206|    422|    }
_ZN12PoolResourceILm128ELm8EEC2Em:
  178|    666|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    666|    {
  180|    666|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    666|        AllocateChunk();
  182|    666|    }
_ZN12PoolResourceILm128ELm8EE17NumElemAlignBytesEm:
  127|   773k|    {
  128|   773k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   773k|    }
_ZN12PoolResourceILm128ELm8EE13AllocateChunkEv:
  154|   155k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|   155k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|   155k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 152k, False: 3.36k]
  ------------------
  158|   152k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|   152k|        }
  160|       |
  161|   155k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|   155k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|   155k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|   155k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|   155k|    }
_ZN12PoolResourceILm128ELm8EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   538k|    {
  144|   538k|        node = new (p) ListNode{node};
  145|   538k|    }
_ZN12PoolResourceILm128ELm8EE8ListNodeC2EPS1_:
   81|   538k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm128ELm8EE8AllocateEmm:
  213|   395k|    {
  214|   395k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 386k, False: 8.87k]
  ------------------
  215|   386k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   386k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 2.75k, False: 383k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  2.75k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  2.75k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   383k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   383k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 154k, False: 228k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|   154k|                AllocateChunk();
  228|   154k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   383k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   386k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  8.87k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   395k|    }
_ZN12PoolResourceILm128ELm8EE16IsFreeListUsableEmm:
  135|   790k|    {
  136|   790k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 785k, False: 5.12k]
  |  Branch (136:49): [True: 772k, False: 12.6k]
  ------------------
  137|   790k|    }
_ZN12PoolResourceILm128ELm8EE10DeallocateEPvmm:
  242|   395k|    {
  243|   395k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 386k, False: 8.87k]
  ------------------
  244|   386k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   386k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   386k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  8.87k|            ::operator delete (p, std::align_val_t{alignment});
  251|  8.87k|        }
  252|   395k|    }
_ZNK12PoolResourceILm128ELm8EE14ChunkSizeBytesEv:
  266|   155k|    {
  267|   155k|        return m_chunk_size_bytes;
  268|   155k|    }
_ZN12PoolResourceILm128ELm8EED2Ev:
  201|    666|    {
  202|   155k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 155k, False: 666]
  ------------------
  203|   155k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|   155k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|   155k|        }
  206|    666|    }
_ZN12PoolResourceILm8ELm8EEC2Em:
  178|    386|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    386|    {
  180|    386|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    386|        AllocateChunk();
  182|    386|    }
_ZN12PoolResourceILm8ELm8EE17NumElemAlignBytesEm:
  127|   533k|    {
  128|   533k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   533k|    }
_ZN12PoolResourceILm8ELm8EE13AllocateChunkEv:
  154|  64.7k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  64.7k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  64.7k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 0, False: 64.7k]
  ------------------
  158|      0|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|      0|        }
  160|       |
  161|  64.7k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  64.7k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  64.7k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  64.7k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  64.7k|    }
_ZN12PoolResourceILm8ELm8EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   266k|    {
  144|   266k|        node = new (p) ListNode{node};
  145|   266k|    }
_ZN12PoolResourceILm8ELm8EE8ListNodeC2EPS1_:
   81|   266k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm8ELm8EE8AllocateEmm:
  213|   304k|    {
  214|   304k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 266k, False: 37.7k]
  ------------------
  215|   266k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   266k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 1.28k, False: 265k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  1.28k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  1.28k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   265k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   265k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 64.3k, False: 201k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  64.3k|                AllocateChunk();
  228|  64.3k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   265k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   266k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  37.7k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   304k|    }
_ZN12PoolResourceILm8ELm8EE16IsFreeListUsableEmm:
  135|   608k|    {
  136|   608k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 602k, False: 6.78k]
  |  Branch (136:49): [True: 533k, False: 68.7k]
  ------------------
  137|   608k|    }
_ZN12PoolResourceILm8ELm8EE10DeallocateEPvmm:
  242|   304k|    {
  243|   304k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 266k, False: 37.7k]
  ------------------
  244|   266k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   266k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   266k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  37.7k|            ::operator delete (p, std::align_val_t{alignment});
  251|  37.7k|        }
  252|   304k|    }
_ZNK12PoolResourceILm8ELm8EE14ChunkSizeBytesEv:
  266|  64.7k|    {
  267|  64.7k|        return m_chunk_size_bytes;
  268|  64.7k|    }
_ZN12PoolResourceILm8ELm8EED2Ev:
  201|    386|    {
  202|  64.7k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 64.7k, False: 386]
  ------------------
  203|  64.7k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  64.7k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  64.7k|        }
  206|    386|    }
_ZN12PoolResourceILm16ELm16EEC2Em:
  178|    500|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    500|    {
  180|    500|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    500|        AllocateChunk();
  182|    500|    }
_ZN12PoolResourceILm16ELm16EE17NumElemAlignBytesEm:
  127|   925k|    {
  128|   925k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   925k|    }
_ZN12PoolResourceILm16ELm16EE13AllocateChunkEv:
  154|  67.1k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  67.1k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  67.1k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 0, False: 67.1k]
  ------------------
  158|      0|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|      0|        }
  160|       |
  161|  67.1k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  67.1k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  67.1k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  67.1k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  67.1k|    }
_ZN12PoolResourceILm16ELm16EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   462k|    {
  144|   462k|        node = new (p) ListNode{node};
  145|   462k|    }
_ZN12PoolResourceILm16ELm16EE8ListNodeC2EPS1_:
   81|   462k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm16ELm16EE8AllocateEmm:
  213|   476k|    {
  214|   476k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 462k, False: 14.2k]
  ------------------
  215|   462k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   462k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 1.87k, False: 460k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  1.87k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  1.87k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   460k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   460k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 66.6k, False: 394k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  66.6k|                AllocateChunk();
  228|  66.6k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   460k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   462k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  14.2k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   476k|    }
_ZN12PoolResourceILm16ELm16EE16IsFreeListUsableEmm:
  135|   953k|    {
  136|   953k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 947k, False: 6.36k]
  |  Branch (136:49): [True: 925k, False: 22.0k]
  ------------------
  137|   953k|    }
_ZN12PoolResourceILm16ELm16EE10DeallocateEPvmm:
  242|   476k|    {
  243|   476k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 462k, False: 14.2k]
  ------------------
  244|   462k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   462k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   462k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  14.2k|            ::operator delete (p, std::align_val_t{alignment});
  251|  14.2k|        }
  252|   476k|    }
_ZNK12PoolResourceILm16ELm16EE14ChunkSizeBytesEv:
  266|  67.1k|    {
  267|  67.1k|        return m_chunk_size_bytes;
  268|  67.1k|    }
_ZN12PoolResourceILm16ELm16EED2Ev:
  201|    500|    {
  202|  67.1k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 67.1k, False: 500]
  ------------------
  203|  67.1k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  67.1k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  67.1k|        }
  206|    500|    }
_ZN12PoolResourceILm256ELm16EEC2Em:
  178|    470|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    470|    {
  180|    470|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    470|        AllocateChunk();
  182|    470|    }
_ZN12PoolResourceILm256ELm16EE17NumElemAlignBytesEm:
  127|   256k|    {
  128|   256k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   256k|    }
_ZN12PoolResourceILm256ELm16EE13AllocateChunkEv:
  154|  33.5k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  33.5k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  33.5k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 23.5k, False: 10.0k]
  ------------------
  158|  23.5k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|  23.5k|        }
  160|       |
  161|  33.5k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  33.5k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  33.5k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  33.5k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  33.5k|    }
_ZN12PoolResourceILm256ELm16EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   151k|    {
  144|   151k|        node = new (p) ListNode{node};
  145|   151k|    }
_ZN12PoolResourceILm256ELm16EE8ListNodeC2EPS1_:
   81|   151k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm256ELm16EE8AllocateEmm:
  213|   134k|    {
  214|   134k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 127k, False: 6.88k]
  ------------------
  215|   127k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   127k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 2.10k, False: 125k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  2.10k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  2.10k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   125k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   125k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 33.1k, False: 92.7k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  33.1k|                AllocateChunk();
  228|  33.1k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   125k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   127k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  6.88k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   134k|    }
_ZN12PoolResourceILm256ELm16EE16IsFreeListUsableEmm:
  135|   269k|    {
  136|   269k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 267k, False: 2.53k]
  |  Branch (136:49): [True: 255k, False: 11.2k]
  ------------------
  137|   269k|    }
_ZN12PoolResourceILm256ELm16EE10DeallocateEPvmm:
  242|   134k|    {
  243|   134k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 127k, False: 6.88k]
  ------------------
  244|   127k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   127k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   127k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  6.88k|            ::operator delete (p, std::align_val_t{alignment});
  251|  6.88k|        }
  252|   134k|    }
_ZNK12PoolResourceILm256ELm16EE14ChunkSizeBytesEv:
  266|  33.5k|    {
  267|  33.5k|        return m_chunk_size_bytes;
  268|  33.5k|    }
_ZN12PoolResourceILm256ELm16EED2Ev:
  201|    470|    {
  202|  33.5k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 33.5k, False: 470]
  ------------------
  203|  33.5k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  33.5k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  33.5k|        }
  206|    470|    }
_ZN12PoolResourceILm256ELm64EEC2Em:
  178|    397|        : m_chunk_size_bytes(NumElemAlignBytes(chunk_size_bytes) * ELEM_ALIGN_BYTES)
  179|    397|    {
  180|    397|        assert(m_chunk_size_bytes >= MAX_BLOCK_SIZE_BYTES);
  181|    397|        AllocateChunk();
  182|    397|    }
_ZN12PoolResourceILm256ELm64EE17NumElemAlignBytesEm:
  127|   311k|    {
  128|   311k|        return (bytes + ELEM_ALIGN_BYTES - 1) / ELEM_ALIGN_BYTES + (bytes == 0);
  129|   311k|    }
_ZN12PoolResourceILm256ELm64EE13AllocateChunkEv:
  154|  69.8k|    {
  155|       |        // if there is still any available memory left, put it into the freelist.
  156|  69.8k|        size_t remaining_available_bytes = std::distance(m_available_memory_it, m_available_memory_end);
  157|  69.8k|        if (0 != remaining_available_bytes) {
  ------------------
  |  Branch (157:13): [True: 53.8k, False: 16.0k]
  ------------------
  158|  53.8k|            PlacementAddToList(m_available_memory_it, m_free_lists[remaining_available_bytes / ELEM_ALIGN_BYTES]);
  159|  53.8k|        }
  160|       |
  161|  69.8k|        void* storage = ::operator new (m_chunk_size_bytes, std::align_val_t{ELEM_ALIGN_BYTES});
  162|  69.8k|        m_available_memory_it = new (storage) std::byte[m_chunk_size_bytes];
  163|  69.8k|        m_available_memory_end = m_available_memory_it + m_chunk_size_bytes;
  164|  69.8k|        m_allocated_chunks.emplace_back(m_available_memory_it);
  165|  69.8k|    }
_ZN12PoolResourceILm256ELm64EE18PlacementAddToListEPvRPNS0_8ListNodeE:
  143|   209k|    {
  144|   209k|        node = new (p) ListNode{node};
  145|   209k|    }
_ZN12PoolResourceILm256ELm64EE8ListNodeC2EPS1_:
   81|   209k|        explicit ListNode(ListNode* next) : m_next(next) {}
_ZN12PoolResourceILm256ELm64EE8AllocateEmm:
  213|   160k|    {
  214|   160k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (214:13): [True: 155k, False: 5.31k]
  ------------------
  215|   155k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  216|   155k|            if (nullptr != m_free_lists[num_alignments]) {
  ------------------
  |  Branch (216:17): [True: 1.32k, False: 154k]
  ------------------
  217|       |                // we've already got data in the pool's freelist, unlink one element and return the pointer
  218|       |                // to the unlinked memory. Since FreeList is trivially destructible we can just treat it as
  219|       |                // uninitialized memory.
  220|  1.32k|                return std::exchange(m_free_lists[num_alignments], m_free_lists[num_alignments]->m_next);
  221|  1.32k|            }
  222|       |
  223|       |            // freelist is empty: get one allocation from allocated chunk memory.
  224|   154k|            const std::ptrdiff_t round_bytes = static_cast<std::ptrdiff_t>(num_alignments * ELEM_ALIGN_BYTES);
  225|   154k|            if (round_bytes > m_available_memory_end - m_available_memory_it) {
  ------------------
  |  Branch (225:17): [True: 69.4k, False: 84.8k]
  ------------------
  226|       |                // slow path, only happens when a new chunk needs to be allocated
  227|  69.4k|                AllocateChunk();
  228|  69.4k|            }
  229|       |
  230|       |            // Make sure we use the right amount of bytes for that freelist (might be rounded up),
  231|   154k|            return std::exchange(m_available_memory_it, m_available_memory_it + round_bytes);
  232|   155k|        }
  233|       |
  234|       |        // Can't use the pool => use operator new()
  235|  5.31k|        return ::operator new (bytes, std::align_val_t{alignment});
  236|   160k|    }
_ZN12PoolResourceILm256ELm64EE16IsFreeListUsableEmm:
  135|   321k|    {
  136|   321k|        return alignment <= ELEM_ALIGN_BYTES && bytes <= MAX_BLOCK_SIZE_BYTES;
  ------------------
  |  Branch (136:16): [True: 319k, False: 1.96k]
  |  Branch (136:49): [True: 311k, False: 8.66k]
  ------------------
  137|   321k|    }
_ZN12PoolResourceILm256ELm64EE10DeallocateEPvmm:
  242|   160k|    {
  243|   160k|        if (IsFreeListUsable(bytes, alignment)) {
  ------------------
  |  Branch (243:13): [True: 155k, False: 5.31k]
  ------------------
  244|   155k|            const std::size_t num_alignments = NumElemAlignBytes(bytes);
  245|       |            // put the memory block into the linked list. We can placement construct the FreeList
  246|       |            // into the memory since we can be sure the alignment is correct.
  247|   155k|            PlacementAddToList(p, m_free_lists[num_alignments]);
  248|   155k|        } else {
  249|       |            // Can't use the pool => forward deallocation to ::operator delete().
  250|  5.31k|            ::operator delete (p, std::align_val_t{alignment});
  251|  5.31k|        }
  252|   160k|    }
_ZNK12PoolResourceILm256ELm64EE14ChunkSizeBytesEv:
  266|  69.8k|    {
  267|  69.8k|        return m_chunk_size_bytes;
  268|  69.8k|    }
_ZN12PoolResourceILm256ELm64EED2Ev:
  201|    397|    {
  202|  69.8k|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 69.8k, False: 397]
  ------------------
  203|  69.8k|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|  69.8k|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|  69.8k|        }
  206|    397|    }

_ZN18FuzzedDataProviderC2EPKhm:
   37|  3.76k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeImEET_S1_S1_:
  205|  10.3M|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  10.3M|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  10.3M|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  10.3M|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 10.3M]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  10.3M|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  10.3M|  uint64_t result = 0;
  215|  10.3M|  size_t offset = 0;
  216|       |
  217|  18.4M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 18.4M, False: 0]
  |  Branch (217:43): [True: 9.64M, False: 8.82M]
  ------------------
  218|  18.4M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 8.15M, False: 1.48M]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  8.15M|    --remaining_bytes_;
  226|  8.15M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  8.15M|    offset += CHAR_BIT;
  228|  8.15M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  10.3M|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 10.3M, False: 0]
  ------------------
  232|  10.3M|    result = result % (range + 1);
  233|       |
  234|  10.3M|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  10.3M|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  2.21M|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.21M|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.21M|                                std::numeric_limits<T>::max());
  198|  2.21M|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  2.21M|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.21M|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.21M|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.21M|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.21M]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.21M|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.21M|  uint64_t result = 0;
  215|  2.21M|  size_t offset = 0;
  216|       |
  217|  4.42M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 2.21M, False: 2.20M]
  |  Branch (217:43): [True: 2.21M, False: 0]
  ------------------
  218|  4.42M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 2.20M, False: 2.34k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  2.20M|    --remaining_bytes_;
  226|  2.20M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  2.20M|    offset += CHAR_BIT;
  228|  2.20M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.21M|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.21M, False: 0]
  ------------------
  232|  2.21M|    result = result % (range + 1);
  233|       |
  234|  2.21M|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.21M|}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|  2.21M|inline bool FuzzedDataProvider::ConsumeBool() {
  290|  2.21M|  return 1 & ConsumeIntegral<uint8_t>();
  291|  2.21M|}

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

_Z25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
  133|  3.76k|{
  134|  3.76k|    FuzzedDataProvider provider(buffer.data(), buffer.size());
  135|  3.76k|    CallOneOf(
  136|  3.76k|        provider,
  137|  3.76k|        [&] { PoolResourceFuzzer<128, 1>{provider}.Fuzz(); },
  138|  3.76k|        [&] { PoolResourceFuzzer<128, 2>{provider}.Fuzz(); },
  139|  3.76k|        [&] { PoolResourceFuzzer<128, 4>{provider}.Fuzz(); },
  140|  3.76k|        [&] { PoolResourceFuzzer<128, 8>{provider}.Fuzz(); },
  141|       |
  142|  3.76k|        [&] { PoolResourceFuzzer<8, 8>{provider}.Fuzz(); },
  143|  3.76k|        [&] { PoolResourceFuzzer<16, 16>{provider}.Fuzz(); },
  144|       |
  145|  3.76k|        [&] { PoolResourceFuzzer<256, alignof(max_align_t)>{provider}.Fuzz(); },
  146|  3.76k|        [&] { PoolResourceFuzzer<256, 64>{provider}.Fuzz(); });
  147|  3.76k|}
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEv:
  137|    479|        [&] { PoolResourceFuzzer<128, 1>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EEC2ER18FuzzedDataProvider:
   39|    479|        : m_provider{provider},
   40|    479|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    479|    {
   42|    479|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE4FuzzEv:
  117|    479|    {
  118|    479|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   232k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 232k, False: 478]
  |  |  |  Branch (23:49): [True: 232k, False: 1]
  |  |  ------------------
  ------------------
  119|   232k|        {
  120|   232k|            CallOneOf(
  121|   232k|                m_provider,
  122|   232k|                [&] { Allocate(); },
  123|   232k|                [&] { Deallocate(); });
  124|   232k|        }
  125|    479|        Clear();
  126|    479|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE4FuzzEvENKUlvE_clEv:
  122|   209k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE8AllocateEv:
   63|   209k|    {
   64|   209k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 194, False: 209k]
  ------------------
   65|   209k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   209k|        size_t alignment = size_t{1} << alignment_bits;
   67|   209k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   209k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   209k|        Allocate(size, alignment);
   70|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE8AllocateEmm:
   45|   209k|    {
   46|   209k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   209k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   209k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   209k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   209k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   209k|        m_total_allocated += size;
   53|       |
   54|   209k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   209k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   209k|        uint64_t seed = m_sequence++;
   58|   209k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE17RandomContentFillERNS1_5EntryE:
   73|   209k|    {
   74|   209k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE5EntryC2E4SpanISt4byteEmm:
   32|   209k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE4FuzzEvENKUlvE0_clEv:
  123|  22.9k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE10DeallocateEv:
   94|   229k|    {
   95|   229k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 20.0k, False: 209k]
  ------------------
   96|  20.0k|            return;
   97|  20.0k|        }
   98|       |
   99|   209k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   209k|        Deallocate(m_entries[idx]);
  101|   209k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 207k, False: 1.21k]
  ------------------
  102|   207k|            m_entries[idx] = std::move(m_entries.back());
  103|   207k|        }
  104|   209k|        m_entries.pop_back();
  105|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE10DeallocateERKNS1_5EntryE:
   85|   209k|    {
   86|   209k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   209k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   209k|        RandomContentCheck(entry);
   89|   209k|        m_total_allocated -= entry.span.size();
   90|   209k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE18RandomContentCheckERKNS1_5EntryE:
   78|   209k|    {
   79|   209k|        std::vector<std::byte> expect(entry.span.size());
   80|   209k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   209k|        assert(std::ranges::equal(entry.span, expect));
   82|   209k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE5ClearEv:
  108|    479|    {
  109|   206k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 206k, False: 479]
  ------------------
  110|   206k|            Deallocate();
  111|   206k|        }
  112|       |
  113|    479|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    479|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_1clEv:
  138|    443|        [&] { PoolResourceFuzzer<128, 2>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EEC2ER18FuzzedDataProvider:
   39|    443|        : m_provider{provider},
   40|    443|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    443|    {
   42|    443|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE4FuzzEv:
  117|    443|    {
  118|    443|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   215k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 215k, False: 440]
  |  |  |  Branch (23:49): [True: 215k, False: 3]
  |  |  ------------------
  ------------------
  119|   215k|        {
  120|   215k|            CallOneOf(
  121|   215k|                m_provider,
  122|   215k|                [&] { Allocate(); },
  123|   215k|                [&] { Deallocate(); });
  124|   215k|        }
  125|    443|        Clear();
  126|    443|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE4FuzzEvENKUlvE_clEv:
  122|   183k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE8AllocateEv:
   63|   183k|    {
   64|   183k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 210, False: 183k]
  ------------------
   65|   183k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   183k|        size_t alignment = size_t{1} << alignment_bits;
   67|   183k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   183k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   183k|        Allocate(size, alignment);
   70|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE8AllocateEmm:
   45|   183k|    {
   46|   183k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   183k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   183k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   183k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   183k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   183k|        m_total_allocated += size;
   53|       |
   54|   183k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   183k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   183k|        uint64_t seed = m_sequence++;
   58|   183k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE17RandomContentFillERNS1_5EntryE:
   73|   183k|    {
   74|   183k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE5EntryC2E4SpanISt4byteEmm:
   32|   183k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE4FuzzEvENKUlvE0_clEv:
  123|  31.4k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE10DeallocateEv:
   94|   211k|    {
   95|   211k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 28.3k, False: 183k]
  ------------------
   96|  28.3k|            return;
   97|  28.3k|        }
   98|       |
   99|   183k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   183k|        Deallocate(m_entries[idx]);
  101|   183k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 182k, False: 1.21k]
  ------------------
  102|   182k|            m_entries[idx] = std::move(m_entries.back());
  103|   182k|        }
  104|   183k|        m_entries.pop_back();
  105|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE10DeallocateERKNS1_5EntryE:
   85|   183k|    {
   86|   183k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   183k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   183k|        RandomContentCheck(entry);
   89|   183k|        m_total_allocated -= entry.span.size();
   90|   183k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE18RandomContentCheckERKNS1_5EntryE:
   78|   183k|    {
   79|   183k|        std::vector<std::byte> expect(entry.span.size());
   80|   183k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   183k|        assert(std::ranges::equal(entry.span, expect));
   82|   183k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE5ClearEv:
  108|    443|    {
  109|   180k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 180k, False: 443]
  ------------------
  110|   180k|            Deallocate();
  111|   180k|        }
  112|       |
  113|    443|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    443|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_2clEv:
  139|    422|        [&] { PoolResourceFuzzer<128, 4>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EEC2ER18FuzzedDataProvider:
   39|    422|        : m_provider{provider},
   40|    422|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    422|    {
   42|    422|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE4FuzzEv:
  117|    422|    {
  118|    422|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   180k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 180k, False: 420]
  |  |  |  Branch (23:49): [True: 180k, False: 2]
  |  |  ------------------
  ------------------
  119|   180k|        {
  120|   180k|            CallOneOf(
  121|   180k|                m_provider,
  122|   180k|                [&] { Allocate(); },
  123|   180k|                [&] { Deallocate(); });
  124|   180k|        }
  125|    422|        Clear();
  126|    422|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE4FuzzEvENKUlvE_clEv:
  122|   157k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE8AllocateEv:
   63|   157k|    {
   64|   157k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 204, False: 157k]
  ------------------
   65|   157k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   157k|        size_t alignment = size_t{1} << alignment_bits;
   67|   157k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   157k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   157k|        Allocate(size, alignment);
   70|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE8AllocateEmm:
   45|   157k|    {
   46|   157k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   157k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   157k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   157k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   157k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   157k|        m_total_allocated += size;
   53|       |
   54|   157k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   157k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   157k|        uint64_t seed = m_sequence++;
   58|   157k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE17RandomContentFillERNS1_5EntryE:
   73|   157k|    {
   74|   157k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE5EntryC2E4SpanISt4byteEmm:
   32|   157k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE4FuzzEvENKUlvE0_clEv:
  123|  22.9k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE10DeallocateEv:
   94|   178k|    {
   95|   178k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 21.0k, False: 157k]
  ------------------
   96|  21.0k|            return;
   97|  21.0k|        }
   98|       |
   99|   157k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   157k|        Deallocate(m_entries[idx]);
  101|   157k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 156k, False: 1.07k]
  ------------------
  102|   156k|            m_entries[idx] = std::move(m_entries.back());
  103|   156k|        }
  104|   157k|        m_entries.pop_back();
  105|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE10DeallocateERKNS1_5EntryE:
   85|   157k|    {
   86|   157k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   157k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   157k|        RandomContentCheck(entry);
   89|   157k|        m_total_allocated -= entry.span.size();
   90|   157k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE18RandomContentCheckERKNS1_5EntryE:
   78|   157k|    {
   79|   157k|        std::vector<std::byte> expect(entry.span.size());
   80|   157k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   157k|        assert(std::ranges::equal(entry.span, expect));
   82|   157k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE5ClearEv:
  108|    422|    {
  109|   155k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 155k, False: 422]
  ------------------
  110|   155k|            Deallocate();
  111|   155k|        }
  112|       |
  113|    422|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    422|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_3clEv:
  140|    666|        [&] { PoolResourceFuzzer<128, 8>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EEC2ER18FuzzedDataProvider:
   39|    666|        : m_provider{provider},
   40|    666|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    666|    {
   42|    666|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE4FuzzEv:
  117|    666|    {
  118|    666|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   424k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 424k, False: 664]
  |  |  |  Branch (23:49): [True: 424k, False: 2]
  |  |  ------------------
  ------------------
  119|   424k|        {
  120|   424k|            CallOneOf(
  121|   424k|                m_provider,
  122|   424k|                [&] { Allocate(); },
  123|   424k|                [&] { Deallocate(); });
  124|   424k|        }
  125|    666|        Clear();
  126|    666|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE4FuzzEvENKUlvE_clEv:
  122|   395k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE8AllocateEv:
   63|   395k|    {
   64|   395k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 199, False: 395k]
  ------------------
   65|   395k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   395k|        size_t alignment = size_t{1} << alignment_bits;
   67|   395k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   395k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   395k|        Allocate(size, alignment);
   70|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE8AllocateEmm:
   45|   395k|    {
   46|   395k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   395k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   395k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   395k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   395k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   395k|        m_total_allocated += size;
   53|       |
   54|   395k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   395k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   395k|        uint64_t seed = m_sequence++;
   58|   395k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE17RandomContentFillERNS1_5EntryE:
   73|   395k|    {
   74|   395k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE5EntryC2E4SpanISt4byteEmm:
   32|   395k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE4FuzzEvENKUlvE0_clEv:
  123|  28.7k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE10DeallocateEv:
   94|   419k|    {
   95|   419k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 24.7k, False: 395k]
  ------------------
   96|  24.7k|            return;
   97|  24.7k|        }
   98|       |
   99|   395k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   395k|        Deallocate(m_entries[idx]);
  101|   395k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 393k, False: 1.69k]
  ------------------
  102|   393k|            m_entries[idx] = std::move(m_entries.back());
  103|   393k|        }
  104|   395k|        m_entries.pop_back();
  105|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE10DeallocateERKNS1_5EntryE:
   85|   395k|    {
   86|   395k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   395k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   395k|        RandomContentCheck(entry);
   89|   395k|        m_total_allocated -= entry.span.size();
   90|   395k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE18RandomContentCheckERKNS1_5EntryE:
   78|   395k|    {
   79|   395k|        std::vector<std::byte> expect(entry.span.size());
   80|   395k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   395k|        assert(std::ranges::equal(entry.span, expect));
   82|   395k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE5ClearEv:
  108|    666|    {
  109|   391k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 391k, False: 666]
  ------------------
  110|   391k|            Deallocate();
  111|   391k|        }
  112|       |
  113|    666|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    666|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_4clEv:
  142|    386|        [&] { PoolResourceFuzzer<8, 8>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EEC2ER18FuzzedDataProvider:
   39|    386|        : m_provider{provider},
   40|    386|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    386|    {
   42|    386|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE4FuzzEv:
  117|    386|    {
  118|    386|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   321k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 320k, False: 384]
  |  |  |  Branch (23:49): [True: 320k, False: 2]
  |  |  ------------------
  ------------------
  119|   320k|        {
  120|   320k|            CallOneOf(
  121|   320k|                m_provider,
  122|   320k|                [&] { Allocate(); },
  123|   320k|                [&] { Deallocate(); });
  124|   320k|        }
  125|    386|        Clear();
  126|    386|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE4FuzzEvENKUlvE_clEv:
  122|   304k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE8AllocateEv:
   63|   304k|    {
   64|   304k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 221, False: 304k]
  ------------------
   65|   304k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   304k|        size_t alignment = size_t{1} << alignment_bits;
   67|   304k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   304k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   304k|        Allocate(size, alignment);
   70|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE8AllocateEmm:
   45|   304k|    {
   46|   304k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   304k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   304k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   304k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   304k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   304k|        m_total_allocated += size;
   53|       |
   54|   304k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   304k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   304k|        uint64_t seed = m_sequence++;
   58|   304k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE17RandomContentFillERNS1_5EntryE:
   73|   304k|    {
   74|   304k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE5EntryC2E4SpanISt4byteEmm:
   32|   304k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE4FuzzEvENKUlvE0_clEv:
  123|  15.9k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE10DeallocateEv:
   94|   318k|    {
   95|   318k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 13.5k, False: 304k]
  ------------------
   96|  13.5k|            return;
   97|  13.5k|        }
   98|       |
   99|   304k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   304k|        Deallocate(m_entries[idx]);
  101|   304k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 303k, False: 1.15k]
  ------------------
  102|   303k|            m_entries[idx] = std::move(m_entries.back());
  103|   303k|        }
  104|   304k|        m_entries.pop_back();
  105|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE10DeallocateERKNS1_5EntryE:
   85|   304k|    {
   86|   304k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   304k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   304k|        RandomContentCheck(entry);
   89|   304k|        m_total_allocated -= entry.span.size();
   90|   304k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE18RandomContentCheckERKNS1_5EntryE:
   78|   304k|    {
   79|   304k|        std::vector<std::byte> expect(entry.span.size());
   80|   304k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   304k|        assert(std::ranges::equal(entry.span, expect));
   82|   304k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE5ClearEv:
  108|    386|    {
  109|   302k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 302k, False: 386]
  ------------------
  110|   302k|            Deallocate();
  111|   302k|        }
  112|       |
  113|    386|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    386|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_5clEv:
  143|    500|        [&] { PoolResourceFuzzer<16, 16>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EEC2ER18FuzzedDataProvider:
   39|    500|        : m_provider{provider},
   40|    500|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    500|    {
   42|    500|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE4FuzzEv:
  117|    500|    {
  118|    500|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   508k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 508k, False: 490]
  |  |  |  Branch (23:49): [True: 508k, False: 10]
  |  |  ------------------
  ------------------
  119|   508k|        {
  120|   508k|            CallOneOf(
  121|   508k|                m_provider,
  122|   508k|                [&] { Allocate(); },
  123|   508k|                [&] { Deallocate(); });
  124|   508k|        }
  125|    500|        Clear();
  126|    500|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE4FuzzEvENKUlvE_clEv:
  122|   477k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE8AllocateEv:
   63|   477k|    {
   64|   477k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 214, False: 476k]
  ------------------
   65|   476k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   476k|        size_t alignment = size_t{1} << alignment_bits;
   67|   476k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   476k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   476k|        Allocate(size, alignment);
   70|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE8AllocateEmm:
   45|   476k|    {
   46|   476k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   476k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   476k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   476k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   476k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   476k|        m_total_allocated += size;
   53|       |
   54|   476k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   476k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   476k|        uint64_t seed = m_sequence++;
   58|   476k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE17RandomContentFillERNS1_5EntryE:
   73|   476k|    {
   74|   476k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE5EntryC2E4SpanISt4byteEmm:
   32|   476k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE4FuzzEvENKUlvE0_clEv:
  123|  30.9k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE10DeallocateEv:
   94|   490k|    {
   95|   490k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 14.0k, False: 476k]
  ------------------
   96|  14.0k|            return;
   97|  14.0k|        }
   98|       |
   99|   476k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   476k|        Deallocate(m_entries[idx]);
  101|   476k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 475k, False: 1.17k]
  ------------------
  102|   475k|            m_entries[idx] = std::move(m_entries.back());
  103|   475k|        }
  104|   476k|        m_entries.pop_back();
  105|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE10DeallocateERKNS1_5EntryE:
   85|   476k|    {
   86|   476k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   476k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   476k|        RandomContentCheck(entry);
   89|   476k|        m_total_allocated -= entry.span.size();
   90|   476k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE18RandomContentCheckERKNS1_5EntryE:
   78|   476k|    {
   79|   476k|        std::vector<std::byte> expect(entry.span.size());
   80|   476k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   476k|        assert(std::ranges::equal(entry.span, expect));
   82|   476k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE5ClearEv:
  108|    500|    {
  109|   460k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 460k, False: 500]
  ------------------
  110|   460k|            Deallocate();
  111|   460k|        }
  112|       |
  113|    500|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    500|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_6clEv:
  145|    470|        [&] { PoolResourceFuzzer<256, alignof(max_align_t)>{provider}.Fuzz(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EEC2ER18FuzzedDataProvider:
   39|    470|        : m_provider{provider},
   40|    470|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    470|    {
   42|    470|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE4FuzzEv:
  117|    470|    {
  118|    470|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   148k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 148k, False: 469]
  |  |  |  Branch (23:49): [True: 148k, False: 1]
  |  |  ------------------
  ------------------
  119|   148k|        {
  120|   148k|            CallOneOf(
  121|   148k|                m_provider,
  122|   148k|                [&] { Allocate(); },
  123|   148k|                [&] { Deallocate(); });
  124|   148k|        }
  125|    470|        Clear();
  126|    470|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE4FuzzEvENKUlvE_clEv:
  122|   135k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE8AllocateEv:
   63|   135k|    {
   64|   135k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 228, False: 134k]
  ------------------
   65|   134k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   134k|        size_t alignment = size_t{1} << alignment_bits;
   67|   134k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   134k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   134k|        Allocate(size, alignment);
   70|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE8AllocateEmm:
   45|   134k|    {
   46|   134k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   134k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   134k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   134k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   134k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   134k|        m_total_allocated += size;
   53|       |
   54|   134k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   134k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   134k|        uint64_t seed = m_sequence++;
   58|   134k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE17RandomContentFillERNS1_5EntryE:
   73|   134k|    {
   74|   134k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE5EntryC2E4SpanISt4byteEmm:
   32|   134k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE4FuzzEvENKUlvE0_clEv:
  123|  13.3k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE10DeallocateEv:
   94|   146k|    {
   95|   146k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 11.7k, False: 134k]
  ------------------
   96|  11.7k|            return;
   97|  11.7k|        }
   98|       |
   99|   134k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   134k|        Deallocate(m_entries[idx]);
  101|   134k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 133k, False: 1.21k]
  ------------------
  102|   133k|            m_entries[idx] = std::move(m_entries.back());
  103|   133k|        }
  104|   134k|        m_entries.pop_back();
  105|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE10DeallocateERKNS1_5EntryE:
   85|   134k|    {
   86|   134k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   134k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   134k|        RandomContentCheck(entry);
   89|   134k|        m_total_allocated -= entry.span.size();
   90|   134k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE18RandomContentCheckERKNS1_5EntryE:
   78|   134k|    {
   79|   134k|        std::vector<std::byte> expect(entry.span.size());
   80|   134k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   134k|        assert(std::ranges::equal(entry.span, expect));
   82|   134k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE5ClearEv:
  108|    470|    {
  109|   133k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 133k, False: 470]
  ------------------
  110|   133k|            Deallocate();
  111|   133k|        }
  112|       |
  113|    470|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    470|    }
poolresource.cpp:_ZZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_7clEv:
  146|    397|        [&] { PoolResourceFuzzer<256, 64>{provider}.Fuzz(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EEC2ER18FuzzedDataProvider:
   39|    397|        : m_provider{provider},
   40|    397|          m_test_resource{provider.ConsumeIntegralInRange<size_t>(MAX_BLOCK_SIZE_BYTES, 262144)}
   41|    397|    {
   42|    397|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE4FuzzEv:
  117|    397|    {
  118|    397|        LIMITED_WHILE(m_provider.ConsumeBool(), 10000)
  ------------------
  |  |   23|   179k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 179k, False: 396]
  |  |  |  Branch (23:49): [True: 179k, False: 1]
  |  |  ------------------
  ------------------
  119|   179k|        {
  120|   179k|            CallOneOf(
  121|   179k|                m_provider,
  122|   179k|                [&] { Allocate(); },
  123|   179k|                [&] { Deallocate(); });
  124|   179k|        }
  125|    397|        Clear();
  126|    397|    }
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE4FuzzEvENKUlvE_clEv:
  122|   161k|                [&] { Allocate(); },
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE8AllocateEv:
   63|   161k|    {
   64|   161k|        if (m_total_allocated > 0x1000000) return;
  ------------------
  |  Branch (64:13): [True: 194, False: 160k]
  ------------------
   65|   160k|        size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
   66|   160k|        size_t alignment = size_t{1} << alignment_bits;
   67|   160k|        size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
   68|   160k|        size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
   69|   160k|        Allocate(size, alignment);
   70|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE8AllocateEmm:
   45|   160k|    {
   46|   160k|        assert(size > 0);                           // Must allocate at least 1 byte.
   47|   160k|        assert(alignment > 0);                      // Alignment must be at least 1.
   48|   160k|        assert((alignment & (alignment - 1)) == 0); // Alignment must be power of 2.
   49|   160k|        assert((size & (alignment - 1)) == 0);      // Size must be a multiple of alignment.
   50|       |
   51|   160k|        auto span = Span(static_cast<std::byte*>(m_test_resource.Allocate(size, alignment)), size);
   52|   160k|        m_total_allocated += size;
   53|       |
   54|   160k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(span.data());
   55|   160k|        assert((ptr_val & (alignment - 1)) == 0);
   56|       |
   57|   160k|        uint64_t seed = m_sequence++;
   58|   160k|        RandomContentFill(m_entries.emplace_back(span, alignment, seed));
   59|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE17RandomContentFillERNS1_5EntryE:
   73|   160k|    {
   74|   160k|        InsecureRandomContext(entry.seed).fillrand(entry.span);
   75|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE5EntryC2E4SpanISt4byteEmm:
   32|   160k|        Entry(Span<std::byte> s, size_t a, uint64_t se) : span(s), alignment(a), seed(se) {}
poolresource.cpp:_ZZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE4FuzzEvENKUlvE0_clEv:
  123|  18.4k|                [&] { Deallocate(); });
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE10DeallocateEv:
   94|   178k|    {
   95|   178k|        if (m_entries.empty()) {
  ------------------
  |  Branch (95:13): [True: 17.1k, False: 160k]
  ------------------
   96|  17.1k|            return;
   97|  17.1k|        }
   98|       |
   99|   160k|        size_t idx = m_provider.ConsumeIntegralInRange<size_t>(0, m_entries.size() - 1);
  100|   160k|        Deallocate(m_entries[idx]);
  101|   160k|        if (idx != m_entries.size() - 1) {
  ------------------
  |  Branch (101:13): [True: 159k, False: 1.06k]
  ------------------
  102|   159k|            m_entries[idx] = std::move(m_entries.back());
  103|   159k|        }
  104|   160k|        m_entries.pop_back();
  105|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE10DeallocateERKNS1_5EntryE:
   85|   160k|    {
   86|   160k|        auto ptr_val = reinterpret_cast<std::uintptr_t>(entry.span.data());
   87|   160k|        assert((ptr_val & (entry.alignment - 1)) == 0);
   88|   160k|        RandomContentCheck(entry);
   89|   160k|        m_total_allocated -= entry.span.size();
   90|   160k|        m_test_resource.Deallocate(entry.span.data(), entry.span.size(), entry.alignment);
   91|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE18RandomContentCheckERKNS1_5EntryE:
   78|   160k|    {
   79|   160k|        std::vector<std::byte> expect(entry.span.size());
   80|   160k|        InsecureRandomContext(entry.seed).fillrand(expect);
   81|   160k|        assert(std::ranges::equal(entry.span, expect));
   82|   160k|    }
poolresource.cpp:_ZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE5ClearEv:
  108|    397|    {
  109|   159k|        while (!m_entries.empty()) {
  ------------------
  |  Branch (109:16): [True: 159k, False: 397]
  ------------------
  110|   159k|            Deallocate();
  111|   159k|        }
  112|       |
  113|    397|        PoolResourceTester::CheckAllDataAccountedFor(m_test_resource);
  114|    397|    }

poolresource.cpp:_Z9CallOneOfIJZ25pool_resource_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEE3$_0Z25pool_resource_fuzz_targetS3_E3$_1Z25pool_resource_fuzz_targetS3_E3$_2Z25pool_resource_fuzz_targetS3_E3$_3Z25pool_resource_fuzz_targetS3_E3$_4Z25pool_resource_fuzz_targetS3_E3$_5Z25pool_resource_fuzz_targetS3_E3$_6Z25pool_resource_fuzz_targetS3_E3$_7EEmR18FuzzedDataProviderDpT_:
   36|  3.76k|{
   37|  3.76k|    constexpr size_t call_size{sizeof...(callables)};
   38|  3.76k|    static_assert(call_size >= 1);
   39|  3.76k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|  3.76k|    size_t i{0};
   42|  30.1k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 479, False: 3.28k]
  |  Branch (42:7): [True: 443, False: 3.32k]
  |  Branch (42:7): [True: 422, False: 3.34k]
  |  Branch (42:7): [True: 666, False: 3.09k]
  |  Branch (42:7): [True: 386, False: 3.37k]
  |  Branch (42:7): [True: 500, False: 3.26k]
  |  Branch (42:7): [True: 470, False: 3.29k]
  |  Branch (42:7): [True: 397, False: 3.36k]
  ------------------
   43|  3.76k|    return call_size;
   44|  3.76k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm1EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   232k|{
   37|   232k|    constexpr size_t call_size{sizeof...(callables)};
   38|   232k|    static_assert(call_size >= 1);
   39|   232k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   232k|    size_t i{0};
   42|   464k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 209k, False: 22.9k]
  |  Branch (42:7): [True: 22.9k, False: 209k]
  ------------------
   43|   232k|    return call_size;
   44|   232k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm2EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   215k|{
   37|   215k|    constexpr size_t call_size{sizeof...(callables)};
   38|   215k|    static_assert(call_size >= 1);
   39|   215k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   215k|    size_t i{0};
   42|   430k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 183k, False: 31.4k]
  |  Branch (42:7): [True: 31.4k, False: 183k]
  ------------------
   43|   215k|    return call_size;
   44|   215k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm4EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   180k|{
   37|   180k|    constexpr size_t call_size{sizeof...(callables)};
   38|   180k|    static_assert(call_size >= 1);
   39|   180k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   180k|    size_t i{0};
   42|   360k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 157k, False: 22.9k]
  |  Branch (42:7): [True: 22.9k, False: 157k]
  ------------------
   43|   180k|    return call_size;
   44|   180k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm128ELm8EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   424k|{
   37|   424k|    constexpr size_t call_size{sizeof...(callables)};
   38|   424k|    static_assert(call_size >= 1);
   39|   424k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   424k|    size_t i{0};
   42|   848k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 395k, False: 28.7k]
  |  Branch (42:7): [True: 28.7k, False: 395k]
  ------------------
   43|   424k|    return call_size;
   44|   424k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm8ELm8EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   320k|{
   37|   320k|    constexpr size_t call_size{sizeof...(callables)};
   38|   320k|    static_assert(call_size >= 1);
   39|   320k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   320k|    size_t i{0};
   42|   641k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 304k, False: 15.9k]
  |  Branch (42:7): [True: 15.9k, False: 304k]
  ------------------
   43|   320k|    return call_size;
   44|   320k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm16ELm16EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   508k|{
   37|   508k|    constexpr size_t call_size{sizeof...(callables)};
   38|   508k|    static_assert(call_size >= 1);
   39|   508k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   508k|    size_t i{0};
   42|  1.01M|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 477k, False: 30.9k]
  |  Branch (42:7): [True: 30.9k, False: 477k]
  ------------------
   43|   508k|    return call_size;
   44|   508k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm16EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   148k|{
   37|   148k|    constexpr size_t call_size{sizeof...(callables)};
   38|   148k|    static_assert(call_size >= 1);
   39|   148k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   148k|    size_t i{0};
   42|   296k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 135k, False: 13.3k]
  |  Branch (42:7): [True: 13.3k, False: 135k]
  ------------------
   43|   148k|    return call_size;
   44|   148k|}
poolresource.cpp:_Z9CallOneOfIJZN12_GLOBAL__N_118PoolResourceFuzzerILm256ELm64EE4FuzzEvEUlvE_ZNS2_4FuzzEvEUlvE0_EEmR18FuzzedDataProviderDpT_:
   36|   179k|{
   37|   179k|    constexpr size_t call_size{sizeof...(callables)};
   38|   179k|    static_assert(call_size >= 1);
   39|   179k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|   179k|    size_t i{0};
   42|   359k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 161k, False: 18.4k]
  |  Branch (42:7): [True: 18.4k, False: 161k]
  ------------------
   43|   179k|    return call_size;
   44|   179k|}

_ZN12CheckGlobalsC2Ev:
   56|  3.76k|CheckGlobals::CheckGlobals() : m_impl(std::make_unique<CheckGlobalsImpl>()) {}
_ZN12CheckGlobalsD2Ev:
   57|  3.76k|CheckGlobals::~CheckGlobals() = default;
_ZN16CheckGlobalsImplC2Ev:
   17|  3.76k|    {
   18|  3.76k|        g_used_g_prng = false;
   19|  3.76k|        g_seeded_g_prng_zero = false;
   20|  3.76k|        g_used_system_time = false;
   21|  3.76k|        SetMockTime(0s);
   22|  3.76k|    }
_ZN16CheckGlobalsImplD2Ev:
   24|  3.76k|    {
   25|  3.76k|        if (g_used_g_prng && !g_seeded_g_prng_zero) {
  ------------------
  |  Branch (25:13): [True: 0, False: 3.76k]
  |  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|  3.76k|        if (g_used_system_time) {
  ------------------
  |  Branch (41:13): [True: 0, False: 3.76k]
  ------------------
   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|  3.76k|    }

_ZN18PoolResourceTester24CheckAllDataAccountedForILm128ELm1EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    479|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    479|        std::vector<PtrAndBytes> free_blocks;
   79|  8.62k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 8.14k, False: 479]
  ------------------
   80|  8.14k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  8.14k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   291k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 283k, False: 8.14k]
  ------------------
   83|   283k|                free_blocks.emplace_back(ptr, bytes);
   84|   283k|                ptr = ptr->m_next;
   85|   283k|            }
   86|  8.14k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    479|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    479|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 451, False: 28]
  ------------------
   90|    451|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    451|        }
   92|       |
   93|       |        // collect all chunks
   94|    479|        std::vector<PtrAndBytes> chunks;
   95|  92.2k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 92.2k, False: 479]
  ------------------
   96|  92.2k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  92.2k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    479|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    479|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    479|        auto chunk_it = chunks.begin();
  105|    479|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    479|        auto chunk_size_remaining = chunk_it->size;
  107|   283k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 283k, False: 479]
  ------------------
  108|   283k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 91.7k, False: 191k]
  ------------------
  109|  91.7k|                assert(chunk_it != chunks.end());
  110|  91.7k|                ++chunk_it;
  111|  91.7k|                assert(chunk_it != chunks.end());
  112|  91.7k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  91.7k|                chunk_size_remaining = chunk_it->size;
  114|  91.7k|            }
  115|   283k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   283k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   283k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   283k|            chunk_ptr_remaining += free_block.size;
  119|   283k|            chunk_size_remaining -= free_block.size;
  120|   283k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    479|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    479|        ++chunk_it;
  124|    479|        assert(chunk_it == chunks.end());
  125|    479|        assert(chunk_size_remaining == 0);
  126|    479|    }
_ZN18PoolResourceTester11PtrAndBytesC2EPKvm:
   26|  3.00M|            : ptr(reinterpret_cast<uintptr_t>(p)), size(s)
   27|  3.00M|        {
   28|  3.00M|        }
_ZltRKN18PoolResourceTester11PtrAndBytesES2_:
   34|  73.1M|        {
   35|  73.1M|            return a.ptr < b.ptr;
   36|  73.1M|        }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm128ELm2EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    443|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    443|        std::vector<PtrAndBytes> free_blocks;
   79|  7.97k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 7.53k, False: 443]
  ------------------
   80|  7.53k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  7.53k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   253k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 246k, False: 7.53k]
  ------------------
   83|   246k|                free_blocks.emplace_back(ptr, bytes);
   84|   246k|                ptr = ptr->m_next;
   85|   246k|            }
   86|  7.53k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    443|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    443|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 427, False: 16]
  ------------------
   90|    427|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    427|        }
   92|       |
   93|       |        // collect all chunks
   94|    443|        std::vector<PtrAndBytes> chunks;
   95|  77.2k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 77.2k, False: 443]
  ------------------
   96|  77.2k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  77.2k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    443|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    443|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    443|        auto chunk_it = chunks.begin();
  105|    443|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    443|        auto chunk_size_remaining = chunk_it->size;
  107|   246k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 246k, False: 443]
  ------------------
  108|   246k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 76.7k, False: 169k]
  ------------------
  109|  76.7k|                assert(chunk_it != chunks.end());
  110|  76.7k|                ++chunk_it;
  111|  76.7k|                assert(chunk_it != chunks.end());
  112|  76.7k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  76.7k|                chunk_size_remaining = chunk_it->size;
  114|  76.7k|            }
  115|   246k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   246k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   246k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   246k|            chunk_ptr_remaining += free_block.size;
  119|   246k|            chunk_size_remaining -= free_block.size;
  120|   246k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    443|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    443|        ++chunk_it;
  124|    443|        assert(chunk_it == chunks.end());
  125|    443|        assert(chunk_size_remaining == 0);
  126|    443|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm128ELm4EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    422|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    422|        std::vector<PtrAndBytes> free_blocks;
   79|  7.59k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 7.17k, False: 422]
  ------------------
   80|  7.17k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  7.17k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   225k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 218k, False: 7.17k]
  ------------------
   83|   218k|                free_blocks.emplace_back(ptr, bytes);
   84|   218k|                ptr = ptr->m_next;
   85|   218k|            }
   86|  7.17k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    422|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    422|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 408, False: 14]
  ------------------
   90|    408|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    408|        }
   92|       |
   93|       |        // collect all chunks
   94|    422|        std::vector<PtrAndBytes> chunks;
   95|  77.0k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 77.0k, False: 422]
  ------------------
   96|  77.0k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  77.0k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    422|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    422|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    422|        auto chunk_it = chunks.begin();
  105|    422|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    422|        auto chunk_size_remaining = chunk_it->size;
  107|   218k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 218k, False: 422]
  ------------------
  108|   218k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 76.6k, False: 141k]
  ------------------
  109|  76.6k|                assert(chunk_it != chunks.end());
  110|  76.6k|                ++chunk_it;
  111|  76.6k|                assert(chunk_it != chunks.end());
  112|  76.6k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  76.6k|                chunk_size_remaining = chunk_it->size;
  114|  76.6k|            }
  115|   218k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   218k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   218k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   218k|            chunk_ptr_remaining += free_block.size;
  119|   218k|            chunk_size_remaining -= free_block.size;
  120|   218k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    422|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    422|        ++chunk_it;
  124|    422|        assert(chunk_it == chunks.end());
  125|    422|        assert(chunk_size_remaining == 0);
  126|    422|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm128ELm8EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    666|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    666|        std::vector<PtrAndBytes> free_blocks;
   79|  11.9k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 11.3k, False: 666]
  ------------------
   80|  11.3k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  11.3k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   546k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 535k, False: 11.3k]
  ------------------
   83|   535k|                free_blocks.emplace_back(ptr, bytes);
   84|   535k|                ptr = ptr->m_next;
   85|   535k|            }
   86|  11.3k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    666|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    666|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 646, False: 20]
  ------------------
   90|    646|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    646|        }
   92|       |
   93|       |        // collect all chunks
   94|    666|        std::vector<PtrAndBytes> chunks;
   95|   155k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 155k, False: 666]
  ------------------
   96|   155k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|   155k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    666|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    666|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    666|        auto chunk_it = chunks.begin();
  105|    666|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    666|        auto chunk_size_remaining = chunk_it->size;
  107|   536k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 536k, False: 666]
  ------------------
  108|   536k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 154k, False: 381k]
  ------------------
  109|   154k|                assert(chunk_it != chunks.end());
  110|   154k|                ++chunk_it;
  111|   154k|                assert(chunk_it != chunks.end());
  112|   154k|                chunk_ptr_remaining = chunk_it->ptr;
  113|   154k|                chunk_size_remaining = chunk_it->size;
  114|   154k|            }
  115|   536k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   536k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   536k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   536k|            chunk_ptr_remaining += free_block.size;
  119|   536k|            chunk_size_remaining -= free_block.size;
  120|   536k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    666|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    666|        ++chunk_it;
  124|    666|        assert(chunk_it == chunks.end());
  125|    666|        assert(chunk_size_remaining == 0);
  126|    666|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm8ELm8EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    386|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    386|        std::vector<PtrAndBytes> free_blocks;
   79|  1.15k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 772, False: 386]
  ------------------
   80|    772|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|    772|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   266k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 265k, False: 772]
  ------------------
   83|   265k|                free_blocks.emplace_back(ptr, bytes);
   84|   265k|                ptr = ptr->m_next;
   85|   265k|            }
   86|    772|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    386|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    386|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 275, False: 111]
  ------------------
   90|    275|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    275|        }
   92|       |
   93|       |        // collect all chunks
   94|    386|        std::vector<PtrAndBytes> chunks;
   95|  64.7k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 64.7k, False: 386]
  ------------------
   96|  64.7k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  64.7k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    386|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    386|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    386|        auto chunk_it = chunks.begin();
  105|    386|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    386|        auto chunk_size_remaining = chunk_it->size;
  107|   265k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 265k, False: 386]
  ------------------
  108|   265k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 64.3k, False: 201k]
  ------------------
  109|  64.3k|                assert(chunk_it != chunks.end());
  110|  64.3k|                ++chunk_it;
  111|  64.3k|                assert(chunk_it != chunks.end());
  112|  64.3k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  64.3k|                chunk_size_remaining = chunk_it->size;
  114|  64.3k|            }
  115|   265k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   265k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   265k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   265k|            chunk_ptr_remaining += free_block.size;
  119|   265k|            chunk_size_remaining -= free_block.size;
  120|   265k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    386|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    386|        ++chunk_it;
  124|    386|        assert(chunk_it == chunks.end());
  125|    386|        assert(chunk_size_remaining == 0);
  126|    386|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm16ELm16EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    500|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    500|        std::vector<PtrAndBytes> free_blocks;
   79|  1.50k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 1.00k, False: 500]
  ------------------
   80|  1.00k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  1.00k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   461k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 460k, False: 1.00k]
  ------------------
   83|   460k|                free_blocks.emplace_back(ptr, bytes);
   84|   460k|                ptr = ptr->m_next;
   85|   460k|            }
   86|  1.00k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    500|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    500|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 402, False: 98]
  ------------------
   90|    402|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    402|        }
   92|       |
   93|       |        // collect all chunks
   94|    500|        std::vector<PtrAndBytes> chunks;
   95|  67.1k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 67.1k, False: 500]
  ------------------
   96|  67.1k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  67.1k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    500|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    500|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    500|        auto chunk_it = chunks.begin();
  105|    500|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    500|        auto chunk_size_remaining = chunk_it->size;
  107|   461k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 461k, False: 500]
  ------------------
  108|   461k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 66.6k, False: 394k]
  ------------------
  109|  66.6k|                assert(chunk_it != chunks.end());
  110|  66.6k|                ++chunk_it;
  111|  66.6k|                assert(chunk_it != chunks.end());
  112|  66.6k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  66.6k|                chunk_size_remaining = chunk_it->size;
  114|  66.6k|            }
  115|   461k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   461k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   461k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   461k|            chunk_ptr_remaining += free_block.size;
  119|   461k|            chunk_size_remaining -= free_block.size;
  120|   461k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    500|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    500|        ++chunk_it;
  124|    500|        assert(chunk_it == chunks.end());
  125|    500|        assert(chunk_size_remaining == 0);
  126|    500|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm256ELm16EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    470|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    470|        std::vector<PtrAndBytes> free_blocks;
   79|  8.46k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 7.99k, False: 470]
  ------------------
   80|  7.99k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  7.99k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   157k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 149k, False: 7.99k]
  ------------------
   83|   149k|                free_blocks.emplace_back(ptr, bytes);
   84|   149k|                ptr = ptr->m_next;
   85|   149k|            }
   86|  7.99k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    470|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    470|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 444, False: 26]
  ------------------
   90|    444|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    444|        }
   92|       |
   93|       |        // collect all chunks
   94|    470|        std::vector<PtrAndBytes> chunks;
   95|  33.5k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 33.5k, False: 470]
  ------------------
   96|  33.5k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  33.5k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    470|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    470|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    470|        auto chunk_it = chunks.begin();
  105|    470|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    470|        auto chunk_size_remaining = chunk_it->size;
  107|   149k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 149k, False: 470]
  ------------------
  108|   149k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 33.1k, False: 116k]
  ------------------
  109|  33.1k|                assert(chunk_it != chunks.end());
  110|  33.1k|                ++chunk_it;
  111|  33.1k|                assert(chunk_it != chunks.end());
  112|  33.1k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  33.1k|                chunk_size_remaining = chunk_it->size;
  114|  33.1k|            }
  115|   149k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   149k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   149k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   149k|            chunk_ptr_remaining += free_block.size;
  119|   149k|            chunk_size_remaining -= free_block.size;
  120|   149k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    470|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    470|        ++chunk_it;
  124|    470|        assert(chunk_it == chunks.end());
  125|    470|        assert(chunk_size_remaining == 0);
  126|    470|    }
_ZN18PoolResourceTester24CheckAllDataAccountedForILm256ELm64EEEvRK12PoolResourceIXT_EXT0_EE:
   76|    397|    {
   77|       |        // collect all free blocks by iterating all freelists
   78|    397|        std::vector<PtrAndBytes> free_blocks;
   79|  2.38k|        for (std::size_t freelist_idx = 0; freelist_idx < resource.m_free_lists.size(); ++freelist_idx) {
  ------------------
  |  Branch (79:44): [True: 1.98k, False: 397]
  ------------------
   80|  1.98k|            std::size_t bytes = freelist_idx * resource.ELEM_ALIGN_BYTES;
   81|  1.98k|            auto* ptr = resource.m_free_lists[freelist_idx];
   82|   210k|            while (ptr != nullptr) {
  ------------------
  |  Branch (82:20): [True: 208k, False: 1.98k]
  ------------------
   83|   208k|                free_blocks.emplace_back(ptr, bytes);
   84|   208k|                ptr = ptr->m_next;
   85|   208k|            }
   86|  1.98k|        }
   87|       |        // also add whatever has not yet been used for blocks
   88|    397|        auto num_available_bytes = resource.m_available_memory_end - resource.m_available_memory_it;
   89|    397|        if (num_available_bytes > 0) {
  ------------------
  |  Branch (89:13): [True: 361, False: 36]
  ------------------
   90|    361|            free_blocks.emplace_back(resource.m_available_memory_it, num_available_bytes);
   91|    361|        }
   92|       |
   93|       |        // collect all chunks
   94|    397|        std::vector<PtrAndBytes> chunks;
   95|  69.8k|        for (const std::byte* ptr : resource.m_allocated_chunks) {
  ------------------
  |  Branch (95:35): [True: 69.8k, False: 397]
  ------------------
   96|  69.8k|            chunks.emplace_back(ptr, resource.ChunkSizeBytes());
   97|  69.8k|        }
   98|       |
   99|       |        // now we have all the data from all freelists on the one hand side, and all chunks on the other hand side.
  100|       |        // To check if all of them match, sort by address and iterate.
  101|    397|        std::sort(free_blocks.begin(), free_blocks.end());
  102|    397|        std::sort(chunks.begin(), chunks.end());
  103|       |
  104|    397|        auto chunk_it = chunks.begin();
  105|    397|        auto chunk_ptr_remaining = chunk_it->ptr;
  106|    397|        auto chunk_size_remaining = chunk_it->size;
  107|   208k|        for (const auto& free_block : free_blocks) {
  ------------------
  |  Branch (107:37): [True: 208k, False: 397]
  ------------------
  108|   208k|            if (chunk_size_remaining == 0) {
  ------------------
  |  Branch (108:17): [True: 69.4k, False: 138k]
  ------------------
  109|  69.4k|                assert(chunk_it != chunks.end());
  110|  69.4k|                ++chunk_it;
  111|  69.4k|                assert(chunk_it != chunks.end());
  112|  69.4k|                chunk_ptr_remaining = chunk_it->ptr;
  113|  69.4k|                chunk_size_remaining = chunk_it->size;
  114|  69.4k|            }
  115|   208k|            assert(free_block.ptr == chunk_ptr_remaining);                   // ensure addresses match
  116|   208k|            assert(free_block.size <= chunk_size_remaining);                 // ensure no overflow
  117|   208k|            assert((free_block.ptr & (resource.ELEM_ALIGN_BYTES - 1)) == 0); // ensure correct alignment
  118|   208k|            chunk_ptr_remaining += free_block.size;
  119|   208k|            chunk_size_remaining -= free_block.size;
  120|   208k|        }
  121|       |        // ensure we are at the end of the chunks
  122|    397|        assert(chunk_ptr_remaining == chunk_it->ptr + chunk_it->size);
  123|    397|        ++chunk_it;
  124|    397|        assert(chunk_it == chunks.end());
  125|    397|        assert(chunk_size_remaining == 0);
  126|    397|    }

_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|  3.76k|{
   53|  3.76k|    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|  3.76k|    ) {
   58|  3.76k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 3.76k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  3.76k|    }
   62|  3.76k|    return std::forward<T>(val);
   63|  3.76k|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|  3.76k|{
   53|  3.76k|    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|  3.76k|    ) {
   58|  3.76k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 3.76k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  3.76k|    }
   62|  3.76k|    return std::forward<T>(val);
   63|  3.76k|}

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

