_ZNK8AddrInfo14GetTriedBucketERK7uint256RK15NetGroupManager:
   30|  18.8M|{
   31|  18.8M|    uint64_t hash1 = (HashWriter{} << nKey << GetKey()).GetCheapHash();
   32|  18.8M|    uint64_t hash2 = (HashWriter{} << nKey << netgroupman.GetGroup(*this) << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP)).GetCheapHash();
   33|  18.8M|    return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
   34|  18.8M|}
_ZNK8AddrInfo12GetNewBucketERK7uint256RK8CNetAddrRK15NetGroupManager:
   37|  17.9M|{
   38|  17.9M|    std::vector<unsigned char> vchSourceGroupKey = netgroupman.GetGroup(src);
   39|  17.9M|    uint64_t hash1 = (HashWriter{} << nKey << netgroupman.GetGroup(*this) << vchSourceGroupKey).GetCheapHash();
   40|  17.9M|    uint64_t hash2 = (HashWriter{} << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP)).GetCheapHash();
   41|  17.9M|    return hash2 % ADDRMAN_NEW_BUCKET_COUNT;
   42|  17.9M|}
_ZNK8AddrInfo17GetBucketPositionERK7uint256bi:
   45|  51.2M|{
   46|  51.2M|    uint64_t hash1 = (HashWriter{} << nKey << (fNew ? uint8_t{'N'} : uint8_t{'K'}) << bucket << GetKey()).GetCheapHash();
  ------------------
  |  Branch (46:48): [True: 32.3M, False: 18.8M]
  ------------------
   47|  51.2M|    return hash1 % ADDRMAN_BUCKET_SIZE;
   48|  51.2M|}
_ZNK8AddrInfo10IsTerribleENSt3__16chrono10time_pointI9NodeClockNS1_8durationIxNS0_5ratioILl1ELl1EEEEEEE:
   51|  2.28M|{
   52|  2.28M|    if (now - m_last_try <= 1min) { // never remove things tried in the last minute
  ------------------
  |  Branch (52:9): [True: 626k, False: 1.65M]
  ------------------
   53|   626k|        return false;
   54|   626k|    }
   55|       |
   56|  1.65M|    if (nTime > now + 10min) { // came in a flying DeLorean
  ------------------
  |  Branch (56:9): [True: 0, False: 1.65M]
  ------------------
   57|      0|        return true;
   58|      0|    }
   59|       |
   60|  1.65M|    if (now - nTime > ADDRMAN_HORIZON) { // not seen in recent history
  ------------------
  |  Branch (60:9): [True: 1.65M, False: 0]
  ------------------
   61|  1.65M|        return true;
   62|  1.65M|    }
   63|       |
   64|      0|    if (TicksSinceEpoch<std::chrono::seconds>(m_last_success) == 0 && nAttempts >= ADDRMAN_RETRIES) { // tried N times and never a success
  ------------------
  |  Branch (64:9): [True: 0, False: 0]
  |  Branch (64:71): [True: 0, False: 0]
  ------------------
   65|      0|        return true;
   66|      0|    }
   67|       |
   68|      0|    if (now - m_last_success > ADDRMAN_MIN_FAIL && nAttempts >= ADDRMAN_MAX_FAILURES) { // N successive failures in the last week
  ------------------
  |  Branch (68:9): [True: 0, False: 0]
  |  Branch (68:9): [True: 0, False: 0]
  |  Branch (68:52): [True: 0, False: 0]
  ------------------
   69|      0|        return true;
   70|      0|    }
   71|       |
   72|      0|    return false;
   73|      0|}
_ZN11AddrManImplC2ERK15NetGroupManagerbi:
   91|  4.46k|    : insecure_rand{deterministic}
   92|  4.46k|    , nKey{deterministic ? uint256{1} : insecure_rand.rand256()}
  ------------------
  |  Branch (92:12): [True: 4.46k, False: 0]
  ------------------
   93|  4.46k|    , m_consistency_check_ratio{consistency_check_ratio}
   94|  4.46k|    , m_netgroupman{netgroupman}
   95|  4.46k|{
   96|  4.56M|    for (auto& bucket : vvNew) {
  ------------------
  |  Branch (96:23): [True: 4.56M, False: 4.46k]
  ------------------
   97|   292M|        for (auto& entry : bucket) {
  ------------------
  |  Branch (97:26): [True: 292M, False: 4.56M]
  ------------------
   98|   292M|            entry = -1;
   99|   292M|        }
  100|  4.56M|    }
  101|  1.14M|    for (auto& bucket : vvTried) {
  ------------------
  |  Branch (101:23): [True: 1.14M, False: 4.46k]
  ------------------
  102|  73.1M|        for (auto& entry : bucket) {
  ------------------
  |  Branch (102:26): [True: 73.1M, False: 1.14M]
  ------------------
  103|  73.1M|            entry = -1;
  104|  73.1M|        }
  105|  1.14M|    }
  106|  4.46k|}
_ZN11AddrManImplD2Ev:
  109|  4.46k|{
  110|  4.46k|    nKey.SetNull();
  111|  4.46k|}
_ZN11AddrManImpl4FindERK8CServicePl:
  383|  20.9M|{
  384|  20.9M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  20.9M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  385|       |
  386|  20.9M|    const auto it = mapAddr.find(addr);
  387|  20.9M|    if (it == mapAddr.end())
  ------------------
  |  Branch (387:9): [True: 13.6M, False: 7.23M]
  ------------------
  388|  13.6M|        return nullptr;
  389|  7.23M|    if (pnId)
  ------------------
  |  Branch (389:9): [True: 7.23M, False: 0]
  ------------------
  390|  7.23M|        *pnId = (*it).second;
  391|  7.23M|    const auto it2 = mapInfo.find((*it).second);
  392|  7.23M|    if (it2 != mapInfo.end())
  ------------------
  |  Branch (392:9): [True: 7.23M, False: 0]
  ------------------
  393|  7.23M|        return &(*it2).second;
  394|      0|    return nullptr;
  395|  7.23M|}
_ZN11AddrManImpl6CreateERK8CAddressRK8CNetAddrPl:
  398|  13.1M|{
  399|  13.1M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  13.1M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  400|       |
  401|  13.1M|    nid_type nId = nIdCount++;
  402|  13.1M|    mapInfo[nId] = AddrInfo(addr, addrSource);
  403|  13.1M|    mapAddr[addr] = nId;
  404|  13.1M|    mapInfo[nId].nRandomPos = vRandom.size();
  405|  13.1M|    vRandom.push_back(nId);
  406|  13.1M|    nNew++;
  407|  13.1M|    m_network_counts[addr.GetNetwork()].n_new++;
  408|  13.1M|    if (pnId)
  ------------------
  |  Branch (408:9): [True: 13.1M, False: 0]
  ------------------
  409|  13.1M|        *pnId = nId;
  410|  13.1M|    return &mapInfo[nId];
  411|  13.1M|}
_ZNK11AddrManImpl10SwapRandomEjj:
  414|  2.17M|{
  415|  2.17M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  2.17M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  416|       |
  417|  2.17M|    if (nRndPos1 == nRndPos2)
  ------------------
  |  Branch (417:9): [True: 602k, False: 1.57M]
  ------------------
  418|   602k|        return;
  419|       |
  420|  2.17M|    assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size());
  ------------------
  |  Branch (420:5): [True: 1.57M, False: 0]
  |  Branch (420:5): [True: 1.57M, False: 0]
  |  Branch (420:5): [True: 1.57M, False: 0]
  ------------------
  421|       |
  422|  1.57M|    nid_type nId1 = vRandom[nRndPos1];
  423|  1.57M|    nid_type nId2 = vRandom[nRndPos2];
  424|       |
  425|  1.57M|    const auto it_1{mapInfo.find(nId1)};
  426|  1.57M|    const auto it_2{mapInfo.find(nId2)};
  427|  1.57M|    assert(it_1 != mapInfo.end());
  ------------------
  |  Branch (427:5): [True: 1.57M, False: 0]
  ------------------
  428|  1.57M|    assert(it_2 != mapInfo.end());
  ------------------
  |  Branch (428:5): [True: 1.57M, False: 0]
  ------------------
  429|       |
  430|  1.57M|    it_1->second.nRandomPos = nRndPos2;
  431|  1.57M|    it_2->second.nRandomPos = nRndPos1;
  432|       |
  433|  1.57M|    vRandom[nRndPos1] = nId2;
  434|  1.57M|    vRandom[nRndPos2] = nId1;
  435|  1.57M|}
_ZN11AddrManImpl6DeleteEl:
  438|  2.17M|{
  439|  2.17M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  2.17M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  440|       |
  441|  2.17M|    assert(mapInfo.contains(nId));
  ------------------
  |  Branch (441:5): [True: 2.17M, False: 0]
  ------------------
  442|  2.17M|    AddrInfo& info = mapInfo[nId];
  443|  2.17M|    assert(!info.fInTried);
  ------------------
  |  Branch (443:5): [True: 2.17M, False: 0]
  ------------------
  444|  2.17M|    assert(info.nRefCount == 0);
  ------------------
  |  Branch (444:5): [True: 2.17M, False: 0]
  ------------------
  445|       |
  446|  2.17M|    SwapRandom(info.nRandomPos, vRandom.size() - 1);
  447|  2.17M|    m_network_counts[info.GetNetwork()].n_new--;
  448|  2.17M|    vRandom.pop_back();
  449|  2.17M|    mapAddr.erase(info);
  450|  2.17M|    mapInfo.erase(nId);
  451|  2.17M|    nNew--;
  452|  2.17M|}
_ZN11AddrManImpl8ClearNewEii:
  455|  12.9M|{
  456|  12.9M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  12.9M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  457|       |
  458|       |    // if there is an entry in the specified bucket, delete it.
  459|  12.9M|    if (vvNew[nUBucket][nUBucketPos] != -1) {
  ------------------
  |  Branch (459:9): [True: 1.67M, False: 11.2M]
  ------------------
  460|  1.67M|        nid_type nIdDelete = vvNew[nUBucket][nUBucketPos];
  461|  1.67M|        AddrInfo& infoDelete = mapInfo[nIdDelete];
  462|  1.67M|        assert(infoDelete.nRefCount > 0);
  ------------------
  |  Branch (462:9): [True: 1.67M, False: 0]
  ------------------
  463|  1.67M|        infoDelete.nRefCount--;
  464|  1.67M|        vvNew[nUBucket][nUBucketPos] = -1;
  465|  1.67M|        LogDebug(BCLog::ADDRMAN, "Removed %s from new[%i][%i]\n", infoDelete.ToStringAddrPort(), nUBucket, nUBucketPos);
  ------------------
  |  |  143|  1.67M|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  1.67M|    do {                                                                                      \
  |  |  |  |  137|  1.67M|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 1.67M]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  1.67M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 1.67M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|  1.67M|        if (infoDelete.nRefCount == 0) {
  ------------------
  |  Branch (466:13): [True: 1.57M, False: 98.5k]
  ------------------
  467|  1.57M|            Delete(nIdDelete);
  468|  1.57M|        }
  469|  1.67M|    }
  470|  12.9M|}
_ZN11AddrManImpl9MakeTriedER8AddrInfol:
  473|  4.37M|{
  474|  4.37M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  4.37M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  475|       |
  476|       |    // remove the entry from all new buckets
  477|  4.37M|    const int start_bucket{info.GetNewBucket(nKey, m_netgroupman)};
  478|  4.90M|    for (int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; ++n) {
  ------------------
  |  Branch (478:21): [True: 4.90M, False: 0]
  ------------------
  479|  4.90M|        const int bucket{(start_bucket + n) % ADDRMAN_NEW_BUCKET_COUNT};
  480|  4.90M|        const int pos{info.GetBucketPosition(nKey, true, bucket)};
  481|  4.90M|        if (vvNew[bucket][pos] == nId) {
  ------------------
  |  Branch (481:13): [True: 4.37M, False: 529k]
  ------------------
  482|  4.37M|            vvNew[bucket][pos] = -1;
  483|  4.37M|            info.nRefCount--;
  484|  4.37M|            if (info.nRefCount == 0) break;
  ------------------
  |  Branch (484:17): [True: 4.37M, False: 1.09k]
  ------------------
  485|  4.37M|        }
  486|  4.90M|    }
  487|  4.37M|    nNew--;
  488|  4.37M|    m_network_counts[info.GetNetwork()].n_new--;
  489|       |
  490|  4.37M|    assert(info.nRefCount == 0);
  ------------------
  |  Branch (490:5): [True: 4.37M, False: 0]
  ------------------
  491|       |
  492|       |    // which tried bucket to move the entry to
  493|  4.37M|    int nKBucket = info.GetTriedBucket(nKey, m_netgroupman);
  494|  4.37M|    int nKBucketPos = info.GetBucketPosition(nKey, false, nKBucket);
  495|       |
  496|       |    // first make space to add it (the existing tried entry there is moved to new, deleting whatever is there).
  497|  4.37M|    if (vvTried[nKBucket][nKBucketPos] != -1) {
  ------------------
  |  Branch (497:9): [True: 0, False: 4.37M]
  ------------------
  498|       |        // find an item to evict
  499|      0|        nid_type nIdEvict = vvTried[nKBucket][nKBucketPos];
  500|      0|        assert(mapInfo.contains(nIdEvict));
  ------------------
  |  Branch (500:9): [True: 0, False: 0]
  ------------------
  501|      0|        AddrInfo& infoOld = mapInfo[nIdEvict];
  502|       |
  503|       |        // Remove the to-be-evicted item from the tried set.
  504|      0|        infoOld.fInTried = false;
  505|      0|        vvTried[nKBucket][nKBucketPos] = -1;
  506|      0|        nTried--;
  507|      0|        m_network_counts[infoOld.GetNetwork()].n_tried--;
  508|       |
  509|       |        // find which new bucket it belongs to
  510|      0|        int nUBucket = infoOld.GetNewBucket(nKey, m_netgroupman);
  511|      0|        int nUBucketPos = infoOld.GetBucketPosition(nKey, true, nUBucket);
  512|      0|        ClearNew(nUBucket, nUBucketPos);
  513|      0|        assert(vvNew[nUBucket][nUBucketPos] == -1);
  ------------------
  |  Branch (513:9): [True: 0, False: 0]
  ------------------
  514|       |
  515|       |        // Enter it into the new set again.
  516|      0|        infoOld.nRefCount = 1;
  517|      0|        vvNew[nUBucket][nUBucketPos] = nIdEvict;
  518|      0|        nNew++;
  519|      0|        m_network_counts[infoOld.GetNetwork()].n_new++;
  520|      0|        LogDebug(BCLog::ADDRMAN, "Moved %s from tried[%i][%i] to new[%i][%i] to make space\n",
  ------------------
  |  |  143|      0|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|      0|    do {                                                                                      \
  |  |  |  |  137|      0|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  521|      0|                 infoOld.ToStringAddrPort(), nKBucket, nKBucketPos, nUBucket, nUBucketPos);
  522|      0|    }
  523|  4.37M|    assert(vvTried[nKBucket][nKBucketPos] == -1);
  ------------------
  |  Branch (523:5): [True: 4.37M, False: 0]
  ------------------
  524|       |
  525|  4.37M|    vvTried[nKBucket][nKBucketPos] = nId;
  526|  4.37M|    nTried++;
  527|  4.37M|    info.fInTried = true;
  528|  4.37M|    m_network_counts[info.GetNetwork()].n_tried++;
  529|  4.37M|}
_ZN11AddrManImpl9AddSingleERK8CAddressRK8CNetAddrNSt3__16chrono8durationIxNS6_5ratioILl1ELl1EEEEE:
  532|  14.6M|{
  533|  14.6M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  14.6M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  534|       |
  535|  14.6M|    if (!addr.IsRoutable())
  ------------------
  |  Branch (535:9): [True: 62.3k, False: 14.5M]
  ------------------
  536|  62.3k|        return false;
  537|       |
  538|  14.5M|    nid_type nId;
  539|  14.5M|    AddrInfo* pinfo = Find(addr, &nId);
  540|       |
  541|       |    // Do not set a penalty for a source's self-announcement
  542|  14.5M|    if (addr == source) {
  ------------------
  |  Branch (542:9): [True: 55.4k, False: 14.5M]
  ------------------
  543|  55.4k|        time_penalty = 0s;
  544|  55.4k|    }
  545|       |
  546|  14.5M|    if (pinfo) {
  ------------------
  |  Branch (546:9): [True: 1.41M, False: 13.1M]
  ------------------
  547|       |        // periodically update nTime
  548|  1.41M|        const bool currently_online{NodeClock::now() - addr.nTime < 24h};
  549|  1.41M|        const auto update_interval{currently_online ? 1h : 24h};
  ------------------
  |  Branch (549:36): [True: 0, False: 1.41M]
  ------------------
  550|  1.41M|        if (pinfo->nTime < addr.nTime - update_interval - time_penalty) {
  ------------------
  |  Branch (550:13): [True: 21.7k, False: 1.38M]
  ------------------
  551|  21.7k|            pinfo->nTime = std::max(NodeSeconds{0s}, addr.nTime - time_penalty);
  552|  21.7k|        }
  553|       |
  554|       |        // add services
  555|  1.41M|        pinfo->nServices = ServiceFlags(pinfo->nServices | addr.nServices);
  556|       |
  557|       |        // do not update if no new information is present
  558|  1.41M|        if (addr.nTime <= pinfo->nTime) {
  ------------------
  |  Branch (558:13): [True: 53.1k, False: 1.35M]
  ------------------
  559|  53.1k|            return false;
  560|  53.1k|        }
  561|       |
  562|       |        // do not update if the entry was already in the "tried" table
  563|  1.35M|        if (pinfo->fInTried)
  ------------------
  |  Branch (563:13): [True: 486k, False: 871k]
  ------------------
  564|   486k|            return false;
  565|       |
  566|       |        // do not update if the max reference count is reached
  567|   871k|        if (pinfo->nRefCount == ADDRMAN_NEW_BUCKETS_PER_ADDRESS)
  ------------------
  |  Branch (567:13): [True: 422, False: 871k]
  ------------------
  568|    422|            return false;
  569|       |
  570|       |        // stochastic test: previous nRefCount == N: 2^N times harder to increase it
  571|   871k|        if (pinfo->nRefCount > 0) {
  ------------------
  |  Branch (571:13): [True: 871k, False: 0]
  ------------------
  572|   871k|            const int nFactor{1 << pinfo->nRefCount};
  573|   871k|            if (insecure_rand.randrange(nFactor) != 0) return false;
  ------------------
  |  Branch (573:17): [True: 442k, False: 428k]
  ------------------
  574|   871k|        }
  575|  13.1M|    } else {
  576|  13.1M|        pinfo = Create(addr, source, &nId);
  577|  13.1M|        pinfo->nTime = std::max(NodeSeconds{0s}, pinfo->nTime - time_penalty);
  578|  13.1M|    }
  579|       |
  580|  13.6M|    int nUBucket = pinfo->GetNewBucket(nKey, source, m_netgroupman);
  581|  13.6M|    int nUBucketPos = pinfo->GetBucketPosition(nKey, true, nUBucket);
  582|  13.6M|    bool fInsert = vvNew[nUBucket][nUBucketPos] == -1;
  583|  13.6M|    if (vvNew[nUBucket][nUBucketPos] != nId) {
  ------------------
  |  Branch (583:9): [True: 13.5M, False: 47.7k]
  ------------------
  584|  13.5M|        if (!fInsert) {
  ------------------
  |  Branch (584:13): [True: 2.28M, False: 11.2M]
  ------------------
  585|  2.28M|            AddrInfo& infoExisting = mapInfo[vvNew[nUBucket][nUBucketPos]];
  586|  2.28M|            if (infoExisting.IsTerrible() || (infoExisting.nRefCount > 1 && pinfo->nRefCount == 0)) {
  ------------------
  |  Branch (586:17): [True: 1.65M, False: 626k]
  |  Branch (586:47): [True: 13.6k, False: 612k]
  |  Branch (586:77): [True: 12.8k, False: 803]
  ------------------
  587|       |                // Overwrite the existing new table entry.
  588|  1.67M|                fInsert = true;
  589|  1.67M|            }
  590|  2.28M|        }
  591|  13.5M|        if (fInsert) {
  ------------------
  |  Branch (591:13): [True: 12.9M, False: 613k]
  ------------------
  592|  12.9M|            ClearNew(nUBucket, nUBucketPos);
  593|  12.9M|            pinfo->nRefCount++;
  594|  12.9M|            vvNew[nUBucket][nUBucketPos] = nId;
  595|  12.9M|            const auto mapped_as{m_netgroupman.GetMappedAS(addr)};
  596|  12.9M|            LogDebug(BCLog::ADDRMAN, "Added %s%s to new[%i][%i]\n",
  ------------------
  |  |  143|  12.9M|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  12.9M|    do {                                                                                      \
  |  |  |  |  137|  12.9M|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 12.9M]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:129): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  12.9M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 12.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  597|  12.9M|                     addr.ToStringAddrPort(), (mapped_as ? strprintf(" mapped to AS%i", mapped_as) : ""), nUBucket, nUBucketPos);
  598|  12.9M|        } else {
  599|   613k|            if (pinfo->nRefCount == 0) {
  ------------------
  |  Branch (599:17): [True: 602k, False: 11.2k]
  ------------------
  600|   602k|                Delete(nId);
  601|   602k|            }
  602|   613k|        }
  603|  13.5M|    }
  604|  13.6M|    return fInsert;
  605|  14.5M|}
_ZN11AddrManImpl5Good_ERK8CServicebNSt3__16chrono10time_pointI9NodeClockNS4_8durationIxNS3_5ratioILl1ELl1EEEEEEE:
  608|  6.31M|{
  609|  6.31M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  6.31M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  610|       |
  611|  6.31M|    nid_type nId;
  612|       |
  613|  6.31M|    m_last_good = time;
  614|       |
  615|  6.31M|    AddrInfo* pinfo = Find(addr, &nId);
  616|       |
  617|       |    // if not found, bail out
  618|  6.31M|    if (!pinfo) return false;
  ------------------
  |  Branch (618:9): [True: 494k, False: 5.82M]
  ------------------
  619|       |
  620|  5.82M|    AddrInfo& info = *pinfo;
  621|       |
  622|       |    // update info
  623|  5.82M|    info.m_last_success = time;
  624|  5.82M|    info.m_last_try = time;
  625|  5.82M|    info.nAttempts = 0;
  626|       |    // nTime is not updated here, to avoid leaking information about
  627|       |    // currently-connected peers.
  628|       |
  629|       |    // if it is already in the tried set, don't do anything else
  630|  5.82M|    if (info.fInTried) return false;
  ------------------
  |  Branch (630:9): [True: 58.4k, False: 5.76M]
  ------------------
  631|       |
  632|       |    // if it is not in new, something bad happened
  633|  5.76M|    if (!Assume(info.nRefCount > 0)) return false;
  ------------------
  |  |  128|  5.76M|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (633:9): [True: 0, False: 5.76M]
  ------------------
  634|       |
  635|       |
  636|       |    // which tried bucket to move the entry to
  637|  5.76M|    int tried_bucket = info.GetTriedBucket(nKey, m_netgroupman);
  638|  5.76M|    int tried_bucket_pos = info.GetBucketPosition(nKey, false, tried_bucket);
  639|       |
  640|       |    // Will moving this address into tried evict another entry?
  641|  5.76M|    if (test_before_evict && (vvTried[tried_bucket][tried_bucket_pos] != -1)) {
  ------------------
  |  Branch (641:9): [True: 5.76M, False: 0]
  |  Branch (641:30): [True: 1.39M, False: 4.37M]
  ------------------
  642|  1.39M|        if (m_tried_collisions.size() < ADDRMAN_SET_TRIED_COLLISION_SIZE) {
  ------------------
  |  Branch (642:13): [True: 12.4k, False: 1.37M]
  ------------------
  643|  12.4k|            m_tried_collisions.insert(nId);
  644|  12.4k|        }
  645|       |        // Output the entry we'd be colliding with, for debugging purposes
  646|  1.39M|        auto colliding_entry = mapInfo.find(vvTried[tried_bucket][tried_bucket_pos]);
  647|  1.39M|        LogDebug(BCLog::ADDRMAN, "Collision with %s while attempting to move %s to tried table. Collisions=%d",
  ------------------
  |  |  143|  1.39M|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  1.39M|    do {                                                                                      \
  |  |  |  |  137|  1.39M|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 1.39M]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:129): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  1.39M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 1.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  648|  1.39M|                 colliding_entry != mapInfo.end() ? colliding_entry->second.ToStringAddrPort() : "<unknown-addr>",
  649|  1.39M|                 addr.ToStringAddrPort(),
  650|  1.39M|                 m_tried_collisions.size());
  651|  1.39M|        return false;
  652|  4.37M|    } else {
  653|       |        // move nId to the tried tables
  654|  4.37M|        MakeTried(info, nId);
  655|  4.37M|        const auto mapped_as{m_netgroupman.GetMappedAS(addr)};
  656|  4.37M|        LogDebug(BCLog::ADDRMAN, "Moved %s%s to tried[%i][%i]\n",
  ------------------
  |  |  143|  4.37M|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  4.37M|    do {                                                                                      \
  |  |  |  |  137|  4.37M|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 4.37M]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:129): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  4.37M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 4.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  657|  4.37M|                 addr.ToStringAddrPort(), (mapped_as ? strprintf(" mapped to AS%i", mapped_as) : ""), tried_bucket, tried_bucket_pos);
  658|  4.37M|        return true;
  659|  4.37M|    }
  660|  5.76M|}
_ZN11AddrManImpl4Add_ERKNSt3__16vectorI8CAddressNS0_9allocatorIS2_EEEERK8CNetAddrNS0_6chrono8durationIxNS0_5ratioILl1ELl1EEEEE:
  663|  14.6M|{
  664|  14.6M|    int added{0};
  665|  29.3M|    for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++) {
  ------------------
  |  Branch (665:68): [True: 14.6M, False: 14.6M]
  ------------------
  666|  14.6M|        added += AddSingle(*it, source, time_penalty) ? 1 : 0;
  ------------------
  |  Branch (666:18): [True: 12.9M, False: 1.70M]
  ------------------
  667|  14.6M|    }
  668|  14.6M|    if (added > 0) {
  ------------------
  |  Branch (668:9): [True: 12.9M, False: 1.70M]
  ------------------
  669|  12.9M|        LogDebug(BCLog::ADDRMAN, "Added %i addresses (of %i) from %s: %i tried, %i new\n", added, vAddr.size(), source.ToStringAddr(), nTried, nNew);
  ------------------
  |  |  143|  12.9M|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  12.9M|    do {                                                                                      \
  |  |  |  |  137|  12.9M|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 12.9M]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  12.9M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 12.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  12.9M|    }
  671|  14.6M|    return added > 0;
  672|  14.6M|}
_ZNK11AddrManImpl5Size_ENSt3__18optionalI7NetworkEENS1_IbEE:
 1009|  9.98M|{
 1010|  9.98M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  9.98M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 1011|       |
 1012|  9.98M|    if (!net.has_value()) {
  ------------------
  |  Branch (1012:9): [True: 9.98M, False: 0]
  ------------------
 1013|  9.98M|        if (in_new.has_value()) {
  ------------------
  |  Branch (1013:13): [True: 0, False: 9.98M]
  ------------------
 1014|      0|            return *in_new ? nNew : nTried;
  ------------------
  |  Branch (1014:20): [True: 0, False: 0]
  ------------------
 1015|  9.98M|        } else {
 1016|  9.98M|            return vRandom.size();
 1017|  9.98M|        }
 1018|  9.98M|    }
 1019|      0|    if (auto it = m_network_counts.find(*net); it != m_network_counts.end()) {
  ------------------
  |  Branch (1019:48): [True: 0, False: 0]
  ------------------
 1020|      0|        auto net_count = it->second;
 1021|      0|        if (in_new.has_value()) {
  ------------------
  |  Branch (1021:13): [True: 0, False: 0]
  ------------------
 1022|      0|            return *in_new ? net_count.n_new : net_count.n_tried;
  ------------------
  |  Branch (1022:20): [True: 0, False: 0]
  ------------------
 1023|      0|        } else {
 1024|      0|            return net_count.n_new + net_count.n_tried;
 1025|      0|        }
 1026|      0|    }
 1027|      0|    return 0;
 1028|      0|}
_ZNK11AddrManImpl5CheckEv:
 1031|  61.9M|{
 1032|  61.9M|    AssertLockHeld(cs);
  ------------------
  |  |  144|  61.9M|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 1033|       |
 1034|       |    // Run consistency checks 1 in m_consistency_check_ratio times if enabled
 1035|  61.9M|    if (m_consistency_check_ratio == 0) return;
  ------------------
  |  Branch (1035:9): [True: 61.9M, False: 0]
  ------------------
 1036|      0|    if (insecure_rand.randrange(m_consistency_check_ratio) >= 1) return;
  ------------------
  |  Branch (1036:9): [True: 0, False: 0]
  ------------------
 1037|       |
 1038|      0|    const int err{CheckAddrman()};
 1039|      0|    if (err) {
  ------------------
  |  Branch (1039:9): [True: 0, False: 0]
  ------------------
 1040|      0|        LogError("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i", err);
  ------------------
  |  |  127|      0|#define LogError(...) detail_LogWithSrcLoc(BCLog::LogFlags::ALL, util::log::Level::Error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1041|       |        assert(false);
  ------------------
  |  Branch (1041:9): [Folded, False: 0]
  ------------------
 1042|      0|    }
 1043|      0|}
_ZNK11AddrManImpl12CheckAddrmanEv:
 1046|  2.23k|{
 1047|  2.23k|    AssertLockHeld(cs);
  ------------------
  |  |  144|  2.23k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 1048|       |
 1049|  2.23k|    LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE(
  ------------------
  |  |  106|  2.23k|    BCLog::Timer<std::chrono::milliseconds> BITCOIN_UNIQUE_NAME(logging_timer)(__func__, end_msg, log_category, /* msg_on_completion=*/false)
  |  |  ------------------
  |  |  |  |   11|  2.23k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  2.23k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  2.23k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1050|  2.23k|        strprintf("new %i, tried %i, total %u", nNew, nTried, vRandom.size()), BCLog::ADDRMAN);
 1051|       |
 1052|  2.23k|    std::unordered_set<nid_type> setTried;
 1053|  2.23k|    std::unordered_map<nid_type, int> mapNew;
 1054|  2.23k|    std::unordered_map<Network, NewTriedCount> local_counts;
 1055|       |
 1056|  2.23k|    if (vRandom.size() != (size_t)(nTried + nNew))
  ------------------
  |  Branch (1056:9): [True: 0, False: 2.23k]
  ------------------
 1057|      0|        return -7;
 1058|       |
 1059|  11.0M|    for (const auto& entry : mapInfo) {
  ------------------
  |  Branch (1059:28): [True: 11.0M, False: 2.23k]
  ------------------
 1060|  11.0M|        nid_type n = entry.first;
 1061|  11.0M|        const AddrInfo& info = entry.second;
 1062|  11.0M|        if (info.fInTried) {
  ------------------
  |  Branch (1062:13): [True: 4.37M, False: 6.63M]
  ------------------
 1063|  4.37M|            if (!TicksSinceEpoch<std::chrono::seconds>(info.m_last_success)) {
  ------------------
  |  Branch (1063:17): [True: 0, False: 4.37M]
  ------------------
 1064|      0|                return -1;
 1065|      0|            }
 1066|  4.37M|            if (info.nRefCount)
  ------------------
  |  Branch (1066:17): [True: 0, False: 4.37M]
  ------------------
 1067|      0|                return -2;
 1068|  4.37M|            setTried.insert(n);
 1069|  4.37M|            local_counts[info.GetNetwork()].n_tried++;
 1070|  6.63M|        } else {
 1071|  6.63M|            if (info.nRefCount < 0 || info.nRefCount > ADDRMAN_NEW_BUCKETS_PER_ADDRESS)
  ------------------
  |  Branch (1071:17): [True: 0, False: 6.63M]
  |  Branch (1071:39): [True: 0, False: 6.63M]
  ------------------
 1072|      0|                return -3;
 1073|  6.63M|            if (!info.nRefCount)
  ------------------
  |  Branch (1073:17): [True: 0, False: 6.63M]
  ------------------
 1074|      0|                return -4;
 1075|  6.63M|            mapNew[n] = info.nRefCount;
 1076|  6.63M|            local_counts[info.GetNetwork()].n_new++;
 1077|  6.63M|        }
 1078|  11.0M|        const auto it{mapAddr.find(info)};
 1079|  11.0M|        if (it == mapAddr.end() || it->second != n) {
  ------------------
  |  Branch (1079:13): [True: 0, False: 11.0M]
  |  Branch (1079:13): [True: 0, False: 11.0M]
  |  Branch (1079:36): [True: 0, False: 11.0M]
  ------------------
 1080|      0|            return -5;
 1081|      0|        }
 1082|  11.0M|        if (info.nRandomPos < 0 || (size_t)info.nRandomPos >= vRandom.size() || vRandom[info.nRandomPos] != n)
  ------------------
  |  Branch (1082:13): [True: 0, False: 11.0M]
  |  Branch (1082:36): [True: 0, False: 11.0M]
  |  Branch (1082:81): [True: 0, False: 11.0M]
  ------------------
 1083|      0|            return -14;
 1084|  11.0M|        if (info.m_last_try < NodeSeconds{0s}) {
  ------------------
  |  Branch (1084:13): [True: 0, False: 11.0M]
  ------------------
 1085|      0|            return -6;
 1086|      0|        }
 1087|  11.0M|        if (info.m_last_success < NodeSeconds{0s}) {
  ------------------
  |  Branch (1087:13): [True: 0, False: 11.0M]
  ------------------
 1088|      0|            return -8;
 1089|      0|        }
 1090|  11.0M|    }
 1091|       |
 1092|  2.23k|    if (setTried.size() != (size_t)nTried)
  ------------------
  |  Branch (1092:9): [True: 0, False: 2.23k]
  ------------------
 1093|      0|        return -9;
 1094|  2.23k|    if (mapNew.size() != (size_t)nNew)
  ------------------
  |  Branch (1094:9): [True: 0, False: 2.23k]
  ------------------
 1095|      0|        return -10;
 1096|       |
 1097|   573k|    for (int n = 0; n < ADDRMAN_TRIED_BUCKET_COUNT; n++) {
  ------------------
  |  Branch (1097:21): [True: 571k, False: 2.23k]
  ------------------
 1098|  37.1M|        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
  ------------------
  |  Branch (1098:25): [True: 36.5M, False: 571k]
  ------------------
 1099|  36.5M|            if (vvTried[n][i] != -1) {
  ------------------
  |  Branch (1099:17): [True: 4.37M, False: 32.1M]
  ------------------
 1100|  4.37M|                if (!setTried.contains(vvTried[n][i]))
  ------------------
  |  Branch (1100:21): [True: 0, False: 4.37M]
  ------------------
 1101|      0|                    return -11;
 1102|  4.37M|                const auto it{mapInfo.find(vvTried[n][i])};
 1103|  4.37M|                if (it == mapInfo.end() || it->second.GetTriedBucket(nKey, m_netgroupman) != n) {
  ------------------
  |  Branch (1103:21): [True: 0, False: 4.37M]
  |  Branch (1103:21): [True: 0, False: 4.37M]
  |  Branch (1103:44): [True: 0, False: 4.37M]
  ------------------
 1104|      0|                    return -17;
 1105|      0|                }
 1106|  4.37M|                if (it->second.GetBucketPosition(nKey, false, n) != i) {
  ------------------
  |  Branch (1106:21): [True: 0, False: 4.37M]
  ------------------
 1107|      0|                    return -18;
 1108|      0|                }
 1109|  4.37M|                setTried.erase(vvTried[n][i]);
 1110|  4.37M|            }
 1111|  36.5M|        }
 1112|   571k|    }
 1113|       |
 1114|  2.28M|    for (int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; n++) {
  ------------------
  |  Branch (1114:21): [True: 2.28M, False: 2.23k]
  ------------------
 1115|   148M|        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
  ------------------
  |  Branch (1115:25): [True: 146M, False: 2.28M]
  ------------------
 1116|   146M|            if (vvNew[n][i] != -1) {
  ------------------
  |  Branch (1116:17): [True: 6.90M, False: 139M]
  ------------------
 1117|  6.90M|                if (!mapNew.contains(vvNew[n][i]))
  ------------------
  |  Branch (1117:21): [True: 0, False: 6.90M]
  ------------------
 1118|      0|                    return -12;
 1119|  6.90M|                const auto it{mapInfo.find(vvNew[n][i])};
 1120|  6.90M|                if (it == mapInfo.end() || it->second.GetBucketPosition(nKey, true, n) != i) {
  ------------------
  |  Branch (1120:21): [True: 0, False: 6.90M]
  |  Branch (1120:21): [True: 0, False: 6.90M]
  |  Branch (1120:44): [True: 0, False: 6.90M]
  ------------------
 1121|      0|                    return -19;
 1122|      0|                }
 1123|  6.90M|                if (--mapNew[vvNew[n][i]] == 0)
  ------------------
  |  Branch (1123:21): [True: 6.63M, False: 269k]
  ------------------
 1124|  6.63M|                    mapNew.erase(vvNew[n][i]);
 1125|  6.90M|            }
 1126|   146M|        }
 1127|  2.28M|    }
 1128|       |
 1129|  2.23k|    if (setTried.size())
  ------------------
  |  Branch (1129:9): [True: 0, False: 2.23k]
  ------------------
 1130|      0|        return -13;
 1131|  2.23k|    if (mapNew.size())
  ------------------
  |  Branch (1131:9): [True: 0, False: 2.23k]
  ------------------
 1132|      0|        return -15;
 1133|  2.23k|    if (nKey.IsNull())
  ------------------
  |  Branch (1133:9): [True: 0, False: 2.23k]
  ------------------
 1134|      0|        return -16;
 1135|       |
 1136|       |    // It's possible that m_network_counts may have all-zero entries that local_counts
 1137|       |    // doesn't have if addrs from a network were being added and then removed again in the past.
 1138|  2.23k|    if (m_network_counts.size() < local_counts.size()) {
  ------------------
  |  Branch (1138:9): [True: 0, False: 2.23k]
  ------------------
 1139|      0|        return -20;
 1140|      0|    }
 1141|  11.0k|    for (const auto& [net, count] : m_network_counts) {
  ------------------
  |  Branch (1141:35): [True: 11.0k, False: 2.23k]
  ------------------
 1142|  11.0k|        if (local_counts[net].n_new != count.n_new || local_counts[net].n_tried != count.n_tried) {
  ------------------
  |  Branch (1142:13): [True: 0, False: 11.0k]
  |  Branch (1142:55): [True: 0, False: 11.0k]
  ------------------
 1143|      0|            return -21;
 1144|      0|        }
 1145|  11.0k|    }
 1146|       |
 1147|  2.23k|    return 0;
 1148|  2.23k|}
_ZNK11AddrManImpl4SizeENSt3__18optionalI7NetworkEENS1_IbEE:
 1151|  9.98M|{
 1152|  9.98M|    LOCK(cs);
  ------------------
  |  |  268|  9.98M|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  9.98M|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  9.98M|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  9.98M|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1153|  9.98M|    Check();
 1154|  9.98M|    auto ret = Size_(net, in_new);
 1155|  9.98M|    Check();
 1156|  9.98M|    return ret;
 1157|  9.98M|}
_ZN11AddrManImpl3AddERKNSt3__16vectorI8CAddressNS0_9allocatorIS2_EEEERK8CNetAddrNS0_6chrono8durationIxNS0_5ratioILl1ELl1EEEEE:
 1160|  14.6M|{
 1161|  14.6M|    LOCK(cs);
  ------------------
  |  |  268|  14.6M|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  14.6M|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  14.6M|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  14.6M|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1162|  14.6M|    Check();
 1163|  14.6M|    auto ret = Add_(vAddr, source, time_penalty);
 1164|  14.6M|    Check();
 1165|  14.6M|    return ret;
 1166|  14.6M|}
_ZN11AddrManImpl4GoodERK8CServiceNSt3__16chrono10time_pointI9NodeClockNS4_8durationIxNS3_5ratioILl1ELl1EEEEEEE:
 1169|  6.31M|{
 1170|  6.31M|    LOCK(cs);
  ------------------
  |  |  268|  6.31M|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  6.31M|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  6.31M|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  6.31M|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1171|  6.31M|    Check();
 1172|  6.31M|    auto ret = Good_(addr, /*test_before_evict=*/true, time);
 1173|  6.31M|    Check();
 1174|  6.31M|    return ret;
 1175|  6.31M|}
_ZN7AddrManC2ERK15NetGroupManagerbi:
 1255|  4.46k|    : m_impl(std::make_unique<AddrManImpl>(netgroupman, deterministic, consistency_check_ratio)) {}
_ZN7AddrManD2Ev:
 1257|  4.46k|AddrMan::~AddrMan() = default;
_ZNK7AddrMan9SerializeI10DataStreamEEvRT_:
 1261|  2.23k|{
 1262|  2.23k|    m_impl->Serialize<Stream>(s_);
 1263|  2.23k|}
_ZN7AddrMan11UnserializeI10DataStreamEEvRT_:
 1267|  2.23k|{
 1268|  2.23k|    m_impl->Unserialize<Stream>(s_);
 1269|  2.23k|}
_ZNK7AddrMan4SizeENSt3__18optionalI7NetworkEENS1_IbEE:
 1280|  9.98M|{
 1281|  9.98M|    return m_impl->Size(net, in_new);
 1282|  9.98M|}
_ZN7AddrMan3AddERKNSt3__16vectorI8CAddressNS0_9allocatorIS2_EEEERK8CNetAddrNS0_6chrono8durationIxNS0_5ratioILl1ELl1EEEEE:
 1285|  14.6M|{
 1286|  14.6M|    return m_impl->Add(vAddr, source, time_penalty);
 1287|  14.6M|}
_ZN7AddrMan4GoodERK8CServiceNSt3__16chrono10time_pointI9NodeClockNS4_8durationIxNS3_5ratioILl1ELl1EEEEEEE:
 1290|  6.31M|{
 1291|  6.31M|    return m_impl->Good(addr, time);
 1292|  6.31M|}
_ZNK11AddrManImpl9SerializeI10DataStreamEEvRT_:
  115|  2.23k|{
  116|  2.23k|    LOCK(cs);
  ------------------
  |  |  268|  2.23k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  2.23k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  2.23k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  2.23k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|       |
  118|       |    /**
  119|       |     * Serialized format.
  120|       |     * * format version byte (@see `Format`)
  121|       |     * * lowest compatible format version byte. This is used to help old software decide
  122|       |     *   whether to parse the file. For example:
  123|       |     *   * Bitcoin Core version N knows how to parse up to format=3. If a new format=4 is
  124|       |     *     introduced in version N+1 that is compatible with format=3 and it is known that
  125|       |     *     version N will be able to parse it, then version N+1 will write
  126|       |     *     (format=4, lowest_compatible=3) in the first two bytes of the file, and so
  127|       |     *     version N will still try to parse it.
  128|       |     *   * Bitcoin Core version N+2 introduces a new incompatible format=5. It will write
  129|       |     *     (format=5, lowest_compatible=5) and so any versions that do not know how to parse
  130|       |     *     format=5 will not try to read the file.
  131|       |     * * nKey
  132|       |     * * nNew
  133|       |     * * nTried
  134|       |     * * number of "new" buckets XOR 2**30
  135|       |     * * all new addresses (total count: nNew)
  136|       |     * * all tried addresses (total count: nTried)
  137|       |     * * for each new bucket:
  138|       |     *   * number of elements
  139|       |     *   * for each element: index in the serialized "all new addresses"
  140|       |     * * asmap version
  141|       |     *
  142|       |     * 2**30 is xorred with the number of buckets to make addrman deserializer v0 detect it
  143|       |     * as incompatible. This is necessary because it did not check the version number on
  144|       |     * deserialization.
  145|       |     *
  146|       |     * vvNew, vvTried, mapInfo, mapAddr and vRandom are never encoded explicitly;
  147|       |     * they are instead reconstructed from the other information.
  148|       |     *
  149|       |     * This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
  150|       |     * changes to the ADDRMAN_ parameters without breaking the on-disk structure.
  151|       |     *
  152|       |     * We don't use SERIALIZE_METHODS since the serialization and deserialization code has
  153|       |     * very little in common.
  154|       |     */
  155|       |
  156|       |    // Always serialize in the latest version (FILE_FORMAT).
  157|  2.23k|    ParamsStream s{s_, CAddress::V2_DISK};
  158|       |
  159|  2.23k|    s << static_cast<uint8_t>(FILE_FORMAT);
  160|       |
  161|       |    // Increment `lowest_compatible` iff a newly introduced format is incompatible with
  162|       |    // the previous one.
  163|  2.23k|    static constexpr uint8_t lowest_compatible = Format::V4_MULTIPORT;
  164|  2.23k|    s << static_cast<uint8_t>(INCOMPATIBILITY_BASE + lowest_compatible);
  165|       |
  166|  2.23k|    s << nKey;
  167|  2.23k|    s << nNew;
  168|  2.23k|    s << nTried;
  169|       |
  170|  2.23k|    int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT ^ (1 << 30);
  171|  2.23k|    s << nUBuckets;
  172|  2.23k|    std::unordered_map<nid_type, int> mapUnkIds;
  173|  2.23k|    int nIds = 0;
  174|  11.0M|    for (const auto& entry : mapInfo) {
  ------------------
  |  Branch (174:28): [True: 11.0M, False: 2.23k]
  ------------------
  175|  11.0M|        mapUnkIds[entry.first] = nIds;
  176|  11.0M|        const AddrInfo& info = entry.second;
  177|  11.0M|        if (info.nRefCount) {
  ------------------
  |  Branch (177:13): [True: 6.63M, False: 4.37M]
  ------------------
  178|  6.63M|            assert(nIds != nNew); // this means nNew was wrong, oh ow
  ------------------
  |  Branch (178:13): [True: 6.63M, False: 0]
  ------------------
  179|  6.63M|            s << info;
  180|  6.63M|            nIds++;
  181|  6.63M|        }
  182|  11.0M|    }
  183|  2.23k|    nIds = 0;
  184|  11.0M|    for (const auto& entry : mapInfo) {
  ------------------
  |  Branch (184:28): [True: 11.0M, False: 2.23k]
  ------------------
  185|  11.0M|        const AddrInfo& info = entry.second;
  186|  11.0M|        if (info.fInTried) {
  ------------------
  |  Branch (186:13): [True: 4.37M, False: 6.63M]
  ------------------
  187|  4.37M|            assert(nIds != nTried); // this means nTried was wrong, oh ow
  ------------------
  |  Branch (187:13): [True: 4.37M, False: 0]
  ------------------
  188|  4.37M|            s << info;
  189|  4.37M|            nIds++;
  190|  4.37M|        }
  191|  11.0M|    }
  192|  2.28M|    for (int bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {
  ------------------
  |  Branch (192:26): [True: 2.28M, False: 2.23k]
  ------------------
  193|  2.28M|        int nSize = 0;
  194|   148M|        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
  ------------------
  |  Branch (194:25): [True: 146M, False: 2.28M]
  ------------------
  195|   146M|            if (vvNew[bucket][i] != -1)
  ------------------
  |  Branch (195:17): [True: 6.90M, False: 139M]
  ------------------
  196|  6.90M|                nSize++;
  197|   146M|        }
  198|  2.28M|        s << nSize;
  199|   148M|        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
  ------------------
  |  Branch (199:25): [True: 146M, False: 2.28M]
  ------------------
  200|   146M|            if (vvNew[bucket][i] != -1) {
  ------------------
  |  Branch (200:17): [True: 6.90M, False: 139M]
  ------------------
  201|  6.90M|                int nIndex = mapUnkIds[vvNew[bucket][i]];
  202|  6.90M|                s << nIndex;
  203|  6.90M|            }
  204|   146M|        }
  205|  2.28M|    }
  206|       |    // Store asmap version after bucket entries so that it
  207|       |    // can be ignored by older clients for backward compatibility.
  208|  2.23k|    s << m_netgroupman.GetAsmapVersion();
  209|  2.23k|}
_ZN11AddrManImpl11UnserializeI10DataStreamEEvRT_:
  213|  2.23k|{
  214|  2.23k|    LOCK(cs);
  ------------------
  |  |  268|  2.23k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  2.23k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  2.23k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  2.23k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|       |
  216|  2.23k|    assert(vRandom.empty());
  ------------------
  |  Branch (216:5): [True: 2.23k, False: 0]
  ------------------
  217|       |
  218|  2.23k|    Format format;
  219|  2.23k|    s_ >> Using<CustomUintFormatter<1>>(format);
  220|       |
  221|  2.23k|    const auto ser_params = (format >= Format::V3_BIP155 ? CAddress::V2_DISK : CAddress::V1_DISK);
  ------------------
  |  Branch (221:30): [True: 2.23k, False: 0]
  ------------------
  222|  2.23k|    ParamsStream s{s_, ser_params};
  223|       |
  224|  2.23k|    uint8_t compat;
  225|  2.23k|    s >> compat;
  226|  2.23k|    if (compat < INCOMPATIBILITY_BASE) {
  ------------------
  |  Branch (226:9): [True: 0, False: 2.23k]
  ------------------
  227|      0|        throw std::ios_base::failure(strprintf(
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  228|      0|            "Corrupted addrman database: The compat value (%u) "
  229|      0|            "is lower than the expected minimum value %u.",
  230|      0|            compat, INCOMPATIBILITY_BASE));
  231|      0|    }
  232|  2.23k|    const uint8_t lowest_compatible = compat - INCOMPATIBILITY_BASE;
  233|  2.23k|    if (lowest_compatible > FILE_FORMAT) {
  ------------------
  |  Branch (233:9): [True: 0, False: 2.23k]
  ------------------
  234|      0|        throw InvalidAddrManVersionError(strprintf(
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  235|      0|            "Unsupported format of addrman database: %u. It is compatible with formats >=%u, "
  236|      0|            "but the maximum supported by this version of %s is %u.",
  237|      0|            uint8_t{format}, lowest_compatible, CLIENT_NAME, uint8_t{FILE_FORMAT}));
  ------------------
  |  |  101|      0|#define CLIENT_NAME "Bitcoin Core"
  ------------------
  238|      0|    }
  239|       |
  240|  2.23k|    s >> nKey;
  241|  2.23k|    s >> nNew;
  242|  2.23k|    s >> nTried;
  243|  2.23k|    int nUBuckets = 0;
  244|  2.23k|    s >> nUBuckets;
  245|  2.23k|    if (format >= Format::V1_DETERMINISTIC) {
  ------------------
  |  Branch (245:9): [True: 2.23k, False: 0]
  ------------------
  246|  2.23k|        nUBuckets ^= (1 << 30);
  247|  2.23k|    }
  248|       |
  249|  2.23k|    if (nNew > ADDRMAN_NEW_BUCKET_COUNT * ADDRMAN_BUCKET_SIZE || nNew < 0) {
  ------------------
  |  Branch (249:9): [True: 0, False: 2.23k]
  |  Branch (249:66): [True: 0, False: 2.23k]
  ------------------
  250|      0|        throw std::ios_base::failure(
  251|      0|                strprintf("Corrupt AddrMan serialization: nNew=%d, should be in [0, %d]",
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  252|      0|                    nNew,
  253|      0|                    ADDRMAN_NEW_BUCKET_COUNT * ADDRMAN_BUCKET_SIZE));
  254|      0|    }
  255|       |
  256|  2.23k|    if (nTried > ADDRMAN_TRIED_BUCKET_COUNT * ADDRMAN_BUCKET_SIZE || nTried < 0) {
  ------------------
  |  Branch (256:9): [True: 0, False: 2.23k]
  |  Branch (256:70): [True: 0, False: 2.23k]
  ------------------
  257|      0|        throw std::ios_base::failure(
  258|      0|                strprintf("Corrupt AddrMan serialization: nTried=%d, should be in [0, %d]",
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  259|      0|                    nTried,
  260|      0|                    ADDRMAN_TRIED_BUCKET_COUNT * ADDRMAN_BUCKET_SIZE));
  261|      0|    }
  262|       |
  263|       |    // Deserialize entries from the new table.
  264|  6.63M|    for (int n = 0; n < nNew; n++) {
  ------------------
  |  Branch (264:21): [True: 6.63M, False: 2.23k]
  ------------------
  265|  6.63M|        AddrInfo& info = mapInfo[n];
  266|  6.63M|        s >> info;
  267|  6.63M|        mapAddr[info] = n;
  268|  6.63M|        info.nRandomPos = vRandom.size();
  269|  6.63M|        vRandom.push_back(n);
  270|  6.63M|        m_network_counts[info.GetNetwork()].n_new++;
  271|  6.63M|    }
  272|  2.23k|    nIdCount = nNew;
  273|       |
  274|       |    // Deserialize entries from the tried table.
  275|  2.23k|    int nLost = 0;
  276|  4.37M|    for (int n = 0; n < nTried; n++) {
  ------------------
  |  Branch (276:21): [True: 4.37M, False: 2.23k]
  ------------------
  277|  4.37M|        AddrInfo info;
  278|  4.37M|        s >> info;
  279|  4.37M|        int nKBucket = info.GetTriedBucket(nKey, m_netgroupman);
  280|  4.37M|        int nKBucketPos = info.GetBucketPosition(nKey, false, nKBucket);
  281|  4.37M|        if (info.IsValid()
  ------------------
  |  Branch (281:13): [True: 4.37M, False: 0]
  ------------------
  282|  4.37M|                && vvTried[nKBucket][nKBucketPos] == -1) {
  ------------------
  |  Branch (282:20): [True: 4.37M, False: 0]
  ------------------
  283|  4.37M|            info.nRandomPos = vRandom.size();
  284|  4.37M|            info.fInTried = true;
  285|  4.37M|            vRandom.push_back(nIdCount);
  286|  4.37M|            mapInfo[nIdCount] = info;
  287|  4.37M|            mapAddr[info] = nIdCount;
  288|  4.37M|            vvTried[nKBucket][nKBucketPos] = nIdCount;
  289|  4.37M|            nIdCount++;
  290|  4.37M|            m_network_counts[info.GetNetwork()].n_tried++;
  291|  4.37M|        } else {
  292|      0|            nLost++;
  293|      0|        }
  294|  4.37M|    }
  295|  2.23k|    nTried -= nLost;
  296|       |
  297|       |    // Store positions in the new table buckets to apply later (if possible).
  298|       |    // An entry may appear in up to ADDRMAN_NEW_BUCKETS_PER_ADDRESS buckets,
  299|       |    // so we store all bucket-entry_index pairs to iterate through later.
  300|  2.23k|    std::vector<std::pair<int, int>> bucket_entries;
  301|       |
  302|  2.28M|    for (int bucket = 0; bucket < nUBuckets; ++bucket) {
  ------------------
  |  Branch (302:26): [True: 2.28M, False: 2.23k]
  ------------------
  303|  2.28M|        int num_entries{0};
  304|  2.28M|        s >> num_entries;
  305|  9.18M|        for (int n = 0; n < num_entries; ++n) {
  ------------------
  |  Branch (305:25): [True: 6.90M, False: 2.28M]
  ------------------
  306|  6.90M|            int entry_index{0};
  307|  6.90M|            s >> entry_index;
  308|  6.90M|            if (entry_index >= 0 && entry_index < nNew) {
  ------------------
  |  Branch (308:17): [True: 6.90M, False: 0]
  |  Branch (308:37): [True: 6.90M, False: 0]
  ------------------
  309|  6.90M|                bucket_entries.emplace_back(bucket, entry_index);
  310|  6.90M|            }
  311|  6.90M|        }
  312|  2.28M|    }
  313|       |
  314|       |    // If the bucket count and asmap version haven't changed, then attempt
  315|       |    // to restore the entries to the buckets/positions they were in before
  316|       |    // serialization.
  317|  2.23k|    uint256 supplied_asmap_version{m_netgroupman.GetAsmapVersion()};
  318|  2.23k|    uint256 serialized_asmap_version;
  319|  2.23k|    if (format >= Format::V2_ASMAP) {
  ------------------
  |  Branch (319:9): [True: 2.23k, False: 0]
  ------------------
  320|  2.23k|        s >> serialized_asmap_version;
  321|  2.23k|    }
  322|  2.23k|    const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT &&
  ------------------
  |  Branch (322:34): [True: 2.23k, False: 0]
  ------------------
  323|  2.23k|        serialized_asmap_version == supplied_asmap_version};
  ------------------
  |  Branch (323:9): [True: 2.23k, False: 0]
  ------------------
  324|       |
  325|  2.23k|    if (!restore_bucketing) {
  ------------------
  |  Branch (325:9): [True: 0, False: 2.23k]
  ------------------
  326|      0|        LogDebug(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n");
  ------------------
  |  |  143|      0|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|      0|    do {                                                                                      \
  |  |  |  |  137|      0|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  327|      0|    }
  328|       |
  329|  6.90M|    for (auto bucket_entry : bucket_entries) {
  ------------------
  |  Branch (329:28): [True: 6.90M, False: 2.23k]
  ------------------
  330|  6.90M|        int bucket{bucket_entry.first};
  331|  6.90M|        const int entry_index{bucket_entry.second};
  332|  6.90M|        AddrInfo& info = mapInfo[entry_index];
  333|       |
  334|       |        // Don't store the entry in the new bucket if it's not a valid address for our addrman
  335|  6.90M|        if (!info.IsValid()) continue;
  ------------------
  |  Branch (335:13): [True: 0, False: 6.90M]
  ------------------
  336|       |
  337|       |        // The entry shouldn't appear in more than
  338|       |        // ADDRMAN_NEW_BUCKETS_PER_ADDRESS. If it has already, just skip
  339|       |        // this bucket_entry.
  340|  6.90M|        if (info.nRefCount >= ADDRMAN_NEW_BUCKETS_PER_ADDRESS) continue;
  ------------------
  |  Branch (340:13): [True: 0, False: 6.90M]
  ------------------
  341|       |
  342|  6.90M|        int bucket_position = info.GetBucketPosition(nKey, true, bucket);
  343|  6.90M|        if (restore_bucketing && vvNew[bucket][bucket_position] == -1) {
  ------------------
  |  Branch (343:13): [True: 6.90M, False: 0]
  |  Branch (343:34): [True: 6.90M, False: 0]
  ------------------
  344|       |            // Bucketing has not changed, using existing bucket positions for the new table
  345|  6.90M|            vvNew[bucket][bucket_position] = entry_index;
  346|  6.90M|            ++info.nRefCount;
  347|  6.90M|        } else {
  348|       |            // In case the new table data cannot be used (bucket count wrong or new asmap),
  349|       |            // try to give them a reference based on their primary source address.
  350|      0|            bucket = info.GetNewBucket(nKey, m_netgroupman);
  351|      0|            bucket_position = info.GetBucketPosition(nKey, true, bucket);
  352|      0|            if (vvNew[bucket][bucket_position] == -1) {
  ------------------
  |  Branch (352:17): [True: 0, False: 0]
  ------------------
  353|      0|                vvNew[bucket][bucket_position] = entry_index;
  354|      0|                ++info.nRefCount;
  355|      0|            }
  356|      0|        }
  357|  6.90M|    }
  358|       |
  359|       |    // Prune new entries with refcount 0 (as a result of collisions or invalid address).
  360|  2.23k|    int nLostUnk = 0;
  361|  11.0M|    for (auto it = mapInfo.cbegin(); it != mapInfo.cend(); ) {
  ------------------
  |  Branch (361:38): [True: 11.0M, False: 2.23k]
  ------------------
  362|  11.0M|        if (it->second.fInTried == false && it->second.nRefCount == 0) {
  ------------------
  |  Branch (362:13): [True: 6.63M, False: 4.37M]
  |  Branch (362:45): [True: 0, False: 6.63M]
  ------------------
  363|      0|            const auto itCopy = it++;
  364|      0|            Delete(itCopy->first);
  365|      0|            ++nLostUnk;
  366|  11.0M|        } else {
  367|  11.0M|            ++it;
  368|  11.0M|        }
  369|  11.0M|    }
  370|  2.23k|    if (nLost + nLostUnk > 0) {
  ------------------
  |  Branch (370:9): [True: 0, False: 2.23k]
  ------------------
  371|      0|        LogDebug(BCLog::ADDRMAN, "addrman lost %i new and %i tried addresses due to collisions or invalid addresses\n", nLostUnk, nLost);
  ------------------
  |  |  143|      0|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|      0|    do {                                                                                      \
  |  |  |  |  137|      0|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  372|      0|    }
  373|       |
  374|  2.23k|    const int check_code{CheckAddrman()};
  375|  2.23k|    if (check_code != 0) {
  ------------------
  |  Branch (375:9): [True: 0, False: 2.23k]
  ------------------
  376|      0|        throw std::ios_base::failure(strprintf(
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  377|      0|            "Corrupt data. Consistency check failed with code %s",
  378|      0|            check_code));
  379|      0|    }
  380|  2.23k|}

_ZN8AddrInfoC2ERK8CAddressRK8CNetAddr:
   77|  13.1M|    AddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn), source(addrSource)
   78|  13.1M|    {
   79|  13.1M|    }
_ZNK8AddrInfo12GetNewBucketERK7uint256RK15NetGroupManager:
   93|  4.37M|    {
   94|  4.37M|        return GetNewBucket(nKey, source, netgroupman);
   95|  4.37M|    }
_ZN8AddrInfoC2Ev:
   81|  28.5M|    AddrInfo() : CAddress(), source()
   82|  28.5M|    {
   83|  28.5M|    }
_ZN8AddrInfo16SerializationOpsI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEKS_15ActionSerializeEEvRT0_RT_T1_:
   73|  11.0M|    {
   74|  11.0M|        READWRITE(AsBase<CAddress>(obj), obj.source, Using<ChronoFormatter<int64_t>>(obj.m_last_success), obj.nAttempts);
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
   75|  11.0M|    }
_ZN8AddrInfo16SerializationOpsI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEES_17ActionUnserializeEEvRT0_RT_T1_:
   73|  11.0M|    {
   74|  11.0M|        READWRITE(AsBase<CAddress>(obj), obj.source, Using<ChronoFormatter<int64_t>>(obj.m_last_success), obj.nAttempts);
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
   75|  11.0M|    }

_ZN11ArgsManagerD2Ev:
  130|      4|ArgsManager::~ArgsManager() = default;
_ZNK11ArgsManager6GetArgITkNSt3__18integralElEET_RKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES2_:
  544|  4.46k|{
  545|  4.46k|    return GetArg<Int>(strArg).value_or(nDefault);
  546|  4.46k|}
_ZNK11ArgsManager6GetArgITkNSt3__18integralElEENS1_8optionalIT_EERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  550|  4.46k|{
  551|  4.46k|    const common::SettingsValue value = GetSetting(strArg);
  552|  4.46k|    return SettingTo<Int>(value);
  553|  4.46k|}
_Z9SettingToITkNSt3__18integralElENS0_8optionalIT_EERK8UniValue:
  557|  4.46k|{
  558|  4.46k|    if (value.isNull()) return std::nullopt;
  ------------------
  |  Branch (558:9): [True: 4.46k, False: 0]
  ------------------
  559|      0|    if (value.isFalse()) return 0;
  ------------------
  |  Branch (559:9): [True: 0, False: 0]
  ------------------
  560|      0|    if (value.isTrue()) return 1;
  ------------------
  |  Branch (560:9): [True: 0, False: 0]
  ------------------
  561|      0|    if (value.isNum()) return value.getInt<Int>();
  ------------------
  |  Branch (561:9): [True: 0, False: 0]
  ------------------
  562|      0|    return LocaleIndependentAtoi<Int>(value.get_str());
  563|      0|}
_ZN11ArgsManager11ForceSetArgERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
  628|      2|{
  629|      2|    LOCK(cs_args);
  ------------------
  |  |  268|      2|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|      2|    m_settings.forced_settings[SettingName(strArg)] = strValue;
  631|      2|}
_ZN11ArgsManager9ClearArgsEv:
  694|      2|{
  695|      2|    LOCK(cs_args);
  ------------------
  |  |  268|      2|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      2|    m_settings = {};
  697|      2|    m_available_args.clear();
  698|      2|    m_command_args.clear();
  699|      2|    m_network_only_args.clear();
  700|      2|    m_config_sections.clear();
  701|      2|}
_ZNK11ArgsManager17UseDefaultSectionERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  957|  4.46k|{
  958|  4.46k|    AssertLockHeld(cs_args);
  ------------------
  |  |  144|  4.46k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  959|  4.46k|    return m_network == ChainTypeToString(ChainType::MAIN) || !m_network_only_args.contains(arg);
  ------------------
  |  Branch (959:12): [True: 0, False: 4.46k]
  |  Branch (959:63): [True: 4.46k, False: 0]
  ------------------
  960|  4.46k|}
_ZNK11ArgsManager11GetSetting_ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  963|  4.46k|{
  964|  4.46k|    AssertLockHeld(cs_args);
  ------------------
  |  |  144|  4.46k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  965|  4.46k|    return common::GetSetting(
  966|  4.46k|        m_settings, m_network, SettingName(arg), !UseDefaultSection(arg),
  967|  4.46k|        /*ignore_nonpersistent=*/false, /*get_chain_type=*/false);
  968|  4.46k|}
_ZNK11ArgsManager10GetSettingERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  971|  4.46k|{
  972|  4.46k|    LOCK(cs_args);
  ------------------
  |  |  268|  4.46k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  4.46k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  4.46k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  4.46k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  973|  4.46k|    return GetSetting_(arg);
  974|  4.46k|}
args.cpp:_ZL11SettingNameRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   63|  4.46k|{
   64|  4.46k|    return arg.size() > 0 && arg[0] == '-' ? arg.substr(1) : arg;
  ------------------
  |  Branch (64:12): [True: 4.46k, False: 0]
  |  Branch (64:30): [True: 4.46k, False: 0]
  ------------------
   65|  4.46k|}

_ZNK11ArgsManager9GetIntArgERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEl:
  323|  4.46k|    int64_t GetIntArg(const std::string& strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) { return GetArg<int64_t>(strArg, nDefault); }

_ZN6common10GetSettingERKNS_8SettingsERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_bbb:
  159|  4.46k|{
  160|  4.46k|    SettingsValue result;
  161|  4.46k|    bool done = false; // Done merging any more settings sources.
  162|  4.46k|    MergeSettings(settings, section, name, [&](SettingsSpan span, Source source) {
  163|       |        // Weird behavior preserved for backwards compatibility: Apply negated
  164|       |        // setting even if non-negated setting would be ignored. A negated
  165|       |        // value in the default section is applied to network specific options,
  166|       |        // even though normal non-negated values there would be ignored.
  167|  4.46k|        const bool never_ignore_negated_setting = span.last_negated();
  168|       |
  169|       |        // Weird behavior preserved for backwards compatibility: Take first
  170|       |        // assigned value instead of last. In general, later settings take
  171|       |        // precedence over early settings, but for backwards compatibility in
  172|       |        // the config file the precedence is reversed for all settings except
  173|       |        // chain type settings.
  174|  4.46k|        const bool reverse_precedence =
  175|  4.46k|            (source == Source::CONFIG_FILE_NETWORK_SECTION || source == Source::CONFIG_FILE_DEFAULT_SECTION) &&
  176|  4.46k|            !get_chain_type;
  177|       |
  178|       |        // Weird behavior preserved for backwards compatibility: Negated
  179|       |        // -regtest and -testnet arguments which you would expect to override
  180|       |        // values set in the configuration file are currently accepted but
  181|       |        // silently ignored. It would be better to apply these just like other
  182|       |        // negated values, or at least warn they are ignored.
  183|  4.46k|        const bool skip_negated_command_line = get_chain_type;
  184|       |
  185|  4.46k|        if (done) return;
  186|       |
  187|       |        // Ignore settings in default config section if requested.
  188|  4.46k|        if (ignore_default_section_config && source == Source::CONFIG_FILE_DEFAULT_SECTION &&
  189|  4.46k|            !never_ignore_negated_setting) {
  190|  4.46k|            return;
  191|  4.46k|        }
  192|       |
  193|       |        // Ignore nonpersistent settings if requested.
  194|  4.46k|        if (ignore_nonpersistent && (source == Source::COMMAND_LINE || source == Source::FORCED)) return;
  195|       |
  196|       |        // Skip negated command line settings.
  197|  4.46k|        if (skip_negated_command_line && span.last_negated()) return;
  198|       |
  199|  4.46k|        if (!span.empty()) {
  200|  4.46k|            result = reverse_precedence ? span.begin()[0] : span.end()[-1];
  201|  4.46k|            done = true;
  202|  4.46k|        } else if (span.last_negated()) {
  203|  4.46k|            result = false;
  204|  4.46k|            done = true;
  205|  4.46k|        }
  206|  4.46k|    });
  207|  4.46k|    return result;
  208|  4.46k|}
settings.cpp:_ZN6common12_GLOBAL__N_113MergeSettingsIZNS_10GetSettingERKNS_8SettingsERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_bbbE3$_0EEvS4_SD_SD_OT_:
   41|  4.46k|{
   42|       |    // Merge in the forced settings
   43|  4.46k|    if (auto* value = FindKey(settings.forced_settings, name)) {
  ------------------
  |  Branch (43:15): [True: 0, False: 4.46k]
  ------------------
   44|      0|        fn(SettingsSpan(*value), Source::FORCED);
   45|      0|    }
   46|       |    // Merge in the command-line options
   47|  4.46k|    if (auto* values = FindKey(settings.command_line_options, name)) {
  ------------------
  |  Branch (47:15): [True: 0, False: 4.46k]
  ------------------
   48|      0|        fn(SettingsSpan(*values), Source::COMMAND_LINE);
   49|      0|    }
   50|       |    // Merge in the read-write settings
   51|  4.46k|    if (const SettingsValue* value = FindKey(settings.rw_settings, name)) {
  ------------------
  |  Branch (51:30): [True: 0, False: 4.46k]
  ------------------
   52|      0|        fn(SettingsSpan(*value), Source::RW_SETTINGS);
   53|      0|    }
   54|       |    // Merge in the network-specific section of the config file
   55|  4.46k|    if (!section.empty()) {
  ------------------
  |  Branch (55:9): [True: 4.46k, False: 0]
  ------------------
   56|  4.46k|        if (auto* map = FindKey(settings.ro_config, section)) {
  ------------------
  |  Branch (56:19): [True: 0, False: 4.46k]
  ------------------
   57|      0|            if (auto* values = FindKey(*map, name)) {
  ------------------
  |  Branch (57:23): [True: 0, False: 0]
  ------------------
   58|      0|                fn(SettingsSpan(*values), Source::CONFIG_FILE_NETWORK_SECTION);
   59|      0|            }
   60|      0|        }
   61|  4.46k|    }
   62|       |    // Merge in the default section of the config file
   63|  4.46k|    if (auto* map = FindKey(settings.ro_config, "")) {
  ------------------
  |  Branch (63:15): [True: 0, False: 4.46k]
  ------------------
   64|      0|        if (auto* values = FindKey(*map, name)) {
  ------------------
  |  Branch (64:19): [True: 0, False: 0]
  ------------------
   65|      0|            fn(SettingsSpan(*values), Source::CONFIG_FILE_DEFAULT_SECTION);
   66|      0|        }
   67|      0|    }
   68|  4.46k|}

_ZN6common7FindKeyIRKNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_6vectorI8UniValueNS6_ISA_EEEENS1_4lessIS8_EENS6_INS1_4pairIKS8_SC_EEEEEERSG_EEDTadcldtfp_2atfp0_EEOT_OT0_:
  110|  4.46k|{
  111|  4.46k|    auto it = map.find(key);
  112|  4.46k|    return it == map.end() ? nullptr : &it->second;
  ------------------
  |  Branch (112:12): [True: 4.46k, False: 0]
  ------------------
  113|  4.46k|}
_ZN6common7FindKeyIRKNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS2_IS8_NS1_6vectorI8UniValueNS6_ISA_EEEENS1_4lessIS8_EENS6_INS1_4pairIKS8_SC_EEEEEESE_NS6_INSF_ISG_SJ_EEEEEERSG_EEDTadcldtfp_2atfp0_EEOT_OT0_:
  110|  4.46k|{
  111|  4.46k|    auto it = map.find(key);
  112|  4.46k|    return it == map.end() ? nullptr : &it->second;
  ------------------
  |  Branch (112:12): [True: 4.46k, False: 0]
  ------------------
  113|  4.46k|}
_ZN6common7FindKeyIRKNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS2_IS8_NS1_6vectorI8UniValueNS6_ISA_EEEENS1_4lessIS8_EENS6_INS1_4pairIKS8_SC_EEEEEESE_NS6_INSF_ISG_SJ_EEEEEERA1_KcEEDTadcldtfp_2atfp0_EEOT_OT0_:
  110|  4.46k|{
  111|  4.46k|    auto it = map.find(key);
  112|  4.46k|    return it == map.end() ? nullptr : &it->second;
  ------------------
  |  Branch (112:12): [True: 4.46k, False: 0]
  ------------------
  113|  4.46k|}
_ZN6common7FindKeyIRKNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE8UniValueNS1_4lessIS8_EENS6_INS1_4pairIKS8_S9_EEEEEERSD_EEDTadcldtfp_2atfp0_EEOT_OT0_:
  110|  8.92k|{
  111|  8.92k|    auto it = map.find(key);
  112|  8.92k|    return it == map.end() ? nullptr : &it->second;
  ------------------
  |  Branch (112:12): [True: 8.92k, False: 0]
  ------------------
  113|  8.92k|}

_Z17internal_bswap_32j:
   54|  2.13G|{
   55|  2.13G|#ifdef bitcoin_builtin_bswap32
   56|  2.13G|    return bitcoin_builtin_bswap32(x);
  ------------------
  |  |   24|  2.13G|#      define bitcoin_builtin_bswap32(x) __builtin_bswap32(x)
  ------------------
   57|       |#else
   58|       |    return (((x & 0xff000000U) >> 24) | ((x & 0x00ff0000U) >>  8) |
   59|       |            ((x & 0x0000ff00U) <<  8) | ((x & 0x000000ffU) << 24));
   60|       |#endif
   61|  2.13G|}
_Z17internal_bswap_64m:
   64|   274M|{
   65|   274M|#ifdef bitcoin_builtin_bswap64
   66|   274M|    return bitcoin_builtin_bswap64(x);
  ------------------
  |  |   27|   274M|#      define bitcoin_builtin_bswap64(x) __builtin_bswap64(x)
  ------------------
   67|       |#else
   68|       |     return (((x & 0xff00000000000000ull) >> 56)
   69|       |          | ((x & 0x00ff000000000000ull) >> 40)
   70|       |          | ((x & 0x0000ff0000000000ull) >> 24)
   71|       |          | ((x & 0x000000ff00000000ull) >> 8)
   72|       |          | ((x & 0x00000000ff000000ull) << 8)
   73|       |          | ((x & 0x0000000000ff0000ull) << 24)
   74|       |          | ((x & 0x000000000000ff00ull) << 40)
   75|       |          | ((x & 0x00000000000000ffull) << 56));
   76|       |#endif
   77|   274M|}

_Z16be32toh_internalj:
   44|   118M|{
   45|   118M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(big_endian_32bits);
   46|       |        else return big_endian_32bits;
   47|   118M|}
_Z16htobe32_internalj:
   34|  2.02G|{
   35|  2.02G|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(host_32bits);
   36|       |        else return host_32bits;
   37|  2.02G|}
_Z16htole64_internalm:
   59|  47.8M|{
   60|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(host_64bits);
   61|  47.8M|        else return host_64bits;
   62|  47.8M|}
_Z16be64toh_internalm:
   64|  11.1M|{
   65|  11.1M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_64(big_endian_64bits);
   66|       |        else return big_endian_64bits;
   67|  11.1M|}
_Z16htobe64_internalm:
   54|   263M|{
   55|   263M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_64(host_64bits);
   56|       |        else return host_64bits;
   57|   263M|}
_Z16le64toh_internalm:
   69|   145M|{
   70|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(little_endian_64bits);
   71|   145M|        else return little_endian_64bits;
   72|   145M|}
_Z16htole32_internalj:
   39|   198M|{
   40|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(host_32bits);
   41|   198M|        else return host_32bits;
   42|   198M|}
_Z16le32toh_internalj:
   49|  42.4M|{
   50|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(little_endian_32bits);
   51|  42.4M|        else return little_endian_32bits;
   52|  42.4M|}

_ZN15ChaCha20Aligned6SetKeyENSt3__14spanIKSt4byteLm18446744073709551615EEE:
   25|  31.2k|{
   26|  31.2k|    assert(key.size() == KEYLEN);
  ------------------
  |  Branch (26:5): [True: 31.2k, False: 0]
  ------------------
   27|  31.2k|    input[0] = ReadLE32(key.data() + 0);
   28|  31.2k|    input[1] = ReadLE32(key.data() + 4);
   29|  31.2k|    input[2] = ReadLE32(key.data() + 8);
   30|  31.2k|    input[3] = ReadLE32(key.data() + 12);
   31|  31.2k|    input[4] = ReadLE32(key.data() + 16);
   32|  31.2k|    input[5] = ReadLE32(key.data() + 20);
   33|  31.2k|    input[6] = ReadLE32(key.data() + 24);
   34|  31.2k|    input[7] = ReadLE32(key.data() + 28);
   35|  31.2k|    input[8] = 0;
   36|  31.2k|    input[9] = 0;
   37|  31.2k|    input[10] = 0;
   38|  31.2k|    input[11] = 0;
   39|  31.2k|}
_ZN15ChaCha20AlignedD2Ev:
   42|  22.3k|{
   43|  22.3k|    memory_cleanse(input, sizeof(input));
   44|  22.3k|}
_ZN15ChaCha20AlignedC2ENSt3__14spanIKSt4byteLm18446744073709551615EEE:
   47|  22.3k|{
   48|  22.3k|    SetKey(key);
   49|  22.3k|}
_ZN8ChaCha209KeystreamENSt3__14spanISt4byteLm18446744073709551615EEE:
  282|  25.4M|{
  283|  25.4M|    if (out.empty()) return;
  ------------------
  |  Branch (283:9): [True: 0, False: 25.4M]
  ------------------
  284|  25.4M|    if (m_bufleft) {
  ------------------
  |  Branch (284:9): [True: 23.8M, False: 1.61M]
  ------------------
  285|  23.8M|        unsigned reuse = std::min<size_t>(m_bufleft, out.size());
  286|  23.8M|        std::copy(m_buffer.end() - m_bufleft, m_buffer.end() - m_bufleft + reuse, out.begin());
  287|  23.8M|        m_bufleft -= reuse;
  288|  23.8M|        out = out.subspan(reuse);
  289|  23.8M|    }
  290|  25.4M|    if (out.size() >= m_aligned.BLOCKLEN) {
  ------------------
  |  Branch (290:9): [True: 0, False: 25.4M]
  ------------------
  291|      0|        size_t blocks = out.size() / m_aligned.BLOCKLEN;
  292|      0|        m_aligned.Keystream(out.first(blocks * m_aligned.BLOCKLEN));
  293|      0|        out = out.subspan(blocks * m_aligned.BLOCKLEN);
  294|      0|    }
  295|  25.4M|    if (!out.empty()) {
  ------------------
  |  Branch (295:9): [True: 6.58M, False: 18.8M]
  ------------------
  296|  6.58M|        m_aligned.Keystream(m_buffer);
  297|  6.58M|        std::copy(m_buffer.begin(), m_buffer.begin() + out.size(), out.begin());
  298|  6.58M|        m_bufleft = m_aligned.BLOCKLEN - out.size();
  299|  6.58M|    }
  300|  25.4M|}
_ZN8ChaCha20D2Ev:
  332|  22.3k|{
  333|  22.3k|    memory_cleanse(m_buffer.data(), m_buffer.size());
  334|  22.3k|}
_ZN8ChaCha206SetKeyENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  337|  8.92k|{
  338|  8.92k|    m_aligned.SetKey(key);
  339|  8.92k|    m_bufleft = 0;
  340|  8.92k|    memory_cleanse(m_buffer.data(), m_buffer.size());
  341|  8.92k|}
_ZN15ChaCha20Aligned9KeystreamENSt3__14spanISt4byteLm18446744073709551615EEE:
   60|  6.58M|{
   61|  6.58M|    std::byte* c = output.data();
   62|  6.58M|    size_t blocks = output.size() / BLOCKLEN;
   63|  6.58M|    assert(blocks * BLOCKLEN == output.size());
  ------------------
  |  Branch (63:5): [True: 6.58M, False: 0]
  ------------------
   64|       |
   65|  6.58M|    uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
   66|  6.58M|    uint32_t j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
   67|       |
   68|  6.58M|    if (!blocks) return;
  ------------------
  |  Branch (68:9): [True: 0, False: 6.58M]
  ------------------
   69|       |
   70|  6.58M|    j4 = input[0];
   71|  6.58M|    j5 = input[1];
   72|  6.58M|    j6 = input[2];
   73|  6.58M|    j7 = input[3];
   74|  6.58M|    j8 = input[4];
   75|  6.58M|    j9 = input[5];
   76|  6.58M|    j10 = input[6];
   77|  6.58M|    j11 = input[7];
   78|  6.58M|    j12 = input[8];
   79|  6.58M|    j13 = input[9];
   80|  6.58M|    j14 = input[10];
   81|  6.58M|    j15 = input[11];
   82|       |
   83|  6.58M|    for (;;) {
   84|  6.58M|        x0 = 0x61707865;
   85|  6.58M|        x1 = 0x3320646e;
   86|  6.58M|        x2 = 0x79622d32;
   87|  6.58M|        x3 = 0x6b206574;
   88|  6.58M|        x4 = j4;
   89|  6.58M|        x5 = j5;
   90|  6.58M|        x6 = j6;
   91|  6.58M|        x7 = j7;
   92|  6.58M|        x8 = j8;
   93|  6.58M|        x9 = j9;
   94|  6.58M|        x10 = j10;
   95|  6.58M|        x11 = j11;
   96|  6.58M|        x12 = j12;
   97|  6.58M|        x13 = j13;
   98|  6.58M|        x14 = j14;
   99|  6.58M|        x15 = j15;
  100|       |
  101|       |        // The 20 inner ChaCha20 rounds are unrolled here for performance.
  102|  6.58M|        REPEAT10(
  ------------------
  |  |   22|  6.58M|#define REPEAT10(a) do { {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; } while(0)
  |  |  ------------------
  |  |  |  Branch (22:84): [Folded, False: 6.58M]
  |  |  ------------------
  ------------------
  103|  6.58M|            QUARTERROUND( x0, x4, x8,x12);
  104|  6.58M|            QUARTERROUND( x1, x5, x9,x13);
  105|  6.58M|            QUARTERROUND( x2, x6,x10,x14);
  106|  6.58M|            QUARTERROUND( x3, x7,x11,x15);
  107|  6.58M|            QUARTERROUND( x0, x5,x10,x15);
  108|  6.58M|            QUARTERROUND( x1, x6,x11,x12);
  109|  6.58M|            QUARTERROUND( x2, x7, x8,x13);
  110|  6.58M|            QUARTERROUND( x3, x4, x9,x14);
  111|  6.58M|        );
  112|       |
  113|  6.58M|        x0 += 0x61707865;
  114|  6.58M|        x1 += 0x3320646e;
  115|  6.58M|        x2 += 0x79622d32;
  116|  6.58M|        x3 += 0x6b206574;
  117|  6.58M|        x4 += j4;
  118|  6.58M|        x5 += j5;
  119|  6.58M|        x6 += j6;
  120|  6.58M|        x7 += j7;
  121|  6.58M|        x8 += j8;
  122|  6.58M|        x9 += j9;
  123|  6.58M|        x10 += j10;
  124|  6.58M|        x11 += j11;
  125|  6.58M|        x12 += j12;
  126|  6.58M|        x13 += j13;
  127|  6.58M|        x14 += j14;
  128|  6.58M|        x15 += j15;
  129|       |
  130|  6.58M|        ++j12;
  131|  6.58M|        if (!j12) ++j13;
  ------------------
  |  Branch (131:13): [True: 0, False: 6.58M]
  ------------------
  132|       |
  133|  6.58M|        WriteLE32(c + 0, x0);
  134|  6.58M|        WriteLE32(c + 4, x1);
  135|  6.58M|        WriteLE32(c + 8, x2);
  136|  6.58M|        WriteLE32(c + 12, x3);
  137|  6.58M|        WriteLE32(c + 16, x4);
  138|  6.58M|        WriteLE32(c + 20, x5);
  139|  6.58M|        WriteLE32(c + 24, x6);
  140|  6.58M|        WriteLE32(c + 28, x7);
  141|  6.58M|        WriteLE32(c + 32, x8);
  142|  6.58M|        WriteLE32(c + 36, x9);
  143|  6.58M|        WriteLE32(c + 40, x10);
  144|  6.58M|        WriteLE32(c + 44, x11);
  145|  6.58M|        WriteLE32(c + 48, x12);
  146|  6.58M|        WriteLE32(c + 52, x13);
  147|  6.58M|        WriteLE32(c + 56, x14);
  148|  6.58M|        WriteLE32(c + 60, x15);
  149|       |
  150|  6.58M|        if (blocks == 1) {
  ------------------
  |  Branch (150:13): [True: 6.58M, False: 0]
  ------------------
  151|  6.58M|            input[8] = j12;
  152|  6.58M|            input[9] = j13;
  153|  6.58M|            return;
  154|  6.58M|        }
  155|      0|        blocks -= 1;
  156|      0|        c += BLOCKLEN;
  157|      0|    }
  158|  6.58M|}

_ZN8ChaCha20C2ENSt3__14spanIKSt4byteLm18446744073709551615EEE:
   90|  22.3k|    ChaCha20(std::span<const std::byte> key) noexcept : m_aligned(key) {}

_Z8ReadLE64ITk8ByteTypeSt4byteEmPKT_:
   36|  9.89M|{
   37|  9.89M|    uint64_t x;
   38|  9.89M|    memcpy(&x, ptr, 8);
   39|  9.89M|    return le64toh_internal(x);
   40|  9.89M|}
_Z8ReadLE64ITk8ByteTypehEmPKT_:
   36|   124M|{
   37|   124M|    uint64_t x;
   38|   124M|    memcpy(&x, ptr, 8);
   39|   124M|    return le64toh_internal(x);
   40|   124M|}
_Z9WriteLE32ITk8ByteTypeSt4byteEvPT_j:
   51|   105M|{
   52|   105M|    uint32_t v = htole32_internal(x);
   53|   105M|    memcpy(ptr, &v, 4);
   54|   105M|}
_Z8ReadLE32ITk8ByteTypeSt4byteEjPKT_:
   28|   249k|{
   29|   249k|    uint32_t x;
   30|   249k|    memcpy(&x, ptr, 4);
   31|   249k|    return le32toh_internal(x);
   32|   249k|}
_Z8ReadBE32ITk8ByteTypehEjPKT_:
   73|   118M|{
   74|   118M|    uint32_t x;
   75|   118M|    memcpy(&x, ptr, 4);
   76|   118M|    return be32toh_internal(x);
   77|   118M|}
_Z9WriteBE32ITk8ByteTypehEvPT_j:
   96|  2.02G|{
   97|  2.02G|    uint32_t v = htobe32_internal(x);
   98|  2.02G|    memcpy(ptr, &v, 4);
   99|  2.02G|}
_Z8ReadBE64ITk8ByteTypehEmPKT_:
   81|   142k|{
   82|   142k|    uint64_t x;
   83|   142k|    memcpy(&x, ptr, 8);
   84|   142k|    return be64toh_internal(x);
   85|   142k|}
_Z9WriteBE64ITk8ByteTypehEvPT_m:
  103|   252M|{
  104|   252M|    uint64_t v = htobe64_internal(x);
  105|   252M|    memcpy(ptr, &v, 8);
  106|   252M|}

_Z6HexStrNSt3__14spanIKhLm18446744073709551615EEE:
   31|  2.23k|{
   32|  2.23k|    std::string rv(s.size() * 2, '\0');
   33|  2.23k|    static constexpr auto byte_to_hex = CreateByteToHexMap();
   34|  2.23k|    static_assert(sizeof(byte_to_hex) == 512);
   35|       |
   36|  2.23k|    char* it = rv.data();
   37|  71.3k|    for (uint8_t v : s) {
  ------------------
  |  Branch (37:20): [True: 71.3k, False: 2.23k]
  ------------------
   38|  71.3k|        std::memcpy(it, byte_to_hex[v].data(), 2);
   39|  71.3k|        it += 2;
   40|  71.3k|    }
   41|       |
   42|  2.23k|    assert(it == rv.data() + rv.size());
  ------------------
  |  Branch (42:5): [True: 2.23k, False: 0]
  ------------------
   43|  2.23k|    return rv;
   44|  2.23k|}

_ZN7CSHA256C2Ev:
  695|   127M|{
  696|   127M|    sha256::Initialize(s);
  697|   127M|}
_ZN7CSHA2565WriteEPKhm:
  700|  1.18G|{
  701|  1.18G|    const unsigned char* end = data + len;
  702|  1.18G|    size_t bufsize = bytes % 64;
  703|  1.18G|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (703:9): [True: 930M, False: 252M]
  |  Branch (703:20): [True: 311M, False: 618M]
  ------------------
  704|       |        // Fill the buffer, and process it.
  705|   311M|        memcpy(buf + bufsize, data, 64 - bufsize);
  706|   311M|        bytes += 64 - bufsize;
  707|   311M|        data += 64 - bufsize;
  708|   311M|        Transform(s, buf, 1);
  709|   311M|        bufsize = 0;
  710|   311M|    }
  711|  1.18G|    if (end - data >= 64) {
  ------------------
  |  Branch (711:9): [True: 30, False: 1.18G]
  ------------------
  712|     30|        size_t blocks = (end - data) / 64;
  713|     30|        Transform(s, data, blocks);
  714|     30|        data += 64 * blocks;
  715|     30|        bytes += 64 * blocks;
  716|     30|    }
  717|  1.18G|    if (end > data) {
  ------------------
  |  Branch (717:9): [True: 930M, False: 252M]
  ------------------
  718|       |        // Fill the buffer with what remains.
  719|   930M|        memcpy(buf + bufsize, data, end - data);
  720|   930M|        bytes += end - data;
  721|   930M|    }
  722|  1.18G|    return *this;
  723|  1.18G|}
_ZN7CSHA2568FinalizeEPh:
  726|   252M|{
  727|   252M|    static const unsigned char pad[64] = {0x80};
  728|   252M|    unsigned char sizedesc[8];
  729|   252M|    WriteBE64(sizedesc, bytes << 3);
  730|   252M|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  731|   252M|    Write(sizedesc, 8);
  732|   252M|    WriteBE32(hash, s[0]);
  733|   252M|    WriteBE32(hash + 4, s[1]);
  734|   252M|    WriteBE32(hash + 8, s[2]);
  735|   252M|    WriteBE32(hash + 12, s[3]);
  736|   252M|    WriteBE32(hash + 16, s[4]);
  737|   252M|    WriteBE32(hash + 20, s[5]);
  738|   252M|    WriteBE32(hash + 24, s[6]);
  739|   252M|    WriteBE32(hash + 28, s[7]);
  740|   252M|}
_ZN7CSHA2565ResetEv:
  743|   124M|{
  744|   124M|    bytes = 0;
  745|   124M|    sha256::Initialize(s);
  746|   124M|    return *this;
  747|   124M|}
sha256.cpp:_ZN12_GLOBAL__N_16sha25610InitializeEPj:
   87|   252M|{
   88|   252M|    s[0] = 0x6a09e667ul;
   89|   252M|    s[1] = 0xbb67ae85ul;
   90|   252M|    s[2] = 0x3c6ef372ul;
   91|   252M|    s[3] = 0xa54ff53aul;
   92|   252M|    s[4] = 0x510e527ful;
   93|   252M|    s[5] = 0x9b05688cul;
   94|   252M|    s[6] = 0x1f83d9abul;
   95|   252M|    s[7] = 0x5be0cd19ul;
   96|   252M|}

_ZN16sha256_x86_shani9TransformEPjPKhm:
   82|   311M|{
   83|   311M|    __m128i m0, m1, m2, m3, s0, s1, so0, so1;
   84|       |
   85|       |    /* Load state */
   86|   311M|    s0 = _mm_loadu_si128((const __m128i*)s);
   87|   311M|    s1 = _mm_loadu_si128((const __m128i*)(s + 4));
   88|   311M|    Shuffle(s0, s1);
   89|       |
   90|   622M|    while (blocks--) {
  ------------------
  |  Branch (90:12): [True: 311M, False: 311M]
  ------------------
   91|       |        /* Remember old state */
   92|   311M|        so0 = s0;
   93|   311M|        so1 = s1;
   94|       |
   95|       |        /* Load data and transform */
   96|   311M|        m0 = Load(chunk);
   97|   311M|        QuadRound(s0, s1, m0, 0xe9b5dba5b5c0fbcfull, 0x71374491428a2f98ull);
   98|   311M|        m1 = Load(chunk + 16);
   99|   311M|        QuadRound(s0, s1, m1, 0xab1c5ed5923f82a4ull, 0x59f111f13956c25bull);
  100|   311M|        ShiftMessageA(m0, m1);
  101|   311M|        m2 = Load(chunk + 32);
  102|   311M|        QuadRound(s0, s1, m2, 0x550c7dc3243185beull, 0x12835b01d807aa98ull);
  103|   311M|        ShiftMessageA(m1, m2);
  104|   311M|        m3 = Load(chunk + 48);
  105|   311M|        QuadRound(s0, s1, m3, 0xc19bf1749bdc06a7ull, 0x80deb1fe72be5d74ull);
  106|   311M|        ShiftMessageB(m2, m3, m0);
  107|   311M|        QuadRound(s0, s1, m0, 0x240ca1cc0fc19dc6ull, 0xefbe4786E49b69c1ull);
  108|   311M|        ShiftMessageB(m3, m0, m1);
  109|   311M|        QuadRound(s0, s1, m1, 0x76f988da5cb0a9dcull, 0x4a7484aa2de92c6full);
  110|   311M|        ShiftMessageB(m0, m1, m2);
  111|   311M|        QuadRound(s0, s1, m2, 0xbf597fc7b00327c8ull, 0xa831c66d983e5152ull);
  112|   311M|        ShiftMessageB(m1, m2, m3);
  113|   311M|        QuadRound(s0, s1, m3, 0x1429296706ca6351ull, 0xd5a79147c6e00bf3ull);
  114|   311M|        ShiftMessageB(m2, m3, m0);
  115|   311M|        QuadRound(s0, s1, m0, 0x53380d134d2c6dfcull, 0x2e1b213827b70a85ull);
  116|   311M|        ShiftMessageB(m3, m0, m1);
  117|   311M|        QuadRound(s0, s1, m1, 0x92722c8581c2c92eull, 0x766a0abb650a7354ull);
  118|   311M|        ShiftMessageB(m0, m1, m2);
  119|   311M|        QuadRound(s0, s1, m2, 0xc76c51A3c24b8b70ull, 0xa81a664ba2bfe8a1ull);
  120|   311M|        ShiftMessageB(m1, m2, m3);
  121|   311M|        QuadRound(s0, s1, m3, 0x106aa070f40e3585ull, 0xd6990624d192e819ull);
  122|   311M|        ShiftMessageB(m2, m3, m0);
  123|   311M|        QuadRound(s0, s1, m0, 0x34b0bcb52748774cull, 0x1e376c0819a4c116ull);
  124|   311M|        ShiftMessageB(m3, m0, m1);
  125|   311M|        QuadRound(s0, s1, m1, 0x682e6ff35b9cca4full, 0x4ed8aa4a391c0cb3ull);
  126|   311M|        ShiftMessageC(m0, m1, m2);
  127|   311M|        QuadRound(s0, s1, m2, 0x8cc7020884c87814ull, 0x78a5636f748f82eeull);
  128|   311M|        ShiftMessageC(m1, m2, m3);
  129|   311M|        QuadRound(s0, s1, m3, 0xc67178f2bef9A3f7ull, 0xa4506ceb90befffaull);
  130|       |
  131|       |        /* Combine with old state */
  132|   311M|        s0 = _mm_add_epi32(s0, so0);
  133|   311M|        s1 = _mm_add_epi32(s1, so1);
  134|       |
  135|       |        /* Advance */
  136|   311M|        chunk += 64;
  137|   311M|    }
  138|       |
  139|   311M|    Unshuffle(s0, s1);
  140|   311M|    _mm_storeu_si128((__m128i*)s, s0);
  141|   311M|    _mm_storeu_si128((__m128i*)(s + 4), s1);
  142|   311M|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_17ShuffleERDv2_xS1_:
   54|   311M|{
   55|   311M|    const __m128i t1 = _mm_shuffle_epi32(s0, 0xB1);
   56|   311M|    const __m128i t2 = _mm_shuffle_epi32(s1, 0x1B);
   57|   311M|    s0 = _mm_alignr_epi8(t1, t2, 0x08);
   58|       |    s1 = _mm_blend_epi16(t2, t1, 0xF0);
   59|   311M|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_14LoadEPKh:
   70|  1.24G|{
   71|  1.24G|    return _mm_shuffle_epi8(_mm_loadu_si128((const __m128i*)in), _mm_load_si128((const __m128i*)MASK));
   72|  1.24G|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_19QuadRoundERDv2_xS1_S0_mm:
   31|  4.98G|{
   32|  4.98G|    const __m128i msg = _mm_add_epi32(m, _mm_set_epi64x(k1, k0));
   33|  4.98G|    state1 = _mm_sha256rnds2_epu32(state1, state0, msg);
   34|       |    state0 = _mm_sha256rnds2_epu32(state0, state1, _mm_shuffle_epi32(msg, 0x0e));
   35|  4.98G|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_113ShiftMessageAERDv2_xS0_:
   38|  3.73G|{
   39|  3.73G|    m0 = _mm_sha256msg1_epu32(m0, m1);
   40|  3.73G|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_113ShiftMessageBERDv2_xS0_S1_:
   48|  3.11G|{
   49|  3.11G|    ShiftMessageC(m0, m1, m2);
   50|  3.11G|    ShiftMessageA(m0, m1);
   51|  3.11G|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_113ShiftMessageCERDv2_xS0_S1_:
   43|  3.73G|{
   44|       |    m2 = _mm_sha256msg2_epu32(_mm_add_epi32(m2, _mm_alignr_epi8(m1, m0, 4)), m1);
   45|  3.73G|}
sha256_x86_shani.cpp:_ZN12_GLOBAL__N_19UnshuffleERDv2_xS1_:
   62|   311M|{
   63|   311M|    const __m128i t1 = _mm_shuffle_epi32(s0, 0x1B);
   64|   311M|    const __m128i t2 = _mm_shuffle_epi32(s1, 0xB1);
   65|   311M|    s0 = _mm_blend_epi16(t1, t2, 0xF0);
   66|       |    s1 = _mm_alignr_epi8(t2, t1, 0x08);
   67|   311M|}

_ZN7CSHA512C2Ev:
  155|  8.92k|{
  156|  8.92k|    sha512::Initialize(s);
  157|  8.92k|}
_ZN7CSHA5125WriteEPKhm:
  160|  62.4k|{
  161|  62.4k|    const unsigned char* end = data + len;
  162|  62.4k|    size_t bufsize = bytes % 128;
  163|  62.4k|    if (bufsize && bufsize + len >= 128) {
  ------------------
  |  Branch (163:9): [True: 53.5k, False: 8.92k]
  |  Branch (163:20): [True: 8.92k, False: 44.6k]
  ------------------
  164|       |        // Fill the buffer, and process it.
  165|  8.92k|        memcpy(buf + bufsize, data, 128 - bufsize);
  166|  8.92k|        bytes += 128 - bufsize;
  167|  8.92k|        data += 128 - bufsize;
  168|  8.92k|        sha512::Transform(s, buf);
  169|  8.92k|        bufsize = 0;
  170|  8.92k|    }
  171|  62.4k|    while (end - data >= 128) {
  ------------------
  |  Branch (171:12): [True: 0, False: 62.4k]
  ------------------
  172|       |        // Process full chunks directly from the source.
  173|      0|        sha512::Transform(s, data);
  174|      0|        data += 128;
  175|      0|        bytes += 128;
  176|      0|    }
  177|  62.4k|    if (end > data) {
  ------------------
  |  Branch (177:9): [True: 53.5k, False: 8.92k]
  ------------------
  178|       |        // Fill the buffer with what remains.
  179|  53.5k|        memcpy(buf + bufsize, data, end - data);
  180|  53.5k|        bytes += end - data;
  181|  53.5k|    }
  182|  62.4k|    return *this;
  183|  62.4k|}
_ZN7CSHA5128FinalizeEPh:
  186|  8.92k|{
  187|  8.92k|    static const unsigned char pad[128] = {0x80};
  188|  8.92k|    unsigned char sizedesc[16] = {0x00};
  189|  8.92k|    WriteBE64(sizedesc + 8, bytes << 3);
  190|  8.92k|    Write(pad, 1 + ((239 - (bytes % 128)) % 128));
  191|  8.92k|    Write(sizedesc, 16);
  192|  8.92k|    WriteBE64(hash, s[0]);
  193|  8.92k|    WriteBE64(hash + 8, s[1]);
  194|  8.92k|    WriteBE64(hash + 16, s[2]);
  195|  8.92k|    WriteBE64(hash + 24, s[3]);
  196|  8.92k|    WriteBE64(hash + 32, s[4]);
  197|  8.92k|    WriteBE64(hash + 40, s[5]);
  198|  8.92k|    WriteBE64(hash + 48, s[6]);
  199|  8.92k|    WriteBE64(hash + 56, s[7]);
  200|  8.92k|}
_ZN7CSHA5125ResetEv:
  203|  8.92k|{
  204|  8.92k|    bytes = 0;
  205|  8.92k|    sha512::Initialize(s);
  206|  8.92k|    return *this;
  207|  8.92k|}
sha512.cpp:_ZN12_GLOBAL__N_16sha51210InitializeEPm:
   35|  17.8k|{
   36|  17.8k|    s[0] = 0x6a09e667f3bcc908ull;
   37|  17.8k|    s[1] = 0xbb67ae8584caa73bull;
   38|  17.8k|    s[2] = 0x3c6ef372fe94f82bull;
   39|  17.8k|    s[3] = 0xa54ff53a5f1d36f1ull;
   40|  17.8k|    s[4] = 0x510e527fade682d1ull;
   41|  17.8k|    s[5] = 0x9b05688c2b3e6c1full;
   42|  17.8k|    s[6] = 0x1f83d9abfb41bd6bull;
   43|  17.8k|    s[7] = 0x5be0cd19137e2179ull;
   44|  17.8k|}
sha512.cpp:_ZN12_GLOBAL__N_16sha5129TransformEPmPKh:
   48|  8.92k|{
   49|  8.92k|    uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
   50|  8.92k|    uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
   51|       |
   52|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x428a2f98d728ae22ull, w0 = ReadBE64(chunk + 0));
   53|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x7137449123ef65cdull, w1 = ReadBE64(chunk + 8));
   54|  8.92k|    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcfec4d3b2full, w2 = ReadBE64(chunk + 16));
   55|  8.92k|    Round(f, g, h, a, b, c, d, e, 0xe9b5dba58189dbbcull, w3 = ReadBE64(chunk + 24));
   56|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x3956c25bf348b538ull, w4 = ReadBE64(chunk + 32));
   57|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x59f111f1b605d019ull, w5 = ReadBE64(chunk + 40));
   58|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x923f82a4af194f9bull, w6 = ReadBE64(chunk + 48));
   59|  8.92k|    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5da6d8118ull, w7 = ReadBE64(chunk + 56));
   60|  8.92k|    Round(a, b, c, d, e, f, g, h, 0xd807aa98a3030242ull, w8 = ReadBE64(chunk + 64));
   61|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x12835b0145706fbeull, w9 = ReadBE64(chunk + 72));
   62|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x243185be4ee4b28cull, w10 = ReadBE64(chunk + 80));
   63|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x550c7dc3d5ffb4e2ull, w11 = ReadBE64(chunk + 88));
   64|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x72be5d74f27b896full, w12 = ReadBE64(chunk + 96));
   65|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x80deb1fe3b1696b1ull, w13 = ReadBE64(chunk + 104));
   66|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x9bdc06a725c71235ull, w14 = ReadBE64(chunk + 112));
   67|  8.92k|    Round(b, c, d, e, f, g, h, a, 0xc19bf174cf692694ull, w15 = ReadBE64(chunk + 120));
   68|       |
   69|  8.92k|    Round(a, b, c, d, e, f, g, h, 0xe49b69c19ef14ad2ull, w0 += sigma1(w14) + w9 + sigma0(w1));
   70|  8.92k|    Round(h, a, b, c, d, e, f, g, 0xefbe4786384f25e3ull, w1 += sigma1(w15) + w10 + sigma0(w2));
   71|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x0fc19dc68b8cd5b5ull, w2 += sigma1(w0) + w11 + sigma0(w3));
   72|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x240ca1cc77ac9c65ull, w3 += sigma1(w1) + w12 + sigma0(w4));
   73|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x2de92c6f592b0275ull, w4 += sigma1(w2) + w13 + sigma0(w5));
   74|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x4a7484aa6ea6e483ull, w5 += sigma1(w3) + w14 + sigma0(w6));
   75|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dcbd41fbd4ull, w6 += sigma1(w4) + w15 + sigma0(w7));
   76|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x76f988da831153b5ull, w7 += sigma1(w5) + w0 + sigma0(w8));
   77|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x983e5152ee66dfabull, w8 += sigma1(w6) + w1 + sigma0(w9));
   78|  8.92k|    Round(h, a, b, c, d, e, f, g, 0xa831c66d2db43210ull, w9 += sigma1(w7) + w2 + sigma0(w10));
   79|  8.92k|    Round(g, h, a, b, c, d, e, f, 0xb00327c898fb213full, w10 += sigma1(w8) + w3 + sigma0(w11));
   80|  8.92k|    Round(f, g, h, a, b, c, d, e, 0xbf597fc7beef0ee4ull, w11 += sigma1(w9) + w4 + sigma0(w12));
   81|  8.92k|    Round(e, f, g, h, a, b, c, d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) + w5 + sigma0(w13));
   82|  8.92k|    Round(d, e, f, g, h, a, b, c, 0xd5a79147930aa725ull, w13 += sigma1(w11) + w6 + sigma0(w14));
   83|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x06ca6351e003826full, w14 += sigma1(w12) + w7 + sigma0(w15));
   84|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x142929670a0e6e70ull, w15 += sigma1(w13) + w8 + sigma0(w0));
   85|       |
   86|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x27b70a8546d22ffcull, w0 += sigma1(w14) + w9 + sigma0(w1));
   87|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x2e1b21385c26c926ull, w1 += sigma1(w15) + w10 + sigma0(w2));
   88|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc5ac42aedull, w2 += sigma1(w0) + w11 + sigma0(w3));
   89|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x53380d139d95b3dfull, w3 += sigma1(w1) + w12 + sigma0(w4));
   90|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x650a73548baf63deull, w4 += sigma1(w2) + w13 + sigma0(w5));
   91|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x766a0abb3c77b2a8ull, w5 += sigma1(w3) + w14 + sigma0(w6));
   92|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x81c2c92e47edaee6ull, w6 += sigma1(w4) + w15 + sigma0(w7));
   93|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x92722c851482353bull, w7 += sigma1(w5) + w0 + sigma0(w8));
   94|  8.92k|    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a14cf10364ull, w8 += sigma1(w6) + w1 + sigma0(w9));
   95|  8.92k|    Round(h, a, b, c, d, e, f, g, 0xa81a664bbc423001ull, w9 += sigma1(w7) + w2 + sigma0(w10));
   96|  8.92k|    Round(g, h, a, b, c, d, e, f, 0xc24b8b70d0f89791ull, w10 += sigma1(w8) + w3 + sigma0(w11));
   97|  8.92k|    Round(f, g, h, a, b, c, d, e, 0xc76c51a30654be30ull, w11 += sigma1(w9) + w4 + sigma0(w12));
   98|  8.92k|    Round(e, f, g, h, a, b, c, d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) + w5 + sigma0(w13));
   99|  8.92k|    Round(d, e, f, g, h, a, b, c, 0xd69906245565a910ull, w13 += sigma1(w11) + w6 + sigma0(w14));
  100|  8.92k|    Round(c, d, e, f, g, h, a, b, 0xf40e35855771202aull, w14 += sigma1(w12) + w7 + sigma0(w15));
  101|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) + w8 + sigma0(w0));
  102|       |
  103|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x19a4c116b8d2d0c8ull, w0 += sigma1(w14) + w9 + sigma0(w1));
  104|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x1e376c085141ab53ull, w1 += sigma1(w15) + w10 + sigma0(w2));
  105|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x2748774cdf8eeb99ull, w2 += sigma1(w0) + w11 + sigma0(w3));
  106|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5e19b48a8ull, w3 += sigma1(w1) + w12 + sigma0(w4));
  107|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x391c0cb3c5c95a63ull, w4 += sigma1(w2) + w13 + sigma0(w5));
  108|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4ae3418acbull, w5 += sigma1(w3) + w14 + sigma0(w6));
  109|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f7763e373ull, w6 += sigma1(w4) + w15 + sigma0(w7));
  110|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x682e6ff3d6b2b8a3ull, w7 += sigma1(w5) + w0 + sigma0(w8));
  111|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x748f82ee5defb2fcull, w8 += sigma1(w6) + w1 + sigma0(w9));
  112|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x78a5636f43172f60ull, w9 += sigma1(w7) + w2 + sigma0(w10));
  113|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x84c87814a1f0ab72ull, w10 += sigma1(w8) + w3 + sigma0(w11));
  114|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x8cc702081a6439ecull, w11 += sigma1(w9) + w4 + sigma0(w12));
  115|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x90befffa23631e28ull, w12 += sigma1(w10) + w5 + sigma0(w13));
  116|  8.92k|    Round(d, e, f, g, h, a, b, c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) + w6 + sigma0(w14));
  117|  8.92k|    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) + w7 + sigma0(w15));
  118|  8.92k|    Round(b, c, d, e, f, g, h, a, 0xc67178f2e372532bull, w15 += sigma1(w13) + w8 + sigma0(w0));
  119|       |
  120|  8.92k|    Round(a, b, c, d, e, f, g, h, 0xca273eceea26619cull, w0 += sigma1(w14) + w9 + sigma0(w1));
  121|  8.92k|    Round(h, a, b, c, d, e, f, g, 0xd186b8c721c0c207ull, w1 += sigma1(w15) + w10 + sigma0(w2));
  122|  8.92k|    Round(g, h, a, b, c, d, e, f, 0xeada7dd6cde0eb1eull, w2 += sigma1(w0) + w11 + sigma0(w3));
  123|  8.92k|    Round(f, g, h, a, b, c, d, e, 0xf57d4f7fee6ed178ull, w3 += sigma1(w1) + w12 + sigma0(w4));
  124|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x06f067aa72176fbaull, w4 += sigma1(w2) + w13 + sigma0(w5));
  125|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x0a637dc5a2c898a6ull, w5 += sigma1(w3) + w14 + sigma0(w6));
  126|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x113f9804bef90daeull, w6 += sigma1(w4) + w15 + sigma0(w7));
  127|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x1b710b35131c471bull, w7 += sigma1(w5) + w0 + sigma0(w8));
  128|  8.92k|    Round(a, b, c, d, e, f, g, h, 0x28db77f523047d84ull, w8 += sigma1(w6) + w1 + sigma0(w9));
  129|  8.92k|    Round(h, a, b, c, d, e, f, g, 0x32caab7b40c72493ull, w9 += sigma1(w7) + w2 + sigma0(w10));
  130|  8.92k|    Round(g, h, a, b, c, d, e, f, 0x3c9ebe0a15c9bebcull, w10 += sigma1(w8) + w3 + sigma0(w11));
  131|  8.92k|    Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12));
  132|  8.92k|    Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13));
  133|  8.92k|    Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14));
  134|  8.92k|    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 + sigma1(w12) + w7 + sigma0(w15));
  135|  8.92k|    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 + sigma1(w13) + w8 + sigma0(w0));
  136|       |
  137|  8.92k|    s[0] += a;
  138|  8.92k|    s[1] += b;
  139|  8.92k|    s[2] += c;
  140|  8.92k|    s[3] += d;
  141|  8.92k|    s[4] += e;
  142|  8.92k|    s[5] += f;
  143|  8.92k|    s[6] += g;
  144|  8.92k|    s[7] += h;
  145|  8.92k|}
sha512.cpp:_ZN12_GLOBAL__N_16sha5125RoundEmmmRmmmmS1_mm:
   26|   713k|{
   27|   713k|    uint64_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
   28|   713k|    uint64_t t2 = Sigma0(a) + Maj(a, b, c);
   29|   713k|    d += t1;
   30|   713k|    h = t1 + t2;
   31|   713k|}
sha512.cpp:_ZN12_GLOBAL__N_16sha5126Sigma1Em:
   20|   713k|uint64_t inline Sigma1(uint64_t x) { return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); }
sha512.cpp:_ZN12_GLOBAL__N_16sha5122ChEmmm:
   17|   713k|uint64_t inline Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); }
sha512.cpp:_ZN12_GLOBAL__N_16sha5126Sigma0Em:
   19|   713k|uint64_t inline Sigma0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); }
sha512.cpp:_ZN12_GLOBAL__N_16sha5123MajEmmm:
   18|   713k|uint64_t inline Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); }
sha512.cpp:_ZN12_GLOBAL__N_16sha5126sigma1Em:
   22|   571k|uint64_t inline sigma1(uint64_t x) { return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); }
sha512.cpp:_ZN12_GLOBAL__N_16sha5126sigma0Em:
   21|   571k|uint64_t inline sigma0(uint64_t x) { return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); }

_ZN10CSipHasherC2Emm:
   12|  91.2M|CSipHasher::CSipHasher(uint64_t k0, uint64_t k1) : m_state{k0, k1} {}
_ZN10CSipHasher5WriteEm:
   15|   380M|{
   16|   380M|    assert(m_count % 8 == 0);
  ------------------
  |  Branch (16:5): [True: 380M, False: 0]
  ------------------
   17|   380M|    m_state.Compress2(data);
   18|   380M|    m_count += 8;
   19|   380M|    return *this;
   20|   380M|}
_ZN10CSipHasher5WriteENSt3__14spanIKhLm18446744073709551615EEE:
   23|   124M|{
   24|   124M|    SipHashState state{m_state.Copy()};
   25|   124M|    uint64_t t{m_tmp};
   26|   124M|    uint8_t c{m_count};
   27|       |
   28|  2.82G|    while (data.size() > 0) {
  ------------------
  |  Branch (28:12): [True: 2.70G, False: 124M]
  ------------------
   29|  2.70G|        t |= uint64_t{data.front()} << (8 * (c % 8));
   30|  2.70G|        c++;
   31|  2.70G|        if ((c & 7) == 0) {
  ------------------
  |  Branch (31:13): [True: 323M, False: 2.37G]
  ------------------
   32|   323M|            state.Compress2(t);
   33|   323M|            t = 0;
   34|   323M|        }
   35|  2.70G|        data = data.subspan(1);
   36|  2.70G|    }
   37|       |
   38|   124M|    m_state = state;
   39|   124M|    m_count = c;
   40|   124M|    m_tmp = t;
   41|       |
   42|   124M|    return *this;
   43|   124M|}
_ZNK10CSipHasher8FinalizeEv:
   46|  91.2M|{
   47|  91.2M|    return m_state.Copy()
   48|  91.2M|                  .Compress2(m_tmp | (uint64_t{m_count} << 56))
   49|  91.2M|                  .Finalize4();
   50|  91.2M|}

_ZN12SipHashStateC2Emmmm:
   28|   306M|    ALWAYS_INLINE SipHashState(uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3) noexcept : m_v0{v0}, m_v1{v1}, m_v2{v2}, m_v3{v3} {}
_ZN12SipHashState8SipRoundEv:
   35|  1.95G|    {
   36|  1.95G|        m_v0 += m_v1; m_v1 = std::rotl(m_v1, 13); m_v1 ^= m_v0;
   37|  1.95G|        m_v0 = std::rotl(m_v0, 32);
   38|  1.95G|        m_v2 += m_v3; m_v3 = std::rotl(m_v3, 16); m_v3 ^= m_v2;
   39|  1.95G|        m_v0 += m_v3; m_v3 = std::rotl(m_v3, 21); m_v3 ^= m_v0;
   40|  1.95G|        m_v2 += m_v1; m_v1 = std::rotl(m_v1, 17); m_v1 ^= m_v2;
   41|  1.95G|        m_v2 = std::rotl(m_v2, 32);
   42|  1.95G|    }
_ZN12SipHashStateC2Emm:
   46|  91.2M|    explicit ALWAYS_INLINE SipHashState(uint64_t k0, uint64_t k1) noexcept : SipHashState{C0 ^ k0, C1 ^ k1, C2 ^ k0, C3 ^ k1} {}
_ZNK12SipHashState4CopyEv:
   48|   215M|    ALWAYS_INLINE SipHashState Copy() const noexcept { return {m_v0, m_v1, m_v2, m_v3}; }
_ZN12SipHashState9Compress2Em:
   68|   795M|    {
   69|   795M|        m_v3 ^= data;
   70|   795M|        SipRound();
   71|   795M|        SipRound();
   72|   795M|        m_v0 ^= data;
   73|   795M|        return *this;
   74|   795M|    }
_ZN12SipHashState9Finalize4Ev:
   77|  91.2M|    {
   78|  91.2M|        m_v2 ^= FINALIZER;
   79|  91.2M|        SipRound();
   80|  91.2M|        SipRound();
   81|  91.2M|        SipRound();
   82|  91.2M|        SipRound();
   83|  91.2M|        return m_v0 ^ m_v1 ^ m_v2 ^ m_v3;
   84|  91.2M|    }

_ZN10HashWriterlsINSt3__14spanIKSt4byteLm18446744073709551615EEEEERS_RKT_:
  150|  1.20k|    {
  151|  1.20k|        ::Serialize(*this, obj);
  152|  1.20k|        return *this;
  153|  1.20k|    }
_ZN10HashWriter12GetCheapHashEv:
  143|   124M|    inline uint64_t GetCheapHash() {
  144|   124M|        uint256 result = GetHash();
  145|   124M|        return ReadLE64(result.begin());
  146|   124M|    }
_ZN10HashWriterlsImEERS_RKT_:
  150|  36.8M|    {
  151|  36.8M|        ::Serialize(*this, obj);
  152|  36.8M|        return *this;
  153|  36.8M|    }
_ZN9ChainCodeD2Ev:
   28|      2|    ~ChainCode() { memory_cleanse(data(), size()); }
_ZN10HashWriterlsINSt3__16vectorIhNS1_9allocatorIhEEEEEERS_RKT_:
  150|   142M|    {
  151|   142M|        ::Serialize(*this, obj);
  152|   142M|        return *this;
  153|   142M|    }
_ZN10HashWriterlsINSt3__14spanIKhLm32EEEEERS_RKT_:
  150|   124M|    {
  151|   124M|        ::Serialize(*this, obj);
  152|   124M|        return *this;
  153|   124M|    }
_ZN10HashWriterlsIiEERS_RKT_:
  150|  51.2M|    {
  151|  51.2M|        ::Serialize(*this, obj);
  152|  51.2M|        return *this;
  153|  51.2M|    }
_ZN10HashWriter7GetHashEv:
  123|   124M|    uint256 GetHash() {
  124|   124M|        uint256 result;
  125|   124M|        ctx.Finalize(result.begin());
  126|   124M|        ctx.Reset().Write(result.begin(), CSHA256::OUTPUT_SIZE).Finalize(result.begin());
  127|   124M|        return result;
  128|   124M|    }
_ZN10HashWriterlsI7uint256EERS_RKT_:
  150|   124M|    {
  151|   124M|        ::Serialize(*this, obj);
  152|   124M|        return *this;
  153|   124M|    }
_ZN10HashWriterlsIhEERS_RKT_:
  150|  51.2M|    {
  151|  51.2M|        ::Serialize(*this, obj);
  152|  51.2M|        return *this;
  153|  51.2M|    }
_ZN10HashWriter5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  115|   550M|    {
  116|   550M|        ctx.Write(UCharCast(src.data()), src.size());
  117|   550M|    }

_ZN10interfaces5ChainD2Ev:
  119|      2|    virtual ~Chain() = default;

_ZN11ECC_ContextD2Ev:
  501|      2|{
  502|      2|    ECC_Stop();
  503|      2|}
key.cpp:_ZL8ECC_Stopv:
  486|      2|static void ECC_Stop() {
  487|      2|    secp256k1_context *ctx = secp256k1_context_sign;
  488|      2|    secp256k1_context_sign = nullptr;
  489|       |
  490|      2|    if (ctx) {
  ------------------
  |  Branch (490:9): [True: 2, False: 0]
  ------------------
  491|      2|        secp256k1_context_destroy(ctx);
  492|      2|    }
  493|      2|}

_Z11LogInstancev:
   27|  33.3M|{
   28|       |/**
   29|       | * NOTE: the logger instances is leaked on exit. This is ugly, but will be
   30|       | * cleaned up by the OS/libc. Defining a logger as a global object doesn't work
   31|       | * since the order of destruction of static/global objects is undefined.
   32|       | * Consider if the logger gets destroyed, and then some later destructor calls
   33|       | * LogInfo, maybe indirectly, and you get a core dump at shutdown trying to
   34|       | * access the logger. When the shutdown sequence is fully audited and tested,
   35|       | * explicit destruction of these objects can be implemented by changing this
   36|       | * from a raw pointer to a std::unique_ptr.
   37|       | * Since the ~Logger() destructor is never called, the Logger class and all
   38|       | * its subclasses must have implicitly-defined destructors.
   39|       | *
   40|       | * This method of initialization was originally introduced in
   41|       | * ee3374234c60aba2cc4c5cd5cac1c0aefc2d817c.
   42|       | */
   43|  33.3M|    static BCLog::Logger* g_logger{new BCLog::Logger()};
   44|  33.3M|    return *g_logger;
   45|  33.3M|}
_ZN5BCLog6Logger20DisconnectTestLoggerEv:
  104|      2|{
  105|      2|    STDLOCK(m_cs);
  ------------------
  |  |   41|      2|#define STDLOCK(cs) StdMutex::Guard BITCOIN_UNIQUE_NAME(criticalblock){StdMutex::CheckNotHeld(cs)}
  |  |  ------------------
  |  |  |  |   11|      2|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|      2|    m_buffering = true;
  107|      2|    if (m_fileout != nullptr) fclose(m_fileout);
  ------------------
  |  Branch (107:9): [True: 0, False: 2]
  ------------------
  108|      2|    m_fileout = nullptr;
  109|      2|    m_print_callbacks.clear();
  110|      2|    m_max_buffer_memusage = DEFAULT_MAX_LOG_BUFFER;
  111|      2|    m_cur_buffer_memusage = 0;
  112|      2|    m_buffer_lines_discarded = 0;
  113|      2|    m_msgs_before_open.clear();
  114|      2|}
_ZNK5BCLog6Logger15WillLogCategoryENS_8LogFlagsE:
  157|  33.3M|{
  158|  33.3M|    return (m_categories.load(std::memory_order_relaxed) & category) != 0;
  159|  33.3M|}
_ZNK5BCLog6Logger20WillLogCategoryLevelENS_8LogFlagsEN4util3log5LevelE:
  162|  33.3M|{
  163|       |    // Log messages at Info, Warning and Error level unconditionally, so that
  164|       |    // important troubleshooting information doesn't get lost.
  165|  33.3M|    if (level >= BCLog::Level::Info) return true;
  ------------------
  |  Branch (165:9): [True: 0, False: 33.3M]
  ------------------
  166|       |
  167|  33.3M|    if (!WillLogCategory(category)) return false;
  ------------------
  |  Branch (167:9): [True: 33.3M, False: 0]
  ------------------
  168|       |
  169|      0|    STDLOCK(m_cs);
  ------------------
  |  |   41|      0|#define STDLOCK(cs) StdMutex::Guard BITCOIN_UNIQUE_NAME(criticalblock){StdMutex::CheckNotHeld(cs)}
  |  |  ------------------
  |  |  |  |   11|      0|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      0|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      0|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      0|    const auto it{m_category_log_levels.find(category)};
  171|      0|    return level >= (it == m_category_log_levels.end() ? LogLevel() : it->second);
  ------------------
  |  Branch (171:22): [True: 0, False: 0]
  ------------------
  172|  33.3M|}
_ZN4util3log14ShouldDebugLogEm:
  620|  33.3M|{
  621|  33.3M|    return LogInstance().WillLogCategoryLevel(static_cast<BCLog::LogFlags>(category), util::log::Level::Debug);
  622|  33.3M|}
_ZN4util3log3LogENS0_5EntryE:
  630|  3.86k|{
  631|  3.86k|    BCLog::Logger& logger{LogInstance()};
  632|  3.86k|    if (logger.Enabled()) {
  ------------------
  |  Branch (632:9): [True: 0, False: 3.86k]
  ------------------
  633|      0|        logger.LogPrint(std::move(entry));
  634|      0|    }
  635|  3.86k|}

_ZNK5BCLog6Logger7EnabledEv:
  185|  3.86k|        {
  186|  3.86k|            STDLOCK(m_cs);
  ------------------
  |  |   41|  3.86k|#define STDLOCK(cs) StdMutex::Guard BITCOIN_UNIQUE_NAME(criticalblock){StdMutex::CheckNotHeld(cs)}
  |  |  ------------------
  |  |  |  |   11|  3.86k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  3.86k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  3.86k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|  3.86k|            return m_buffering || m_print_to_console || m_print_to_file || !m_print_callbacks.empty();
  ------------------
  |  Branch (187:20): [True: 0, False: 3.86k]
  |  Branch (187:35): [True: 0, False: 3.86k]
  |  Branch (187:57): [True: 0, False: 3.86k]
  |  Branch (187:76): [True: 0, False: 3.86k]
  ------------------
  188|  3.86k|        }

_ZN5BCLog5TimerINSt3__16chrono8durationIxNS1_5ratioILl1ELl1000EEEEEEC2ENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEESD_NS_8LogFlagsEb:
   33|  2.23k|        : m_prefix(std::move(prefix)),
   34|  2.23k|          m_title(std::move(end_msg)),
   35|  2.23k|          m_log_category(log_category),
   36|  2.23k|          m_message_on_completion(msg_on_completion)
   37|  2.23k|    {
   38|  2.23k|        this->Log(strprintf("%s started", m_title));
  ------------------
  |  | 1172|  2.23k|#define strprintf tfm::format
  ------------------
   39|  2.23k|        m_start_t = std::chrono::steady_clock::now();
   40|  2.23k|    }
_ZN5BCLog5TimerINSt3__16chrono8durationIxNS1_5ratioILl1ELl1000EEEEEE3LogERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   52|  4.46k|    {
   53|  4.46k|        const std::string full_msg = this->LogMsg(msg);
   54|       |
   55|  4.46k|        if (m_log_category == BCLog::LogFlags::ALL) {
  ------------------
  |  Branch (55:13): [True: 0, False: 4.46k]
  ------------------
   56|      0|            LogInfo("%s\n", full_msg);
  ------------------
  |  |  125|      0|#define LogInfo(...) detail_LogWithSrcLoc(BCLog::LogFlags::ALL, util::log::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
   57|  4.46k|        } else {
   58|  4.46k|            LogDebug(m_log_category, "%s\n", full_msg);
  ------------------
  |  |  143|  4.46k|#define LogDebug(category, ...) detail_LogIfCategoryAndLevelEnabled(category, util::log::ShouldDebugLog, util::log::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  136|  4.46k|    do {                                                                                      \
  |  |  |  |  137|  4.46k|        if (shouldlog(category)) {                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:13): [True: 0, False: 4.46k]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            detail_LogWithSrcLoc((category), (level), util::log::NO_RATE_LIMIT, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  139|      0|        }                                                                                     \
  |  |  |  |  140|  4.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:14): [Folded, False: 4.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   59|  4.46k|        }
   60|  4.46k|    }
_ZN5BCLog5TimerINSt3__16chrono8durationIxNS1_5ratioILl1ELl1000EEEEEE6LogMsgERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   63|  4.46k|    {
   64|  4.46k|        const auto end_time{std::chrono::steady_clock::now()};
   65|  4.46k|        if (!m_start_t) {
  ------------------
  |  Branch (65:13): [True: 2.23k, False: 2.23k]
  ------------------
   66|  2.23k|            return strprintf("%s: %s", m_prefix, msg);
  ------------------
  |  | 1172|  2.23k|#define strprintf tfm::format
  ------------------
   67|  2.23k|        }
   68|  2.23k|        const auto duration{end_time - *m_start_t};
   69|       |
   70|       |        if constexpr (std::is_same_v<TimeType, std::chrono::microseconds>) {
   71|       |            return strprintf("%s: %s (%iμs)", m_prefix, msg, Ticks<std::chrono::microseconds>(duration));
   72|  2.23k|        } else if constexpr (std::is_same_v<TimeType, std::chrono::milliseconds>) {
   73|  2.23k|            return strprintf("%s: %s (%.2fms)", m_prefix, msg, Ticks<MillisecondsDouble>(duration));
  ------------------
  |  | 1172|  2.23k|#define strprintf tfm::format
  ------------------
   74|       |        } else if constexpr (std::is_same_v<TimeType, std::chrono::seconds>) {
   75|       |            return strprintf("%s: %s (%.2fs)", m_prefix, msg, Ticks<SecondsDouble>(duration));
   76|       |        } else {
   77|       |            static_assert(ALWAYS_FALSE<TimeType>, "Error: unexpected time type");
   78|       |        }
   79|  2.23k|    }
_ZN5BCLog5TimerINSt3__16chrono8durationIxNS1_5ratioILl1ELl1000EEEEEED2Ev:
   43|  2.23k|    {
   44|  2.23k|        if (m_message_on_completion) {
  ------------------
  |  Branch (44:13): [True: 0, False: 2.23k]
  ------------------
   45|      0|            this->Log(strprintf("%s completed", m_title));
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   46|  2.23k|        } else {
   47|  2.23k|            this->Log("completed");
   48|  2.23k|        }
   49|  2.23k|    }

_ZN11CNetCleanupD2Ev:
 3676|      2|    {
 3677|       |#ifdef WIN32
 3678|       |        // Shutdown Windows Sockets
 3679|       |        WSACleanup();
 3680|       |#endif
 3681|      2|    }

_ZNK8CNetAddr16GetBIP155NetworkEv:
   28|  22.0M|{
   29|  22.0M|    switch (m_net) {
  ------------------
  |  Branch (29:13): [True: 22.0M, False: 0]
  ------------------
   30|  4.80M|    case NET_IPV4:
  ------------------
  |  Branch (30:5): [True: 4.80M, False: 17.2M]
  ------------------
   31|  4.80M|        return BIP155Network::IPV4;
   32|  4.22M|    case NET_IPV6:
  ------------------
  |  Branch (32:5): [True: 4.22M, False: 17.7M]
  ------------------
   33|  4.22M|        return BIP155Network::IPV6;
   34|  4.20M|    case NET_ONION:
  ------------------
  |  Branch (34:5): [True: 4.20M, False: 17.8M]
  ------------------
   35|  4.20M|        return BIP155Network::TORV3;
   36|  4.35M|    case NET_I2P:
  ------------------
  |  Branch (36:5): [True: 4.35M, False: 17.6M]
  ------------------
   37|  4.35M|        return BIP155Network::I2P;
   38|  4.42M|    case NET_CJDNS:
  ------------------
  |  Branch (38:5): [True: 4.42M, False: 17.5M]
  ------------------
   39|  4.42M|        return BIP155Network::CJDNS;
   40|      0|    case NET_INTERNAL:   // should have been handled before calling this function
  ------------------
  |  Branch (40:5): [True: 0, False: 22.0M]
  ------------------
   41|      0|    case NET_UNROUTABLE: // m_net is never and should not be set to NET_UNROUTABLE
  ------------------
  |  Branch (41:5): [True: 0, False: 22.0M]
  ------------------
   42|      0|    case NET_MAX:        // m_net is never and should not be set to NET_MAX
  ------------------
  |  Branch (42:5): [True: 0, False: 22.0M]
  ------------------
   43|      0|        assert(false);
  ------------------
  |  Branch (43:9): [Folded, False: 0]
  ------------------
   44|  22.0M|    } // no default case, so the compiler can warn about missing cases
   45|       |
   46|  22.0M|    assert(false);
  ------------------
  |  Branch (46:5): [Folded, False: 0]
  ------------------
   47|      0|}
_ZN8CNetAddr23SetNetFromBIP155NetworkEhm:
   50|  35.4M|{
   51|  35.4M|    switch (possible_bip155_net) {
  ------------------
  |  Branch (51:13): [True: 35.4M, False: 0]
  ------------------
   52|  7.44M|    case BIP155Network::IPV4:
  ------------------
  |  Branch (52:5): [True: 7.44M, False: 27.9M]
  ------------------
   53|  7.44M|        if (address_size == ADDR_IPV4_SIZE) {
  ------------------
  |  Branch (53:13): [True: 7.44M, False: 0]
  ------------------
   54|  7.44M|            m_net = NET_IPV4;
   55|  7.44M|            return true;
   56|  7.44M|        }
   57|      0|        throw std::ios_base::failure(
   58|      0|            strprintf("BIP155 IPv4 address with length %u (should be %u)", address_size,
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   59|      0|                      ADDR_IPV4_SIZE));
   60|  7.17M|    case BIP155Network::IPV6:
  ------------------
  |  Branch (60:5): [True: 7.17M, False: 28.2M]
  ------------------
   61|  7.17M|        if (address_size == ADDR_IPV6_SIZE) {
  ------------------
  |  Branch (61:13): [True: 7.17M, False: 0]
  ------------------
   62|  7.17M|            m_net = NET_IPV6;
   63|  7.17M|            return true;
   64|  7.17M|        }
   65|      0|        throw std::ios_base::failure(
   66|      0|            strprintf("BIP155 IPv6 address with length %u (should be %u)", address_size,
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   67|      0|                      ADDR_IPV6_SIZE));
   68|  6.79M|    case BIP155Network::TORV3:
  ------------------
  |  Branch (68:5): [True: 6.79M, False: 28.6M]
  ------------------
   69|  6.79M|        if (address_size == ADDR_TORV3_SIZE) {
  ------------------
  |  Branch (69:13): [True: 6.79M, False: 0]
  ------------------
   70|  6.79M|            m_net = NET_ONION;
   71|  6.79M|            return true;
   72|  6.79M|        }
   73|      0|        throw std::ios_base::failure(
   74|      0|            strprintf("BIP155 TORv3 address with length %u (should be %u)", address_size,
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   75|      0|                      ADDR_TORV3_SIZE));
   76|  6.98M|    case BIP155Network::I2P:
  ------------------
  |  Branch (76:5): [True: 6.98M, False: 28.4M]
  ------------------
   77|  6.98M|        if (address_size == ADDR_I2P_SIZE) {
  ------------------
  |  Branch (77:13): [True: 6.98M, False: 0]
  ------------------
   78|  6.98M|            m_net = NET_I2P;
   79|  6.98M|            return true;
   80|  6.98M|        }
   81|      0|        throw std::ios_base::failure(
   82|      0|            strprintf("BIP155 I2P address with length %u (should be %u)", address_size,
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   83|      0|                      ADDR_I2P_SIZE));
   84|  7.04M|    case BIP155Network::CJDNS:
  ------------------
  |  Branch (84:5): [True: 7.04M, False: 28.3M]
  ------------------
   85|  7.04M|        if (address_size == ADDR_CJDNS_SIZE) {
  ------------------
  |  Branch (85:13): [True: 7.04M, False: 0]
  ------------------
   86|  7.04M|            m_net = NET_CJDNS;
   87|  7.04M|            return true;
   88|  7.04M|        }
   89|      0|        throw std::ios_base::failure(
   90|      0|            strprintf("BIP155 CJDNS address with length %u (should be %u)", address_size,
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
   91|      0|                      ADDR_CJDNS_SIZE));
   92|  35.4M|    }
   93|       |
   94|       |    // Don't throw on addresses with unknown network ids (maybe from the future).
   95|       |    // Instead silently drop them and have the unserialization code consume
   96|       |    // subsequent ones which may be known to us.
   97|      0|    return false;
   98|  35.4M|}
_ZN8CNetAddrC2Ev:
  105|  86.5M|CNetAddr::CNetAddr() = default;
_ZN8CNetAddr11SetInternalERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  174|  2.62M|{
  175|  2.62M|    if (name.empty()) {
  ------------------
  |  Branch (175:9): [True: 8, False: 2.62M]
  ------------------
  176|      8|        return false;
  177|      8|    }
  178|  2.62M|    m_net = NET_INTERNAL;
  179|  2.62M|    unsigned char hash[32] = {};
  180|  2.62M|    CSHA256().Write((const unsigned char*)name.data(), name.size()).Finalize(hash);
  181|  2.62M|    m_addr.assign(hash, hash + ADDR_INTERNAL_SIZE);
  182|  2.62M|    return true;
  183|  2.62M|}
_ZN8CNetAddrC2ERK7in_addr:
  291|  6.14k|{
  292|  6.14k|    m_net = NET_IPV4;
  293|  6.14k|    const uint8_t* ptr = reinterpret_cast<const uint8_t*>(&ipv4Addr);
  294|  6.14k|    m_addr.assign(ptr, ptr + ADDR_IPV4_SIZE);
  295|  6.14k|}
_ZNK8CNetAddr9IsRFC1918Ev:
  312|   480M|{
  313|   480M|    return IsIPv4() && (
  ------------------
  |  Branch (313:12): [True: 98.2M, False: 382M]
  ------------------
  314|  98.2M|        m_addr[0] == 10 ||
  ------------------
  |  Branch (314:9): [True: 91.5k, False: 98.1M]
  ------------------
  315|  98.1M|        (m_addr[0] == 192 && m_addr[1] == 168) ||
  ------------------
  |  Branch (315:10): [True: 439k, False: 97.6M]
  |  Branch (315:30): [True: 7.44k, False: 431k]
  ------------------
  316|  98.1M|        (m_addr[0] == 172 && m_addr[1] >= 16 && m_addr[1] <= 31));
  ------------------
  |  Branch (316:10): [True: 356k, False: 97.7M]
  |  Branch (316:30): [True: 321k, False: 35.0k]
  |  Branch (316:49): [True: 8.50k, False: 312k]
  ------------------
  317|   480M|}
_ZNK8CNetAddr9IsRFC2544Ev:
  320|   480M|{
  321|   480M|    return IsIPv4() && m_addr[0] == 198 && (m_addr[1] == 18 || m_addr[1] == 19);
  ------------------
  |  Branch (321:12): [True: 98.0M, False: 382M]
  |  Branch (321:24): [True: 325k, False: 97.7M]
  |  Branch (321:45): [True: 10.1k, False: 315k]
  |  Branch (321:64): [True: 7.08k, False: 308k]
  ------------------
  322|   480M|}
_ZNK8CNetAddr9IsRFC3927Ev:
  325|   480M|{
  326|   480M|    return IsIPv4() && HasPrefix(m_addr, std::array<uint8_t, 2>{169, 254});
  ------------------
  |  Branch (326:12): [True: 98.0M, False: 382M]
  |  Branch (326:24): [True: 9.34k, False: 98.0M]
  ------------------
  327|   480M|}
_ZNK8CNetAddr9IsRFC6598Ev:
  330|   480M|{
  331|   480M|    return IsIPv4() && m_addr[0] == 100 && m_addr[1] >= 64 && m_addr[1] <= 127;
  ------------------
  |  Branch (331:12): [True: 98.0M, False: 382M]
  |  Branch (331:24): [True: 253k, False: 97.8M]
  |  Branch (331:44): [True: 172k, False: 81.5k]
  |  Branch (331:63): [True: 25.6k, False: 146k]
  ------------------
  332|   480M|}
_ZNK8CNetAddr9IsRFC5737Ev:
  335|   480M|{
  336|   480M|    return IsIPv4() && (HasPrefix(m_addr, std::array<uint8_t, 3>{192, 0, 2}) ||
  ------------------
  |  Branch (336:12): [True: 98.0M, False: 382M]
  |  Branch (336:25): [True: 18.3k, False: 98.0M]
  ------------------
  337|  98.0M|                        HasPrefix(m_addr, std::array<uint8_t, 3>{198, 51, 100}) ||
  ------------------
  |  Branch (337:25): [True: 7.97k, False: 98.0M]
  ------------------
  338|  98.0M|                        HasPrefix(m_addr, std::array<uint8_t, 3>{203, 0, 113}));
  ------------------
  |  Branch (338:25): [True: 1, False: 98.0M]
  ------------------
  339|   480M|}
_ZNK8CNetAddr9IsRFC3849Ev:
  342|   522M|{
  343|   522M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 4>{0x20, 0x01, 0x0D, 0xB8});
  ------------------
  |  Branch (343:12): [True: 103M, False: 419M]
  |  Branch (343:24): [True: 244, False: 103M]
  ------------------
  344|   522M|}
_ZNK8CNetAddr9IsRFC3964Ev:
  347|   142M|{
  348|   142M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 2>{0x20, 0x02});
  ------------------
  |  Branch (348:12): [True: 36.3M, False: 105M]
  |  Branch (348:24): [True: 13.7k, False: 36.3M]
  ------------------
  349|   142M|}
_ZNK8CNetAddr9IsRFC6052Ev:
  352|   142M|{
  353|   142M|    return IsIPv6() &&
  ------------------
  |  Branch (353:12): [True: 36.3M, False: 105M]
  ------------------
  354|  36.3M|           HasPrefix(m_addr, std::array<uint8_t, 12>{0x00, 0x64, 0xFF, 0x9B, 0x00, 0x00,
  ------------------
  |  Branch (354:12): [True: 20.3k, False: 36.3M]
  ------------------
  355|  36.3M|                                                     0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
  356|   142M|}
_ZNK8CNetAddr9IsRFC4380Ev:
  359|   142M|{
  360|   142M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 4>{0x20, 0x01, 0x00, 0x00});
  ------------------
  |  Branch (360:12): [True: 36.3M, False: 105M]
  |  Branch (360:24): [True: 11.1k, False: 36.3M]
  ------------------
  361|   142M|}
_ZNK8CNetAddr9IsRFC4862Ev:
  364|   480M|{
  365|   480M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 8>{0xFE, 0x80, 0x00, 0x00,
  ------------------
  |  Branch (365:12): [True: 94.9M, False: 385M]
  |  Branch (365:24): [True: 12.2k, False: 94.9M]
  ------------------
  366|  94.9M|                                                                0x00, 0x00, 0x00, 0x00});
  367|   480M|}
_ZNK8CNetAddr9IsRFC4193Ev:
  370|   480M|{
  371|   480M|    return IsIPv6() && (m_addr[0] & 0xFE) == 0xFC;
  ------------------
  |  Branch (371:12): [True: 94.9M, False: 385M]
  |  Branch (371:24): [True: 110k, False: 94.8M]
  ------------------
  372|   480M|}
_ZNK8CNetAddr9IsRFC6145Ev:
  375|   142M|{
  376|   142M|    return IsIPv6() &&
  ------------------
  |  Branch (376:12): [True: 36.4M, False: 105M]
  ------------------
  377|  36.4M|           HasPrefix(m_addr, std::array<uint8_t, 12>{0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  ------------------
  |  Branch (377:12): [True: 17.3k, False: 36.3M]
  ------------------
  378|  36.4M|                                                     0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00});
  379|   142M|}
_ZNK8CNetAddr9IsRFC4843Ev:
  382|   480M|{
  383|   480M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 3>{0x20, 0x01, 0x00}) &&
  ------------------
  |  Branch (383:12): [True: 94.8M, False: 385M]
  |  Branch (383:24): [True: 72.7k, False: 94.8M]
  ------------------
  384|  72.7k|           (m_addr[3] & 0xF0) == 0x10;
  ------------------
  |  Branch (384:12): [True: 24.0k, False: 48.6k]
  ------------------
  385|   480M|}
_ZNK8CNetAddr9IsRFC7343Ev:
  388|   480M|{
  389|   480M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 3>{0x20, 0x01, 0x00}) &&
  ------------------
  |  Branch (389:12): [True: 94.8M, False: 385M]
  |  Branch (389:24): [True: 48.6k, False: 94.8M]
  ------------------
  390|  48.6k|           (m_addr[3] & 0xF0) == 0x20;
  ------------------
  |  Branch (390:12): [True: 8.29k, False: 40.3k]
  ------------------
  391|   480M|}
_ZNK8CNetAddr7IsHeNetEv:
  394|  9.17M|{
  395|  9.17M|    return IsIPv6() && HasPrefix(m_addr, std::array<uint8_t, 4>{0x20, 0x01, 0x04, 0x70});
  ------------------
  |  Branch (395:12): [True: 9.17M, False: 0]
  |  Branch (395:24): [True: 4.15k, False: 9.17M]
  ------------------
  396|  9.17M|}
_ZNK8CNetAddr7IsLocalEv:
  399|   531M|{
  400|       |    // IPv4 loopback (127.0.0.0/8 or 0.0.0.0/8)
  401|   531M|    if (IsIPv4() && (m_addr[0] == 127 || m_addr[0] == 0)) {
  ------------------
  |  Branch (401:9): [True: 107M, False: 423M]
  |  Branch (401:22): [True: 73.4k, False: 107M]
  |  Branch (401:42): [True: 144k, False: 107M]
  ------------------
  402|   218k|        return true;
  403|   218k|    }
  404|       |
  405|       |    // IPv6 loopback (::1/128)
  406|   530M|    static const unsigned char pchLocal[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
  407|   530M|    if (IsIPv6() && memcmp(m_addr.data(), pchLocal, sizeof(pchLocal)) == 0) {
  ------------------
  |  Branch (407:9): [True: 104M, False: 426M]
  |  Branch (407:21): [True: 16.0k, False: 104M]
  ------------------
  408|  16.0k|        return true;
  409|  16.0k|    }
  410|       |
  411|   530M|    return false;
  412|   530M|}
_ZNK8CNetAddr7IsValidEv:
  425|   549M|{
  426|       |    // unspecified IPv6 address (::/128)
  427|   549M|    unsigned char ipNone6[16] = {};
  428|   549M|    if (IsIPv6() && memcmp(m_addr.data(), ipNone6, sizeof(ipNone6)) == 0) {
  ------------------
  |  Branch (428:9): [True: 130M, False: 419M]
  |  Branch (428:21): [True: 26.8M, False: 103M]
  ------------------
  429|  26.8M|        return false;
  430|  26.8M|    }
  431|       |
  432|   522M|    if (IsCJDNS() && !HasCJDNSPrefix()) {
  ------------------
  |  Branch (432:9): [True: 105M, False: 417M]
  |  Branch (432:22): [True: 0, False: 105M]
  ------------------
  433|      0|        return false;
  434|      0|    }
  435|       |
  436|       |    // documentation IPv6 address
  437|   522M|    if (IsRFC3849())
  ------------------
  |  Branch (437:9): [True: 244, False: 522M]
  ------------------
  438|    244|        return false;
  439|       |
  440|   522M|    if (IsInternal())
  ------------------
  |  Branch (440:9): [True: 2.62M, False: 519M]
  ------------------
  441|  2.62M|        return false;
  442|       |
  443|   519M|    if (IsIPv4()) {
  ------------------
  |  Branch (443:9): [True: 105M, False: 414M]
  ------------------
  444|   105M|        const uint32_t addr = ReadBE32(m_addr.data());
  445|   105M|        if (addr == INADDR_ANY || addr == INADDR_NONE) {
  ------------------
  |  Branch (445:13): [True: 3.64k, False: 105M]
  |  Branch (445:35): [True: 2.67k, False: 105M]
  ------------------
  446|  6.31k|            return false;
  447|  6.31k|        }
  448|   105M|    }
  449|       |
  450|   519M|    return true;
  451|   519M|}
_ZNK8CNetAddr10IsRoutableEv:
  463|   480M|{
  464|   480M|    return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || IsRFC4193() || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
  ------------------
  |  Branch (464:12): [True: 480M, False: 0]
  |  Branch (464:27): [True: 107k, False: 480M]
  |  Branch (464:42): [True: 17.2k, False: 480M]
  |  Branch (464:57): [True: 9.34k, False: 480M]
  |  Branch (464:72): [True: 12.2k, False: 480M]
  |  Branch (464:87): [True: 25.6k, False: 480M]
  |  Branch (464:102): [True: 26.3k, False: 480M]
  |  Branch (464:117): [True: 110k, False: 480M]
  |  Branch (464:132): [True: 24.0k, False: 480M]
  |  Branch (464:147): [True: 8.29k, False: 480M]
  |  Branch (464:162): [True: 192k, False: 480M]
  |  Branch (464:175): [True: 0, False: 480M]
  ------------------
  465|   480M|}
_ZNK8CNetAddr10IsInternalEv:
  473|  1.31G|{
  474|  1.31G|   return m_net == NET_INTERNAL;
  475|  1.31G|}
_ZNK8CNetAddr18IsAddrV1CompatibleEv:
  478|   180M|{
  479|   180M|    switch (m_net) {
  ------------------
  |  Branch (479:13): [True: 180M, False: 0]
  ------------------
  480|  27.5M|    case NET_IPV4:
  ------------------
  |  Branch (480:5): [True: 27.5M, False: 152M]
  ------------------
  481|  66.9M|    case NET_IPV6:
  ------------------
  |  Branch (481:5): [True: 39.3M, False: 141M]
  ------------------
  482|  66.9M|    case NET_INTERNAL:
  ------------------
  |  Branch (482:5): [True: 0, False: 180M]
  ------------------
  483|  66.9M|        return true;
  484|  37.0M|    case NET_ONION:
  ------------------
  |  Branch (484:5): [True: 37.0M, False: 143M]
  ------------------
  485|  75.1M|    case NET_I2P:
  ------------------
  |  Branch (485:5): [True: 38.0M, False: 142M]
  ------------------
  486|   113M|    case NET_CJDNS:
  ------------------
  |  Branch (486:5): [True: 38.4M, False: 142M]
  ------------------
  487|   113M|        return false;
  488|      0|    case NET_UNROUTABLE: // m_net is never and should not be set to NET_UNROUTABLE
  ------------------
  |  Branch (488:5): [True: 0, False: 180M]
  ------------------
  489|      0|    case NET_MAX:        // m_net is never and should not be set to NET_MAX
  ------------------
  |  Branch (489:5): [True: 0, False: 180M]
  ------------------
  490|      0|        assert(false);
  ------------------
  |  Branch (490:9): [Folded, False: 0]
  ------------------
  491|   180M|    } // no default case, so the compiler can warn about missing cases
  492|       |
  493|   180M|    assert(false);
  ------------------
  |  Branch (493:5): [Folded, False: 0]
  ------------------
  494|      0|}
_ZNK8CNetAddr10GetNetworkEv:
  497|   112M|{
  498|   112M|    if (IsInternal())
  ------------------
  |  Branch (498:9): [True: 0, False: 112M]
  ------------------
  499|      0|        return NET_INTERNAL;
  500|       |
  501|   112M|    if (!IsRoutable())
  ------------------
  |  Branch (501:9): [True: 197k, False: 111M]
  ------------------
  502|   197k|        return NET_UNROUTABLE;
  503|       |
  504|   111M|    return m_net;
  505|   112M|}
_ZeqRK8CNetAddrS1_:
  604|  79.3M|{
  605|  79.3M|    return a.m_net == b.m_net && a.m_addr == b.m_addr;
  ------------------
  |  Branch (605:12): [True: 67.9M, False: 11.3M]
  |  Branch (605:34): [True: 64.7M, False: 3.15M]
  ------------------
  606|  79.3M|}
_ZNK8CNetAddr13HasLinkedIPv4Ev:
  653|   179M|{
  654|   179M|    return IsRoutable() && (IsIPv4() || IsRFC6145() || IsRFC6052() || IsRFC3964() || IsRFC4380());
  ------------------
  |  Branch (654:12): [True: 179M, False: 0]
  |  Branch (654:29): [True: 37.3M, False: 142M]
  |  Branch (654:41): [True: 12.6k, False: 142M]
  |  Branch (654:56): [True: 15.2k, False: 142M]
  |  Branch (654:71): [True: 10.0k, False: 142M]
  |  Branch (654:86): [True: 8.26k, False: 142M]
  ------------------
  655|   179M|}
_ZNK8CNetAddr13GetLinkedIPv4Ev:
  658|  12.6M|{
  659|  12.6M|    if (IsIPv4()) {
  ------------------
  |  Branch (659:9): [True: 12.6M, False: 16.3k]
  ------------------
  660|  12.6M|        return ReadBE32(m_addr.data());
  661|  12.6M|    } else if (IsRFC6052() || IsRFC6145()) {
  ------------------
  |  Branch (661:16): [True: 5.07k, False: 11.2k]
  |  Branch (661:31): [True: 4.75k, False: 6.54k]
  ------------------
  662|       |        // mapped IPv4, SIIT translated IPv4: the IPv4 address is the last 4 bytes of the address
  663|  9.82k|        return ReadBE32(std::span{m_addr}.last(ADDR_IPV4_SIZE).data());
  664|  9.82k|    } else if (IsRFC3964()) {
  ------------------
  |  Branch (664:16): [True: 3.67k, False: 2.87k]
  ------------------
  665|       |        // 6to4 tunneled IPv4: the IPv4 address is in bytes 2-6
  666|  3.67k|        return ReadBE32(std::span{m_addr}.subspan(2, ADDR_IPV4_SIZE).data());
  667|  3.67k|    } else if (IsRFC4380()) {
  ------------------
  |  Branch (667:16): [True: 2.87k, False: 0]
  ------------------
  668|       |        // Teredo tunneled IPv4: the IPv4 address is in the last 4 bytes of the address, but bitflipped
  669|  2.87k|        return ~ReadBE32(std::span{m_addr}.last(ADDR_IPV4_SIZE).data());
  670|  2.87k|    }
  671|  12.6M|    assert(false);
  ------------------
  |  Branch (671:5): [Folded, False: 0]
  ------------------
  672|      0|}
_ZNK8CNetAddr11GetNetClassEv:
  675|   123M|{
  676|       |    // Make sure that if we return NET_IPV6, then IsIPv6() is true. The callers expect that.
  677|       |
  678|       |    // Check for "internal" first because such addresses are also !IsRoutable()
  679|       |    // and we don't want to return NET_UNROUTABLE in that case.
  680|   123M|    if (IsInternal()) {
  ------------------
  |  Branch (680:9): [True: 0, False: 123M]
  ------------------
  681|      0|        return NET_INTERNAL;
  682|      0|    }
  683|   123M|    if (!IsRoutable()) {
  ------------------
  |  Branch (683:9): [True: 210k, False: 122M]
  ------------------
  684|   210k|        return NET_UNROUTABLE;
  685|   210k|    }
  686|   122M|    if (HasLinkedIPv4()) {
  ------------------
  |  Branch (686:9): [True: 24.7M, False: 98.1M]
  ------------------
  687|  24.7M|        return NET_IPV4;
  688|  24.7M|    }
  689|  98.1M|    return m_net;
  690|   122M|}
_ZNK8CNetAddr12GetAddrBytesEv:
  693|   180M|{
  694|   180M|    if (IsAddrV1Compatible()) {
  ------------------
  |  Branch (694:9): [True: 66.9M, False: 113M]
  ------------------
  695|  66.9M|        uint8_t serialized[V1_SERIALIZATION_SIZE];
  696|  66.9M|        SerializeV1Array(serialized);
  697|  66.9M|        return {std::begin(serialized), std::end(serialized)};
  698|  66.9M|    }
  699|   113M|    return std::vector<unsigned char>(m_addr.begin(), m_addr.end());
  700|   180M|}
_ZN8CServiceC2Ev:
  780|  28.5M|CService::CService() : port(0)
  781|  28.5M|{
  782|  28.5M|}
_ZN8CServiceC2ERK8CNetAddrt:
  784|  13.3M|CService::CService(const CNetAddr& cip, uint16_t portIn) : CNetAddr(cip), port(portIn)
  785|  13.3M|{
  786|  13.3M|}
_ZeqRK8CServiceS1_:
  841|  53.7M|{
  842|  53.7M|    return static_cast<CNetAddr>(a) == static_cast<CNetAddr>(b) && a.port == b.port;
  ------------------
  |  Branch (842:12): [True: 53.7M, False: 0]
  |  Branch (842:68): [True: 53.7M, False: 0]
  ------------------
  843|  53.7M|}
_ZNK8CService6GetKeyEv:
  896|   103M|{
  897|   103M|    auto key = GetAddrBytes();
  898|   103M|    key.push_back(port / 0x100); // most significant byte of our port
  899|   103M|    key.push_back(port & 0x0FF); // least significant byte of our port
  900|   103M|    return key;
  901|   103M|}

_ZNK8CNetAddr14HasCJDNSPrefixEv:
  178|   105M|    [[nodiscard]] bool HasCJDNSPrefix() const { return m_addr[0] == CJDNS_PREFIX; }
_ZN12CServiceHashC2Ev:
  575|  4.46k|        : m_salt_k0{FastRandomContext().rand64()},
  576|  4.46k|          m_salt_k1{FastRandomContext().rand64()}
  577|  4.46k|    {
  578|  4.46k|    }
_ZN8CService16SerializationOpsI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEKS_15ActionSerializeEEvRT0_RT_T1_:
  563|  11.0M|    {
  564|  11.0M|        READWRITE(AsBase<CNetAddr>(obj), Using<BigEndianFormatter<2>>(obj.port));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  565|  11.0M|    }
_ZNK8CNetAddr9SerializeI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEENS_9SerParamsEEEEvRT_:
  239|  11.0M|    {
  240|  11.0M|        if (s.template GetParams<SerParams>().enc == Encoding::V2) {
  ------------------
  |  Branch (240:13): [True: 11.0M, False: 0]
  ------------------
  241|  11.0M|            SerializeV2Stream(s);
  242|  11.0M|        } else {
  243|      0|            SerializeV1Stream(s);
  244|      0|        }
  245|  11.0M|    }
_ZNK8CNetAddr17SerializeV2StreamI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEENS_9SerParamsEEEEvRT_:
  376|  11.0M|    {
  377|  11.0M|        if (IsInternal()) {
  ------------------
  |  Branch (377:13): [True: 0, False: 11.0M]
  ------------------
  378|       |            // Serialize NET_INTERNAL as embedded in IPv6. We need to
  379|       |            // serialize such addresses from addrman.
  380|      0|            s << static_cast<uint8_t>(BIP155Network::IPV6);
  381|      0|            s << COMPACTSIZE(ADDR_IPV6_SIZE);
  ------------------
  |  |  495|      0|#define COMPACTSIZE(obj) Using<CompactSizeFormatter<true>>(obj)
  ------------------
  382|      0|            SerializeV1Stream(s);
  383|      0|            return;
  384|      0|        }
  385|       |
  386|  11.0M|        s << static_cast<uint8_t>(GetBIP155Network());
  387|  11.0M|        s << m_addr;
  388|  11.0M|    }
_ZNK8CNetAddr9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  239|  11.0M|    {
  240|  11.0M|        if (s.template GetParams<SerParams>().enc == Encoding::V2) {
  ------------------
  |  Branch (240:13): [True: 11.0M, False: 0]
  ------------------
  241|  11.0M|            SerializeV2Stream(s);
  242|  11.0M|        } else {
  243|      0|            SerializeV1Stream(s);
  244|      0|        }
  245|  11.0M|    }
_ZNK8CNetAddr17SerializeV2StreamI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  376|  11.0M|    {
  377|  11.0M|        if (IsInternal()) {
  ------------------
  |  Branch (377:13): [True: 0, False: 11.0M]
  ------------------
  378|       |            // Serialize NET_INTERNAL as embedded in IPv6. We need to
  379|       |            // serialize such addresses from addrman.
  380|      0|            s << static_cast<uint8_t>(BIP155Network::IPV6);
  381|      0|            s << COMPACTSIZE(ADDR_IPV6_SIZE);
  ------------------
  |  |  495|      0|#define COMPACTSIZE(obj) Using<CompactSizeFormatter<true>>(obj)
  ------------------
  382|      0|            SerializeV1Stream(s);
  383|      0|            return;
  384|      0|        }
  385|       |
  386|  11.0M|        s << static_cast<uint8_t>(GetBIP155Network());
  387|  11.0M|        s << m_addr;
  388|  11.0M|    }
_ZN8CNetAddr11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  252|  24.4M|    {
  253|  24.4M|        if (s.template GetParams<SerParams>().enc == Encoding::V2) {
  ------------------
  |  Branch (253:13): [True: 24.4M, False: 0]
  ------------------
  254|  24.4M|            UnserializeV2Stream(s);
  255|  24.4M|        } else {
  256|      0|            UnserializeV1Stream(s);
  257|      0|        }
  258|  24.4M|    }
_ZN8CNetAddr19UnserializeV2StreamI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  424|  24.4M|    {
  425|  24.4M|        uint8_t bip155_net;
  426|  24.4M|        s >> bip155_net;
  427|       |
  428|  24.4M|        size_t address_size;
  429|  24.4M|        s >> COMPACTSIZE(address_size);
  ------------------
  |  |  495|  24.4M|#define COMPACTSIZE(obj) Using<CompactSizeFormatter<true>>(obj)
  ------------------
  430|       |
  431|  24.4M|        if (address_size > MAX_ADDRV2_SIZE) {
  ------------------
  |  Branch (431:13): [True: 0, False: 24.4M]
  ------------------
  432|      0|            throw std::ios_base::failure(strprintf(
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  433|      0|                "Address too long: %u > %u", address_size, MAX_ADDRV2_SIZE));
  434|      0|        }
  435|       |
  436|  24.4M|        m_scope_id = 0;
  437|       |
  438|  24.4M|        if (SetNetFromBIP155Network(bip155_net, address_size)) {
  ------------------
  |  Branch (438:13): [True: 24.4M, False: 0]
  ------------------
  439|  24.4M|            m_addr.resize(address_size);
  440|  24.4M|            s >> std::span{m_addr};
  441|       |
  442|  24.4M|            if (m_net != NET_IPV6) {
  ------------------
  |  Branch (442:17): [True: 19.3M, False: 5.07M]
  ------------------
  443|  19.3M|                return;
  444|  19.3M|            }
  445|       |
  446|       |            // Do some special checks on IPv6 addresses.
  447|       |
  448|       |            // Recognize NET_INTERNAL embedded in IPv6, such addresses are not
  449|       |            // gossiped but could be coming from addrman, when unserializing from
  450|       |            // disk.
  451|  5.07M|            if (util::HasPrefix(m_addr, INTERNAL_IN_IPV6_PREFIX)) {
  ------------------
  |  Branch (451:17): [True: 378, False: 5.07M]
  ------------------
  452|    378|                m_net = NET_INTERNAL;
  453|    378|                memmove(m_addr.data(), m_addr.data() + INTERNAL_IN_IPV6_PREFIX.size(),
  454|    378|                        ADDR_INTERNAL_SIZE);
  455|    378|                m_addr.resize(ADDR_INTERNAL_SIZE);
  456|    378|                return;
  457|    378|            }
  458|       |
  459|  5.07M|            if (!util::HasPrefix(m_addr, IPV4_IN_IPV6_PREFIX) &&
  ------------------
  |  Branch (459:17): [True: 5.07M, False: 562]
  ------------------
  460|  5.07M|                !util::HasPrefix(m_addr, TORV2_IN_IPV6_PREFIX)) {
  ------------------
  |  Branch (460:17): [True: 5.07M, False: 82]
  ------------------
  461|  5.07M|                return;
  462|  5.07M|            }
  463|       |
  464|       |            // IPv4 and TORv2 are not supposed to be embedded in IPv6 (like in V1
  465|       |            // encoding). Unserialize as !IsValid(), thus ignoring them.
  466|  5.07M|        } else {
  467|       |            // If we receive an unknown BIP155 network id (from the future?) then
  468|       |            // ignore the address - unserialize as !IsValid().
  469|      0|            s.ignore(address_size);
  470|      0|        }
  471|       |
  472|       |        // Mimic a default-constructed CNetAddr object which is !IsValid() and thus
  473|       |        // will not be gossiped, but continue reading next addresses from the stream.
  474|    644|        m_net = NET_IPV6;
  475|    644|        m_addr.assign(ADDR_IPV6_SIZE, 0x0);
  476|    644|    }
_ZNK8CNetAddr16SerializeV1ArrayERA16_h:
  325|  66.9M|    {
  326|  66.9M|        size_t prefix_size;
  327|       |
  328|  66.9M|        switch (m_net) {
  ------------------
  |  Branch (328:17): [True: 66.9M, False: 0]
  ------------------
  329|  39.3M|        case NET_IPV6:
  ------------------
  |  Branch (329:9): [True: 39.3M, False: 27.5M]
  ------------------
  330|  39.3M|            assert(m_addr.size() == sizeof(arr));
  ------------------
  |  Branch (330:13): [True: 39.3M, False: 0]
  ------------------
  331|  39.3M|            memcpy(arr, m_addr.data(), m_addr.size());
  332|  39.3M|            return;
  333|  27.5M|        case NET_IPV4:
  ------------------
  |  Branch (333:9): [True: 27.5M, False: 39.3M]
  ------------------
  334|  27.5M|            prefix_size = sizeof(IPV4_IN_IPV6_PREFIX);
  335|  27.5M|            assert(prefix_size + m_addr.size() == sizeof(arr));
  ------------------
  |  Branch (335:13): [True: 27.5M, False: 0]
  ------------------
  336|  27.5M|            memcpy(arr, IPV4_IN_IPV6_PREFIX.data(), prefix_size);
  337|  27.5M|            memcpy(arr + prefix_size, m_addr.data(), m_addr.size());
  338|  27.5M|            return;
  339|      0|        case NET_INTERNAL:
  ------------------
  |  Branch (339:9): [True: 0, False: 66.9M]
  ------------------
  340|      0|            prefix_size = sizeof(INTERNAL_IN_IPV6_PREFIX);
  341|      0|            assert(prefix_size + m_addr.size() == sizeof(arr));
  ------------------
  |  Branch (341:13): [True: 0, False: 0]
  ------------------
  342|      0|            memcpy(arr, INTERNAL_IN_IPV6_PREFIX.data(), prefix_size);
  343|      0|            memcpy(arr + prefix_size, m_addr.data(), m_addr.size());
  344|      0|            return;
  345|      0|        case NET_ONION:
  ------------------
  |  Branch (345:9): [True: 0, False: 66.9M]
  ------------------
  346|      0|        case NET_I2P:
  ------------------
  |  Branch (346:9): [True: 0, False: 66.9M]
  ------------------
  347|      0|        case NET_CJDNS:
  ------------------
  |  Branch (347:9): [True: 0, False: 66.9M]
  ------------------
  348|      0|            break;
  349|      0|        case NET_UNROUTABLE:
  ------------------
  |  Branch (349:9): [True: 0, False: 66.9M]
  ------------------
  350|      0|        case NET_MAX:
  ------------------
  |  Branch (350:9): [True: 0, False: 66.9M]
  ------------------
  351|      0|            assert(false);
  ------------------
  |  Branch (351:13): [Folded, False: 0]
  ------------------
  352|  66.9M|        } // no default case, so the compiler can warn about missing cases
  353|       |
  354|       |        // Serialize ONION, I2P and CJDNS as all-zeros.
  355|      0|        memset(arr, 0x0, V1_SERIALIZATION_SIZE);
  356|      0|    }
_ZN8CService16SerializationOpsI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEES_17ActionUnserializeEEvRT0_RT_T1_:
  563|  11.0M|    {
  564|  11.0M|        READWRITE(AsBase<CNetAddr>(obj), Using<BigEndianFormatter<2>>(obj.port));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  565|  11.0M|    }
_ZN8CNetAddr11UnserializeI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEENS_9SerParamsEEEEvRT_:
  252|  11.0M|    {
  253|  11.0M|        if (s.template GetParams<SerParams>().enc == Encoding::V2) {
  ------------------
  |  Branch (253:13): [True: 11.0M, False: 0]
  ------------------
  254|  11.0M|            UnserializeV2Stream(s);
  255|  11.0M|        } else {
  256|      0|            UnserializeV1Stream(s);
  257|      0|        }
  258|  11.0M|    }
_ZN8CNetAddr19UnserializeV2StreamI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEENS_9SerParamsEEEEvRT_:
  424|  11.0M|    {
  425|  11.0M|        uint8_t bip155_net;
  426|  11.0M|        s >> bip155_net;
  427|       |
  428|  11.0M|        size_t address_size;
  429|  11.0M|        s >> COMPACTSIZE(address_size);
  ------------------
  |  |  495|  11.0M|#define COMPACTSIZE(obj) Using<CompactSizeFormatter<true>>(obj)
  ------------------
  430|       |
  431|  11.0M|        if (address_size > MAX_ADDRV2_SIZE) {
  ------------------
  |  Branch (431:13): [True: 0, False: 11.0M]
  ------------------
  432|      0|            throw std::ios_base::failure(strprintf(
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  433|      0|                "Address too long: %u > %u", address_size, MAX_ADDRV2_SIZE));
  434|      0|        }
  435|       |
  436|  11.0M|        m_scope_id = 0;
  437|       |
  438|  11.0M|        if (SetNetFromBIP155Network(bip155_net, address_size)) {
  ------------------
  |  Branch (438:13): [True: 11.0M, False: 0]
  ------------------
  439|  11.0M|            m_addr.resize(address_size);
  440|  11.0M|            s >> std::span{m_addr};
  441|       |
  442|  11.0M|            if (m_net != NET_IPV6) {
  ------------------
  |  Branch (442:17): [True: 8.90M, False: 2.10M]
  ------------------
  443|  8.90M|                return;
  444|  8.90M|            }
  445|       |
  446|       |            // Do some special checks on IPv6 addresses.
  447|       |
  448|       |            // Recognize NET_INTERNAL embedded in IPv6, such addresses are not
  449|       |            // gossiped but could be coming from addrman, when unserializing from
  450|       |            // disk.
  451|  2.10M|            if (util::HasPrefix(m_addr, INTERNAL_IN_IPV6_PREFIX)) {
  ------------------
  |  Branch (451:17): [True: 0, False: 2.10M]
  ------------------
  452|      0|                m_net = NET_INTERNAL;
  453|      0|                memmove(m_addr.data(), m_addr.data() + INTERNAL_IN_IPV6_PREFIX.size(),
  454|      0|                        ADDR_INTERNAL_SIZE);
  455|      0|                m_addr.resize(ADDR_INTERNAL_SIZE);
  456|      0|                return;
  457|      0|            }
  458|       |
  459|  2.10M|            if (!util::HasPrefix(m_addr, IPV4_IN_IPV6_PREFIX) &&
  ------------------
  |  Branch (459:17): [True: 2.10M, False: 0]
  ------------------
  460|  2.10M|                !util::HasPrefix(m_addr, TORV2_IN_IPV6_PREFIX)) {
  ------------------
  |  Branch (460:17): [True: 2.10M, False: 0]
  ------------------
  461|  2.10M|                return;
  462|  2.10M|            }
  463|       |
  464|       |            // IPv4 and TORv2 are not supposed to be embedded in IPv6 (like in V1
  465|       |            // encoding). Unserialize as !IsValid(), thus ignoring them.
  466|  2.10M|        } else {
  467|       |            // If we receive an unknown BIP155 network id (from the future?) then
  468|       |            // ignore the address - unserialize as !IsValid().
  469|      0|            s.ignore(address_size);
  470|      0|        }
  471|       |
  472|       |        // Mimic a default-constructed CNetAddr object which is !IsValid() and thus
  473|       |        // will not be gossiped, but continue reading next addresses from the stream.
  474|      0|        m_net = NET_IPV6;
  475|      0|        m_addr.assign(ADDR_IPV6_SIZE, 0x0);
  476|      0|    }
_ZNK8CNetAddr6IsIPv4Ev:
  158|  3.64G|    [[nodiscard]] bool IsIPv4() const { return m_net == NET_IPV4; } // IPv4 mapped address (::FFFF:0:0/96, 0.0.0.0/0)
_ZNK12CServiceHashclERK8CService:
  583|  58.2M|    {
  584|  58.2M|        CSipHasher hasher(m_salt_k0, m_salt_k1);
  585|  58.2M|        hasher.Write(a.m_net);
  586|  58.2M|        hasher.Write(a.port);
  587|  58.2M|        hasher.Write(a.m_addr);
  588|  58.2M|        return static_cast<size_t>(hasher.Finalize());
  589|  58.2M|    }
_ZNK8CNetAddr5IsTorEv:
  175|  40.9M|    [[nodiscard]] bool IsTor() const { return m_net == NET_ONION; }
_ZNK8CNetAddr5IsI2PEv:
  176|  30.6M|    [[nodiscard]] bool IsI2P() const { return m_net == NET_I2P; }
_ZNK8CNetAddr7IsCJDNSEv:
  177|   542M|    [[nodiscard]] bool IsCJDNS() const { return m_net == NET_CJDNS; }
_ZNK8CNetAddr6IsIPv6Ev:
  159|  4.10G|    [[nodiscard]] bool IsIPv6() const { return m_net == NET_IPV6; } // IPv6 address (not mapped IPv4, not Tor)

_ZNK15NetGroupManager15GetAsmapVersionEv:
   15|  4.46k|{
   16|  4.46k|    return AsmapVersion(m_asmap);
   17|  4.46k|}
_ZNK15NetGroupManager8GetGroupERK8CNetAddr:
   20|  54.8M|{
   21|  54.8M|    std::vector<unsigned char> vchRet;
   22|       |    // If non-empty asmap is supplied and the address is IPv4/IPv6,
   23|       |    // return ASN to be used for bucketing.
   24|  54.8M|    uint32_t asn = GetMappedAS(address);
   25|  54.8M|    if (asn != 0) { // Either asmap was empty, or address has non-asmappable net class (e.g. TOR).
  ------------------
  |  Branch (25:9): [True: 3.91M, False: 50.9M]
  ------------------
   26|  3.91M|        vchRet.push_back(NET_IPV6); // IPv4 and IPv6 with same ASN should be in the same bucket
   27|  19.5M|        for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (27:25): [True: 15.6M, False: 3.91M]
  ------------------
   28|  15.6M|            vchRet.push_back((asn >> (8 * i)) & 0xFF);
   29|  15.6M|        }
   30|  3.91M|        return vchRet;
   31|  3.91M|    }
   32|       |
   33|  50.9M|    vchRet.push_back(address.GetNetClass());
   34|  50.9M|    int nStartByte{0};
   35|  50.9M|    int nBits{0};
   36|       |
   37|  50.9M|    if (address.IsLocal()) {
  ------------------
  |  Branch (37:9): [True: 41.5k, False: 50.8M]
  ------------------
   38|       |        // all local addresses belong to the same group
   39|  50.8M|    } else if (address.IsInternal()) {
  ------------------
  |  Branch (39:16): [True: 0, False: 50.8M]
  ------------------
   40|       |        // All internal-usage addresses get their own group.
   41|       |        // Skip over the INTERNAL_IN_IPV6_PREFIX returned by CAddress::GetAddrBytes().
   42|      0|        nStartByte = INTERNAL_IN_IPV6_PREFIX.size();
   43|      0|        nBits = ADDR_INTERNAL_SIZE * 8;
   44|  50.8M|    } else if (!address.IsRoutable()) {
  ------------------
  |  Branch (44:16): [True: 63.5k, False: 50.8M]
  ------------------
   45|       |        // all other unroutable addresses belong to the same group
   46|  50.8M|    } else if (address.HasLinkedIPv4()) {
  ------------------
  |  Branch (46:16): [True: 9.83M, False: 40.9M]
  ------------------
   47|       |        // IPv4 addresses (and mapped IPv4 addresses) use /16 groups
   48|  9.83M|        uint32_t ipv4 = address.GetLinkedIPv4();
   49|  9.83M|        vchRet.push_back((ipv4 >> 24) & 0xFF);
   50|  9.83M|        vchRet.push_back((ipv4 >> 16) & 0xFF);
   51|  9.83M|        return vchRet;
   52|  40.9M|    } else if (address.IsTor() || address.IsI2P()) {
  ------------------
  |  Branch (52:16): [True: 10.3M, False: 30.6M]
  |  Branch (52:35): [True: 10.6M, False: 19.9M]
  ------------------
   53|  21.0M|        nBits = 4;
   54|  21.0M|    } else if (address.IsCJDNS()) {
  ------------------
  |  Branch (54:16): [True: 10.7M, False: 9.17M]
  ------------------
   55|       |        // Treat in the same way as Tor and I2P because the address in all of
   56|       |        // them is "random" bytes (derived from a public key). However in CJDNS
   57|       |        // the first byte is a constant (see CJDNS_PREFIX), so the random bytes
   58|       |        // come after it. Thus skip the constant 8 bits at the start.
   59|  10.7M|        nBits = 12;
   60|  10.7M|    } else if (address.IsHeNet()) {
  ------------------
  |  Branch (60:16): [True: 4.15k, False: 9.17M]
  ------------------
   61|       |        // for he.net, use /36 groups
   62|  4.15k|        nBits = 36;
   63|  9.17M|    } else {
   64|       |        // for the rest of the IPv6 network, use /32 groups
   65|  9.17M|        nBits = 32;
   66|  9.17M|    }
   67|       |
   68|       |    // Push our address onto vchRet.
   69|  41.0M|    auto addr_bytes = address.GetAddrBytes();
   70|  41.0M|    const size_t num_bytes = nBits / 8;
   71|  41.0M|    vchRet.insert(vchRet.end(), addr_bytes.begin() + nStartByte, addr_bytes.begin() + nStartByte + num_bytes);
   72|  41.0M|    nBits %= 8;
   73|       |    // ...for the last byte, push nBits and for the rest of the byte push 1's
   74|  41.0M|    if (nBits > 0) {
  ------------------
  |  Branch (74:9): [True: 31.8M, False: 9.28M]
  ------------------
   75|  31.8M|        assert(num_bytes < addr_bytes.size());
  ------------------
  |  Branch (75:9): [True: 31.8M, False: 0]
  ------------------
   76|  31.8M|        vchRet.push_back(addr_bytes[num_bytes + nStartByte] | ((1 << (8 - nBits)) - 1));
   77|  31.8M|    }
   78|       |
   79|  41.0M|    return vchRet;
   80|  41.0M|}
_ZNK15NetGroupManager11GetMappedASERK8CNetAddr:
   83|  72.1M|{
   84|  72.1M|    uint32_t net_class = address.GetNetClass();
   85|  72.1M|    if (m_asmap.empty() || (net_class != NET_IPV4 && net_class != NET_IPV6)) {
  ------------------
  |  Branch (85:9): [True: 56.2M, False: 15.9M]
  |  Branch (85:29): [True: 13.1M, False: 2.79M]
  |  Branch (85:54): [True: 9.93M, False: 3.23M]
  ------------------
   86|  66.1M|        return 0; // Indicates not found, safe because AS0 is reserved per RFC7607.
   87|  66.1M|    }
   88|  6.02M|    std::vector<std::byte> ip_bytes(16);
   89|  6.02M|    if (address.HasLinkedIPv4()) {
  ------------------
  |  Branch (89:9): [True: 2.79M, False: 3.23M]
  ------------------
   90|       |        // For lookup, treat as if it was just an IPv4 address (IPV4_IN_IPV6_PREFIX + IPv4 bits)
   91|  2.79M|        std::copy_n(std::as_bytes(std::span{IPV4_IN_IPV6_PREFIX}).begin(),
   92|  2.79M|                    IPV4_IN_IPV6_PREFIX.size(), ip_bytes.begin());
   93|  2.79M|        uint32_t ipv4 = address.GetLinkedIPv4();
   94|  13.9M|        for (int i = 0; i < 4; ++i) {
  ------------------
  |  Branch (94:25): [True: 11.1M, False: 2.79M]
  ------------------
   95|  11.1M|            ip_bytes[12 + i] = std::byte((ipv4 >> (24 - i * 8)) & 0xFF);
   96|  11.1M|        }
   97|  3.23M|    } else {
   98|       |        // Use all 128 bits of the IPv6 address otherwise
   99|  3.23M|        assert(address.IsIPv6());
  ------------------
  |  Branch (99:9): [True: 3.23M, False: 0]
  ------------------
  100|  3.23M|        auto addr_bytes = address.GetAddrBytes();
  101|  3.23M|        assert(addr_bytes.size() == ip_bytes.size());
  ------------------
  |  Branch (101:9): [True: 3.23M, False: 0]
  ------------------
  102|  3.23M|        std::copy_n(std::as_bytes(std::span{addr_bytes}).begin(),
  103|  3.23M|                    addr_bytes.size(), ip_bytes.begin());
  104|  3.23M|    }
  105|  6.02M|    uint32_t mapped_as = Interpret(m_asmap, ip_bytes);
  106|  6.02M|    return mapped_as;
  107|  6.02M|}

_ZN15NetGroupManager15WithLoadedAsmapEONSt3__16vectorISt4byteNS0_9allocatorIS2_EEEE:
   28|    600|    static NetGroupManager WithLoadedAsmap(std::vector<std::byte>&& asmap) {
   29|    600|        return NetGroupManager(std::span{asmap}, std::move(asmap));
   30|    600|    }
_ZN15NetGroupManagerC2ENSt3__14spanIKSt4byteLm18446744073709551615EEEONS0_6vectorIS2_NS0_9allocatorIS2_EEEE:
   97|  2.23k|        : m_asmap{embedded_asmap},
   98|  2.23k|          m_loaded_asmap{std::move(loaded_asmap)}
   99|  2.23k|    {
  100|       |        assert(m_loaded_asmap.empty() || m_asmap.data() == m_loaded_asmap.data());
  ------------------
  |  Branch (100:9): [True: 1.63k, False: 600]
  |  Branch (100:9): [True: 600, False: 0]
  |  Branch (100:9): [True: 2.23k, False: 0]
  ------------------
  101|  2.23k|    }
_ZN15NetGroupManager7NoAsmapEv:
   32|  1.63k|    static NetGroupManager NoAsmap() {
   33|  1.63k|        return NetGroupManager({}, {});
   34|  1.63k|    }

_ZN4node11NodeContextD2Ev:
   27|      2|NodeContext::~NodeContext() = default;

_ZNK9prevectorILj16EhjiEeqERKS0_:
  429|  67.9M|    constexpr bool operator==(const prevector& other) const {
  430|  67.9M|        return std::ranges::equal(*this, other);
  431|  67.9M|    }
_ZN9prevectorILj16EhjiEC2EjRKh:
  202|  86.5M|    explicit prevector(size_type n, const T& val) {
  203|  86.5M|        change_capacity(n);
  204|  86.5M|        _size += n;
  205|  86.5M|        fill(item_ptr(0), n, val);
  206|  86.5M|    }
_ZN9prevectorILj16EhjiE6assignITkNSt3__114input_iteratorEPhEEvT_S4_:
  186|  2.62M|    void assign(InputIterator first, InputIterator last) {
  187|  2.62M|        size_type n = last - first;
  188|  2.62M|        clear();
  189|  2.62M|        if (capacity() < n) {
  ------------------
  |  Branch (189:13): [True: 0, False: 2.62M]
  ------------------
  190|      0|            change_capacity(n);
  191|      0|        }
  192|  2.62M|        _size += n;
  193|  2.62M|        fill(item_ptr(0), first, last);
  194|  2.62M|    }
_ZN9prevectorILj16EhjiE4fillITkNSt3__114input_iteratorEPhEEvS3_T_S4_:
  167|  2.62M|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  28.9M|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 26.2M, False: 2.62M]
  ------------------
  169|  26.2M|            new(static_cast<void*>(dst)) T(*first);
  170|  26.2M|            ++dst;
  171|  26.2M|            ++first;
  172|  26.2M|        }
  173|  2.62M|    }
_ZN9prevectorILj16EhjiE6assignITkNSt3__114input_iteratorEPKhEEvT_S5_:
  186|  6.14k|    void assign(InputIterator first, InputIterator last) {
  187|  6.14k|        size_type n = last - first;
  188|  6.14k|        clear();
  189|  6.14k|        if (capacity() < n) {
  ------------------
  |  Branch (189:13): [True: 0, False: 6.14k]
  ------------------
  190|      0|            change_capacity(n);
  191|      0|        }
  192|  6.14k|        _size += n;
  193|  6.14k|        fill(item_ptr(0), first, last);
  194|  6.14k|    }
_ZN9prevectorILj16EhjiE4fillITkNSt3__114input_iteratorEPKhEEvPhT_S6_:
  167|  6.14k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  30.7k|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 24.5k, False: 6.14k]
  ------------------
  169|  24.5k|            new(static_cast<void*>(dst)) T(*first);
  170|  24.5k|            ++dst;
  171|  24.5k|            ++first;
  172|  24.5k|        }
  173|  6.14k|    }
_ZNK9prevectorILj16EhjiEixEj:
  272|   908M|    const T& operator[](size_type pos) const {
  273|   908M|        return *item_ptr(pos);
  274|   908M|    }
_ZNK9prevectorILj16EhjiE14const_iteratorptEv:
   90|  1.45G|        const T* operator->() const { return ptr; }
_ZN9prevectorILj16EhjiE4dataEv:
  464|  35.4M|    value_type* data() {
  465|  35.4M|        return item_ptr(0);
  466|  35.4M|    }
_ZN9prevectorILj16EhjiE6assignEjRKh:
  176|    644|    void assign(size_type n, const T& val) {
  177|    644|        clear();
  178|    644|        if (capacity() < n) {
  ------------------
  |  Branch (178:13): [True: 0, False: 644]
  ------------------
  179|      0|            change_capacity(n);
  180|      0|        }
  181|    644|        _size += n;
  182|    644|        fill(item_ptr(0), n, val);
  183|    644|    }
_ZNK9prevectorILj16EhjiE5emptyEv:
  251|  22.0M|    bool empty() const {
  252|  22.0M|        return size() == 0;
  253|  22.0M|    }
_ZNK9prevectorILj16EhjiE4dataEv:
  468|   499M|    const value_type* data() const {
  469|   499M|        return item_ptr(0);
  470|   499M|    }
_ZN9prevectorILj16EhjiEaSERKS0_:
  229|  8.80M|    prevector& operator=(const prevector<N, T, Size, Diff>& other) {
  230|  8.80M|        if (&other == this) {
  ------------------
  |  Branch (230:13): [True: 0, False: 8.80M]
  ------------------
  231|      0|            return *this;
  232|      0|        }
  233|  8.80M|        assign(other.begin(), other.end());
  234|  8.80M|        return *this;
  235|  8.80M|    }
_ZN9prevectorILj16EhjiE6assignITkNSt3__114input_iteratorENS0_14const_iteratorEEEvT_S4_:
  186|  8.80M|    void assign(InputIterator first, InputIterator last) {
  187|  8.80M|        size_type n = last - first;
  188|  8.80M|        clear();
  189|  8.80M|        if (capacity() < n) {
  ------------------
  |  Branch (189:13): [True: 3.30M, False: 5.49M]
  ------------------
  190|  3.30M|            change_capacity(n);
  191|  3.30M|        }
  192|  8.80M|        _size += n;
  193|  8.80M|        fill(item_ptr(0), first, last);
  194|  8.80M|    }
_ZmiN9prevectorILj16EhjiE14const_iteratorES1_:
   96|   122M|        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
_ZN9prevectorILj16EhjiE5clearEv:
  303|  11.4M|    void clear() {
  304|  11.4M|        resize(0);
  305|  11.4M|    }
_ZN9prevectorILj16EhjiE6resizeEj:
  276|  46.8M|    void resize(size_type new_size) {
  277|  46.8M|        size_type cur_size = size();
  278|  46.8M|        if (cur_size == new_size) {
  ------------------
  |  Branch (278:13): [True: 14.2M, False: 32.6M]
  ------------------
  279|  14.2M|            return;
  280|  14.2M|        }
  281|  32.6M|        if (cur_size > new_size) {
  ------------------
  |  Branch (281:13): [True: 18.8M, False: 13.7M]
  ------------------
  282|  18.8M|            erase(item_ptr(new_size), end());
  283|  18.8M|            return;
  284|  18.8M|        }
  285|  13.7M|        if (new_size > capacity()) {
  ------------------
  |  Branch (285:13): [True: 13.7M, False: 0]
  ------------------
  286|  13.7M|            change_capacity(new_size);
  287|  13.7M|        }
  288|  13.7M|        ptrdiff_t increase = new_size - cur_size;
  289|  13.7M|        fill(item_ptr(cur_size), increase);
  290|  13.7M|        _size += increase;
  291|  13.7M|    }
_ZN9prevectorILj16EhjiE5eraseENS0_8iteratorES1_:
  368|  18.8M|    iterator erase(iterator first, iterator last) {
  369|       |        // Erase is not allowed to the change the object's capacity. That means
  370|       |        // that when starting with an indirectly allocated prevector with
  371|       |        // size and capacity > N, the result may be a still indirectly allocated
  372|       |        // prevector with size <= N and capacity > N. A shrink_to_fit() call is
  373|       |        // necessary to switch to the (more efficient) directly allocated
  374|       |        // representation (with capacity N and size <= N).
  375|  18.8M|        iterator p = first;
  376|  18.8M|        char* endp = (char*)&(*end());
  377|  18.8M|        _size -= last - p;
  378|  18.8M|        memmove(&(*first), &(*last), endp - ((char*)(&(*last))));
  379|  18.8M|        return first;
  380|  18.8M|    }
_ZNK9prevectorILj16EhjiE8iteratordeEv:
   61|   113M|        T& operator*() const { return *ptr; }
_ZmiN9prevectorILj16EhjiE8iteratorES1_:
   68|  18.8M|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZN9prevectorILj16EhjiE8iteratorC2EPh:
   60|  56.6M|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj16EhjiE3endEv:
  257|  37.7M|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj16EhjiE4fillEPhlRKh:
  162|   100M|    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
  163|   100M|        std::fill_n(dst, count, value);
  164|   100M|    }
_ZNK9prevectorILj16EhjiE8capacityEv:
  260|  25.2M|    size_t capacity() const {
  261|  25.2M|        if (is_direct()) {
  ------------------
  |  Branch (261:13): [True: 25.1M, False: 45.6k]
  ------------------
  262|  25.1M|            return N;
  263|  25.1M|        } else {
  264|  45.6k|            return _union.indirect_contents.capacity;
  265|  45.6k|        }
  266|  25.2M|    }
_ZN9prevectorILj16EhjiEC2ERKS0_:
  216|   257M|    prevector(const prevector<N, T, Size, Diff>& other) {
  217|   257M|        size_type n = other.size();
  218|   257M|        change_capacity(n);
  219|   257M|        _size += n;
  220|   257M|        fill(item_ptr(0), other.begin(),  other.end());
  221|   257M|    }
_ZNK9prevectorILj16EhjiE4sizeEv:
  247|  2.36G|    size_type size() const {
  248|  2.36G|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (248:16): [True: 1.90G, False: 459M]
  ------------------
  249|  2.36G|    }
_ZNK9prevectorILj16EhjiE9is_directEv:
  126|  6.99G|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj16EhjiE15change_capacityEj:
  128|   361M|    void change_capacity(size_type new_capacity) {
  129|   361M|        if (new_capacity <= N) {
  ------------------
  |  Branch (129:13): [True: 242M, False: 119M]
  ------------------
  130|   242M|            if (!is_direct()) {
  ------------------
  |  Branch (130:17): [True: 0, False: 242M]
  ------------------
  131|      0|                T* indirect = indirect_ptr(0);
  132|      0|                T* src = indirect;
  133|      0|                T* dst = direct_ptr(0);
  134|      0|                memcpy(dst, src, size() * sizeof(T));
  135|      0|                free(indirect);
  136|      0|                _size -= N + 1;
  137|      0|            }
  138|   242M|        } else {
  139|   119M|            if (!is_direct()) {
  ------------------
  |  Branch (139:17): [True: 0, False: 119M]
  ------------------
  140|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  141|       |                    success. These should instead use an allocator or new/delete so that handlers
  142|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  143|      0|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  144|      0|                assert(_union.indirect_contents.indirect);
  ------------------
  |  Branch (144:17): [True: 0, False: 0]
  ------------------
  145|      0|                _union.indirect_contents.capacity = new_capacity;
  146|   119M|            } else {
  147|   119M|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  148|   119M|                assert(new_indirect);
  ------------------
  |  Branch (148:17): [True: 119M, False: 0]
  ------------------
  149|   119M|                T* src = direct_ptr(0);
  150|   119M|                T* dst = reinterpret_cast<T*>(new_indirect);
  151|   119M|                memcpy(dst, src, size() * sizeof(T));
  152|   119M|                _union.indirect_contents.indirect = new_indirect;
  153|   119M|                _union.indirect_contents.capacity = new_capacity;
  154|   119M|                _size += N + 1;
  155|   119M|            }
  156|   119M|        }
  157|   361M|    }
_ZN9prevectorILj16EhjiE12indirect_ptrEi:
  124|   133M|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj16EhjiE10direct_ptrEi:
  122|   447M|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj16EhjiE4fillITkNSt3__114input_iteratorENS0_14const_iteratorEEEvPhT_S5_:
  167|   266M|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  5.59G|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 5.32G, False: 266M]
  ------------------
  169|  5.32G|            new(static_cast<void*>(dst)) T(*first);
  170|  5.32G|            ++dst;
  171|  5.32G|            ++first;
  172|  5.32G|        }
  173|   266M|    }
_ZNK9prevectorILj16EhjiE14const_iteratoreqES1_:
  102|  5.59G|        bool operator==(const_iterator x) const { return ptr == x.ptr; }
_ZNK9prevectorILj16EhjiE14const_iteratordeEv:
   89|  5.56G|        const T& operator*() const { return *ptr; }
_ZN9prevectorILj16EhjiE14const_iteratorppEv:
   92|  5.32G|        const_iterator& operator++() { ptr++; return *this; }
_ZN9prevectorILj16EhjiE8item_ptrEi:
  159|   461M|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (159:47): [True: 328M, False: 133M]
  ------------------
_ZNK9prevectorILj16EhjiE5beginEv:
  256|  1.47G|    const_iterator begin() const { return const_iterator(item_ptr(0)); }
_ZNK9prevectorILj16EhjiE8item_ptrEi:
  160|  3.39G|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (160:59): [True: 2.88G, False: 512M]
  ------------------
_ZNK9prevectorILj16EhjiE10direct_ptrEi:
  123|  2.88G|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj16EhjiE12indirect_ptrEi:
  125|   512M|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj16EhjiE14const_iteratorC2EPKh:
   87|  1.98G|        const_iterator(const T* ptr_) : ptr(ptr_) {}
_ZNK9prevectorILj16EhjiE3endEv:
  258|   516M|    const_iterator end() const { return const_iterator(item_ptr(size())); }
_ZN9prevectorILj16EhjiED2Ev:
  422|   344M|    ~prevector() {
  423|   344M|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 119M, False: 225M]
  ------------------
  424|   119M|            free(_union.indirect_contents.indirect);
  425|   119M|            _union.indirect_contents.indirect = nullptr;
  426|   119M|        }
  427|   344M|    }
_ZN9prevectorILj16EhjiEaSEOS0_:
  237|  42.4M|    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
  238|  42.4M|        if (!is_direct()) {
  ------------------
  |  Branch (238:13): [True: 0, False: 42.4M]
  ------------------
  239|      0|            free(_union.indirect_contents.indirect);
  240|      0|        }
  241|  42.4M|        _union = std::move(other._union);
  242|  42.4M|        _size = other._size;
  243|  42.4M|        other._size = 0;
  244|  42.4M|        return *this;
  245|  42.4M|    }
_ZNK9prevectorILj36EhjiE9is_directEv:
  126|     20|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj36EhjiED2Ev:
  422|     20|    ~prevector() {
  423|     20|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 4, False: 16]
  ------------------
  424|      4|            free(_union.indirect_contents.indirect);
  425|      4|            _union.indirect_contents.indirect = nullptr;
  426|      4|        }
  427|     20|    }

_ZeqRK8CAddressS1_:
  482|  22.2M|    {
  483|  22.2M|        return a.nTime == b.nTime &&
  ------------------
  |  Branch (483:16): [True: 22.2M, False: 0]
  ------------------
  484|  22.2M|               a.nServices == b.nServices &&
  ------------------
  |  Branch (484:16): [True: 22.2M, False: 0]
  ------------------
  485|  22.2M|               static_cast<const CService&>(a) == static_cast<const CService&>(b);
  ------------------
  |  Branch (485:16): [True: 22.2M, False: 0]
  ------------------
  486|  22.2M|    }
_ZN8CAddress16SerializationOpsI12ParamsStreamIR10DataStreamNS_9SerParamsEEKS_15ActionSerializeEEvRT0_RT_T1_:
  434|  11.0M|    {
  435|  11.0M|        bool use_v2;
  436|  11.0M|        auto& params = SER_PARAMS(SerParams);
  ------------------
  |  |  209|  11.0M|#define SER_PARAMS(type) (s.template GetParams<type>())
  ------------------
  437|  11.0M|        if (params.fmt == Format::Disk) {
  ------------------
  |  Branch (437:13): [True: 11.0M, False: 0]
  ------------------
  438|       |            // In the disk serialization format, the encoding (v1 or v2) is determined by a flag version
  439|       |            // that's part of the serialization itself. ADDRV2_FORMAT in the stream version only determines
  440|       |            // whether V2 is chosen/permitted at all.
  441|  11.0M|            uint32_t stored_format_version = DISK_VERSION_INIT;
  442|  11.0M|            if (params.enc == Encoding::V2) stored_format_version |= DISK_VERSION_ADDRV2;
  ------------------
  |  Branch (442:17): [True: 11.0M, False: 0]
  ------------------
  443|  11.0M|            READWRITE(stored_format_version);
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  444|  11.0M|            stored_format_version &= ~DISK_VERSION_IGNORE_MASK; // ignore low bits
  445|  11.0M|            if (stored_format_version == 0) {
  ------------------
  |  Branch (445:17): [True: 0, False: 11.0M]
  ------------------
  446|      0|                use_v2 = false;
  447|  11.0M|            } else if (stored_format_version == DISK_VERSION_ADDRV2 && params.enc == Encoding::V2) {
  ------------------
  |  Branch (447:24): [True: 11.0M, False: 0]
  |  Branch (447:72): [True: 11.0M, False: 0]
  ------------------
  448|       |                // Only support v2 deserialization if V2 is set.
  449|  11.0M|                use_v2 = true;
  450|  11.0M|            } else {
  451|      0|                throw std::ios_base::failure("Unsupported CAddress disk format version");
  452|      0|            }
  453|  11.0M|        } else {
  454|      0|            assert(params.fmt == Format::Network);
  ------------------
  |  Branch (454:13): [True: 0, False: 0]
  ------------------
  455|       |            // In the network serialization format, the encoding (v1 or v2) is determined directly by
  456|       |            // the value of enc in the stream params, as no explicitly encoded version
  457|       |            // exists in the stream.
  458|      0|            use_v2 = params.enc == Encoding::V2;
  459|      0|        }
  460|       |
  461|  11.0M|        READWRITE(Using<LossyChronoFormatter<uint32_t>>(obj.nTime));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  462|       |        // nServices is serialized as CompactSize in V2; as uint64_t in V1.
  463|  11.0M|        if (use_v2) {
  ------------------
  |  Branch (463:13): [True: 11.0M, False: 0]
  ------------------
  464|  11.0M|            uint64_t services_tmp;
  465|  11.0M|            SER_WRITE(obj, services_tmp = obj.nServices);
  ------------------
  |  |  150|  11.0M|#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
  ------------------
  466|  11.0M|            READWRITE(Using<CompactSizeFormatter<false>>(services_tmp));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  467|  11.0M|            SER_READ(obj, obj.nServices = static_cast<ServiceFlags>(services_tmp));
  ------------------
  |  |  149|  11.0M|#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, std::remove_const_t<Type>& obj) { code; })
  ------------------
  468|  11.0M|        } else {
  469|      0|            READWRITE(Using<CustomUintFormatter<8>>(obj.nServices));
  ------------------
  |  |  148|      0|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  470|      0|        }
  471|       |        // Invoke V1/V2 serializer for CService parent object.
  472|  11.0M|        const auto ser_params{use_v2 ? CNetAddr::V2 : CNetAddr::V1};
  ------------------
  |  Branch (472:31): [True: 11.0M, False: 0]
  ------------------
  473|  11.0M|        READWRITE(ser_params(AsBase<CService>(obj)));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  474|  11.0M|    }
_ZN8CAddress16SerializationOpsI12ParamsStreamIR10DataStreamNS_9SerParamsEES_17ActionUnserializeEEvRT0_RT_T1_:
  434|  11.0M|    {
  435|  11.0M|        bool use_v2;
  436|  11.0M|        auto& params = SER_PARAMS(SerParams);
  ------------------
  |  |  209|  11.0M|#define SER_PARAMS(type) (s.template GetParams<type>())
  ------------------
  437|  11.0M|        if (params.fmt == Format::Disk) {
  ------------------
  |  Branch (437:13): [True: 11.0M, False: 0]
  ------------------
  438|       |            // In the disk serialization format, the encoding (v1 or v2) is determined by a flag version
  439|       |            // that's part of the serialization itself. ADDRV2_FORMAT in the stream version only determines
  440|       |            // whether V2 is chosen/permitted at all.
  441|  11.0M|            uint32_t stored_format_version = DISK_VERSION_INIT;
  442|  11.0M|            if (params.enc == Encoding::V2) stored_format_version |= DISK_VERSION_ADDRV2;
  ------------------
  |  Branch (442:17): [True: 11.0M, False: 0]
  ------------------
  443|  11.0M|            READWRITE(stored_format_version);
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  444|  11.0M|            stored_format_version &= ~DISK_VERSION_IGNORE_MASK; // ignore low bits
  445|  11.0M|            if (stored_format_version == 0) {
  ------------------
  |  Branch (445:17): [True: 0, False: 11.0M]
  ------------------
  446|      0|                use_v2 = false;
  447|  11.0M|            } else if (stored_format_version == DISK_VERSION_ADDRV2 && params.enc == Encoding::V2) {
  ------------------
  |  Branch (447:24): [True: 11.0M, False: 0]
  |  Branch (447:72): [True: 11.0M, False: 0]
  ------------------
  448|       |                // Only support v2 deserialization if V2 is set.
  449|  11.0M|                use_v2 = true;
  450|  11.0M|            } else {
  451|      0|                throw std::ios_base::failure("Unsupported CAddress disk format version");
  452|      0|            }
  453|  11.0M|        } else {
  454|      0|            assert(params.fmt == Format::Network);
  ------------------
  |  Branch (454:13): [True: 0, False: 0]
  ------------------
  455|       |            // In the network serialization format, the encoding (v1 or v2) is determined directly by
  456|       |            // the value of enc in the stream params, as no explicitly encoded version
  457|       |            // exists in the stream.
  458|      0|            use_v2 = params.enc == Encoding::V2;
  459|      0|        }
  460|       |
  461|  11.0M|        READWRITE(Using<LossyChronoFormatter<uint32_t>>(obj.nTime));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  462|       |        // nServices is serialized as CompactSize in V2; as uint64_t in V1.
  463|  11.0M|        if (use_v2) {
  ------------------
  |  Branch (463:13): [True: 11.0M, False: 0]
  ------------------
  464|  11.0M|            uint64_t services_tmp;
  465|  11.0M|            SER_WRITE(obj, services_tmp = obj.nServices);
  ------------------
  |  |  150|  11.0M|#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
  ------------------
  466|  11.0M|            READWRITE(Using<CompactSizeFormatter<false>>(services_tmp));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  467|  11.0M|            SER_READ(obj, obj.nServices = static_cast<ServiceFlags>(services_tmp));
  ------------------
  |  |  149|  11.0M|#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, std::remove_const_t<Type>& obj) { code; })
  ------------------
  468|  11.0M|        } else {
  469|      0|            READWRITE(Using<CustomUintFormatter<8>>(obj.nServices));
  ------------------
  |  |  148|      0|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  470|      0|        }
  471|       |        // Invoke V1/V2 serializer for CService parent object.
  472|  11.0M|        const auto ser_params{use_v2 ? CNetAddr::V2 : CNetAddr::V1};
  ------------------
  |  Branch (472:31): [True: 11.0M, False: 0]
  ------------------
  473|  11.0M|        READWRITE(ser_params(AsBase<CService>(obj)));
  ------------------
  |  |  148|  11.0M|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  474|  11.0M|    }
_ZN8CAddressC2Ev:
  416|  28.5M|    CAddress() : CService{} {};
_ZN8CAddressC2E8CService12ServiceFlags:
  417|  13.3M|    CAddress(CService ipIn, ServiceFlags nServicesIn) : CService{ipIn}, nServices{nServicesIn} {};

_Z30MakeRandDeterministicDANGEROUSRK7uint256:
  596|  2.23k|{
  597|  2.23k|    GetRNGState().MakeDeterministic(seed);
  598|  2.23k|}
_Z12GetRandBytesNSt3__14spanIhLm18446744073709551615EEE:
  602|  8.92k|{
  603|  8.92k|    g_used_g_prng = true;
  604|  8.92k|    ProcRand(bytes.data(), bytes.size(), RNGLevel::FAST, /*always_use_real_rng=*/false);
  605|  8.92k|}
_ZN17FastRandomContext10RandomSeedEv:
  620|  8.92k|{
  621|  8.92k|    uint256 seed = GetRandHash();
  622|  8.92k|    rng.SetKey(MakeByteSpan(seed));
  623|  8.92k|    requires_seed = false;
  624|  8.92k|}
_ZN17FastRandomContext8fillrandENSt3__14spanISt4byteLm18446744073709551615EEE:
  627|  15.5M|{
  628|  15.5M|    if (requires_seed) RandomSeed();
  ------------------
  |  Branch (628:9): [True: 0, False: 15.5M]
  ------------------
  629|  15.5M|    rng.Keystream(output);
  630|  15.5M|}
_ZN17FastRandomContextC2ERK7uint256:
  632|  2.23k|FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), rng(MakeByteSpan(seed)) {}
_ZN17FastRandomContext6ReseedERK7uint256:
  635|  4.46k|{
  636|  4.46k|    FlushCache();
  637|  4.46k|    requires_seed = false;
  638|  4.46k|    rng = {MakeByteSpan(seed)};
  639|  4.46k|}
_ZN17FastRandomContextC2Eb:
  689|  13.3k|FastRandomContext::FastRandomContext(bool fDeterministic) noexcept : requires_seed(!fDeterministic), rng(ZERO_KEY)
  690|  13.3k|{
  691|       |    // Note that despite always initializing with ZERO_KEY, requires_seed is set to true if not
  692|       |    // fDeterministic. That means the rng will be reinitialized with a secure random key upon first
  693|       |    // use.
  694|  13.3k|}
random.cpp:_ZN12_GLOBAL__N_111GetRNGStateEv:
  451|  11.1k|{
  452|       |    // This idiom relies on the guarantee that static variable are initialized
  453|       |    // on first call, even when multiple parallel calls are permitted.
  454|  11.1k|    static std::vector<RNGState, secure_allocator<RNGState>> g_rng(1);
  455|  11.1k|    return g_rng[0];
  456|  11.1k|}
random.cpp:_ZN12_GLOBAL__N_18RNGStateD2Ev:
  367|      2|    ~RNGState() = default;
random.cpp:_ZN12_GLOBAL__N_18RNGState17MakeDeterministicERK7uint256:
  400|  2.23k|    {
  401|  2.23k|        LOCK(m_mutex);
  ------------------
  |  |  268|  2.23k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  2.23k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  2.23k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  2.23k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  402|  2.23k|        m_deterministic_prng.emplace(MakeByteSpan(seed));
  403|  2.23k|    }
random.cpp:_ZN12_GLOBAL__N_18ProcRandEPhiNS_8RNGLevelEb:
  563|  8.92k|{
  564|       |    // Make sure the RNG is initialized first (as all Seed* function possibly need hwrand to be available).
  565|  8.92k|    RNGState& rng = GetRNGState();
  566|       |
  567|  8.92k|    assert(num <= 32);
  ------------------
  |  Branch (567:5): [True: 8.92k, False: 0]
  ------------------
  568|       |
  569|  8.92k|    CSHA512 hasher;
  570|  8.92k|    switch (level) {
  ------------------
  |  Branch (570:13): [True: 8.92k, False: 0]
  ------------------
  571|  8.92k|    case RNGLevel::FAST:
  ------------------
  |  Branch (571:5): [True: 8.92k, False: 0]
  ------------------
  572|  8.92k|        SeedFast(hasher);
  573|  8.92k|        break;
  574|      0|    case RNGLevel::SLOW:
  ------------------
  |  Branch (574:5): [True: 0, False: 8.92k]
  ------------------
  575|      0|        SeedSlow(hasher, rng);
  576|      0|        break;
  577|      0|    case RNGLevel::PERIODIC:
  ------------------
  |  Branch (577:5): [True: 0, False: 8.92k]
  ------------------
  578|      0|        SeedPeriodic(hasher, rng);
  579|      0|        break;
  580|  8.92k|    }
  581|       |
  582|       |    // Combine with and update state
  583|  8.92k|    if (!rng.MixExtract(out, num, std::move(hasher), false, always_use_real_rng)) {
  ------------------
  |  Branch (583:9): [True: 0, False: 8.92k]
  ------------------
  584|       |        // On the first invocation, also seed with SeedStartup().
  585|      0|        CSHA512 startup_hasher;
  586|      0|        SeedStartup(startup_hasher, rng);
  587|      0|        rng.MixExtract(out, num, std::move(startup_hasher), true, always_use_real_rng);
  588|      0|    }
  589|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_18SeedFastER7CSHA512:
  470|  8.92k|{
  471|  8.92k|    unsigned char buffer[32];
  472|       |
  473|       |    // Stack pointer to indirectly commit to thread/callstack
  474|  8.92k|    const unsigned char* ptr = buffer;
  475|  8.92k|    hasher.Write((const unsigned char*)&ptr, sizeof(ptr));
  476|       |
  477|       |    // Hardware randomness is very fast when available; use it always.
  478|  8.92k|    SeedHardwareFast(hasher);
  479|       |
  480|       |    // High-precision timestamp
  481|  8.92k|    SeedTimestamp(hasher);
  482|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_116SeedHardwareFastER7CSHA512:
  199|  8.92k|void SeedHardwareFast(CSHA512& hasher) noexcept {
  200|  8.92k|#if defined(__x86_64__) || defined(__amd64__) || defined(__i386__)
  201|  8.92k|    if (g_rdrand_supported) {
  ------------------
  |  Branch (201:9): [True: 8.92k, False: 0]
  ------------------
  202|  8.92k|        uint64_t out = GetRdRand();
  203|  8.92k|        hasher.Write((const unsigned char*)&out, sizeof(out));
  204|  8.92k|        return;
  205|  8.92k|    }
  206|  8.92k|#endif
  207|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_19GetRdRandEv:
  122|  8.92k|{
  123|       |    // RdRand may very rarely fail. Invoke it up to 10 times in a loop to reduce this risk.
  124|       |#ifdef __i386__
  125|       |    uint8_t ok = 0;
  126|       |    // Initialize to 0 to silence a compiler warning that r1 or r2 may be used
  127|       |    // uninitialized. Even if rdrand fails (!ok) it will set the output to 0,
  128|       |    // but there is no way that the compiler could know that.
  129|       |    uint32_t r1 = 0, r2 = 0;
  130|       |    for (int i = 0; i < 10; ++i) {
  131|       |        __asm__ volatile (".byte 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r1), "=q"(ok) :: "cc"); // rdrand %eax
  132|       |        if (ok) break;
  133|       |    }
  134|       |    for (int i = 0; i < 10; ++i) {
  135|       |        __asm__ volatile (".byte 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r2), "=q"(ok) :: "cc"); // rdrand %eax
  136|       |        if (ok) break;
  137|       |    }
  138|       |    return (((uint64_t)r2) << 32) | r1;
  139|       |#elif defined(__x86_64__) || defined(__amd64__)
  140|       |    uint8_t ok = 0;
  141|  8.92k|    uint64_t r1 = 0; // See above why we initialize to 0.
  142|  8.92k|    for (int i = 0; i < 10; ++i) {
  ------------------
  |  Branch (142:21): [True: 8.92k, False: 0]
  ------------------
  143|  8.92k|        __asm__ volatile (".byte 0x48, 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r1), "=q"(ok) :: "cc"); // rdrand %rax
  144|  8.92k|        if (ok) break;
  ------------------
  |  Branch (144:13): [True: 8.92k, False: 0]
  ------------------
  145|  8.92k|    }
  146|  8.92k|    return r1;
  147|       |#else
  148|       |#error "RdRand is only supported on x86 and x86_64"
  149|       |#endif
  150|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_113SeedTimestampER7CSHA512:
  464|  8.92k|{
  465|  8.92k|    int64_t perfcounter = GetPerformanceCounter();
  466|  8.92k|    hasher.Write((const unsigned char*)&perfcounter, sizeof(perfcounter));
  467|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_121GetPerformanceCounterEv:
   61|  8.92k|{
   62|       |    // Read the hardware time stamp counter when available.
   63|       |    // See https://en.wikipedia.org/wiki/Time_Stamp_Counter for more information.
   64|       |#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
   65|       |    return __rdtsc();
   66|       |#elif !defined(_MSC_VER) && defined(__i386__)
   67|       |    uint64_t r = 0;
   68|       |    __asm__ volatile ("rdtsc" : "=A"(r)); // Constrain the r variable to the eax:edx pair.
   69|       |    return r;
   70|       |#elif !defined(_MSC_VER) && (defined(__x86_64__) || defined(__amd64__))
   71|       |    uint64_t r1 = 0, r2 = 0;
   72|  8.92k|    __asm__ volatile ("rdtsc" : "=a"(r1), "=d"(r2)); // Constrain r1 to rax and r2 to rdx.
   73|  8.92k|    return (r2 << 32) | r1;
   74|       |#else
   75|       |    // Fall back to using standard library clock (usually microsecond or nanosecond precision)
   76|       |    return std::chrono::high_resolution_clock::now().time_since_epoch().count();
   77|       |#endif
   78|  8.92k|}
random.cpp:_ZN12_GLOBAL__N_18RNGState10MixExtractEPhmO7CSHA512bb:
  413|  8.92k|    {
  414|  8.92k|        assert(num <= 32);
  ------------------
  |  Branch (414:9): [True: 8.92k, False: 0]
  ------------------
  415|  8.92k|        unsigned char buf[64];
  416|  8.92k|        static_assert(sizeof(buf) == CSHA512::OUTPUT_SIZE, "Buffer needs to have hasher's output size");
  417|  8.92k|        bool ret;
  418|  8.92k|        {
  419|  8.92k|            LOCK(m_mutex);
  ------------------
  |  |  268|  8.92k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  8.92k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  8.92k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  8.92k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|  8.92k|            ret = (m_strongly_seeded |= strong_seed);
  421|       |            // Write the current state of the RNG into the hasher
  422|  8.92k|            hasher.Write(m_state, 32);
  423|       |            // Write a new counter number into the state
  424|  8.92k|            hasher.Write((const unsigned char*)&m_counter, sizeof(m_counter));
  425|  8.92k|            ++m_counter;
  426|       |            // Finalize the hasher
  427|  8.92k|            hasher.Finalize(buf);
  428|       |            // Store the last 32 bytes of the hash output as new RNG state.
  429|  8.92k|            memcpy(m_state, buf + 32, 32);
  430|       |            // Handle requests for deterministic randomness.
  431|  8.92k|            if (!always_use_real_rng && m_deterministic_prng.has_value()) [[unlikely]] {
  ------------------
  |  Branch (431:17): [True: 8.92k, False: 0]
  |  Branch (431:41): [True: 8.92k, False: 0]
  ------------------
  432|       |                // Overwrite the beginning of buf, which will be used for output.
  433|  8.92k|                m_deterministic_prng->Keystream(std::as_writable_bytes(std::span{buf, num}));
  434|       |                // Do not require strong seeding for deterministic output.
  435|  8.92k|                ret = true;
  436|  8.92k|            }
  437|  8.92k|        }
  438|       |        // If desired, copy (up to) the first 32 bytes of the hash output as output.
  439|  8.92k|        if (num) {
  ------------------
  |  Branch (439:13): [True: 8.92k, False: 0]
  ------------------
  440|  8.92k|            assert(out != nullptr);
  ------------------
  |  Branch (440:13): [True: 8.92k, False: 0]
  ------------------
  441|  8.92k|            memcpy(out, buf, num);
  442|  8.92k|        }
  443|       |        // Best effort cleanup of internal state
  444|  8.92k|        hasher.Reset();
  445|  8.92k|        memory_cleanse(buf, 64);
  446|  8.92k|        return ret;
  447|  8.92k|    }

_ZN11RandomMixinI17FastRandomContextEC2Ev:
  195|  15.6k|    constexpr RandomMixin() noexcept = default;
_ZN11RandomMixinI17FastRandomContextE10FlushCacheEv:
  189|  4.46k|    {
  190|  4.46k|        bitbuf = 0;
  191|  4.46k|        bitbuf_size = 0;
  192|  4.46k|    }
_ZN11RandomMixinI17FastRandomContextE9randbytesITk9BasicBytehEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEm:
  298|  15.5M|    {
  299|  15.5M|        std::vector<B> ret(len);
  300|  15.5M|        Impl().fillrand(MakeWritableByteSpan(ret));
  301|  15.5M|        return ret;
  302|  15.5M|    }
_ZN11RandomMixinI17FastRandomContextE9randrangeITkNSt3__18integralEmEET_S4_:
  255|  15.5M|    {
  256|  15.5M|        static_assert(std::numeric_limits<I>::max() <= std::numeric_limits<uint64_t>::max());
  257|  15.5M|        Assume(range > 0);
  ------------------
  |  |  128|  15.5M|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  258|  15.5M|        uint64_t maxval = range - 1U;
  259|  15.5M|        int bits = std::bit_width(maxval);
  260|  20.6M|        while (true) {
  ------------------
  |  Branch (260:16): [True: 20.6M, Folded]
  ------------------
  261|  20.6M|            uint64_t ret = Impl().randbits(bits);
  262|  20.6M|            if (ret <= maxval) return ret;
  ------------------
  |  Branch (262:17): [True: 15.5M, False: 5.16M]
  ------------------
  263|  20.6M|        }
  264|  15.5M|    }
_Z11GetRandHashv:
  464|  8.92k|{
  465|  8.92k|    uint256 hash;
  466|  8.92k|    GetRandBytes(hash);
  467|  8.92k|    return hash;
  468|  8.92k|}
_ZN11RandomMixinI17FastRandomContextE4ImplEv:
  185|  86.3M|    RandomNumberGenerator auto& Impl() noexcept { return static_cast<T&>(*this); }
_ZN11RandomMixinI17FastRandomContextE8randbitsEi:
  205|  60.9M|    {
  206|  60.9M|        Assume(bits <= 64);
  ------------------
  |  |  128|  60.9M|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  207|       |        // Requests for the full 64 bits are passed through.
  208|  60.9M|        if (bits == 64) return Impl().rand64();
  ------------------
  |  Branch (208:13): [True: 0, False: 60.9M]
  ------------------
  209|  60.9M|        uint64_t ret;
  210|  60.9M|        if (bits <= bitbuf_size) {
  ------------------
  |  Branch (210:13): [True: 51.0M, False: 9.89M]
  ------------------
  211|       |            // If there is enough entropy left in bitbuf, return its bottom bits bits.
  212|  51.0M|            ret = bitbuf;
  213|  51.0M|            bitbuf >>= bits;
  214|  51.0M|            bitbuf_size -= bits;
  215|  51.0M|        } else {
  216|       |            // If not, return all of bitbuf, supplemented with the (bits - bitbuf_size) bottom
  217|       |            // bits of a newly generated 64-bit number on top. The remainder of that generated
  218|       |            // number becomes the new bitbuf.
  219|  9.89M|            uint64_t gen = Impl().rand64();
  220|  9.89M|            ret = (gen << bitbuf_size) | bitbuf;
  221|  9.89M|            bitbuf = gen >> (bits - bitbuf_size);
  222|  9.89M|            bitbuf_size = 64 + bitbuf_size - bits;
  223|  9.89M|        }
  224|       |        // Return the bottom bits bits of ret.
  225|  60.9M|        return ret & ((uint64_t{1} << bits) - 1);
  226|  60.9M|    }
_ZN17FastRandomContext6rand64Ev:
  405|  9.89M|    {
  406|  9.89M|        if (requires_seed) RandomSeed();
  ------------------
  |  Branch (406:13): [True: 8.92k, False: 9.89M]
  ------------------
  407|  9.89M|        std::array<std::byte, 8> buf;
  408|  9.89M|        rng.Keystream(buf);
  409|  9.89M|        return ReadLE64(buf.data());
  410|  9.89M|    }
_ZN11RandomMixinI17FastRandomContextE9randrangeITkNSt3__18integralEiEET_S4_:
  255|  27.6M|    {
  256|  27.6M|        static_assert(std::numeric_limits<I>::max() <= std::numeric_limits<uint64_t>::max());
  257|  27.6M|        Assume(range > 0);
  ------------------
  |  |  128|  27.6M|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  258|  27.6M|        uint64_t maxval = range - 1U;
  259|  27.6M|        int bits = std::bit_width(maxval);
  260|  40.2M|        while (true) {
  ------------------
  |  Branch (260:16): [True: 40.2M, Folded]
  ------------------
  261|  40.2M|            uint64_t ret = Impl().randbits(bits);
  262|  40.2M|            if (ret <= maxval) return ret;
  ------------------
  |  Branch (262:17): [True: 27.6M, False: 12.6M]
  ------------------
  263|  40.2M|        }
  264|  27.6M|    }

_ZN20BaseSignatureCheckerD2Ev:
  298|      2|    virtual ~BaseSignatureChecker() = default;

_ZN20BaseSignatureCreatorD2Ev:
   41|      4|    virtual ~BaseSignatureCreator() = default;

_ZN15SigningProviderD2Ev:
  170|      2|    virtual ~SigningProvider() = default;

secp256k1.c:secp256k1_ecmult_gen_context_clear:
   26|      2|static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context *ctx) {
   27|      2|    ctx->built = 0;
   28|      2|    secp256k1_scalar_clear(&ctx->scalar_offset);
   29|      2|    secp256k1_ge_clear(&ctx->ge_offset);
   30|      2|    secp256k1_fe_clear(&ctx->proj_blind);
   31|      2|}
secp256k1.c:secp256k1_ecmult_gen_context_is_built:
   22|      4|static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx) {
   23|      4|    return ctx->built;
   24|      4|}

secp256k1.c:secp256k1_fe_clear:
   21|      2|SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) {
   22|      2|    secp256k1_memclear_explicit(a, sizeof(secp256k1_fe));
   23|      2|}

secp256k1.c:secp256k1_ge_clear:
  343|      2|static void secp256k1_ge_clear(secp256k1_ge *r) {
  344|      2|    secp256k1_memclear_explicit(r, sizeof(secp256k1_ge));
  345|      2|}

secp256k1.c:secp256k1_scalar_clear:
   30|      2|SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) {
   31|      2|    secp256k1_memclear_explicit(r, sizeof(secp256k1_scalar));
   32|      2|}

secp256k1_context_preallocated_destroy:
  178|      2|void secp256k1_context_preallocated_destroy(secp256k1_context* ctx) {
  179|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded, False: 2]
  |  |  ------------------
  ------------------
  180|       |
  181|       |    /* Defined as noop */
  182|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2]
  ------------------
  183|      0|        return;
  184|      0|    }
  185|       |
  186|      2|    secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx);
  187|      2|}
secp256k1_context_destroy:
  189|      2|void secp256k1_context_destroy(secp256k1_context* ctx) {
  190|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded, False: 2]
  |  |  ------------------
  ------------------
  191|       |
  192|       |    /* Defined as noop */
  193|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (193:9): [True: 0, False: 2]
  ------------------
  194|      0|        return;
  195|      0|    }
  196|       |
  197|      2|    secp256k1_context_preallocated_destroy(ctx);
  198|      2|    free(ctx);
  199|      2|}
secp256k1.c:secp256k1_context_is_proper:
   83|      4|static int secp256k1_context_is_proper(const secp256k1_context* ctx) {
   84|      4|    return secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx);
   85|      4|}

secp256k1.c:secp256k1_memclear_explicit:
  268|      6|static SECP256K1_INLINE void secp256k1_memclear_explicit(void *ptr, size_t len) {
  269|       |    /* The current implementation zeroes, but callers must not rely on this */
  270|      6|    secp256k1_memzero_explicit(ptr, len);
  271|       |#ifdef VERIFY
  272|       |    SECP256K1_CHECKMEM_UNDEFINE(ptr, len);
  273|       |#endif
  274|      6|}
secp256k1.c:secp256k1_memzero_explicit:
  236|      6|static SECP256K1_INLINE void secp256k1_memzero_explicit(void *ptr, size_t len) {
  237|       |#if defined(_MSC_VER)
  238|       |    /* SecureZeroMemory is guaranteed not to be optimized out by MSVC. */
  239|       |    SecureZeroMemory(ptr, len);
  240|       |#elif defined(__GNUC__)
  241|       |    /* We use a memory barrier that scares the compiler away from optimizing out the memset.
  242|       |     *
  243|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
  244|       |     * in BoringSSL (ISC License):
  245|       |     *    As best as we can tell, this is sufficient to break any optimisations that
  246|       |     *    might try to eliminate "superfluous" memsets.
  247|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
  248|       |     * is pretty efficient, because the compiler can still implement the memset() efficiently,
  249|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
  250|       |     * Yang et al. (USENIX Security 2017) for more background.
  251|       |     */
  252|      6|    memset(ptr, 0, len);
  253|      6|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
  254|       |#else
  255|       |    void *(*volatile const volatile_memset)(void *, int, size_t) = memset;
  256|       |    volatile_memset(ptr, 0, len);
  257|       |#endif
  258|      6|}

_Z9SerializeI10DataStream20AddrManDeterministicQ12SerializableIT0_T_EEvRS3_RKS2_:
  767|  2.23k|{
  768|  2.23k|    a.Serialize(os);
  769|  2.23k|}
_Z11UnserializeI10DataStreamR20AddrManDeterministicQ14UnserializableIT0_T_EEvRS4_OS3_:
  776|  2.23k|{
  777|  2.23k|    a.Unserialize(is);
  778|  2.23k|}
deserialize.cpp:_ZL5UsingI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE7WrapperIT_RT0_EOSE_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
deserialize.cpp:_ZL5UsingI20CompactSizeFormatterILb0EERmE7WrapperIT_RT0_EOS5_:
  491|  22.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
deserialize.cpp:_ZL5UsingI20CompactSizeFormatterILb1EERmE7WrapperIT_RT0_EOS5_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
deserialize.cpp:_ZL5UsingI19CustomUintFormatterILi2ELb1EERtE7WrapperIT_RT0_EOS5_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
deserialize.cpp:_ZL5UsingI19CustomUintFormatterILi2ELb1EERKtE7WrapperIT_RT0_EOS6_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
deserialize.cpp:_ZL5UsingI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE7WrapperIT_RT0_EOSF_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZNK8CAddress9SerParamsclIR8CNetAddrEEDaOT_:
 1282|  13.4M|    {                                                                                    \
 1283|  13.4M|        return ParamsWrapper{*this, t};                                                  \
 1284|  13.4M|    }
_ZN13ParamsWrapperIN8CAddress9SerParamsE8CNetAddrEC2ERKS1_RS2_:
 1249|  13.4M|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_Z11UnserializeI10DataStreamR13ParamsWrapperIN8CAddress9SerParamsE8CNetAddrEQ14UnserializableIT0_T_EEvRS8_OS7_:
  776|  13.4M|{
  777|  13.4M|    a.Unserialize(is);
  778|  13.4M|}
_ZN13ParamsWrapperIN8CAddress9SerParamsE8CNetAddrE11UnserializeI10DataStreamEEvRT_:
 1259|  13.4M|    {
 1260|  13.4M|        ParamsStream ss{s, m_params};
 1261|  13.4M|        ::Unserialize(ss, m_object);
 1262|  13.4M|    }
_Z9SerializeI10HashWriterTk9BasicByteKSt4byteEvRT_NSt3__14spanIT0_Lm18446744073709551615EEE:
  261|  1.20k|template <typename Stream, BasicByte B>           void Serialize(Stream& s, std::span<B> span)         { s.write(std::as_bytes(span)); }
_Z6AsBaseI8CAddress8AddrInfoERKT_RKT0_:
  143|  11.0M|{
  144|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  145|  11.0M|    return x;
  146|  11.0M|}
addrman.cpp:_ZL5UsingI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE7WrapperIT_RT0_EOSF_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEEC2ESC_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsIhEERS4_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_h:
  250|  11.0M|template <typename Stream> void Serialize(Stream& s, uint8_t a)   { ser_writedata8(s, a); }
_Z14ser_writedata8I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_h:
   58|  33.0M|{
   59|  33.0M|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|  33.0M|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
 1189|  97.2M|    void write(std::span<const std::byte> src) { GetStream().write(src); }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsI7uint256EERS4_RKT_:
 1187|  4.46k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE7uint256Q12SerializableIT0_T_EEvRS8_RKS7_:
  767|  4.46k|{
  768|  4.46k|    a.Serialize(os);
  769|  4.46k|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsINSt3__14spanIKhLm32EEEEERS4_RKT_:
 1187|  4.46k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEETk9BasicByteKhLm32EEvRT_NSt3__14spanIT0_XT1_EEE:
  260|  4.46k|template <typename Stream, BasicByte B, size_t N> void Serialize(Stream& s, std::span<B, N> span)      { s.write(std::as_bytes(span)); }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsIiEERS4_RKT_:
 1187|  9.19M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_i:
  253|  20.2M|template <typename Stream> void Serialize(Stream& s, int32_t a)   { ser_writedata32(s, uint32_t(a)); }
_Z15ser_writedata32I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_j:
   67|  42.2M|{
   68|  42.2M|    obj = htole32_internal(obj);
   69|  42.2M|    s.write(std::as_bytes(std::span{&obj, 1}));
   70|  42.2M|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsI8AddrInfoEERS4_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE8AddrInfoQ12SerializableIT0_T_EEvRS8_RKS7_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK8AddrInfo9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  214|  11.0M|    {                                                                                               \
  215|  11.0M|        static_assert(std::is_same_v<const cls&, decltype(*this)>, "Serialize type mismatch");      \
  216|  11.0M|        Ser(s, *this);                                                                              \
  217|  11.0M|    }                                                                                               \
_ZN8AddrInfo3SerI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_RKS_:
  170|  11.0M|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJS4_8CNetAddr7WrapperI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNSC_8durationIxNSB_5ratioILl1ELl1EEEEEEEEiEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJS3_8CNetAddr7WrapperI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNSB_8durationIxNSA_5ratioILl1ELl1EEEEEEEEiEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEES3_Q12SerializableIT0_T_EEvRS7_RKS6_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK8CAddress9SerializeI12ParamsStreamIR10DataStreamNS_9SerParamsEEEEvRT_:
  214|  11.0M|    {                                                                                               \
  215|  11.0M|        static_assert(std::is_same_v<const cls&, decltype(*this)>, "Serialize type mismatch");      \
  216|  11.0M|        Ser(s, *this);                                                                              \
  217|  11.0M|    }                                                                                               \
_ZN8CAddress3SerI12ParamsStreamIR10DataStreamNS_9SerParamsEEEEvRT_RKS_:
  170|  11.0M|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJjEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJjEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_j:
  254|  22.0M|template <typename Stream> void Serialize(Stream& s, uint32_t a)  { ser_writedata32(s, a); }
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNSB_8durationIxNSA_5ratioILl1ELl1EEEEEEEEEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE7WrapperI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEQ12SerializableIT0_T_EEvRSM_RKSL_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK7WrapperI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  476|  11.0M|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN15ChronoFormatterIjLb1EE3SerI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEENSt3__16chrono10time_pointI9NodeClockNS9_8durationIxNS8_5ratioILl1ELl1EEEEEEEEEvRT_T0_:
  594|  11.0M|    {
  595|  11.0M|        if constexpr (LOSSY) {
  596|  11.0M|            s << U(tp.time_since_epoch().count());
  597|       |        } else {
  598|       |            s << U{tp.time_since_epoch().count()};
  599|       |        }
  600|  11.0M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsIjEERS4_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_ZN15ActionSerialize8SerWriteI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEERKS4_ZNS4_16SerializationOpsIS6_S7_S_EEvRT0_RT_T1_EUlRS6_S8_E_EEvSD_OSA_OSE_:
 1077|  11.0M|    {
 1078|  11.0M|        fn(s, std::forward<Type>(obj));
 1079|  11.0M|    }
_ZZN8CAddress16SerializationOpsI12ParamsStreamIR10DataStreamNS_9SerParamsEEKS_15ActionSerializeEEvRT0_RT_T1_ENKUlRS5_RS6_E_clESD_SE_:
  150|  11.0M|#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI20CompactSizeFormatterILb0EERmEEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI20CompactSizeFormatterILb0EERmEEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE7WrapperI20CompactSizeFormatterILb0EERmEQ12SerializableIT0_T_EEvRSC_RKSB_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK7WrapperI20CompactSizeFormatterILb0EERmE9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  476|  11.0M|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN20CompactSizeFormatterILb0EE3SerI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEmEEvRT_T0_:
  574|  11.0M|    {
  575|  11.0M|        static_assert(std::is_unsigned_v<I>, "CompactSize only supported for unsigned integers");
  576|  11.0M|        static_assert(std::numeric_limits<I>::max() <= std::numeric_limits<uint64_t>::max(), "CompactSize only supports 64-bit integers and below");
  577|       |
  578|  11.0M|        WriteCompactSize<Stream>(s, v);
  579|  11.0M|    }
_Z16WriteCompactSizeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_m:
  303|  22.0M|{
  304|  22.0M|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 22.0M, False: 0]
  ------------------
  305|  22.0M|    {
  306|  22.0M|        ser_writedata8(os, nSize);
  307|  22.0M|    }
  308|      0|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|    {
  310|      0|        ser_writedata8(os, 253);
  311|      0|        ser_writedata16(os, nSize);
  312|      0|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|  22.0M|    return;
  324|  22.0M|}
_Z15ser_writedata64I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_m:
   77|  11.0M|{
   78|  11.0M|    obj = htole64_internal(obj);
   79|  11.0M|    s.write(std::as_bytes(std::span{&obj, 1}));
   80|  11.0M|}
_ZN15ActionSerialize7SerReadI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEERKS4_ZNS4_16SerializationOpsIS6_S7_S_EEvRT0_RT_T1_EUlRS6_RS4_E_EEvSD_OSA_OSE_:
 1072|  11.0M|    {
 1073|  11.0M|    }
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ13ParamsWrapperIN8CNetAddr9SerParamsEK8CServiceEEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ13ParamsWrapperIN8CNetAddr9SerParamsEK8CServiceEEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE13ParamsWrapperIN8CNetAddr9SerParamsEK8CServiceEQ12SerializableIT0_T_EEvRSD_RKSC_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK13ParamsWrapperIN8CNetAddr9SerParamsEK8CServiceE9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
 1253|  11.0M|    {
 1254|  11.0M|        ParamsStream ss{s, m_params};
 1255|  11.0M|        ::Serialize(ss, m_object);
 1256|  11.0M|    }
_Z9SerializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE8CServiceQ12SerializableIT0_T_EEvRSC_RKSB_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK8CService9SerializeI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_:
  214|  11.0M|    {                                                                                               \
  215|  11.0M|        static_assert(std::is_same_v<const cls&, decltype(*this)>, "Serialize type mismatch");      \
  216|  11.0M|        Ser(s, *this);                                                                              \
  217|  11.0M|    }                                                                                               \
_ZN8CService3SerI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_RKS_:
  170|  11.0M|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEJS8_7WrapperI19CustomUintFormatterILi2ELb1EERKtEEEEvRT_DpRKT0_:
 1066|  11.0M|    {
 1067|  11.0M|        ::SerializeMany(s, args...);
 1068|  11.0M|    }
_Z13SerializeManyI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEJS7_7WrapperI19CustomUintFormatterILi2ELb1EERKtEEEvRT_DpRKT0_:
 1048|  11.0M|{
 1049|  11.0M|    (::Serialize(s, args), ...);
 1050|  11.0M|}
_Z9SerializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEES7_Q12SerializableIT0_T_EEvRSB_RKSA_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEElsIhEERS8_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEvRT_h:
  250|  11.0M|template <typename Stream> void Serialize(Stream& s, uint8_t a)   { ser_writedata8(s, a); }
_Z14ser_writedata8I12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEvRT_h:
   58|  22.0M|{
   59|  22.0M|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|  22.0M|}
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
 1189|  44.0M|    void write(std::span<const std::byte> src) { GetStream().write(src); }
_Z16WriteCompactSizeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEvRT_m:
  303|  11.0M|{
  304|  11.0M|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 11.0M, False: 0]
  ------------------
  305|  11.0M|    {
  306|  11.0M|        ser_writedata8(os, nSize);
  307|  11.0M|    }
  308|      0|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|    {
  310|      0|        ser_writedata8(os, 253);
  311|      0|        ser_writedata16(os, nSize);
  312|      0|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|  11.0M|    return;
  324|  11.0M|}
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEElsI9prevectorILj16EhjiEEERS8_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEELj16EhEvRT_RK9prevectorIXT0_ET1_jiE:
  864|  11.0M|{
  865|  11.0M|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  866|  11.0M|        WriteCompactSize(os, v.size());
  867|  11.0M|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (867:13): [True: 11.0M, False: 0]
  ------------------
  868|       |    } else {
  869|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  870|       |    }
  871|  11.0M|}
_Z9SerializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE7WrapperI19CustomUintFormatterILi2ELb1EERKtEQ12SerializableIT0_T_EEvRSH_RKSG_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK7WrapperI19CustomUintFormatterILi2ELb1EERKtE9SerializeI12ParamsStreamIRS6_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_:
  476|  11.0M|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN19CustomUintFormatterILi2ELb1EE3SerI12ParamsStreamIRS2_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEtEEvRT_T0_:
  530|  11.0M|    {
  531|  11.0M|        if (v < 0 || v > MAX) throw std::ios_base::failure("CustomUintFormatter value out of range");
  ------------------
  |  Branch (531:13): [True: 0, False: 11.0M]
  |  Branch (531:22): [True: 0, False: 11.0M]
  ------------------
  532|  11.0M|        if (BigEndian) {
  ------------------
  |  Branch (532:13): [True: 11.0M, Folded]
  ------------------
  533|  11.0M|            uint64_t raw = htobe64_internal(v);
  534|  11.0M|            s.write(std::as_bytes(std::span{&raw, 1}).last(Bytes));
  535|  11.0M|        } else {
  536|      0|            uint64_t raw = htole64_internal(v);
  537|      0|            s.write(std::as_bytes(std::span{&raw, 1}).first(Bytes));
  538|      0|        }
  539|  11.0M|    }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE8CNetAddrQ12SerializableIT0_T_EEvRS8_RKS7_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE9GetParamsIN8CNetAddr9SerParamsEEERKDav:
 1198|  35.4M|    {
 1199|  35.4M|        if constexpr (std::is_convertible_v<Params, P>) {
 1200|  35.4M|            return m_params;
 1201|       |        } else {
 1202|       |            return m_substream.template GetParams<P>();
 1203|       |        }
 1204|  35.4M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsI9prevectorILj16EhjiEEERS4_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEELj16EhEvRT_RK9prevectorIXT0_ET1_jiE:
  864|  11.0M|{
  865|  11.0M|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  866|  11.0M|        WriteCompactSize(os, v.size());
  867|  11.0M|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (867:13): [True: 11.0M, False: 0]
  ------------------
  868|       |    } else {
  869|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  870|       |    }
  871|  11.0M|}
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE7WrapperI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEQ12SerializableIT0_T_EEvRSM_RKSL_:
  767|  11.0M|{
  768|  11.0M|    a.Serialize(os);
  769|  11.0M|}
_ZNK7WrapperI15ChronoFormatterIlLb0EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  476|  11.0M|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN15ChronoFormatterIlLb0EE3SerI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEENSt3__16chrono10time_pointI9NodeClockNS9_8durationIxNS8_5ratioILl1ELl1EEEEEEEEEvRT_T0_:
  594|  11.0M|    {
  595|       |        if constexpr (LOSSY) {
  596|       |            s << U(tp.time_since_epoch().count());
  597|  11.0M|        } else {
  598|  11.0M|            s << U{tp.time_since_epoch().count()};
  599|  11.0M|        }
  600|  11.0M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEElsIlEERS4_RKT_:
 1187|  11.0M|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_l:
  255|  11.0M|template <typename Stream> void Serialize(Stream& s, int64_t a)   { ser_writedata64(s, uint64_t(a)); }
addrman.cpp:_ZL5UsingI19CustomUintFormatterILi1ELb0EERN11AddrManImpl6FormatEE7WrapperIT_RT0_EOS7_:
  491|  2.23k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI19CustomUintFormatterILi1ELb0EERN11AddrManImpl6FormatEEC2ES4_:
  475|  2.23k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z6AsBaseI8CAddress8AddrInfoERT_RT0_:
  137|  11.0M|{
  138|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  139|  11.0M|    return x;
  140|  11.0M|}
addrman.cpp:_ZL5UsingI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE7WrapperIT_RT0_EOSE_:
  491|  11.0M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEEC2ESB_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_Z11UnserializeI10DataStreamR7WrapperI19CustomUintFormatterILi1ELb0EERN11AddrManImpl6FormatEEQ14UnserializableIT0_T_EEvRSA_OS9_:
  776|  2.23k|{
  777|  2.23k|    a.Unserialize(is);
  778|  2.23k|}
_ZN7WrapperI19CustomUintFormatterILi1ELb0EERN11AddrManImpl6FormatEE11UnserializeI10DataStreamEEvRT_:
  477|  2.23k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN19CustomUintFormatterILi1ELb0EE5UnserI10DataStreamN11AddrManImpl6FormatEEEvRT_RT0_:
  542|  2.23k|    {
  543|  2.23k|        using U = typename std::conditional_t<std::is_enum_v<I>, std::underlying_type<I>, std::common_type<I>>::type;
  544|  2.23k|        static_assert(std::numeric_limits<U>::max() >= MAX && std::numeric_limits<U>::min() <= 0, "Assigned type too small");
  545|  2.23k|        uint64_t raw = 0;
  546|  2.23k|        if (BigEndian) {
  ------------------
  |  Branch (546:13): [Folded, False: 2.23k]
  ------------------
  547|      0|            s.read(std::as_writable_bytes(std::span{&raw, 1}).last(Bytes));
  548|      0|            v = static_cast<I>(be64toh_internal(raw));
  549|  2.23k|        } else {
  550|  2.23k|            s.read(std::as_writable_bytes(std::span{&raw, 1}).first(Bytes));
  551|  2.23k|            v = static_cast<I>(le64toh_internal(raw));
  552|  2.23k|        }
  553|  2.23k|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIRhEERS4_OT_:
 1188|  24.4M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_Rh:
  266|  24.4M|template <typename Stream> void Unserialize(Stream& s, uint8_t& a)   { a = ser_readdata8(s); }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIR7uint256EERS4_OT_:
 1188|  4.46k|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER7uint256Q14UnserializableIT0_T_EEvRS9_OS8_:
  776|  4.46k|{
  777|  4.46k|    a.Unserialize(is);
  778|  4.46k|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIRiEERS4_OT_:
 1188|  9.19M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_Ri:
  269|  20.2M|template <typename Stream> void Unserialize(Stream& s, int32_t& a)   { a = int32_t(ser_readdata32(s)); }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIR8AddrInfoEERS4_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER8AddrInfoQ14UnserializableIT0_T_EEvRS9_OS8_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN8AddrInfo11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  220|  11.0M|    {                                                                                               \
  221|  11.0M|        static_assert(std::is_same_v<cls&, decltype(*this)>, "Unserialize type mismatch");          \
  222|  11.0M|        Unser(s, *this);                                                                            \
  223|  11.0M|    }
_ZN8AddrInfo5UnserI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_RS_:
  172|  11.0M|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJRS4_R8CNetAddr7WrapperI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNSE_8durationIxNSD_5ratioILl1ELl1EEEEEEEERiEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJRS3_R8CNetAddrR7WrapperI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNSD_8durationIxNSC_5ratioILl1ELl1EEEEEEEERiEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER8CNetAddrQ14UnserializableIT0_T_EEvRS9_OS8_:
  776|  24.4M|{
  777|  24.4M|    a.Unserialize(is);
  778|  24.4M|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsI7WrapperI20CompactSizeFormatterILb1EERmEEERS4_OT_:
 1188|  24.4M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER7WrapperI20CompactSizeFormatterILb1EERmEQ14UnserializableIT0_T_EEvRSD_OSC_:
  776|  24.4M|{
  777|  24.4M|    a.Unserialize(is);
  778|  24.4M|}
_ZN7WrapperI20CompactSizeFormatterILb1EERmE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  477|  24.4M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN20CompactSizeFormatterILb1EE5UnserI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEmEEvRT_RT0_:
  564|  24.4M|    {
  565|  24.4M|        uint64_t n = ReadCompactSize<Stream>(s, RangeCheck);
  566|  24.4M|        if (n < std::numeric_limits<I>::min() || n > std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (566:13): [True: 0, False: 24.4M]
  |  Branch (566:50): [True: 0, False: 24.4M]
  ------------------
  567|      0|            throw std::ios_base::failure("CompactSize exceeds limit of type");
  568|      0|        }
  569|  24.4M|        v = n;
  570|  24.4M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsINSt3__14spanIhLm18446744073709551615EEEEERS4_OT_:
 1188|  24.4M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEETk9BasicBytehEvRT_NSt3__14spanIT0_Lm18446744073709551615EEE:
  277|  24.4M|template <typename Stream, BasicByte B>           void Unserialize(Stream& s, std::span<B> span)    { s.read(std::as_writable_bytes(span)); }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER7WrapperI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEQ14UnserializableIT0_T_EEvRSM_OSL_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN7WrapperI15ChronoFormatterIlLb0EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  477|  11.0M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15ChronoFormatterIlLb0EE5UnserI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEENSt3__16chrono10time_pointI9NodeClockNS9_8durationIxNS8_5ratioILl1ELl1EEEEEEEEEvRT_RT0_:
  586|  11.0M|    {
  587|  11.0M|        U u;
  588|  11.0M|        s >> u;
  589|       |        // Lossy deserialization does not make sense, so force Wnarrowing
  590|  11.0M|        tp = Tp{typename Tp::duration{typename Tp::duration::rep{u}}};
  591|  11.0M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIRlEERS4_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_Rl:
  271|  11.0M|template <typename Stream> void Unserialize(Stream& s, int64_t& a)   { a = int64_t(ser_readdata64(s)); }
net.cpp:_ZL5UsingI20CompactSizeFormatterILb1EERmE7WrapperIT_RT0_EOS5_:
  491|  24.4M|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI20CompactSizeFormatterILb1EERmEC2ES2_:
  475|  35.4M|    explicit Wrapper(T obj) : m_object(obj) {}
_Z6AsBaseI8CNetAddr8CServiceERT_RT0_:
  137|  11.0M|{
  138|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  139|  11.0M|    return x;
  140|  11.0M|}
_ZN7WrapperI19CustomUintFormatterILi2ELb1EERtEC2ES2_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZNK8CNetAddr9SerParamsclIR8CServiceEEDaOT_:
 1282|  11.0M|    {                                                                                    \
 1283|  11.0M|        return ParamsWrapper{*this, t};                                                  \
 1284|  11.0M|    }
_ZN13ParamsWrapperIN8CNetAddr9SerParamsE8CServiceEC2ERKS1_RS2_:
 1249|  11.0M|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_Z6AsBaseI8CNetAddr8CServiceERKT_RKT0_:
  143|  11.0M|{
  144|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  145|  11.0M|    return x;
  146|  11.0M|}
_ZN7WrapperI19CustomUintFormatterILi2ELb1EERKtEC2ES3_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEC2ES1_RKS3_:
 1181|  13.4M|    ParamsStream(SubStream&& substream, const Params& params LIFETIMEBOUND) : m_params{params}, m_substream{std::forward<SubStream>(substream)} {}
_Z15ReadCompactSizeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEmRT_b:
  334|  35.4M|{
  335|  35.4M|    uint8_t chSize = ser_readdata8(is);
  336|  35.4M|    uint64_t nSizeRet = 0;
  337|  35.4M|    if (chSize < 253)
  ------------------
  |  Branch (337:9): [True: 35.4M, False: 0]
  ------------------
  338|  35.4M|    {
  339|  35.4M|        nSizeRet = chSize;
  340|  35.4M|    }
  341|      0|    else if (chSize == 253)
  ------------------
  |  Branch (341:14): [True: 0, False: 0]
  ------------------
  342|      0|    {
  343|      0|        nSizeRet = ser_readdata16(is);
  344|      0|        if (nSizeRet < 253)
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  ------------------
  345|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  346|      0|    }
  347|      0|    else if (chSize == 254)
  ------------------
  |  Branch (347:14): [True: 0, False: 0]
  ------------------
  348|      0|    {
  349|      0|        nSizeRet = ser_readdata32(is);
  350|      0|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (350:13): [True: 0, False: 0]
  ------------------
  351|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|      0|    }
  353|      0|    else
  354|      0|    {
  355|      0|        nSizeRet = ser_readdata64(is);
  356|      0|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|      0|    }
  359|  35.4M|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (359:9): [True: 24.4M, False: 11.0M]
  |  Branch (359:24): [True: 0, False: 24.4M]
  ------------------
  360|      0|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  361|      0|    }
  362|  35.4M|    return nSizeRet;
  363|  35.4M|}
_Z13ser_readdata8I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEhRT_:
   82|  59.8M|{
   83|  59.8M|    uint8_t obj;
   84|  59.8M|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   85|  59.8M|    return obj;
   86|  59.8M|}
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE4readENSt3__14spanISt4byteLm18446744073709551615EEE:
 1190|   137M|    void read(std::span<std::byte> dst) { GetStream().read(dst); }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE9GetStreamEv:
 1208|   322M|    {
 1209|       |        if constexpr (ContainsStream<SubStream>) {
 1210|       |            return m_substream.GetStream();
 1211|   322M|        } else {
 1212|   322M|            return m_substream;
 1213|   322M|        }
 1214|   322M|    }
_Z14ser_readdata32I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEjRT_:
   94|  42.2M|{
   95|  42.2M|    uint32_t obj;
   96|  42.2M|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   97|  42.2M|    return le32toh_internal(obj);
   98|  42.2M|}
_Z14ser_readdata64I12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEmRT_:
  106|  11.0M|{
  107|  11.0M|    uint64_t obj;
  108|  11.0M|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
  109|  11.0M|    return le64toh_internal(obj);
  110|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEERS3_Q14UnserializableIT0_T_EEvRS8_OS7_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN8CAddress11UnserializeI12ParamsStreamIR10DataStreamNS_9SerParamsEEEEvRT_:
  220|  11.0M|    {                                                                                               \
  221|  11.0M|        static_assert(std::is_same_v<cls&, decltype(*this)>, "Unserialize type mismatch");          \
  222|  11.0M|        Unser(s, *this);                                                                            \
  223|  11.0M|    }
_ZN8CAddress5UnserI12ParamsStreamIR10DataStreamNS_9SerParamsEEEEvRT_RS_:
  172|  11.0M|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZNK12ParamsStreamIR10DataStreamN8CAddress9SerParamsEE9GetParamsIS3_EERKDav:
 1198|  22.0M|    {
 1199|  22.0M|        if constexpr (std::is_convertible_v<Params, P>) {
 1200|  22.0M|            return m_params;
 1201|       |        } else {
 1202|       |            return m_substream.template GetParams<P>();
 1203|       |        }
 1204|  22.0M|    }
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJRjEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJRjEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEvRT_Rj:
  270|  22.0M|template <typename Stream> void Unserialize(Stream& s, uint32_t& a)  { a = ser_readdata32(s); }
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNSB_8durationIxNSA_5ratioILl1ELl1EEEEEEEEEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJR7WrapperI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER7WrapperI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNSA_8durationIxNS9_5ratioILl1ELl1EEEEEEEEQ14UnserializableIT0_T_EEvRSM_OSL_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN7WrapperI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  477|  11.0M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15ChronoFormatterIjLb1EE5UnserI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEENSt3__16chrono10time_pointI9NodeClockNS9_8durationIxNS8_5ratioILl1ELl1EEEEEEEEEvRT_RT0_:
  586|  11.0M|    {
  587|  11.0M|        U u;
  588|  11.0M|        s >> u;
  589|       |        // Lossy deserialization does not make sense, so force Wnarrowing
  590|  11.0M|        tp = Tp{typename Tp::duration{typename Tp::duration::rep{u}}};
  591|  11.0M|    }
_ZN12ParamsStreamIR10DataStreamN8CAddress9SerParamsEErsIRjEERS4_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_ZN7WrapperI15ChronoFormatterIjLb1EERNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEEC2ESB_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN17ActionUnserialize8SerWriteI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEERS4_ZNS4_16SerializationOpsIS6_S4_S_EEvRT0_RT_T1_EUlRS6_RKS4_E_EEvSC_OS9_OSD_:
 1098|  11.0M|    {
 1099|  11.0M|    }
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ7WrapperI20CompactSizeFormatterILb0EERmEEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJR7WrapperI20CompactSizeFormatterILb0EERmEEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER7WrapperI20CompactSizeFormatterILb0EERmEQ14UnserializableIT0_T_EEvRSD_OSC_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN7WrapperI20CompactSizeFormatterILb0EERmE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  477|  11.0M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN20CompactSizeFormatterILb0EE5UnserI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEmEEvRT_RT0_:
  564|  11.0M|    {
  565|  11.0M|        uint64_t n = ReadCompactSize<Stream>(s, RangeCheck);
  566|  11.0M|        if (n < std::numeric_limits<I>::min() || n > std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (566:13): [True: 0, False: 11.0M]
  |  Branch (566:50): [True: 0, False: 11.0M]
  ------------------
  567|      0|            throw std::ios_base::failure("CompactSize exceeds limit of type");
  568|      0|        }
  569|  11.0M|        v = n;
  570|  11.0M|    }
_ZN7WrapperI20CompactSizeFormatterILb0EERmEC2ES2_:
  475|  22.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN17ActionUnserialize7SerReadI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEERS4_ZNS4_16SerializationOpsIS6_S4_S_EEvRT0_RT_T1_EUlRS6_S7_E_EEvSC_OS9_OSD_:
 1092|  11.0M|    {
 1093|  11.0M|        fn(s, std::forward<Type>(obj));
 1094|  11.0M|    }
_ZZN8CAddress16SerializationOpsI12ParamsStreamIR10DataStreamNS_9SerParamsEES_17ActionUnserializeEEvRT0_RT_T1_ENKUlRS5_RS_E_clESC_SD_:
  149|  11.0M|#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, std::remove_const_t<Type>& obj) { code; })
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJ13ParamsWrapperIN8CNetAddr9SerParamsE8CServiceEEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEJR13ParamsWrapperIN8CNetAddr9SerParamsE8CServiceEEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEER13ParamsWrapperIN8CNetAddr9SerParamsE8CServiceEQ14UnserializableIT0_T_EEvRSD_OSC_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN13ParamsWrapperIN8CNetAddr9SerParamsE8CServiceE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
 1259|  11.0M|    {
 1260|  11.0M|        ParamsStream ss{s, m_params};
 1261|  11.0M|        ::Unserialize(ss, m_object);
 1262|  11.0M|    }
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEC2ES5_RKS7_:
 1181|  22.0M|    ParamsStream(SubStream&& substream, const Params& params LIFETIMEBOUND) : m_params{params}, m_substream{std::forward<SubStream>(substream)} {}
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEER8CServiceQ14UnserializableIT0_T_EEvRSD_OSC_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN8CService11UnserializeI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_:
  220|  11.0M|    {                                                                                               \
  221|  11.0M|        static_assert(std::is_same_v<cls&, decltype(*this)>, "Unserialize type mismatch");          \
  222|  11.0M|        Unser(s, *this);                                                                            \
  223|  11.0M|    }
_ZN8CService5UnserI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_RS_:
  172|  11.0M|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIRS1_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEJRS8_7WrapperI19CustomUintFormatterILi2ELb1EERtEEEEvRT_DpOT0_:
 1086|  11.0M|    {
 1087|  11.0M|        ::UnserializeMany(s, args...);
 1088|  11.0M|    }
_Z15UnserializeManyI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEJRS7_R7WrapperI19CustomUintFormatterILi2ELb1EERtEEEvRT_DpOT0_:
 1054|  11.0M|{
 1055|  11.0M|    (::Unserialize(s, args), ...);
 1056|  11.0M|}
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEERS7_Q14UnserializableIT0_T_EEvRSC_OSB_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZNK12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE9GetParamsIS7_EERKDav:
 1198|  22.0M|    {
 1199|  22.0M|        if constexpr (std::is_convertible_v<Params, P>) {
 1200|  22.0M|            return m_params;
 1201|       |        } else {
 1202|       |            return m_substream.template GetParams<P>();
 1203|       |        }
 1204|  22.0M|    }
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEErsIRhEERS8_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEvRT_Rh:
  266|  11.0M|template <typename Stream> void Unserialize(Stream& s, uint8_t& a)   { a = ser_readdata8(s); }
_Z13ser_readdata8I12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEhRT_:
   82|  22.0M|{
   83|  22.0M|    uint8_t obj;
   84|  22.0M|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   85|  22.0M|    return obj;
   86|  22.0M|}
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE4readENSt3__14spanISt4byteLm18446744073709551615EEE:
 1190|  44.0M|    void read(std::span<std::byte> dst) { GetStream().read(dst); }
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEE9GetStreamEv:
 1208|  88.0M|    {
 1209|  88.0M|        if constexpr (ContainsStream<SubStream>) {
 1210|  88.0M|            return m_substream.GetStream();
 1211|       |        } else {
 1212|       |            return m_substream;
 1213|       |        }
 1214|  88.0M|    }
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEErsI7WrapperI20CompactSizeFormatterILb1EERmEEERS8_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEER7WrapperI20CompactSizeFormatterILb1EERmEQ14UnserializableIT0_T_EEvRSH_OSG_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN7WrapperI20CompactSizeFormatterILb1EERmE11UnserializeI12ParamsStreamIRS5_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_:
  477|  11.0M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN20CompactSizeFormatterILb1EE5UnserI12ParamsStreamIRS2_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEmEEvRT_RT0_:
  564|  11.0M|    {
  565|  11.0M|        uint64_t n = ReadCompactSize<Stream>(s, RangeCheck);
  566|  11.0M|        if (n < std::numeric_limits<I>::min() || n > std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (566:13): [True: 0, False: 11.0M]
  |  Branch (566:50): [True: 0, False: 11.0M]
  ------------------
  567|      0|            throw std::ios_base::failure("CompactSize exceeds limit of type");
  568|      0|        }
  569|  11.0M|        v = n;
  570|  11.0M|    }
_Z15ReadCompactSizeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEmRT_b:
  334|  11.0M|{
  335|  11.0M|    uint8_t chSize = ser_readdata8(is);
  336|  11.0M|    uint64_t nSizeRet = 0;
  337|  11.0M|    if (chSize < 253)
  ------------------
  |  Branch (337:9): [True: 11.0M, False: 0]
  ------------------
  338|  11.0M|    {
  339|  11.0M|        nSizeRet = chSize;
  340|  11.0M|    }
  341|      0|    else if (chSize == 253)
  ------------------
  |  Branch (341:14): [True: 0, False: 0]
  ------------------
  342|      0|    {
  343|      0|        nSizeRet = ser_readdata16(is);
  344|      0|        if (nSizeRet < 253)
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  ------------------
  345|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  346|      0|    }
  347|      0|    else if (chSize == 254)
  ------------------
  |  Branch (347:14): [True: 0, False: 0]
  ------------------
  348|      0|    {
  349|      0|        nSizeRet = ser_readdata32(is);
  350|      0|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (350:13): [True: 0, False: 0]
  ------------------
  351|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|      0|    }
  353|      0|    else
  354|      0|    {
  355|      0|        nSizeRet = ser_readdata64(is);
  356|      0|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|      0|    }
  359|  11.0M|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (359:9): [True: 11.0M, False: 0]
  |  Branch (359:24): [True: 0, False: 11.0M]
  ------------------
  360|      0|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  361|      0|    }
  362|  11.0M|    return nSizeRet;
  363|  11.0M|}
_ZN12ParamsStreamIRS_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEErsINSt3__14spanIhLm18446744073709551615EEEEERS8_OT_:
 1188|  11.0M|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEETk9BasicBytehEvRT_NSt3__14spanIT0_Lm18446744073709551615EEE:
  277|  11.0M|template <typename Stream, BasicByte B>           void Unserialize(Stream& s, std::span<B> span)    { s.read(std::as_writable_bytes(span)); }
_Z11UnserializeI12ParamsStreamIRS0_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEER7WrapperI19CustomUintFormatterILi2ELb1EERtEQ14UnserializableIT0_T_EEvRSH_OSG_:
  776|  11.0M|{
  777|  11.0M|    a.Unserialize(is);
  778|  11.0M|}
_ZN7WrapperI19CustomUintFormatterILi2ELb1EERtE11UnserializeI12ParamsStreamIRS5_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEEEvRT_:
  477|  11.0M|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN19CustomUintFormatterILi2ELb1EE5UnserI12ParamsStreamIRS2_IR10DataStreamN8CAddress9SerParamsEEN8CNetAddr9SerParamsEEtEEvRT_RT0_:
  542|  11.0M|    {
  543|  11.0M|        using U = typename std::conditional_t<std::is_enum_v<I>, std::underlying_type<I>, std::common_type<I>>::type;
  544|  11.0M|        static_assert(std::numeric_limits<U>::max() >= MAX && std::numeric_limits<U>::min() <= 0, "Assigned type too small");
  545|  11.0M|        uint64_t raw = 0;
  546|  11.0M|        if (BigEndian) {
  ------------------
  |  Branch (546:13): [True: 11.0M, Folded]
  ------------------
  547|  11.0M|            s.read(std::as_writable_bytes(std::span{&raw, 1}).last(Bytes));
  548|  11.0M|            v = static_cast<I>(be64toh_internal(raw));
  549|  11.0M|        } else {
  550|      0|            s.read(std::as_writable_bytes(std::span{&raw, 1}).first(Bytes));
  551|      0|            v = static_cast<I>(le64toh_internal(raw));
  552|      0|        }
  553|  11.0M|    }
_Z6AsBaseI8CService8CAddressERT_RT0_:
  137|  11.0M|{
  138|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  139|  11.0M|    return x;
  140|  11.0M|}
_ZN7WrapperI15ChronoFormatterIjLb1EERKNSt3__16chrono10time_pointI9NodeClockNS3_8durationIxNS2_5ratioILl1ELl1EEEEEEEEC2ESC_:
  475|  11.0M|    explicit Wrapper(T obj) : m_object(obj) {}
_ZNK8CNetAddr9SerParamsclIRK8CServiceEEDaOT_:
 1282|  11.0M|    {                                                                                    \
 1283|  11.0M|        return ParamsWrapper{*this, t};                                                  \
 1284|  11.0M|    }
_ZN13ParamsWrapperIN8CNetAddr9SerParamsEK8CServiceEC2ERKS1_RS3_:
 1249|  11.0M|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_Z6AsBaseI8CService8CAddressERKT_RKT0_:
  143|  11.0M|{
  144|  11.0M|    static_assert(std::is_base_of_v<Out, In>);
  145|  11.0M|    return x;
  146|  11.0M|}
_Z9SerializeI10HashWriterEvRT_m:
  256|  36.8M|template <typename Stream> void Serialize(Stream& s, uint64_t a)  { ser_writedata64(s, a); }
_Z9SerializeI10DataStreamhNSt3__19allocatorIhEEEvRT_RKNS1_6vectorIT0_T1_EE:
  899|  13.4M|{
  900|  13.4M|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  901|  13.4M|        WriteCompactSize(os, v.size());
  902|  13.4M|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (902:13): [True: 13.4M, False: 0]
  ------------------
  903|       |    } else if constexpr (std::is_same_v<T, bool>) {
  904|       |        // A special case for std::vector<bool>, as dereferencing
  905|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  906|       |        // due to std::vector's special casing for bool arguments.
  907|       |        WriteCompactSize(os, v.size());
  908|       |        for (bool elem : v) {
  909|       |            ::Serialize(os, elem);
  910|       |        }
  911|       |    } else {
  912|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  913|       |    }
  914|  13.4M|}
_Z9SerializeI10DataStreamEvRT_h:
  250|  13.4M|template <typename Stream> void Serialize(Stream& s, uint8_t a)   { ser_writedata8(s, a); }
_Z14ser_writedata8I10DataStreamEvRT_h:
   58|  26.8M|{
   59|  26.8M|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|  26.8M|}
_Z16WriteCompactSizeI10DataStreamEvRT_m:
  303|  13.4M|{
  304|  13.4M|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 13.4M, False: 0]
  ------------------
  305|  13.4M|    {
  306|  13.4M|        ser_writedata8(os, nSize);
  307|  13.4M|    }
  308|      0|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|    {
  310|      0|        ser_writedata8(os, 253);
  311|      0|        ser_writedata16(os, nSize);
  312|      0|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|  13.4M|    return;
  324|  13.4M|}
_Z15ser_writedata64I10HashWriterEvRT_m:
   77|  36.8M|{
   78|  36.8M|    obj = htole64_internal(obj);
   79|  36.8M|    s.write(std::as_bytes(std::span{&obj, 1}));
   80|  36.8M|}
_Z16WriteCompactSizeI10HashWriterEvRT_m:
  303|   142M|{
  304|   142M|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 142M, False: 0]
  ------------------
  305|   142M|    {
  306|   142M|        ser_writedata8(os, nSize);
  307|   142M|    }
  308|      0|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|    {
  310|      0|        ser_writedata8(os, 253);
  311|      0|        ser_writedata16(os, nSize);
  312|      0|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|   142M|    return;
  324|   142M|}
_Z14ser_writedata8I10HashWriterEvRT_h:
   58|   194M|{
   59|   194M|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|   194M|}
_Z15ser_writedata32I10HashWriterEvRT_j:
   67|  51.2M|{
   68|  51.2M|    obj = htole32_internal(obj);
   69|  51.2M|    s.write(std::as_bytes(std::span{&obj, 1}));
   70|  51.2M|}
_Z9SerializeI10HashWriterhNSt3__19allocatorIhEEEvRT_RKNS1_6vectorIT0_T1_EE:
  899|   142M|{
  900|   142M|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  901|   142M|        WriteCompactSize(os, v.size());
  902|   142M|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (902:13): [True: 142M, False: 0]
  ------------------
  903|       |    } else if constexpr (std::is_same_v<T, bool>) {
  904|       |        // A special case for std::vector<bool>, as dereferencing
  905|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  906|       |        // due to std::vector's special casing for bool arguments.
  907|       |        WriteCompactSize(os, v.size());
  908|       |        for (bool elem : v) {
  909|       |            ::Serialize(os, elem);
  910|       |        }
  911|       |    } else {
  912|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  913|       |    }
  914|   142M|}
_Z9SerializeI10HashWriterTk9BasicByteKhLm32EEvRT_NSt3__14spanIT0_XT1_EEE:
  260|   124M|template <typename Stream, BasicByte B, size_t N> void Serialize(Stream& s, std::span<B, N> span)      { s.write(std::as_bytes(span)); }
_Z9SerializeI10HashWriterEvRT_i:
  253|  51.2M|template <typename Stream> void Serialize(Stream& s, int32_t a)   { ser_writedata32(s, uint32_t(a)); }
_Z9SerializeI10HashWriter7uint256Q12SerializableIT0_T_EEvRS3_RKS2_:
  767|   124M|{
  768|   124M|    a.Serialize(os);
  769|   124M|}
_Z9SerializeI10HashWriterEvRT_h:
  250|  51.2M|template <typename Stream> void Serialize(Stream& s, uint8_t a)   { ser_writedata8(s, a); }

_Z20MakeWritableByteSpanIRNSt3__16vectorIhNS0_9allocatorIhEEEEEDaOT_:
   90|  15.5M|{
   91|  15.5M|    return std::as_writable_bytes(std::span{std::forward<V>(v)});
   92|  15.5M|}
_Z12MakeByteSpanI9prevectorILj16EhjiEEDaRKT_:
   85|  22.0M|{
   86|  22.0M|    return std::as_bytes(std::span{v});
   87|  22.0M|}
_Z20MakeWritableByteSpanIRNSt3__15arrayIhLm32EEEEDaOT_:
   90|  4.46k|{
   91|  4.46k|    return std::as_writable_bytes(std::span{std::forward<V>(v)});
   92|  4.46k|}
_Z12MakeByteSpanINSt3__16vectorIhNS0_9allocatorIhEEEEEDaRKT_:
   85|   156M|{
   86|   156M|    return std::as_bytes(std::span{v});
   87|   156M|}
_Z12MakeByteSpanI7uint256EDaRKT_:
   85|  17.8k|{
   86|  17.8k|    return std::as_bytes(std::span{v});
   87|  17.8k|}
_Z9UCharCastPKSt4byte:
  102|   550M|inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }

_ZN10DataStreamlsI20AddrManDeterministicEERS_RKT_:
  252|  2.23k|    {
  253|  2.23k|        ::Serialize(*this, obj);
  254|  2.23k|        return (*this);
  255|  2.23k|    }
_ZN10DataStreamrsIR20AddrManDeterministicEERS_OT_:
  259|  2.23k|    {
  260|  2.23k|        ::Unserialize(*this, obj);
  261|  2.23k|        return (*this);
  262|  2.23k|    }
_ZN10DataStreamrsI13ParamsWrapperIN8CAddress9SerParamsE8CNetAddrEEERS_OT_:
  259|  13.4M|    {
  260|  13.4M|        ::Unserialize(*this, obj);
  261|  13.4M|        return (*this);
  262|  13.4M|    }
_ZN10DataStreamrsI7WrapperI19CustomUintFormatterILi1ELb0EERN11AddrManImpl6FormatEEEERS_OT_:
  259|  2.23k|    {
  260|  2.23k|        ::Unserialize(*this, obj);
  261|  2.23k|        return (*this);
  262|  2.23k|    }
_ZN10DataStreamlsINSt3__16vectorIhNS1_9allocatorIhEEEEEERS_RKT_:
  252|  13.4M|    {
  253|  13.4M|        ::Serialize(*this, obj);
  254|  13.4M|        return (*this);
  255|  13.4M|    }
_ZN10DataStream5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  245|   181M|    {
  246|       |        // Write to the end of the buffer
  247|   181M|        vch.insert(vch.end(), src.begin(), src.end());
  248|   181M|    }
_ZN10DataStream5clearEv:
  204|  13.4M|    void clear()                                     { vch.clear(); m_read_pos = 0; }
_ZN10DataStreamC2Ev:
  182|  13.4M|    explicit DataStream() = default;
_ZN10DataStreamlsIhEERS_RKT_:
  252|  13.4M|    {
  253|  13.4M|        ::Serialize(*this, obj);
  254|  13.4M|        return (*this);
  255|  13.4M|    }
_ZN10DataStream4readENSt3__14spanISt4byteLm18446744073709551615EEE:
  212|   181M|    {
  213|   181M|        if (dst.size() == 0) return;
  ------------------
  |  Branch (213:13): [True: 0, False: 181M]
  ------------------
  214|       |
  215|       |        // Read from the beginning of the buffer
  216|   181M|        auto next_read_pos{CheckedAdd(m_read_pos, dst.size())};
  217|   181M|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (217:13): [True: 0, False: 181M]
  |  Branch (217:43): [True: 0, False: 181M]
  ------------------
  218|      0|            throw std::ios_base::failure("DataStream::read(): end of data");
  219|      0|        }
  220|   181M|        memcpy(dst.data(), &vch[m_read_pos], dst.size());
  221|   181M|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (221:13): [True: 13.4M, False: 168M]
  ------------------
  222|       |            // If fully consumed, reset to empty state.
  223|  13.4M|            clear();
  224|  13.4M|            return;
  225|  13.4M|        }
  226|   168M|        m_read_pos = next_read_pos.value();
  227|   168M|    }

random.cpp:_ZN16secure_allocatorIN12_GLOBAL__N_18RNGStateEE10deallocateEPS1_m:
   37|      2|    {
   38|      2|        if (p != nullptr) {
  ------------------
  |  Branch (38:13): [True: 2, False: 0]
  ------------------
   39|      2|            memory_cleanse(p, sizeof(T) * n);
   40|      2|        }
   41|      2|        LockedPoolManager::Instance().free(p);
   42|      2|    }

_ZN25zero_after_free_allocatorISt4byteE8allocateEm:
   25|  40.3M|    {
   26|  40.3M|        return std::allocator<T>{}.allocate(n);
   27|  40.3M|    }
_ZN25zero_after_free_allocatorISt4byteE10deallocateEPS0_m:
   30|  40.3M|    {
   31|  40.3M|        if (p != nullptr)
  ------------------
  |  Branch (31:13): [True: 40.3M, False: 0]
  ------------------
   32|  40.3M|            memory_cleanse(p, sizeof(T) * n);
   33|  40.3M|        std::allocator<T>{}.deallocate(p, n);
   34|  40.3M|    }

_Z14memory_cleansePvm:
   15|  40.3M|{
   16|       |#if defined(WIN32)
   17|       |    /* SecureZeroMemory is guaranteed not to be optimized out. */
   18|       |    SecureZeroMemory(ptr, len);
   19|       |#else
   20|  40.3M|    std::memset(ptr, 0, len);
   21|       |
   22|       |    /* Memory barrier that scares the compiler away from optimizing out the memset.
   23|       |     *
   24|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
   25|       |     * in BoringSSL (ISC License):
   26|       |     *    As best as we can tell, this is sufficient to break any optimisations that
   27|       |     *    might try to eliminate "superfluous" memsets.
   28|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
   29|       |     * is pretty efficient because the compiler can still implement the memset() efficiently,
   30|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
   31|       |     * Yang et al. (USENIX Security 2017) for more background.
   32|       |     */
   33|  40.3M|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
   34|  40.3M|#endif
   35|  40.3M|}

_ZN5ArenaD2Ev:
   48|      2|Arena::~Arena() = default;
_ZN5Arena4freeEPv:
   87|      2|{
   88|       |    // Freeing the nullptr pointer is OK.
   89|      2|    if (ptr == nullptr) {
  ------------------
  |  Branch (89:9): [True: 0, False: 2]
  ------------------
   90|      0|        return;
   91|      0|    }
   92|       |
   93|       |    // Remove chunk from used map
   94|      2|    auto i = chunks_used.find(ptr);
   95|      2|    if (i == chunks_used.end()) {
  ------------------
  |  Branch (95:9): [True: 0, False: 2]
  ------------------
   96|      0|        throw std::runtime_error("Arena: invalid or double free");
   97|      0|    }
   98|      2|    auto freed = std::make_pair(static_cast<char*>(i->first), i->second);
   99|      2|    chunks_used.erase(i);
  100|       |
  101|       |    // coalesce freed with previous chunk
  102|      2|    auto prev = chunks_free_end.find(freed.first);
  103|      2|    if (prev != chunks_free_end.end()) {
  ------------------
  |  Branch (103:9): [True: 2, False: 0]
  ------------------
  104|      2|        freed.first -= prev->second->first;
  105|      2|        freed.second += prev->second->first;
  106|      2|        size_to_free_chunk.erase(prev->second);
  107|      2|        chunks_free_end.erase(prev);
  108|      2|    }
  109|       |
  110|       |    // coalesce freed with chunk after freed
  111|      2|    auto next = chunks_free.find(freed.first + freed.second);
  112|      2|    if (next != chunks_free.end()) {
  ------------------
  |  Branch (112:9): [True: 0, False: 2]
  ------------------
  113|      0|        freed.second += next->second->first;
  114|      0|        size_to_free_chunk.erase(next->second);
  115|      0|        chunks_free.erase(next);
  116|      0|    }
  117|       |
  118|       |    // Add/set space with coalesced free chunk
  119|      2|    auto it = size_to_free_chunk.emplace(freed.second, freed.first);
  120|      2|    chunks_free[freed.first] = it;
  121|      2|    chunks_free_end[freed.first + freed.second] = it;
  122|      2|}
_ZN24PosixLockedPageAllocator10FreeLockedEPvm:
  254|      2|{
  255|      2|    len = align_up(len, page_size);
  256|      2|    memory_cleanse(addr, len);
  257|      2|    munlock(addr, len);
  258|      2|    munmap(addr, len);
  259|      2|}
_ZN10LockedPoolD2Ev:
  283|      2|LockedPool::~LockedPool() = default;
_ZN10LockedPool4freeEPv:
  308|      2|{
  309|      2|    std::lock_guard<std::mutex> lock(mutex);
  310|       |    // TODO we can do better than this linear search by keeping a map of arena
  311|       |    // extents to arena, and looking up the address.
  312|      2|    for (auto &arena: arenas) {
  ------------------
  |  Branch (312:21): [True: 2, False: 0]
  ------------------
  313|      2|        if (arena.addressInArena(ptr)) {
  ------------------
  |  Branch (313:13): [True: 2, False: 0]
  ------------------
  314|      2|            arena.free(ptr);
  315|      2|            return;
  316|      2|        }
  317|      2|    }
  318|      0|    throw std::runtime_error("LockedPool: invalid address not pointing to any arena");
  319|      2|}
_ZN10LockedPool15LockedPageArenaD2Ev:
  370|      2|{
  371|      2|    allocator->FreeLocked(base, size);
  372|      2|}
_ZN17LockedPoolManager8InstanceEv:
  405|      2|{
  406|      2|    static std::once_flag init_flag;
  407|      2|    std::call_once(init_flag, LockedPoolManager::CreateInstance);
  408|      2|    return *LockedPoolManager::_instance;
  409|      2|}
lockedpool.cpp:_ZL8align_upmm:
   32|      2|{
   33|      2|    return (x + align - 1) & ~(align - 1);
   34|      2|}

_ZNK5Arena14addressInArenaEPv:
   90|      2|    bool addressInArena(void *ptr) const { return ptr >= base && ptr < end; }
  ------------------
  |  Branch (90:51): [True: 2, False: 0]
  |  Branch (90:66): [True: 2, False: 0]
  ------------------
_ZN19LockedPageAllocatorD2Ev:
   22|      2|    virtual ~LockedPageAllocator() = default;

_ZZN20AddrManDeterministicC1ERK15NetGroupManagerR18FuzzedDataProvideriENKUlvE_clEv:
  299|  4.46k|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
  |  |  268|  4.46k|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  4.46k|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  4.46k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  4.46k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
_Z22AssertLockHeldInternalI14AnnotatedMixinINSt3__15mutexEEEvPKcS5_iPT_:
   71|   148M|inline void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs) {}
_ZN14AnnotatedMixinINSt3__115recursive_mutexEED2Ev:
   96|      2|    ~AnnotatedMixin() {
   97|      2|        DeleteLock((void*)this);
   98|      2|    }
_ZN14AnnotatedMixinINSt3__15mutexEED2Ev:
   96|  4.53k|    ~AnnotatedMixin() {
   97|  4.53k|        DeleteLock((void*)this);
   98|  4.53k|    }
_Z10DeleteLockPv:
   74|  4.53k|inline void DeleteLock(void* cs) {}
_Z17MaybeCheckNotHeldR14AnnotatedMixinINSt3__15mutexEE:
  258|  30.9M|inline Mutex& MaybeCheckNotHeld(Mutex& cs) EXCLUSIVE_LOCKS_REQUIRED(!cs) LOCK_RETURNED(cs) { return cs; }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEEC2ERS3_PKcS7_ib:
  181|  30.9M|    UniqueLock(MutexType& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)
  182|  30.9M|    {
  183|  30.9M|        if (fTry)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.9M]
  ------------------
  184|      0|            TryEnter(pszName, pszFile, nLine);
  185|  30.9M|        else
  186|  30.9M|            Enter(pszName, pszFile, nLine);
  187|  30.9M|    }
_Z13EnterCriticalINSt3__15mutexEEvPKcS3_iPT_b:
   67|  30.9M|inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, MutexType* cs, bool fTry = false) {}
_Z13LeaveCriticalv:
   68|  30.9M|inline void LeaveCritical() {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEE5EnterEPKcS6_i:
  159|  30.9M|    {
  160|  30.9M|        EnterCritical(pszName, pszFile, nLine, Base::mutex());
  161|       |#ifdef DEBUG_LOCKCONTENTION
  162|       |        if (!Base::try_lock()) {
  163|       |            ContendedLock(pszName, pszFile, nLine, static_cast<Base&>(*this));
  164|       |        }
  165|       |#else
  166|  30.9M|        Base::lock();
  167|  30.9M|#endif
  168|  30.9M|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEED2Ev:
  201|  30.9M|    {
  202|  30.9M|        if (Base::owns_lock())
  ------------------
  |  Branch (202:13): [True: 30.9M, False: 0]
  ------------------
  203|  30.9M|            LeaveCritical();
  204|  30.9M|    }

_ZN18FuzzedDataProvider15remaining_bytesEv:
   85|  16.0M|  size_t remaining_bytes() { return remaining_bytes_; }
_ZN18FuzzedDataProviderC2EPKhm:
   37|  2.23k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|   982k|inline bool FuzzedDataProvider::ConsumeBool() {
  290|   982k|  return 1 & ConsumeIntegral<uint8_t>();
  291|   982k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|   982k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|   982k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|   982k|                                std::numeric_limits<T>::max());
  198|   982k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|   982k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|   982k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|   982k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|   982k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 982k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|   982k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|   982k|  uint64_t result = 0;
  215|   982k|  size_t offset = 0;
  216|       |
  217|  1.96M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 982k, False: 982k]
  |  Branch (217:43): [True: 982k, False: 0]
  ------------------
  218|   982k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 982k, False: 0]
  ------------------
  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|   982k|    --remaining_bytes_;
  226|   982k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|   982k|    offset += CHAR_BIT;
  228|   982k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|   982k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 982k, False: 0]
  ------------------
  232|   982k|    result = result % (range + 1);
  233|       |
  234|   982k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|   982k|}
_ZN18FuzzedDataProvider20ConsumeBytesAsStringEm:
  137|  47.8k|inline std::string FuzzedDataProvider::ConsumeBytesAsString(size_t num_bytes) {
  138|  47.8k|  static_assert(sizeof(std::string::value_type) == sizeof(uint8_t),
  139|  47.8k|                "ConsumeBytesAsString cannot convert the data to a string.");
  140|       |
  141|  47.8k|  num_bytes = std::min(num_bytes, remaining_bytes_);
  142|  47.8k|  std::string result(
  143|  47.8k|      reinterpret_cast<const std::string::value_type *>(data_ptr_), num_bytes);
  144|  47.8k|  Advance(num_bytes);
  145|  47.8k|  return result;
  146|  47.8k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  2.23k|FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) {
  154|       |  // Reads bytes from the start of |data_ptr_|. Maps "\\" to "\", and maps "\"
  155|       |  // followed by anything else to the end of the string. As a result of this
  156|       |  // logic, a fuzzer can insert characters into the string, and the string
  157|       |  // will be lengthened to include those new characters, resulting in a more
  158|       |  // stable fuzzer than picking the length of a string independently from
  159|       |  // picking its contents.
  160|  2.23k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  2.23k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|  22.5M|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 22.5M, False: 456]
  |  Branch (164:40): [True: 22.5M, False: 24]
  ------------------
  165|  22.5M|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|  22.5M|    Advance(1);
  167|  22.5M|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 47.0k, False: 22.5M]
  |  Branch (167:25): [True: 47.0k, False: 7]
  ------------------
  168|  47.0k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  47.0k|      Advance(1);
  170|  47.0k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 1.75k, False: 45.3k]
  ------------------
  171|  1.75k|        break;
  172|  47.0k|    }
  173|  22.5M|    result += next;
  174|  22.5M|  }
  175|       |
  176|  2.23k|  result.shrink_to_fit();
  177|  2.23k|  return result;
  178|  2.23k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEv:
  181|  2.23k|inline std::string FuzzedDataProvider::ConsumeRandomLengthString() {
  182|  2.23k|  return ConsumeRandomLengthString(remaining_bytes_);
  183|  2.23k|}
_ZN18FuzzedDataProvider14CopyAndAdvanceEPvm:
  338|   493k|                                               size_t num_bytes) {
  339|   493k|  std::memcpy(destination, data_ptr_, num_bytes);
  340|   493k|  Advance(num_bytes);
  341|   493k|}
_ZN18FuzzedDataProvider7AdvanceEm:
  343|  23.1M|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  344|  23.1M|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (344:7): [True: 0, False: 23.1M]
  ------------------
  345|      0|    abort();
  346|       |
  347|  23.1M|  data_ptr_ += num_bytes;
  348|  23.1M|  remaining_bytes_ -= num_bytes;
  349|  23.1M|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  378|  22.6M|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  379|  22.6M|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  380|  22.6M|  static_assert(!std::numeric_limits<TU>::is_signed,
  381|  22.6M|                "Source type must be unsigned.");
  382|       |
  383|       |  if constexpr (std::numeric_limits<TS>::is_modulo)
  384|       |    return static_cast<TS>(value);
  385|       |
  386|       |  // Avoid using implementation-defined unsigned to signed conversions.
  387|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  388|  22.6M|  constexpr auto TS_max = static_cast<TU>(std::numeric_limits<TS>::max());
  389|  22.6M|  if (value <= TS_max) {
  ------------------
  |  Branch (389:7): [True: 22.0M, False: 551k]
  ------------------
  390|  22.0M|    return static_cast<TS>(value);
  391|  22.0M|  } else {
  392|   551k|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  393|   551k|    return TS_min + static_cast<TS>(value - TS_min);
  394|   551k|  }
  395|  22.6M|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeImEET_S1_S1_:
  205|   541k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|   541k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|   541k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|   541k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 541k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|   541k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|   541k|  uint64_t result = 0;
  215|   541k|  size_t offset = 0;
  216|       |
  217|  1.08M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 1.08M, False: 0]
  |  Branch (217:43): [True: 541k, False: 540k]
  ------------------
  218|   541k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 540k, False: 1.09k]
  ------------------
  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|   540k|    --remaining_bytes_;
  226|   540k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|   540k|    offset += CHAR_BIT;
  228|   540k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|   541k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 541k, False: 0]
  ------------------
  232|   541k|    result = result % (range + 1);
  233|       |
  234|   541k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|   541k|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEm:
  109|   495k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t num_bytes) {
  110|   495k|  num_bytes = std::min(num_bytes, remaining_bytes_);
  111|   495k|  return ConsumeBytes<T>(num_bytes, num_bytes);
  112|   495k|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEmm:
  352|   495k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t size, size_t num_bytes) {
  353|   495k|  static_assert(sizeof(T) == sizeof(uint8_t), "Incompatible data type.");
  354|       |
  355|       |  // The point of using the size-based constructor below is to increase the
  356|       |  // odds of having a vector object with capacity being equal to the length.
  357|       |  // That part is always implementation specific, but at least both libc++ and
  358|       |  // libstdc++ allocate the requested number of bytes in that constructor,
  359|       |  // which seems to be a natural choice for other implementations as well.
  360|       |  // To increase the odds even more, we also call |shrink_to_fit| below.
  361|   495k|  std::vector<T> result(size);
  362|   495k|  if (size == 0) {
  ------------------
  |  Branch (362:7): [True: 2.03k, False: 493k]
  ------------------
  363|  2.03k|    if (num_bytes != 0)
  ------------------
  |  Branch (363:9): [True: 0, False: 2.03k]
  ------------------
  364|      0|      abort();
  365|  2.03k|    return result;
  366|  2.03k|  }
  367|       |
  368|   493k|  CopyAndAdvance(result.data(), num_bytes);
  369|       |
  370|       |  // Even though |shrink_to_fit| is also implementation specific, we expect it
  371|       |  // to provide an additional assurance in case vector's constructor allocated
  372|       |  // a buffer which is larger than the actual amount of data we put inside it.
  373|   493k|  result.shrink_to_fit();
  374|   493k|  return result;
  375|   495k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIxEET_S1_S1_:
  205|  2.23k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.23k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|  2.23k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.23k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.23k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.23k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.23k|  uint64_t result = 0;
  215|  2.23k|  size_t offset = 0;
  216|       |
  217|  11.0k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 11.0k, False: 0]
  |  Branch (217:43): [True: 8.86k, False: 2.18k]
  ------------------
  218|  8.86k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 8.81k, False: 48]
  ------------------
  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.81k|    --remaining_bytes_;
  226|  8.81k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  8.81k|    offset += CHAR_BIT;
  228|  8.81k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.23k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.23k, False: 0]
  ------------------
  232|  2.23k|    result = result % (range + 1);
  233|       |
  234|  2.23k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.23k|}

_Z8RandAddrR18FuzzedDataProviderR17FastRandomContext:
   60|  13.4M|{
   61|  13.4M|    CNetAddr addr;
   62|  13.4M|    assert(!addr.IsValid());
  ------------------
  |  Branch (62:5): [True: 13.4M, False: 0]
  ------------------
   63|  29.4M|    for (size_t i = 0; i < 8 && !addr.IsValid(); ++i) {
  ------------------
  |  Branch (63:24): [True: 29.4M, False: 6.36k]
  |  Branch (63:33): [True: 16.0M, False: 13.3M]
  ------------------
   64|  16.0M|        if (fuzzed_data_provider.remaining_bytes() > 1 && fuzzed_data_provider.ConsumeBool()) {
  ------------------
  |  Branch (64:13): [True: 982k, False: 15.0M]
  |  Branch (64:59): [True: 536k, False: 445k]
  ------------------
   65|   536k|            addr = ConsumeNetAddr(fuzzed_data_provider);
   66|  15.5M|        } else {
   67|  15.5M|            addr = ConsumeNetAddr(fuzzed_data_provider, &fast_random_context);
   68|  15.5M|        }
   69|  16.0M|    }
   70|       |
   71|       |    // Return a dummy IPv4 5.5.5.5 if we generated an invalid address.
   72|  13.4M|    if (!addr.IsValid()) {
  ------------------
  |  Branch (72:9): [True: 6.14k, False: 13.3M]
  ------------------
   73|  6.14k|        in_addr v4_addr = {};
   74|  6.14k|        v4_addr.s_addr = 0x05050505;
   75|  6.14k|        addr = CNetAddr{v4_addr};
   76|  6.14k|    }
   77|       |
   78|  13.4M|    return addr;
   79|  13.4M|}
_Z11FillAddrmanR7AddrManR18FuzzedDataProvider:
   83|  2.23k|{
   84|       |    // Add a fraction of the addresses to the "tried" table.
   85|       |    // 0, 1, 2, 3 corresponding to 0%, 100%, 50%, 33%
   86|  2.23k|    const size_t n = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 3);
   87|       |
   88|  2.23k|    const size_t num_sources = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(1, 50);
   89|  2.23k|    CNetAddr prev_source;
   90|       |    // Generate a FastRandomContext seed to use inside the loops instead of
   91|       |    // fuzzed_data_provider. When fuzzed_data_provider is exhausted it
   92|       |    // just returns 0.
   93|  2.23k|    FastRandomContext fast_random_context{ConsumeUInt256(fuzzed_data_provider)};
   94|  55.9k|    for (size_t i = 0; i < num_sources; ++i) {
  ------------------
  |  Branch (94:24): [True: 53.7k, False: 2.23k]
  ------------------
   95|  53.7k|        const auto source = RandAddr(fuzzed_data_provider, fast_random_context);
   96|  53.7k|        const size_t num_addresses = fast_random_context.randrange(500) + 1; // [1..500]
   97|       |
   98|  13.4M|        for (size_t j = 0; j < num_addresses; ++j) {
  ------------------
  |  Branch (98:28): [True: 13.3M, False: 53.7k]
  ------------------
   99|  13.3M|            const auto addr = CAddress{CService{RandAddr(fuzzed_data_provider, fast_random_context), 8333}, NODE_NETWORK};
  100|  13.3M|            const std::chrono::seconds time_penalty{fast_random_context.randrange(100000001)};
  101|  13.3M|            addrman.Add({addr}, source, time_penalty);
  102|       |
  103|  13.3M|            if (n > 0 && addrman.Size() % n == 0) {
  ------------------
  |  Branch (103:17): [True: 9.98M, False: 3.35M]
  |  Branch (103:26): [True: 6.31M, False: 3.66M]
  ------------------
  104|  6.31M|                addrman.Good(addr, Now<NodeSeconds>());
  105|  6.31M|            }
  106|       |
  107|       |            // Add 10% of the addresses from more than one source.
  108|  13.3M|            if (fast_random_context.randrange(10) == 0 && prev_source.IsValid()) {
  ------------------
  |  Branch (108:17): [True: 1.34M, False: 12.0M]
  |  Branch (108:59): [True: 1.30M, False: 36.2k]
  ------------------
  109|  1.30M|                addrman.Add({addr}, prev_source, time_penalty);
  110|  1.30M|            }
  111|  13.3M|        }
  112|  53.7k|        prev_source = source;
  113|  53.7k|    }
  114|  2.23k|}
_Z28addrman_serdeser_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
  202|  2.23k|{
  203|  2.23k|    SeedRandomStateForTest(SeedRand::ZEROS);
  204|  2.23k|    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
  205|  2.23k|    FakeNodeClock clock{ConsumeTime(fuzzed_data_provider)};
  206|       |
  207|  2.23k|    NetGroupManager netgroupman{ConsumeNetGroupManager(fuzzed_data_provider)};
  208|  2.23k|    AddrManDeterministic addr_man1{netgroupman, fuzzed_data_provider, GetCheckRatio()};
  209|  2.23k|    AddrManDeterministic addr_man2{netgroupman, fuzzed_data_provider, GetCheckRatio()};
  210|       |
  211|  2.23k|    DataStream data_stream{};
  212|       |
  213|  2.23k|    FillAddrman(addr_man1, fuzzed_data_provider);
  214|  2.23k|    data_stream << addr_man1;
  215|  2.23k|    data_stream >> addr_man2;
  216|       |    assert(addr_man1 == addr_man2);
  ------------------
  |  Branch (216:5): [True: 2.23k, False: 0]
  ------------------
  217|  2.23k|}
addrman.cpp:_ZN12_GLOBAL__N_113GetCheckRatioEv:
   32|  4.46k|{
   33|  4.46k|    return std::clamp<int32_t>(g_setup->m_node.args->GetIntArg("-checkaddrman", 0), 0, 1000000);
   34|  4.46k|}

LLVMFuzzerTestOneInput:
  213|  2.23k|{
  214|  2.23k|    test_one_input({data, size});
  215|  2.23k|    return 0;
  216|  2.23k|}
fuzz.cpp:_ZL14test_one_inputNSt3__14spanIKhLm18446744073709551615EEE:
   84|  2.23k|{
   85|  2.23k|    CheckGlobals check{};
   86|  2.23k|    (*Assert(g_test_one_input))(buffer);
  ------------------
  |  |  116|  2.23k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
   87|  2.23k|}

_Z11ConsumeTimeR18FuzzedDataProviderRKNSt3__18optionalIlEES5_:
   35|  2.23k|{
   36|       |    // Avoid t=0 (1970-01-01T00:00:00Z) since SetMockTime(0) disables mocktime.
   37|  2.23k|    static const int64_t time_min{ParseISO8601DateTime("2000-01-01T00:00:01Z").value()};
   38|  2.23k|    static const int64_t time_max{ParseISO8601DateTime("2100-12-31T23:59:59Z").value()};
   39|  2.23k|    return NodeSeconds{ConsumeDuration<std::chrono::seconds>(fuzzed_data_provider, min.value_or(time_min) * 1s, max.value_or(time_max) * 1s)};
   40|  2.23k|}

_Z29ConsumeRandomLengthByteVectorISt4byteENSt3__16vectorIT_NS1_9allocatorIS3_EEEER18FuzzedDataProviderRKNS1_8optionalImEE:
   64|  2.23k|{
   65|  2.23k|    static_assert(sizeof(B) == 1);
   66|  2.23k|    const std::string s = max_length ?
  ------------------
  |  Branch (66:27): [True: 0, False: 2.23k]
  ------------------
   67|      0|                              fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
   68|  2.23k|                              fuzzed_data_provider.ConsumeRandomLengthString();
   69|  2.23k|    std::vector<B> ret(s.size());
   70|  2.23k|    std::copy(s.begin(), s.end(), reinterpret_cast<char*>(ret.data()));
   71|  2.23k|    return ret;
   72|  2.23k|}
_Z14ConsumeUInt256R18FuzzedDataProvider:
  196|  6.69k|{
  197|  6.69k|    const std::vector<uint8_t> v256 = fuzzed_data_provider.ConsumeBytes<uint8_t>(256 / 8);
  198|  6.69k|    if (v256.size() != 256 / 8) {
  ------------------
  |  Branch (198:9): [True: 2.07k, False: 4.62k]
  ------------------
  199|  2.07k|        return {};
  200|  2.07k|    }
  201|  4.62k|    return uint256{v256};
  202|  6.69k|}
_Z15ConsumeDurationINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEEET_R18FuzzedDataProviderNS0_11common_typeIJS6_EE4typeESB_:
  169|  2.23k|{
  170|  2.23k|    return Dur{fuzzed_data_provider.ConsumeIntegralInRange(min.count(), max.count())};
  171|  2.23k|}

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

_Z14ConsumeNetAddrR18FuzzedDataProviderP17FastRandomContext:
   30|  16.0M|{
   31|  16.0M|    struct NetAux {
   32|  16.0M|        Network net;
   33|  16.0M|        CNetAddr::BIP155Network bip155;
   34|  16.0M|        size_t len;
   35|  16.0M|    };
   36|       |
   37|  16.0M|    static constexpr std::array<NetAux, 6> nets{
   38|  16.0M|        NetAux{.net = Network::NET_IPV4, .bip155 = CNetAddr::BIP155Network::IPV4, .len = ADDR_IPV4_SIZE},
   39|  16.0M|        NetAux{.net = Network::NET_IPV6, .bip155 = CNetAddr::BIP155Network::IPV6, .len = ADDR_IPV6_SIZE},
   40|  16.0M|        NetAux{.net = Network::NET_ONION, .bip155 = CNetAddr::BIP155Network::TORV3, .len = ADDR_TORV3_SIZE},
   41|  16.0M|        NetAux{.net = Network::NET_I2P, .bip155 = CNetAddr::BIP155Network::I2P, .len = ADDR_I2P_SIZE},
   42|  16.0M|        NetAux{.net = Network::NET_CJDNS, .bip155 = CNetAddr::BIP155Network::CJDNS, .len = ADDR_CJDNS_SIZE},
   43|  16.0M|        NetAux{.net = Network::NET_INTERNAL, .bip155 = CNetAddr::BIP155Network{0}, .len = 0},
   44|  16.0M|    };
   45|       |
   46|  16.0M|    const size_t nets_index{rand == nullptr
  ------------------
  |  Branch (46:29): [True: 536k, False: 15.5M]
  ------------------
   47|  16.0M|        ? fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, nets.size() - 1)
   48|  16.0M|        : static_cast<size_t>(rand->randrange(nets.size()))};
   49|       |
   50|  16.0M|    const auto& aux = nets[nets_index];
   51|       |
   52|  16.0M|    CNetAddr addr;
   53|       |
   54|  16.0M|    if (aux.net == Network::NET_INTERNAL) {
  ------------------
  |  Branch (54:9): [True: 2.62M, False: 13.4M]
  ------------------
   55|  2.62M|        if (rand == nullptr) {
  ------------------
  |  Branch (55:13): [True: 47.8k, False: 2.58M]
  ------------------
   56|  47.8k|            addr.SetInternal(fuzzed_data_provider.ConsumeBytesAsString(32));
   57|  2.58M|        } else {
   58|  2.58M|            const auto v = rand->randbytes(32);
   59|  2.58M|            addr.SetInternal(std::string{v.begin(), v.end()});
   60|  2.58M|        }
   61|  2.62M|        return addr;
   62|  2.62M|    }
   63|       |
   64|  13.4M|    DataStream s;
   65|       |
   66|  13.4M|    s << static_cast<uint8_t>(aux.bip155);
   67|       |
   68|  13.4M|    std::vector<uint8_t> addr_bytes;
   69|  13.4M|    if (rand == nullptr) {
  ------------------
  |  Branch (69:9): [True: 489k, False: 12.9M]
  ------------------
   70|   489k|        addr_bytes = fuzzed_data_provider.ConsumeBytes<uint8_t>(aux.len);
   71|   489k|        addr_bytes.resize(aux.len);
   72|  12.9M|    } else {
   73|  12.9M|        addr_bytes = rand->randbytes(aux.len);
   74|  12.9M|    }
   75|  13.4M|    if (aux.net == NET_IPV6 && addr_bytes[0] == CJDNS_PREFIX) { // Avoid generating IPv6 addresses that look like CJDNS.
  ------------------
  |  Branch (75:9): [True: 2.94M, False: 10.4M]
  |  Branch (75:32): [True: 11.5k, False: 2.93M]
  ------------------
   76|  11.5k|        addr_bytes[0] = 0x55; // Just an arbitrary number, anything != CJDNS_PREFIX would do.
   77|  11.5k|    }
   78|  13.4M|    if (aux.net == NET_CJDNS) { // Avoid generating CJDNS addresses that don't start with CJDNS_PREFIX because those are !IsValid().
  ------------------
  |  Branch (78:9): [True: 2.61M, False: 10.8M]
  ------------------
   79|  2.61M|        addr_bytes[0] = CJDNS_PREFIX;
   80|  2.61M|    }
   81|  13.4M|    s << addr_bytes;
   82|       |
   83|  13.4M|    s >> CAddress::V2_NETWORK(addr);
   84|       |
   85|  13.4M|    return addr;
   86|  16.0M|}

_ZNK20AddrManDeterministiceqERKS_:
   59|  2.23k|    {
   60|  2.23k|        LOCK2(m_impl->cs, other.m_impl->cs);
  ------------------
  |  |  270|  2.23k|    UniqueLock criticalblock1(MaybeCheckNotHeld(cs1), #cs1, __FILE__, __LINE__); \
  |  |  271|  2.23k|    UniqueLock criticalblock2(MaybeCheckNotHeld(cs2), #cs2, __FILE__, __LINE__)
  ------------------
   61|       |
   62|  2.23k|        if (m_impl->mapInfo.size() != other.m_impl->mapInfo.size() || m_impl->nNew != other.m_impl->nNew ||
  ------------------
  |  Branch (62:13): [True: 0, False: 2.23k]
  |  Branch (62:71): [True: 0, False: 2.23k]
  ------------------
   63|  2.23k|            m_impl->nTried != other.m_impl->nTried) {
  ------------------
  |  Branch (63:13): [True: 0, False: 2.23k]
  ------------------
   64|      0|            return false;
   65|      0|        }
   66|       |
   67|       |        // Check that all values in `mapInfo` are equal to all values in `other.mapInfo`.
   68|       |        // Keys may be different.
   69|       |
   70|  2.23k|        auto addrinfo_hasher = [](const AddrInfo& a) {
   71|  2.23k|            CSipHasher hasher(0, 0);
   72|  2.23k|            auto addr_key = a.GetKey();
   73|  2.23k|            auto source_key = a.source.GetAddrBytes();
   74|  2.23k|            hasher.Write(TicksSinceEpoch<std::chrono::seconds>(a.m_last_success));
   75|  2.23k|            hasher.Write(a.nAttempts);
   76|  2.23k|            hasher.Write(a.nRefCount);
   77|  2.23k|            hasher.Write(a.fInTried);
   78|  2.23k|            hasher.Write(a.GetNetwork());
   79|  2.23k|            hasher.Write(a.source.GetNetwork());
   80|  2.23k|            hasher.Write(addr_key.size());
   81|  2.23k|            hasher.Write(source_key.size());
   82|  2.23k|            hasher.Write(addr_key);
   83|  2.23k|            hasher.Write(source_key);
   84|  2.23k|            return (size_t)hasher.Finalize();
   85|  2.23k|        };
   86|       |
   87|  2.23k|        auto addrinfo_eq = [](const AddrInfo& lhs, const AddrInfo& rhs) {
   88|  2.23k|            return std::tie(static_cast<const CService&>(lhs), lhs.source, lhs.m_last_success, lhs.nAttempts, lhs.nRefCount, lhs.fInTried) ==
   89|  2.23k|                   std::tie(static_cast<const CService&>(rhs), rhs.source, rhs.m_last_success, rhs.nAttempts, rhs.nRefCount, rhs.fInTried);
   90|  2.23k|        };
   91|       |
   92|  2.23k|        using Addresses = std::unordered_set<AddrInfo, decltype(addrinfo_hasher), decltype(addrinfo_eq)>;
   93|       |
   94|  2.23k|        const size_t num_addresses{m_impl->mapInfo.size()};
   95|       |
   96|  2.23k|        Addresses addresses{num_addresses, addrinfo_hasher, addrinfo_eq};
   97|  11.0M|        for (const auto& [id, addr] : m_impl->mapInfo) {
  ------------------
  |  Branch (97:37): [True: 11.0M, False: 2.23k]
  ------------------
   98|  11.0M|            addresses.insert(addr);
   99|  11.0M|        }
  100|       |
  101|  2.23k|        Addresses other_addresses{num_addresses, addrinfo_hasher, addrinfo_eq};
  102|  11.0M|        for (const auto& [id, addr] : other.m_impl->mapInfo) {
  ------------------
  |  Branch (102:37): [True: 11.0M, False: 2.23k]
  ------------------
  103|  11.0M|            other_addresses.insert(addr);
  104|  11.0M|        }
  105|       |
  106|  2.23k|        if (addresses != other_addresses) {
  ------------------
  |  Branch (106:13): [True: 0, False: 2.23k]
  ------------------
  107|      0|            return false;
  108|      0|        }
  109|       |
  110|  2.23k|        auto IdsReferToSameAddress = [&](nid_type id, nid_type other_id) EXCLUSIVE_LOCKS_REQUIRED(m_impl->cs, other.m_impl->cs) {
  111|  2.23k|            if (id == -1 && other_id == -1) {
  112|  2.23k|                return true;
  113|  2.23k|            }
  114|  2.23k|            if ((id == -1 && other_id != -1) || (id != -1 && other_id == -1)) {
  115|  2.23k|                return false;
  116|  2.23k|            }
  117|  2.23k|            return m_impl->mapInfo.at(id) == other.m_impl->mapInfo.at(other_id);
  118|  2.23k|        };
  119|       |
  120|       |        // Check that `vvNew` contains the same addresses as `other.vvNew`. Notice - `vvNew[i][j]`
  121|       |        // contains just an id and the address is to be found in `mapInfo.at(id)`. The ids
  122|       |        // themselves may differ between `vvNew` and `other.vvNew`.
  123|  2.28M|        for (size_t i = 0; i < ADDRMAN_NEW_BUCKET_COUNT; ++i) {
  ------------------
  |  Branch (123:28): [True: 2.28M, False: 2.23k]
  ------------------
  124|   148M|            for (size_t j = 0; j < ADDRMAN_BUCKET_SIZE; ++j) {
  ------------------
  |  Branch (124:32): [True: 146M, False: 2.28M]
  ------------------
  125|   146M|                if (!IdsReferToSameAddress(m_impl->vvNew[i][j], other.m_impl->vvNew[i][j])) {
  ------------------
  |  Branch (125:21): [True: 0, False: 146M]
  ------------------
  126|      0|                    return false;
  127|      0|                }
  128|   146M|            }
  129|  2.28M|        }
  130|       |
  131|       |        // Same for `vvTried`.
  132|   573k|        for (size_t i = 0; i < ADDRMAN_TRIED_BUCKET_COUNT; ++i) {
  ------------------
  |  Branch (132:28): [True: 571k, False: 2.23k]
  ------------------
  133|  37.1M|            for (size_t j = 0; j < ADDRMAN_BUCKET_SIZE; ++j) {
  ------------------
  |  Branch (133:32): [True: 36.5M, False: 571k]
  ------------------
  134|  36.5M|                if (!IdsReferToSameAddress(m_impl->vvTried[i][j], other.m_impl->vvTried[i][j])) {
  ------------------
  |  Branch (134:21): [True: 0, False: 36.5M]
  ------------------
  135|      0|                    return false;
  136|      0|                }
  137|  36.5M|            }
  138|   571k|        }
  139|       |
  140|  2.23k|        return true;
  141|  2.23k|    }
_ZZNK20AddrManDeterministiceqERKS_ENKUlRK8AddrInfoE_clES4_:
   70|  33.0M|        auto addrinfo_hasher = [](const AddrInfo& a) {
   71|  33.0M|            CSipHasher hasher(0, 0);
   72|  33.0M|            auto addr_key = a.GetKey();
   73|  33.0M|            auto source_key = a.source.GetAddrBytes();
   74|  33.0M|            hasher.Write(TicksSinceEpoch<std::chrono::seconds>(a.m_last_success));
   75|  33.0M|            hasher.Write(a.nAttempts);
   76|  33.0M|            hasher.Write(a.nRefCount);
   77|  33.0M|            hasher.Write(a.fInTried);
   78|  33.0M|            hasher.Write(a.GetNetwork());
   79|  33.0M|            hasher.Write(a.source.GetNetwork());
   80|  33.0M|            hasher.Write(addr_key.size());
   81|  33.0M|            hasher.Write(source_key.size());
   82|  33.0M|            hasher.Write(addr_key);
   83|  33.0M|            hasher.Write(source_key);
   84|  33.0M|            return (size_t)hasher.Finalize();
   85|  33.0M|        };
_ZZNK20AddrManDeterministiceqERKS_ENKUlRK8AddrInfoS4_E_clES4_S4_:
   87|  11.0M|        auto addrinfo_eq = [](const AddrInfo& lhs, const AddrInfo& rhs) {
   88|  11.0M|            return std::tie(static_cast<const CService&>(lhs), lhs.source, lhs.m_last_success, lhs.nAttempts, lhs.nRefCount, lhs.fInTried) ==
   89|  11.0M|                   std::tie(static_cast<const CService&>(rhs), rhs.source, rhs.m_last_success, rhs.nAttempts, rhs.nRefCount, rhs.fInTried);
   90|  11.0M|        };
_ZZNK20AddrManDeterministiceqERKS_ENKUlllE_clEll:
  110|   182M|        auto IdsReferToSameAddress = [&](nid_type id, nid_type other_id) EXCLUSIVE_LOCKS_REQUIRED(m_impl->cs, other.m_impl->cs) {
  111|   182M|            if (id == -1 && other_id == -1) {
  ------------------
  |  Branch (111:17): [True: 171M, False: 11.2M]
  |  Branch (111:29): [True: 171M, False: 0]
  ------------------
  112|   171M|                return true;
  113|   171M|            }
  114|  11.2M|            if ((id == -1 && other_id != -1) || (id != -1 && other_id == -1)) {
  ------------------
  |  Branch (114:18): [True: 0, False: 11.2M]
  |  Branch (114:30): [True: 0, False: 0]
  |  Branch (114:50): [True: 11.2M, False: 0]
  |  Branch (114:62): [True: 0, False: 11.2M]
  ------------------
  115|      0|                return false;
  116|      0|            }
  117|  11.2M|            return m_impl->mapInfo.at(id) == other.m_impl->mapInfo.at(other_id);
  118|  11.2M|        };
_Z22ConsumeNetGroupManagerR18FuzzedDataProvider:
  237|  2.23k|{
  238|  2.23k|    std::vector<std::byte> asmap{ConsumeRandomLengthByteVector<std::byte>(fuzzed_data_provider)};
  239|  2.23k|    if (!CheckStandardAsmap(asmap)) {
  ------------------
  |  Branch (239:9): [True: 1.63k, False: 600]
  ------------------
  240|  1.63k|        return NetGroupManager::NoAsmap();
  241|  1.63k|    }
  242|    600|    return NetGroupManager::WithLoadedAsmap(std::move(asmap));
  243|  2.23k|}
_ZN20AddrManDeterministicC2ERK15NetGroupManagerR18FuzzedDataProvideri:
   46|  4.46k|        : AddrMan(netgroupman, /*deterministic=*/true, check_ratio)
   47|  4.46k|    {
   48|  4.46k|        WITH_LOCK(m_impl->cs, m_impl->insecure_rand.Reseed(ConsumeUInt256(fuzzed_data_provider)));
  ------------------
  |  |  299|  4.46k|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
   49|  4.46k|    }

__gcov_reset:
   13|      2|extern "C" __attribute__((weak)) void __gcov_reset(void) {}

_Z22SeedRandomStateForTest8SeedRand:
   20|  2.23k|{
   21|  2.23k|    constexpr auto RANDOM_CTX_SEED{"RANDOM_CTX_SEED"};
   22|       |
   23|       |    // Do this once, on the first call, regardless of seedtype, because once
   24|       |    // MakeRandDeterministicDANGEROUS is called, the output of GetRandHash is
   25|       |    // no longer truly random. It should be enough to get the seed once for the
   26|       |    // process.
   27|  2.23k|    static const auto g_ctx_seed = []() -> std::optional<uint256> {
   28|  2.23k|        if (EnableFuzzDeterminism()) return {};
   29|       |        // If RANDOM_CTX_SEED is set, use that as seed.
   30|  2.23k|        if (const char* num{std::getenv(RANDOM_CTX_SEED)}) {
   31|  2.23k|            if (auto num_parsed{uint256::FromUserHex(num)}) {
   32|  2.23k|                return *num_parsed;
   33|  2.23k|            } else {
   34|  2.23k|                std::cerr << RANDOM_CTX_SEED << " must consist of up to " << uint256::size() * 2 << " hex digits (\"0x\" prefix allowed), it was set to: '" << num << "'.\n";
   35|  2.23k|                std::abort();
   36|  2.23k|            }
   37|  2.23k|        }
   38|       |        // Otherwise use a (truly) random value.
   39|  2.23k|        return GetRandHash();
   40|  2.23k|    }();
   41|       |
   42|  2.23k|    g_seeded_g_prng_zero = seedtype == SeedRand::ZEROS;
   43|  2.23k|    if (EnableFuzzDeterminism()) {
  ------------------
  |  Branch (43:9): [True: 2.23k, False: 0]
  ------------------
   44|  2.23k|        Assert(g_seeded_g_prng_zero); // Only SeedRandomStateForTest(SeedRand::ZEROS) is allowed in fuzz tests
  ------------------
  |  |  116|  2.23k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
   45|  2.23k|        Assert(!g_used_g_prng);       // The global PRNG must not have been used before SeedRandomStateForTest(SeedRand::ZEROS)
  ------------------
  |  |  116|  2.23k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
   46|  2.23k|    }
   47|  2.23k|    const uint256& seed{seedtype == SeedRand::FIXED_SEED ? g_ctx_seed.value() : uint256::ZERO};
  ------------------
  |  Branch (47:25): [True: 0, False: 2.23k]
  ------------------
   48|  2.23k|    LogInfo("Setting random seed for current tests to %s=%s\n", RANDOM_CTX_SEED, seed.GetHex());
  ------------------
  |  |  125|  2.23k|#define LogInfo(...) detail_LogWithSrcLoc(BCLog::LogFlags::ALL, util::log::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  119|  2.23k|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
   49|  2.23k|    MakeRandDeterministicDANGEROUS(seed);
   50|  2.23k|}

_ZN17BasicTestingSetupD2Ev:
  252|      2|{
  253|      2|    m_node.ecc_context.reset();
  254|      2|    m_node.kernel.reset();
  255|      2|    if (!EnableFuzzDeterminism()) {
  ------------------
  |  Branch (255:9): [True: 0, False: 2]
  ------------------
  256|      0|        SetMockTime(0s); // Reset mocktime for following tests
  257|      0|    }
  258|      2|    LogInstance().DisconnectTestLogger();
  259|      2|    if (m_has_custom_datadir) {
  ------------------
  |  Branch (259:9): [True: 0, False: 2]
  ------------------
  260|       |        // Only remove the lock file, preserve the data directory.
  261|      0|        UnlockDirectory(m_path_lock, ".lock");
  262|      0|        fs::remove(m_path_lock / ".lock");
  263|      2|    } else {
  264|      2|        fs::remove_all(m_path_root);
  265|      2|    }
  266|       |    // Clear all arguments except for -datadir, which GUI tests currently rely
  267|       |    // on to be set even after the testing setup is destroyed.
  268|      2|    gArgs.ClearArgs();
  269|      2|    gArgs.ForceSetArg("-datadir", fs::PathToString(m_path_root));
  270|      2|}

_ZN13FakeNodeClockC2ENSt3__16chrono10time_pointI9NodeClockNS1_8durationIxNS0_5ratioILl1ELl1EEEEEEE:
   59|  2.23k|    explicit FakeNodeClock(NodeSeconds init_time) { set(init_time); }
_ZN8LimitOneI13FakeNodeClockEC2Ev:
   16|  2.23k|    LimitOne() { Assert(g_T_available) = false; }
  ------------------
  |  |  116|  2.23k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
_ZN13FakeNodeClock3setENSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEE:
   72|  2.23k|    void set(std::chrono::seconds t) { set(NodeSeconds{t}); }
_ZN8LimitOneI13FakeNodeClockED2Ev:
   17|  2.23k|    ~LimitOne() { g_T_available = true; }
_ZN13FakeNodeClockD2Ev:
   65|  2.23k|    ~FakeNodeClock() { set(0s); }
_ZN13FakeNodeClock3setENSt3__16chrono10time_pointI9NodeClockNS1_8durationIxNS0_5ratioILl1ELl1EEEEEEE:
   71|  4.46k|    void set(NodeSeconds t) { SetMockTime(m_t = t); }

_ZN10tinyformat6formatIJEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  1.63k|{
 1089|  1.63k|    std::ostringstream oss;
 1090|  1.63k|    format(oss, fmt, args...);
 1091|  1.63k|    return oss.str();
 1092|  1.63k|}
_ZN10tinyformat6formatIJEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  1.63k|{
 1081|  1.63k|    vformat(out, fmt, makeFormatList(args...));
 1082|  1.63k|}
_ZN10tinyformat14makeFormatListIJEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  1.63k|{
 1045|  1.63k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  1.63k|}
_ZN10tinyformat17FormatStringCheckILj0EEcvPKcEv:
  197|  1.63k|    operator const char*() { return fmt; }
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.23k|{
 1089|  2.23k|    std::ostringstream oss;
 1090|  2.23k|    format(oss, fmt, args...);
 1091|  2.23k|    return oss.str();
 1092|  2.23k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.23k|{
 1081|  2.23k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.23k|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.23k|{
 1045|  2.23k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.23k|}
_ZN10tinyformat6formatIJiimEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.23k|{
 1089|  2.23k|    std::ostringstream oss;
 1090|  2.23k|    format(oss, fmt, args...);
 1091|  2.23k|    return oss.str();
 1092|  2.23k|}
_ZN10tinyformat6formatIJiimEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.23k|{
 1081|  2.23k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.23k|}
_ZN10tinyformat14makeFormatListIJiimEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.23k|{
 1045|  2.23k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.23k|}
_ZN10tinyformat6detail11FormatListNILi3EEC2IJiimEEEDpRKT_:
  990|  2.23k|            : FormatList(&m_formatterStore[0], N),
  991|  2.23k|            m_formatterStore { FormatArg(args)... }
  992|  2.23k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJPKcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEES9_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.23k|{
 1089|  2.23k|    std::ostringstream oss;
 1090|  2.23k|    format(oss, fmt, args...);
 1091|  2.23k|    return oss.str();
 1092|  2.23k|}
_ZN10tinyformat6formatIJPKcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEvRNS3_13basic_ostreamIcS6_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.23k|{
 1081|  2.23k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.23k|}
_ZN10tinyformat14makeFormatListIJPKcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.23k|{
 1045|  2.23k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.23k|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJPKcNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEEDpRKT_:
  990|  2.23k|            : FormatList(&m_formatterStore[0], N),
  991|  2.23k|            m_formatterStore { FormatArg(args)... }
  992|  2.23k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat17FormatStringCheckILj2EEcvPKcEv:
  197|  4.46k|    operator const char*() { return fmt; }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSE_iPKv:
  558|  13.3k|        {
  559|  13.3k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  13.3k|        }
_ZN10tinyformat11formatValueINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSC_iRKT_:
  351|  13.3k|{
  352|  13.3k|#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
  353|       |    // Since we don't support printing of wchar_t using "%ls", make it fail at
  354|       |    // compile time in preference to printing as a void* at runtime.
  355|  13.3k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  13.3k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  13.3k|#endif
  358|       |    // The mess here is to support the %c and %p conversions: if these
  359|       |    // conversions are active we try to convert the type to a char or const
  360|       |    // void* respectively and format that instead of the value itself.  For the
  361|       |    // %p conversion it's important to avoid dereferencing the pointer, which
  362|       |    // could otherwise lead to a crash when printing a dangling (const char*).
  363|  13.3k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  13.3k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  13.3k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 13.3k]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  13.3k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 13.3k]
  |  Branch (367:37): [True: 0, False: 0]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  13.3k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 13.3k]
  ------------------
  373|       |        // Take care not to overread C strings in truncating conversions like
  374|       |        // "%.4s" where at most 4 characters may be read.
  375|      0|        detail::formatTruncated(out, value, ntrunc);
  376|      0|    }
  377|  13.3k|    else
  378|  13.3k|        out << value;
  379|  13.3k|}
_ZN10tinyformat6detail9FormatArgC2IPKcEERKT_:
  534|  2.23k|            : m_value(static_cast<const void*>(&value)),
  535|  2.23k|            m_formatImpl(&formatImpl<T>),
  536|  2.23k|            m_toIntImpl(&toIntImpl<T>)
  537|  2.23k|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIPKcEEvRNSt3__113basic_ostreamIcNS5_11char_traitsIcEEEES4_S4_iPKv:
  558|  2.23k|        {
  559|  2.23k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  2.23k|        }
_ZN10tinyformat11formatValueIPKcEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEES2_S2_iRKT_:
  351|  2.23k|{
  352|  2.23k|#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
  353|       |    // Since we don't support printing of wchar_t using "%ls", make it fail at
  354|       |    // compile time in preference to printing as a void* at runtime.
  355|  2.23k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  2.23k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  2.23k|#endif
  358|       |    // The mess here is to support the %c and %p conversions: if these
  359|       |    // conversions are active we try to convert the type to a char or const
  360|       |    // void* respectively and format that instead of the value itself.  For the
  361|       |    // %p conversion it's important to avoid dereferencing the pointer, which
  362|       |    // could otherwise lead to a crash when printing a dangling (const char*).
  363|  2.23k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  2.23k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  2.23k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 2.23k]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  2.23k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [True: 2.23k, Folded]
  |  Branch (367:37): [True: 0, False: 2.23k]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  2.23k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 2.23k]
  ------------------
  373|       |        // Take care not to overread C strings in truncating conversions like
  374|       |        // "%.4s" where at most 4 characters may be read.
  375|      0|        detail::formatTruncated(out, value, ntrunc);
  376|      0|    }
  377|  2.23k|    else
  378|  2.23k|        out << value;
  379|  2.23k|}
_ZN10tinyformat6detail9FormatArgC2IdEERKT_:
  534|  2.23k|            : m_value(static_cast<const void*>(&value)),
  535|  2.23k|            m_formatImpl(&formatImpl<T>),
  536|  2.23k|            m_toIntImpl(&toIntImpl<T>)
  537|  2.23k|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIdEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  2.23k|        {
  559|  2.23k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  2.23k|        }
_ZN10tinyformat11formatValueIdEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  2.23k|{
  352|  2.23k|#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
  353|       |    // Since we don't support printing of wchar_t using "%ls", make it fail at
  354|       |    // compile time in preference to printing as a void* at runtime.
  355|  2.23k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  2.23k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  2.23k|#endif
  358|       |    // The mess here is to support the %c and %p conversions: if these
  359|       |    // conversions are active we try to convert the type to a char or const
  360|       |    // void* respectively and format that instead of the value itself.  For the
  361|       |    // %p conversion it's important to avoid dereferencing the pointer, which
  362|       |    // could otherwise lead to a crash when printing a dangling (const char*).
  363|  2.23k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  2.23k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  2.23k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 2.23k, Folded]
  |  Branch (365:29): [True: 0, False: 2.23k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  2.23k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 2.23k]
  |  Branch (367:37): [True: 0, False: 0]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  2.23k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 2.23k]
  ------------------
  373|       |        // Take care not to overread C strings in truncating conversions like
  374|       |        // "%.4s" where at most 4 characters may be read.
  375|      0|        detail::formatTruncated(out, value, ntrunc);
  376|      0|    }
  377|  2.23k|    else
  378|  2.23k|        out << value;
  379|  2.23k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_dEEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.23k|{
 1089|  2.23k|    std::ostringstream oss;
 1090|  2.23k|    format(oss, fmt, args...);
 1091|  2.23k|    return oss.str();
 1092|  2.23k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_dEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.23k|{
 1081|  2.23k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.23k|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_dEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.23k|{
 1045|  2.23k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.23k|}
_ZN10tinyformat6detail11FormatListNILi3EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_dEEEDpRKT_:
  990|  2.23k|            : FormatList(&m_formatterStore[0], N),
  991|  2.23k|            m_formatterStore { FormatArg(args)... }
  992|  2.23k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.23k|{
 1089|  2.23k|    std::ostringstream oss;
 1090|  2.23k|    format(oss, fmt, args...);
 1091|  2.23k|    return oss.str();
 1092|  2.23k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.23k|{
 1081|  2.23k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.23k|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.23k|{
 1045|  2.23k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.23k|}
_ZN10tinyformat17FormatStringCheckILj1EEcvPKcEv:
  197|  2.23k|    operator const char*() { return fmt; }
_ZN10tinyformat17FormatStringCheckILj2EEC2EN4util21ConstevalFormatStringILj2EEE:
  196|  2.23k|    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
_ZNK10tinyformat6detail9FormatArg6formatERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEPKcS9_i:
  541|  24.5k|        {
  542|  24.5k|            TINYFORMAT_ASSERT(m_value);
  ------------------
  |  |  153|  24.5k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (542:13): [True: 24.5k, False: 0]
  ------------------
  543|  24.5k|            TINYFORMAT_ASSERT(m_formatImpl);
  ------------------
  |  |  153|  24.5k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (543:13): [True: 24.5k, False: 0]
  ------------------
  544|  24.5k|            m_formatImpl(out, fmtBegin, fmtEnd, ntrunc, m_value);
  545|  24.5k|        }
_ZN10tinyformat10FormatListC2EPNS_6detail9FormatArgEi:
  966|  12.7k|            : m_args(args), m_N(N) { }
_ZN10tinyformat6detail18parseIntAndAdvanceERPKc:
  578|  2.23k|{
  579|  2.23k|    int i = 0;
  580|  4.46k|    for (;*c >= '0' && *c <= '9'; ++c)
  ------------------
  |  Branch (580:11): [True: 4.46k, False: 0]
  |  Branch (580:24): [True: 2.23k, False: 2.23k]
  ------------------
  581|  2.23k|        i = 10*i + (*c - '0');
  582|  2.23k|    return i;
  583|  2.23k|}
_ZN10tinyformat6detail21parseWidthOrPrecisionERiRPKcbPKNS0_9FormatArgES1_i:
  593|  26.7k|{
  594|  26.7k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (594:9): [True: 24.5k, False: 2.23k]
  |  Branch (594:22): [True: 2.23k, False: 22.3k]
  ------------------
  595|  2.23k|        n = parseIntAndAdvance(c);
  596|  2.23k|    }
  597|  24.5k|    else if (*c == '*') {
  ------------------
  |  Branch (597:14): [True: 0, False: 24.5k]
  ------------------
  598|      0|        ++c;
  599|      0|        n = 0;
  600|      0|        if (positionalMode) {
  ------------------
  |  Branch (600:13): [True: 0, False: 0]
  ------------------
  601|      0|            int pos = parseIntAndAdvance(c) - 1;
  602|      0|            if (*c != '$')
  ------------------
  |  Branch (602:17): [True: 0, False: 0]
  ------------------
  603|      0|                TINYFORMAT_ERROR("tinyformat: Non-positional argument used after a positional one");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  604|      0|            if (pos >= 0 && pos < numArgs)
  ------------------
  |  Branch (604:17): [True: 0, False: 0]
  |  Branch (604:29): [True: 0, False: 0]
  ------------------
  605|      0|                n = args[pos].toInt();
  606|      0|            else
  607|      0|                TINYFORMAT_ERROR("tinyformat: Positional argument out of range");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  608|      0|            ++c;
  609|      0|        }
  610|      0|        else {
  611|      0|            if (argIndex < numArgs)
  ------------------
  |  Branch (611:17): [True: 0, False: 0]
  ------------------
  612|      0|                n = args[argIndex++].toInt();
  613|      0|            else
  614|      0|                TINYFORMAT_ERROR("tinyformat: Not enough arguments to read variable width or precision");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  615|      0|        }
  616|      0|    }
  617|  24.5k|    else {
  618|  24.5k|        return false;
  619|  24.5k|    }
  620|  2.23k|    return true;
  621|  26.7k|}
_ZN10tinyformat6detail24printFormatStringLiteralERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKc:
  629|  37.3k|{
  630|  37.3k|    const char* c = fmt;
  631|   271k|    for (;; ++c) {
  632|   271k|        if (*c == '\0') {
  ------------------
  |  Branch (632:13): [True: 12.7k, False: 258k]
  ------------------
  633|  12.7k|            out.write(fmt, c - fmt);
  634|  12.7k|            return c;
  635|  12.7k|        }
  636|   258k|        else if (*c == '%') {
  ------------------
  |  Branch (636:18): [True: 24.5k, False: 233k]
  ------------------
  637|  24.5k|            out.write(fmt, c - fmt);
  638|  24.5k|            if (*(c+1) != '%')
  ------------------
  |  Branch (638:17): [True: 24.5k, False: 0]
  ------------------
  639|  24.5k|                return c;
  640|       |            // for "%%", tack trailing % onto next literal section.
  641|      0|            fmt = ++c;
  642|      0|        }
  643|   271k|    }
  644|  37.3k|}
_ZN10tinyformat6detail21streamStateFromFormatERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERbS7_RiPKcPKNS0_9FormatArgES8_i:
  685|  24.5k|{
  686|  24.5k|    TINYFORMAT_ASSERT(*fmtStart == '%');
  ------------------
  |  |  153|  24.5k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (686:5): [True: 24.5k, False: 0]
  ------------------
  687|       |    // Reset stream state to defaults.
  688|  24.5k|    out.width(0);
  689|  24.5k|    out.precision(6);
  690|  24.5k|    out.fill(' ');
  691|       |    // Reset most flags; ignore irrelevant unitbuf & skipws.
  692|  24.5k|    out.unsetf(std::ios::adjustfield | std::ios::basefield |
  693|  24.5k|               std::ios::floatfield | std::ios::showbase | std::ios::boolalpha |
  694|  24.5k|               std::ios::showpoint | std::ios::showpos | std::ios::uppercase);
  695|  24.5k|    bool precisionSet = false;
  696|  24.5k|    bool widthSet = false;
  697|  24.5k|    int widthExtra = 0;
  698|  24.5k|    const char* c = fmtStart + 1;
  699|       |
  700|       |    // 1) Parse an argument index (if followed by '$') or a width possibly
  701|       |    // preceded with '0' flag.
  702|  24.5k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (702:9): [True: 22.3k, False: 2.23k]
  |  Branch (702:22): [True: 0, False: 22.3k]
  ------------------
  703|      0|        const char tmpc = *c;
  704|      0|        int value = parseIntAndAdvance(c);
  705|      0|        if (*c == '$') {
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|       |            // value is an argument index
  707|      0|            if (value > 0 && value <= numArgs)
  ------------------
  |  Branch (707:17): [True: 0, False: 0]
  |  Branch (707:30): [True: 0, False: 0]
  ------------------
  708|      0|                argIndex = value - 1;
  709|      0|            else
  710|      0|                TINYFORMAT_ERROR("tinyformat: Positional argument out of range");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  711|      0|            ++c;
  712|      0|            positionalMode = true;
  713|      0|        }
  714|      0|        else if (positionalMode) {
  ------------------
  |  Branch (714:18): [True: 0, False: 0]
  ------------------
  715|      0|            TINYFORMAT_ERROR("tinyformat: Non-positional argument used after a positional one");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  716|      0|        }
  717|      0|        else {
  718|      0|            if (tmpc == '0') {
  ------------------
  |  Branch (718:17): [True: 0, False: 0]
  ------------------
  719|       |                // Use internal padding so that numeric values are
  720|       |                // formatted correctly, eg -00010 rather than 000-10
  721|      0|                out.fill('0');
  722|      0|                out.setf(std::ios::internal, std::ios::adjustfield);
  723|      0|            }
  724|      0|            if (value != 0) {
  ------------------
  |  Branch (724:17): [True: 0, False: 0]
  ------------------
  725|       |                // Nonzero value means that we parsed width.
  726|      0|                widthSet = true;
  727|      0|                out.width(value);
  728|      0|            }
  729|      0|        }
  730|      0|    }
  731|  24.5k|    else if (positionalMode) {
  ------------------
  |  Branch (731:14): [True: 0, False: 24.5k]
  ------------------
  732|      0|        TINYFORMAT_ERROR("tinyformat: Non-positional argument used after a positional one");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  733|      0|    }
  734|       |    // 2) Parse flags and width if we did not do it in previous step.
  735|  24.5k|    if (!widthSet) {
  ------------------
  |  Branch (735:9): [True: 24.5k, False: 0]
  ------------------
  736|       |        // Parse flags
  737|  24.5k|        for (;; ++c) {
  738|  24.5k|            switch (*c) {
  739|      0|                case '#':
  ------------------
  |  Branch (739:17): [True: 0, False: 24.5k]
  ------------------
  740|      0|                    out.setf(std::ios::showpoint | std::ios::showbase);
  741|      0|                    continue;
  742|      0|                case '0':
  ------------------
  |  Branch (742:17): [True: 0, False: 24.5k]
  ------------------
  743|       |                    // overridden by left alignment ('-' flag)
  744|      0|                    if (!(out.flags() & std::ios::left)) {
  ------------------
  |  Branch (744:25): [True: 0, False: 0]
  ------------------
  745|       |                        // Use internal padding so that numeric values are
  746|       |                        // formatted correctly, eg -00010 rather than 000-10
  747|      0|                        out.fill('0');
  748|      0|                        out.setf(std::ios::internal, std::ios::adjustfield);
  749|      0|                    }
  750|      0|                    continue;
  751|      0|                case '-':
  ------------------
  |  Branch (751:17): [True: 0, False: 24.5k]
  ------------------
  752|      0|                    out.fill(' ');
  753|      0|                    out.setf(std::ios::left, std::ios::adjustfield);
  754|      0|                    continue;
  755|      0|                case ' ':
  ------------------
  |  Branch (755:17): [True: 0, False: 24.5k]
  ------------------
  756|       |                    // overridden by show positive sign, '+' flag.
  757|      0|                    if (!(out.flags() & std::ios::showpos))
  ------------------
  |  Branch (757:25): [True: 0, False: 0]
  ------------------
  758|      0|                        spacePadPositive = true;
  759|      0|                    continue;
  760|      0|                case '+':
  ------------------
  |  Branch (760:17): [True: 0, False: 24.5k]
  ------------------
  761|      0|                    out.setf(std::ios::showpos);
  762|      0|                    spacePadPositive = false;
  763|      0|                    widthExtra = 1;
  764|      0|                    continue;
  765|  24.5k|                default:
  ------------------
  |  Branch (765:17): [True: 24.5k, False: 0]
  ------------------
  766|  24.5k|                    break;
  767|  24.5k|            }
  768|  24.5k|            break;
  769|  24.5k|        }
  770|       |        // Parse width
  771|  24.5k|        int width = 0;
  772|  24.5k|        widthSet = parseWidthOrPrecision(width, c, positionalMode,
  773|  24.5k|                                         args, argIndex, numArgs);
  774|  24.5k|        if (widthSet) {
  ------------------
  |  Branch (774:13): [True: 0, False: 24.5k]
  ------------------
  775|      0|            if (width < 0) {
  ------------------
  |  Branch (775:17): [True: 0, False: 0]
  ------------------
  776|       |                // negative widths correspond to '-' flag set
  777|      0|                out.fill(' ');
  778|      0|                out.setf(std::ios::left, std::ios::adjustfield);
  779|      0|                width = -width;
  780|      0|            }
  781|      0|            out.width(width);
  782|      0|        }
  783|  24.5k|    }
  784|       |    // 3) Parse precision
  785|  24.5k|    if (*c == '.') {
  ------------------
  |  Branch (785:9): [True: 2.23k, False: 22.3k]
  ------------------
  786|  2.23k|        ++c;
  787|  2.23k|        int precision = 0;
  788|  2.23k|        parseWidthOrPrecision(precision, c, positionalMode,
  789|  2.23k|                              args, argIndex, numArgs);
  790|       |        // Presence of `.` indicates precision set, unless the inferred value
  791|       |        // was negative in which case the default is used.
  792|  2.23k|        precisionSet = precision >= 0;
  793|  2.23k|        if (precisionSet)
  ------------------
  |  Branch (793:13): [True: 2.23k, False: 0]
  ------------------
  794|  2.23k|            out.precision(precision);
  795|  2.23k|    }
  796|       |    // 4) Ignore any C99 length modifier
  797|  24.5k|    while (*c == 'l' || *c == 'h' || *c == 'L' ||
  ------------------
  |  Branch (797:12): [True: 0, False: 24.5k]
  |  Branch (797:25): [True: 0, False: 24.5k]
  |  Branch (797:38): [True: 0, False: 24.5k]
  ------------------
  798|  24.5k|           *c == 'j' || *c == 'z' || *c == 't') {
  ------------------
  |  Branch (798:12): [True: 0, False: 24.5k]
  |  Branch (798:25): [True: 0, False: 24.5k]
  |  Branch (798:38): [True: 0, False: 24.5k]
  ------------------
  799|      0|        ++c;
  800|      0|    }
  801|       |    // 5) We're up to the conversion specifier character.
  802|       |    // Set stream flags based on conversion specifier (thanks to the
  803|       |    // boost::format class for forging the way here).
  804|  24.5k|    bool intConversion = false;
  805|  24.5k|    switch (*c) {
  806|  6.69k|        case 'u': case 'd': case 'i':
  ------------------
  |  Branch (806:9): [True: 2.23k, False: 22.3k]
  |  Branch (806:19): [True: 0, False: 24.5k]
  |  Branch (806:29): [True: 4.46k, False: 20.0k]
  ------------------
  807|  6.69k|            out.setf(std::ios::dec, std::ios::basefield);
  808|  6.69k|            intConversion = true;
  809|  6.69k|            break;
  810|      0|        case 'o':
  ------------------
  |  Branch (810:9): [True: 0, False: 24.5k]
  ------------------
  811|      0|            out.setf(std::ios::oct, std::ios::basefield);
  812|      0|            intConversion = true;
  813|      0|            break;
  814|      0|        case 'X':
  ------------------
  |  Branch (814:9): [True: 0, False: 24.5k]
  ------------------
  815|      0|            out.setf(std::ios::uppercase);
  816|      0|            [[fallthrough]];
  817|      0|        case 'x': case 'p':
  ------------------
  |  Branch (817:9): [True: 0, False: 24.5k]
  |  Branch (817:19): [True: 0, False: 24.5k]
  ------------------
  818|      0|            out.setf(std::ios::hex, std::ios::basefield);
  819|      0|            intConversion = true;
  820|      0|            break;
  821|      0|        case 'E':
  ------------------
  |  Branch (821:9): [True: 0, False: 24.5k]
  ------------------
  822|      0|            out.setf(std::ios::uppercase);
  823|      0|            [[fallthrough]];
  824|      0|        case 'e':
  ------------------
  |  Branch (824:9): [True: 0, False: 24.5k]
  ------------------
  825|      0|            out.setf(std::ios::scientific, std::ios::floatfield);
  826|      0|            out.setf(std::ios::dec, std::ios::basefield);
  827|      0|            break;
  828|      0|        case 'F':
  ------------------
  |  Branch (828:9): [True: 0, False: 24.5k]
  ------------------
  829|      0|            out.setf(std::ios::uppercase);
  830|      0|            [[fallthrough]];
  831|  2.23k|        case 'f':
  ------------------
  |  Branch (831:9): [True: 2.23k, False: 22.3k]
  ------------------
  832|  2.23k|            out.setf(std::ios::fixed, std::ios::floatfield);
  833|  2.23k|            break;
  834|      0|        case 'A':
  ------------------
  |  Branch (834:9): [True: 0, False: 24.5k]
  ------------------
  835|      0|            out.setf(std::ios::uppercase);
  836|      0|            [[fallthrough]];
  837|      0|        case 'a':
  ------------------
  |  Branch (837:9): [True: 0, False: 24.5k]
  ------------------
  838|       |#           ifdef _MSC_VER
  839|       |            // Workaround https://developercommunity.visualstudio.com/content/problem/520472/hexfloat-stream-output-does-not-ignore-precision-a.html
  840|       |            // by always setting maximum precision on MSVC to avoid precision
  841|       |            // loss for doubles.
  842|       |            out.precision(13);
  843|       |#           endif
  844|      0|            out.setf(std::ios::fixed | std::ios::scientific, std::ios::floatfield);
  845|      0|            break;
  846|      0|        case 'G':
  ------------------
  |  Branch (846:9): [True: 0, False: 24.5k]
  ------------------
  847|      0|            out.setf(std::ios::uppercase);
  848|      0|            [[fallthrough]];
  849|      0|        case 'g':
  ------------------
  |  Branch (849:9): [True: 0, False: 24.5k]
  ------------------
  850|      0|            out.setf(std::ios::dec, std::ios::basefield);
  851|       |            // As in boost::format, let stream decide float format.
  852|      0|            out.flags(out.flags() & ~std::ios::floatfield);
  853|      0|            break;
  854|      0|        case 'c':
  ------------------
  |  Branch (854:9): [True: 0, False: 24.5k]
  ------------------
  855|       |            // Handled as special case inside formatValue()
  856|      0|            break;
  857|  15.6k|        case 's':
  ------------------
  |  Branch (857:9): [True: 15.6k, False: 8.92k]
  ------------------
  858|  15.6k|            if (precisionSet)
  ------------------
  |  Branch (858:17): [True: 0, False: 15.6k]
  ------------------
  859|      0|                ntrunc = static_cast<int>(out.precision());
  860|       |            // Make %s print Booleans as "true" and "false"
  861|  15.6k|            out.setf(std::ios::boolalpha);
  862|  15.6k|            break;
  863|      0|        case 'n':
  ------------------
  |  Branch (863:9): [True: 0, False: 24.5k]
  ------------------
  864|       |            // Not supported - will cause problems!
  865|      0|            TINYFORMAT_ERROR("tinyformat: %n conversion spec not supported");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  866|      0|            break;
  867|      0|        case '\0':
  ------------------
  |  Branch (867:9): [True: 0, False: 24.5k]
  ------------------
  868|      0|            TINYFORMAT_ERROR("tinyformat: Conversion spec incorrectly "
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  869|      0|                             "terminated by end of string");
  870|      0|            return c;
  871|      0|        default:
  ------------------
  |  Branch (871:9): [True: 0, False: 24.5k]
  ------------------
  872|      0|            break;
  873|  24.5k|    }
  874|  24.5k|    if (intConversion && precisionSet && !widthSet) {
  ------------------
  |  Branch (874:9): [True: 6.69k, False: 17.8k]
  |  Branch (874:26): [True: 0, False: 6.69k]
  |  Branch (874:42): [True: 0, False: 0]
  ------------------
  875|       |        // "precision" for integers gives the minimum number of digits (to be
  876|       |        // padded with zeros on the left).  This isn't really supported by the
  877|       |        // iostreams, but we can approximately simulate it with the width if
  878|       |        // the width isn't otherwise used.
  879|      0|        out.width(out.precision() + widthExtra);
  880|      0|        out.setf(std::ios::internal, std::ios::adjustfield);
  881|      0|        out.fill('0');
  882|      0|    }
  883|  24.5k|    return c+1;
  884|  24.5k|}
_ZN10tinyformat6detail10formatImplERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcPKNS0_9FormatArgEi:
  891|  12.7k|{
  892|       |    // Saved stream state
  893|  12.7k|    std::streamsize origWidth = out.width();
  894|  12.7k|    std::streamsize origPrecision = out.precision();
  895|  12.7k|    std::ios::fmtflags origFlags = out.flags();
  896|  12.7k|    char origFill = out.fill();
  897|       |
  898|       |    // "Positional mode" means all format specs should be of the form "%n$..."
  899|       |    // with `n` an integer. We detect this in `streamStateFromFormat`.
  900|  12.7k|    bool positionalMode = false;
  901|  12.7k|    int argIndex = 0;
  902|  37.3k|    while (true) {
  ------------------
  |  Branch (902:12): [True: 37.3k, Folded]
  ------------------
  903|  37.3k|        fmt = printFormatStringLiteral(out, fmt);
  904|  37.3k|        if (*fmt == '\0') {
  ------------------
  |  Branch (904:13): [True: 12.7k, False: 24.5k]
  ------------------
  905|  12.7k|            if (!positionalMode && argIndex < numArgs) {
  ------------------
  |  Branch (905:17): [True: 12.7k, False: 0]
  |  Branch (905:36): [True: 0, False: 12.7k]
  ------------------
  906|      0|                TINYFORMAT_ERROR("tinyformat: Not enough conversion specifiers in format string");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  907|      0|            }
  908|  12.7k|            break;
  909|  12.7k|        }
  910|  24.5k|        bool spacePadPositive = false;
  911|  24.5k|        int ntrunc = -1;
  912|  24.5k|        const char* fmtEnd = streamStateFromFormat(out, positionalMode, spacePadPositive, ntrunc, fmt,
  913|  24.5k|                                                   args, argIndex, numArgs);
  914|       |        // NB: argIndex may be incremented by reading variable width/precision
  915|       |        // in `streamStateFromFormat`, so do the bounds check here.
  916|  24.5k|        if (argIndex >= numArgs) {
  ------------------
  |  Branch (916:13): [True: 0, False: 24.5k]
  ------------------
  917|      0|            TINYFORMAT_ERROR("tinyformat: Too many conversion specifiers in format string");
  ------------------
  |  |  135|      0|#define TINYFORMAT_ERROR(reasonString) throw tinyformat::format_error(reasonString)
  ------------------
  918|      0|            return;
  919|      0|        }
  920|  24.5k|        const FormatArg& arg = args[argIndex];
  921|       |        // Format the arg into the stream.
  922|  24.5k|        if (!spacePadPositive) {
  ------------------
  |  Branch (922:13): [True: 24.5k, False: 0]
  ------------------
  923|  24.5k|            arg.format(out, fmt, fmtEnd, ntrunc);
  924|  24.5k|        }
  925|      0|        else {
  926|       |            // The following is a special case with no direct correspondence
  927|       |            // between stream formatting and the printf() behaviour.  Simulate
  928|       |            // it crudely by formatting into a temporary string stream and
  929|       |            // munging the resulting string.
  930|      0|            std::ostringstream tmpStream;
  931|      0|            tmpStream.copyfmt(out);
  932|      0|            tmpStream.setf(std::ios::showpos);
  933|      0|            arg.format(tmpStream, fmt, fmtEnd, ntrunc);
  934|      0|            std::string result = tmpStream.str(); // allocates... yuck.
  935|      0|            for (size_t i = 0, iend = result.size(); i < iend; ++i) {
  ------------------
  |  Branch (935:54): [True: 0, False: 0]
  ------------------
  936|      0|                if (result[i] == '+')
  ------------------
  |  Branch (936:21): [True: 0, False: 0]
  ------------------
  937|      0|                    result[i] = ' ';
  938|      0|            }
  939|      0|            out << result;
  940|      0|        }
  941|  24.5k|        if (!positionalMode)
  ------------------
  |  Branch (941:13): [True: 24.5k, False: 0]
  ------------------
  942|  24.5k|            ++argIndex;
  943|  24.5k|        fmt = fmtEnd;
  944|  24.5k|    }
  945|       |
  946|       |    // Restore stream state
  947|  12.7k|    out.width(origWidth);
  948|  12.7k|    out.precision(origPrecision);
  949|  12.7k|    out.flags(origFlags);
  950|  12.7k|    out.fill(origFill);
  951|  12.7k|}
_ZN10tinyformat7vformatERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcRKNS_10FormatListE:
 1070|  12.7k|{
 1071|  12.7k|    detail::formatImpl(out, fmt, list.m_args, list.m_N);
 1072|  12.7k|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEDpRKT_:
  990|  2.23k|            : FormatList(&m_formatterStore[0], N),
  991|  2.23k|            m_formatterStore { FormatArg(args)... }
  992|  2.23k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail11FormatListNILi0EEC2Ev:
 1025|  1.63k|    FormatListN() : FormatList(nullptr, 0) {}
_ZN10tinyformat17FormatStringCheckILj0EEC2EN4util21ConstevalFormatStringILj0EEE:
  196|  1.63k|    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
_ZN10tinyformat6detail9FormatArg10formatImplImEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  2.23k|        {
  559|  2.23k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  2.23k|        }
_ZN10tinyformat11formatValueImEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  2.23k|{
  352|  2.23k|#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
  353|       |    // Since we don't support printing of wchar_t using "%ls", make it fail at
  354|       |    // compile time in preference to printing as a void* at runtime.
  355|  2.23k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  2.23k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  2.23k|#endif
  358|       |    // The mess here is to support the %c and %p conversions: if these
  359|       |    // conversions are active we try to convert the type to a char or const
  360|       |    // void* respectively and format that instead of the value itself.  For the
  361|       |    // %p conversion it's important to avoid dereferencing the pointer, which
  362|       |    // could otherwise lead to a crash when printing a dangling (const char*).
  363|  2.23k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  2.23k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  2.23k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 2.23k, Folded]
  |  Branch (365:29): [True: 0, False: 2.23k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  2.23k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 2.23k]
  |  Branch (367:37): [True: 0, False: 0]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  2.23k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 2.23k]
  ------------------
  373|       |        // Take care not to overread C strings in truncating conversions like
  374|       |        // "%.4s" where at most 4 characters may be read.
  375|      0|        detail::formatTruncated(out, value, ntrunc);
  376|      0|    }
  377|  2.23k|    else
  378|  2.23k|        out << value;
  379|  2.23k|}
_ZN10tinyformat6detail9FormatArg10formatImplIiEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  4.46k|        {
  559|  4.46k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  4.46k|        }
_ZN10tinyformat11formatValueIiEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  4.46k|{
  352|  4.46k|#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
  353|       |    // Since we don't support printing of wchar_t using "%ls", make it fail at
  354|       |    // compile time in preference to printing as a void* at runtime.
  355|  4.46k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  4.46k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  4.46k|#endif
  358|       |    // The mess here is to support the %c and %p conversions: if these
  359|       |    // conversions are active we try to convert the type to a char or const
  360|       |    // void* respectively and format that instead of the value itself.  For the
  361|       |    // %p conversion it's important to avoid dereferencing the pointer, which
  362|       |    // could otherwise lead to a crash when printing a dangling (const char*).
  363|  4.46k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  4.46k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  4.46k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 4.46k, Folded]
  |  Branch (365:29): [True: 0, False: 4.46k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  4.46k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 4.46k]
  |  Branch (367:37): [True: 0, False: 0]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  4.46k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 4.46k]
  ------------------
  373|       |        // Take care not to overread C strings in truncating conversions like
  374|       |        // "%.4s" where at most 4 characters may be read.
  375|      0|        detail::formatTruncated(out, value, ntrunc);
  376|      0|    }
  377|  4.46k|    else
  378|  4.46k|        out << value;
  379|  4.46k|}
_ZN10tinyformat17FormatStringCheckILj3EEcvPKcEv:
  197|  4.46k|    operator const char*() { return fmt; }
_ZN10tinyformat6detail9FormatArgC2IiEERKT_:
  534|  4.46k|            : m_value(static_cast<const void*>(&value)),
  535|  4.46k|            m_formatImpl(&formatImpl<T>),
  536|  4.46k|            m_toIntImpl(&toIntImpl<T>)
  537|  4.46k|        { }
_ZN10tinyformat6detail9FormatArgC2INSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEERKT_:
  534|  13.3k|            : m_value(static_cast<const void*>(&value)),
  535|  13.3k|            m_formatImpl(&formatImpl<T>),
  536|  13.3k|            m_toIntImpl(&toIntImpl<T>)
  537|  13.3k|        { }
_ZN10tinyformat6detail11FormatListNILi1EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEDpRKT_:
  990|  2.23k|            : FormatList(&m_formatterStore[0], N),
  991|  2.23k|            m_formatterStore { FormatArg(args)... }
  992|  2.23k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2ImEERKT_:
  534|  2.23k|            : m_value(static_cast<const void*>(&value)),
  535|  2.23k|            m_formatImpl(&formatImpl<T>),
  536|  2.23k|            m_toIntImpl(&toIntImpl<T>)
  537|  2.23k|        { }

_ZNK9base_blobILj256EE6GetHexEv:
   12|  2.23k|{
   13|  2.23k|    uint8_t m_data_rev[WIDTH];
   14|  73.6k|    for (int i = 0; i < WIDTH; ++i) {
  ------------------
  |  Branch (14:21): [True: 71.3k, False: 2.23k]
  ------------------
   15|  71.3k|        m_data_rev[i] = m_data[WIDTH - 1 - i];
   16|  71.3k|    }
   17|  2.23k|    return HexStr(m_data_rev);
   18|  2.23k|}

_ZN7uint256C2Eh:
  202|  4.46k|    constexpr explicit uint256(uint8_t v) : base_blob<256>(v) {}
_ZN9base_blobILj256EEC2Eh:
   40|  4.46k|    constexpr explicit base_blob(uint8_t v) : m_data{v} {}
_ZNK9base_blobILj256EE9SerializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  113|  4.46k|    {
  114|  4.46k|        s << std::span(m_data);
  115|  4.46k|    }
_ZN9base_blobILj256EE11UnserializeI12ParamsStreamIR10DataStreamN8CAddress9SerParamsEEEEvRT_:
  119|  4.46k|    {
  120|  4.46k|        s.read(MakeWritableByteSpan(m_data));
  121|  4.46k|    }
_ZN9base_blobILj256EE7SetNullEv:
   58|  4.46k|    {
   59|  4.46k|        std::fill(m_data.begin(), m_data.end(), 0);
   60|  4.46k|    }
_ZNK9base_blobILj256EEeqERKS0_:
   62|  2.23k|    constexpr bool operator==(const base_blob&) const = default;
_ZNK9base_blobILj256EE6IsNullEv:
   51|  2.23k|    {
   52|  2.23k|        return std::all_of(m_data.begin(), m_data.end(), [](uint8_t val) {
   53|  2.23k|            return val == 0;
   54|  2.23k|        });
   55|  2.23k|    }
_ZZNK9base_blobILj256EE6IsNullEvENKUlhE_clEh:
   52|  2.23k|        return std::all_of(m_data.begin(), m_data.end(), [](uint8_t val) {
   53|  2.23k|            return val == 0;
   54|  2.23k|        });
_ZN7uint256C2ENSt3__14spanIKhLm18446744073709551615EEE:
  203|  4.62k|    constexpr explicit uint256(std::span<const unsigned char> vch) : base_blob<256>(vch) {}
_ZN9base_blobILj256EEC2ENSt3__14spanIKhLm18446744073709551615EEE:
   43|  4.62k|    {
   44|  4.62k|        assert(vch.size() == WIDTH);
  ------------------
  |  Branch (44:9): [True: 4.62k, False: 0]
  ------------------
   45|  4.62k|        std::copy(vch.begin(), vch.end(), m_data.begin());
   46|  4.62k|    }
_ZN9base_blobILj256EE4dataEv:
   99|  8.92k|    constexpr unsigned char* data() { return m_data.data(); }
_ZNK9base_blobILj256EE9SerializeI10HashWriterEEvRT_:
  113|   124M|    {
  114|   124M|        s << std::span(m_data);
  115|   124M|    }
_ZN7uint256C2Ev:
  200|   124M|    constexpr uint256() = default;
_ZN9base_blobILj256EEC2Ev:
   37|   124M|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj256EE5beginEv:
  101|   499M|    constexpr unsigned char* begin() { return m_data.data(); }
_ZNK9base_blobILj256EE4dataEv:
   98|  17.8k|    constexpr const unsigned char* data() const { return m_data.data(); }
_ZN9base_blobILj256EE4sizeEv:
  107|  26.7k|    static constexpr unsigned int size() { return WIDTH; }

_ZN8UniValueC2Ev:
   31|  4.46k|    UniValue() { typ = VNULL; }
_ZN8UniValueC2IRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSB_Esr3stdE11is_signed_vISB_Esr3stdE13is_unsigned_vISB_Esr3stdE18is_constructible_vIS7_SB_EEbE4typeELb1EEEOT_:
   40|      2|    {
   41|       |        if constexpr (std::is_floating_point_v<T>) {
   42|       |            setFloat(val);
   43|       |        } else if constexpr (std::is_same_v<bool, T>) {
   44|       |            setBool(val);
   45|       |        } else if constexpr (std::is_signed_v<T>) {
   46|       |            setInt(int64_t{val});
   47|       |        } else if constexpr (std::is_unsigned_v<T>) {
   48|       |            setInt(uint64_t{val});
   49|      2|        } else {
   50|      2|            setStr(std::string{std::forward<Ref>(val)});
   51|      2|        }
   52|      2|    }
_ZNK8UniValue6isNullEv:
   81|  4.46k|    bool isNull() const { return (typ == VNULL); }

_ZN8UniValue5clearEv:
   18|      2|{
   19|      2|    typ = VNULL;
   20|      2|    val.clear();
   21|      2|    keys.clear();
   22|      2|    values.clear();
   23|      2|}
_ZN8UniValue6setStrENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   85|      2|{
   86|      2|    clear();
   87|      2|    typ = VSTR;
   88|      2|    val = std::move(str);
   89|      2|}

_Z9InterpretNSt3__14spanIKSt4byteLm18446744073709551615EEES3_:
  181|  6.02M|{
  182|  6.02M|    size_t pos{0};
  183|  6.02M|    const size_t endpos{asmap.size() * 8};
  184|  6.02M|    uint8_t ip_bit{0};
  185|  6.02M|    const uint8_t ip_bits_end = ip.size() * 8;
  186|  6.02M|    uint32_t default_asn = 0;
  187|  10.0M|    while (pos < endpos) {
  ------------------
  |  Branch (187:12): [True: 10.0M, False: 0]
  ------------------
  188|  10.0M|        Instruction opcode = DecodeType(pos, asmap);
  189|  10.0M|        if (opcode == Instruction::RETURN) {
  ------------------
  |  Branch (189:13): [True: 4.77M, False: 5.22M]
  ------------------
  190|       |            // Found leaf node - return the ASN
  191|  4.77M|            uint32_t asn = DecodeASN(pos, asmap);
  192|  4.77M|            if (asn == INVALID) break; // ASN straddles EOF
  ------------------
  |  Branch (192:17): [True: 0, False: 4.77M]
  ------------------
  193|  4.77M|            return asn;
  194|  5.22M|        } else if (opcode == Instruction::JUMP) {
  ------------------
  |  Branch (194:20): [True: 1.56M, False: 3.66M]
  ------------------
  195|       |            // Binary branch: if IP bit is 1, jump forward; else continue
  196|  1.56M|            uint32_t jump = DecodeJump(pos, asmap);
  197|  1.56M|            if (jump == INVALID) break; // Jump offset straddles EOF
  ------------------
  |  Branch (197:17): [True: 0, False: 1.56M]
  ------------------
  198|  1.56M|            if (ip_bit == ip_bits_end) break; // No input bits left
  ------------------
  |  Branch (198:17): [True: 0, False: 1.56M]
  ------------------
  199|  1.56M|            if (int64_t{jump} >= static_cast<int64_t>(endpos - pos)) break; // Jumping past EOF
  ------------------
  |  Branch (199:17): [True: 0, False: 1.56M]
  ------------------
  200|  1.56M|            if (ConsumeBitBE(ip_bit, ip)) {  // Check next IP bit (big-endian)
  ------------------
  |  Branch (200:17): [True: 514k, False: 1.04M]
  ------------------
  201|   514k|                pos += jump;  // Bit = 1: skip to right subtree
  202|   514k|            }
  203|       |            // Bit = 0: fall through to left subtree
  204|  3.66M|        } else if (opcode == Instruction::MATCH) {
  ------------------
  |  Branch (204:20): [True: 2.47M, False: 1.19M]
  ------------------
  205|       |            // Compare multiple IP bits against a pattern
  206|       |            // The match value encodes both length and pattern:
  207|       |            // - highest set bit position determines length (bit_width - 1)
  208|       |            // - lower bits contain the pattern to compare
  209|  2.47M|            uint32_t match = DecodeMatch(pos, asmap);
  210|  2.47M|            if (match == INVALID) break; // Match bits straddle EOF
  ------------------
  |  Branch (210:17): [True: 0, False: 2.47M]
  ------------------
  211|  2.47M|            int matchlen = std::bit_width(match) - 1;  // An n-bit value matches n-1 input bits
  212|  2.47M|            if ((ip_bits_end - ip_bit) < matchlen) break; // Not enough input bits
  ------------------
  |  Branch (212:17): [True: 0, False: 2.47M]
  ------------------
  213|  4.81M|            for (int bit = 0; bit < matchlen; bit++) {
  ------------------
  |  Branch (213:31): [True: 3.59M, False: 1.22M]
  ------------------
  214|  3.59M|                if (ConsumeBitBE(ip_bit, ip) != ((match >> (matchlen - 1 - bit)) & 1)) {
  ------------------
  |  Branch (214:21): [True: 1.24M, False: 2.34M]
  ------------------
  215|  1.24M|                    return default_asn;  // Pattern mismatch - use default
  216|  1.24M|                }
  217|  3.59M|            }
  218|       |            // Pattern matched - continue execution
  219|  2.47M|        } else if (opcode == Instruction::DEFAULT) {
  ------------------
  |  Branch (219:20): [True: 1.19M, False: 0]
  ------------------
  220|       |            // Update the default ASN for subsequent MATCH failures
  221|  1.19M|            default_asn = DecodeASN(pos, asmap);
  222|  1.19M|            if (default_asn == INVALID) break; // ASN straddles EOF
  ------------------
  |  Branch (222:17): [True: 0, False: 1.19M]
  ------------------
  223|  1.19M|        } else {
  224|      0|            break; // Instruction straddles EOF
  225|      0|        }
  226|  10.0M|    }
  227|       |    // Reached EOF without RETURN, or aborted (see any of the breaks above)
  228|       |    // - should have been caught by SanityCheckAsmap below
  229|  6.02M|    assert(false);
  ------------------
  |  Branch (229:5): [Folded, False: 0]
  ------------------
  230|      0|    return 0; // 0 is not a valid ASN
  231|      0|}
_Z16SanityCheckAsmapNSt3__14spanIKSt4byteLm18446744073709551615EEEi:
  238|  2.23k|{
  239|  2.23k|    size_t pos{0};
  240|  2.23k|    const size_t endpos{asmap.size() * 8};
  241|  2.23k|    std::vector<std::pair<uint32_t, int>> jumps; // All future positions we may jump to (bit offset in asmap -> bits to consume left)
  242|  2.23k|    jumps.reserve(bits);
  243|  2.23k|    Instruction prevopcode = Instruction::JUMP;
  244|  2.23k|    bool had_incomplete_match = false;  // Track <8 bit matches for efficiency check
  245|       |
  246|  12.0k|    while (pos != endpos) {
  ------------------
  |  Branch (246:12): [True: 11.0k, False: 976]
  ------------------
  247|       |        // There was a jump into the middle of the previous instruction
  248|  11.0k|        if (!jumps.empty() && pos >= jumps.back().first) return false;
  ------------------
  |  Branch (248:13): [True: 4.60k, False: 6.47k]
  |  Branch (248:31): [True: 12, False: 4.59k]
  ------------------
  249|       |
  250|  11.0k|        Instruction opcode = DecodeType(pos, asmap);
  251|  11.0k|        if (opcode == Instruction::RETURN) {
  ------------------
  |  Branch (251:13): [True: 3.57k, False: 7.49k]
  ------------------
  252|       |            // There should not be any RETURN immediately after a DEFAULT (could be combined into just RETURN)
  253|  3.57k|            if (prevopcode == Instruction::DEFAULT) return false;
  ------------------
  |  Branch (253:17): [True: 49, False: 3.52k]
  ------------------
  254|  3.52k|            uint32_t asn = DecodeASN(pos, asmap);
  255|  3.52k|            if (asn == INVALID) return false; // ASN straddles EOF
  ------------------
  |  Branch (255:17): [True: 52, False: 3.46k]
  ------------------
  256|  3.46k|            if (jumps.empty()) {
  ------------------
  |  Branch (256:17): [True: 827, False: 2.64k]
  ------------------
  257|       |                // Nothing to execute anymore
  258|    827|                if (endpos - pos > 7) return false; // Excessive padding
  ------------------
  |  Branch (258:21): [True: 203, False: 624]
  ------------------
  259|  1.86k|                while (pos != endpos) {
  ------------------
  |  Branch (259:24): [True: 1.26k, False: 600]
  ------------------
  260|  1.26k|                    if (ConsumeBitLE(pos, asmap)) return false; // Nonzero padding bit
  ------------------
  |  Branch (260:25): [True: 24, False: 1.24k]
  ------------------
  261|  1.26k|                }
  262|    600|                return true; // Sanely reached EOF
  263|  2.64k|            } else {
  264|       |                // Continue by pretending we jumped to the next instruction
  265|  2.64k|                if (pos != jumps.back().first) return false; // Unreachable code
  ------------------
  |  Branch (265:21): [True: 52, False: 2.59k]
  ------------------
  266|  2.59k|                bits = jumps.back().second; // Restore the number of bits we would have had left after this jump
  267|  2.59k|                jumps.pop_back();
  268|  2.59k|                prevopcode = Instruction::JUMP;
  269|  2.59k|            }
  270|  7.49k|        } else if (opcode == Instruction::JUMP) {
  ------------------
  |  Branch (270:20): [True: 2.88k, False: 4.60k]
  ------------------
  271|  2.88k|            uint32_t jump = DecodeJump(pos, asmap);
  272|  2.88k|            if (jump == INVALID) return false; // Jump offset straddles EOF
  ------------------
  |  Branch (272:17): [True: 17, False: 2.87k]
  ------------------
  273|  2.87k|            if (int64_t{jump} > static_cast<int64_t>(endpos - pos)) return false; // Jump out of range
  ------------------
  |  Branch (273:17): [True: 105, False: 2.76k]
  ------------------
  274|  2.76k|            if (bits == 0) return false; // Consuming bits past the end of the input
  ------------------
  |  Branch (274:17): [True: 2, False: 2.76k]
  ------------------
  275|  2.76k|            --bits;
  276|  2.76k|            uint32_t jump_offset = pos + jump;
  277|  2.76k|            if (!jumps.empty() && jump_offset >= jumps.back().first) return false; // Intersecting jumps
  ------------------
  |  Branch (277:17): [True: 664, False: 2.10k]
  |  Branch (277:35): [True: 37, False: 627]
  ------------------
  278|  2.72k|            jumps.emplace_back(jump_offset, bits);  // Queue jump target for validation
  279|  2.72k|            prevopcode = Instruction::JUMP;
  280|  4.60k|        } else if (opcode == Instruction::MATCH) {
  ------------------
  |  Branch (280:20): [True: 2.87k, False: 1.72k]
  ------------------
  281|  2.87k|            uint32_t match = DecodeMatch(pos, asmap);
  282|  2.87k|            if (match == INVALID) return false; // Match bits straddle EOF
  ------------------
  |  Branch (282:17): [True: 28, False: 2.85k]
  ------------------
  283|  2.85k|            int matchlen = std::bit_width(match) - 1;
  284|  2.85k|            if (prevopcode != Instruction::MATCH) had_incomplete_match = false;
  ------------------
  |  Branch (284:17): [True: 2.68k, False: 164]
  ------------------
  285|       |            // Within a sequence of matches only at most one should be incomplete
  286|  2.85k|            if (matchlen < 8 && had_incomplete_match) return false;
  ------------------
  |  Branch (286:17): [True: 2.72k, False: 131]
  |  Branch (286:33): [True: 10, False: 2.71k]
  ------------------
  287|  2.84k|            had_incomplete_match = (matchlen < 8);
  288|  2.84k|            if (bits < matchlen) return false; // Consuming bits past the end of the input
  ------------------
  |  Branch (288:17): [True: 3, False: 2.83k]
  ------------------
  289|  2.83k|            bits -= matchlen;
  290|  2.83k|            prevopcode = Instruction::MATCH;
  291|  2.83k|        } else if (opcode == Instruction::DEFAULT) {
  ------------------
  |  Branch (291:20): [True: 1.71k, False: 9]
  ------------------
  292|       |            // There should not be two successive DEFAULTs (they could be combined into one)
  293|  1.71k|            if (prevopcode == Instruction::DEFAULT) return false;
  ------------------
  |  Branch (293:17): [True: 21, False: 1.69k]
  ------------------
  294|  1.69k|            uint32_t asn = DecodeASN(pos, asmap);
  295|  1.69k|            if (asn == INVALID) return false; // ASN straddles EOF
  ------------------
  |  Branch (295:17): [True: 31, False: 1.66k]
  ------------------
  296|  1.66k|            prevopcode = Instruction::DEFAULT;
  297|  1.66k|        } else {
  298|      9|            return false; // Instruction straddles EOF
  299|      9|        }
  300|  11.0k|    }
  301|    976|    return false; // Reached EOF without RETURN instruction
  302|  2.23k|}
_Z18CheckStandardAsmapNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  309|  2.23k|{
  310|  2.23k|    if (!SanityCheckAsmap(data, 128)) {
  ------------------
  |  Branch (310:9): [True: 1.63k, False: 600]
  ------------------
  311|  1.63k|        LogWarning("Sanity check of asmap data failed\n");
  ------------------
  |  |  126|  1.63k|#define LogWarning(...) detail_LogWithSrcLoc(BCLog::LogFlags::ALL, util::log::Level::Warning, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  119|  1.63k|#define detail_LogWithSrcLoc(category, level, ...) util::log::LogPrintFormatInternal(SourceLocation{__func__}, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
  312|  1.63k|        return false;
  313|  1.63k|    }
  314|    600|    return true;
  315|  2.23k|}
_Z12AsmapVersionNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  347|  4.46k|{
  348|  4.46k|    if (data.empty()) return {};
  ------------------
  |  Branch (348:9): [True: 3.26k, False: 1.20k]
  ------------------
  349|       |
  350|  1.20k|    HashWriter asmap_hasher;
  351|  1.20k|    asmap_hasher << data;
  352|  1.20k|    return asmap_hasher.GetHash();
  353|  4.46k|}
asmap.cpp:_ZN12_GLOBAL__N_110DecodeTypeERmNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  142|  10.0M|{
  143|  10.0M|    return Instruction(DecodeBits(bitpos, data, 0, TYPE_BIT_SIZES));
  144|  10.0M|}
asmap.cpp:_ZN12_GLOBAL__N_110DecodeBitsERmNSt3__14spanIKSt4byteLm18446744073709551615EEEhNS2_IKhLm18446744073709551615EEE:
   86|  20.0M|{
   87|  20.0M|    uint32_t val = minval;  // Start with minimum encodable value
   88|  20.0M|    bool bit;
   89|  44.0M|    for (auto bit_sizes_it = bit_sizes.begin(); bit_sizes_it != bit_sizes.end(); ++bit_sizes_it) {
  ------------------
  |  Branch (89:49): [True: 44.0M, False: 0]
  ------------------
   90|       |        // Read continuation bit to determine if we're in this class
   91|  44.0M|        if (bit_sizes_it + 1 != bit_sizes.end()) {  // Unless we're in the last class
  ------------------
  |  Branch (91:13): [True: 40.2M, False: 3.74M]
  ------------------
   92|  40.2M|            if (bitpos >= data.size() * 8) break;
  ------------------
  |  Branch (92:17): [True: 49, False: 40.2M]
  ------------------
   93|  40.2M|            bit = ConsumeBitLE(bitpos, data);
   94|  40.2M|        } else {
   95|  3.74M|            bit = 0;  // Last class has no continuation bit
   96|  3.74M|        }
   97|  44.0M|        if (bit) {
  ------------------
  |  Branch (97:13): [True: 23.9M, False: 20.0M]
  ------------------
   98|       |            // If the value will not fit in this class, subtract its range from val,
   99|       |            // emit a "1" bit and continue with the next class
  100|  23.9M|            val += (1 << *bit_sizes_it);  // Add size of this class
  101|  23.9M|        } else {
  102|       |            // Decode the position within this class in big endian
  103|   138M|            for (int b = 0; b < *bit_sizes_it; b++) {
  ------------------
  |  Branch (103:29): [True: 118M, False: 20.0M]
  ------------------
  104|   118M|                if (bitpos >= data.size() * 8) return INVALID; // Reached EOF in mantissa
  ------------------
  |  Branch (104:21): [True: 88, False: 118M]
  ------------------
  105|   118M|                bit = ConsumeBitLE(bitpos, data);
  106|   118M|                val += bit << (*bit_sizes_it - 1 - b); // Big-endian within the class
  107|   118M|            }
  108|  20.0M|            return val;
  109|  20.0M|        }
  110|  44.0M|    }
  111|     49|    return INVALID; // Reached EOF in exponent
  112|  20.0M|}
asmap.cpp:_ZN12_GLOBAL__N_19DecodeASNERmNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  151|  5.98M|{
  152|  5.98M|    return DecodeBits(bitpos, data, 1, ASN_BIT_SIZES);
  153|  5.98M|}
asmap.cpp:_ZN12_GLOBAL__N_110DecodeJumpERmNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  167|  1.56M|{
  168|  1.56M|    return DecodeBits(bitpos, data, 17, JUMP_BIT_SIZES);
  169|  1.56M|}
asmap.cpp:_ZN12_GLOBAL__N_112ConsumeBitBEERhNSt3__14spanIKSt4byteLm18446744073709551615EEE:
   64|  5.15M|{
   65|  5.15M|    const bool bit = (std::to_integer<uint8_t>(bytes[bitpos / 8]) >> (7 - (bitpos % 8))) & 1;
   66|  5.15M|    ++bitpos;
   67|  5.15M|    return bit;
   68|  5.15M|}
asmap.cpp:_ZN12_GLOBAL__N_111DecodeMatchERmNSt3__14spanIKSt4byteLm18446744073709551615EEE:
  159|  2.47M|{
  160|  2.47M|    return DecodeBits(bitpos, data, 2, MATCH_BIT_SIZES);
  161|  2.47M|}
asmap.cpp:_ZN12_GLOBAL__N_112ConsumeBitLEERmNSt3__14spanIKSt4byteLm18446744073709551615EEE:
   53|   158M|{
   54|   158M|    const bool bit = (std::to_integer<uint8_t>(bytes[bitpos / 8]) >> (bitpos % 8)) & 1;
   55|   158M|    ++bitpos;
   56|   158M|    return bit;
   57|   158M|}

_ZN10btcsignals6signalIFvvENS_10null_valueEED2Ev:
  175|      6|    ~signal() = default;
_ZN10btcsignals6signalIFv20SynchronizationStatellbENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFv20SynchronizationStateRK11CBlockIndexdENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFvRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEibENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFvbENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFviENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFvRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFbRK13bilingual_strRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEjENS_6any_ofEED2Ev:
  175|      2|    ~signal() = default;
_ZN10btcsignals6signalIFvRK13bilingual_strjENS_10null_valueEED2Ev:
  175|      2|    ~signal() = default;

_Z17ChainTypeToString9ChainType:
   13|  4.46k|{
   14|  4.46k|    switch (chain) {
  ------------------
  |  Branch (14:13): [True: 4.46k, False: 0]
  ------------------
   15|  4.46k|    case ChainType::MAIN:
  ------------------
  |  Branch (15:5): [True: 4.46k, False: 0]
  ------------------
   16|  4.46k|        return "main";
   17|      0|    case ChainType::TESTNET:
  ------------------
  |  Branch (17:5): [True: 0, False: 4.46k]
  ------------------
   18|      0|        return "test";
   19|      0|    case ChainType::TESTNET4:
  ------------------
  |  Branch (19:5): [True: 0, False: 4.46k]
  ------------------
   20|      0|        return "testnet4";
   21|      0|    case ChainType::SIGNET:
  ------------------
  |  Branch (21:5): [True: 0, False: 4.46k]
  ------------------
   22|      0|        return "signet";
   23|      0|    case ChainType::REGTEST:
  ------------------
  |  Branch (23:5): [True: 0, False: 4.46k]
  ------------------
   24|      0|        return "regtest";
   25|  4.46k|    }
   26|  4.46k|    assert(false);
  ------------------
  |  Branch (26:5): [Folded, False: 0]
  ------------------
   27|      0|}

_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_RKNS0_15source_locationENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   90|  2.23k|{
   91|  2.23k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 2.23k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  2.23k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 2.23k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  2.23k|    }
   96|  2.23k|    return std::forward<T>(val);
   97|  2.23k|}
_Z22inline_assertion_checkILb1ERNSt3__16atomicIbEEEOT0_S5_RKNS0_15source_locationENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   90|  2.23k|{
   91|  2.23k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 2.23k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  2.23k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 2.23k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  2.23k|    }
   96|  2.23k|    return std::forward<T>(val);
   97|  2.23k|}
_Z21EnableFuzzDeterminismv:
   39|  2.23k|{
   40|  2.23k|    if constexpr (G_FUZZING_BUILD) {
   41|  2.23k|        return true;
   42|       |    } else if constexpr (!G_ABORT_ON_FAILED_ASSUME) {
   43|       |        // Running fuzz tests is always disabled if Assume() doesn't abort
   44|       |        // (ie, non-fuzz non-debug builds), as otherwise tests which
   45|       |        // should fail due to a failing Assume may still pass. As such,
   46|       |        // we also statically disable fuzz determinism in that case.
   47|       |        return false;
   48|       |    } else {
   49|       |        return g_enable_dynamic_fuzz_determinism;
   50|       |    }
   51|  2.23k|}
_Z22inline_assertion_checkILb1ERbEOT0_S2_RKNSt3__115source_locationENS3_17basic_string_viewIcNS3_11char_traitsIcEEEE:
   90|  2.23k|{
   91|  2.23k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 2.23k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  2.23k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 2.23k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  2.23k|    }
   96|  2.23k|    return std::forward<T>(val);
   97|  2.23k|}
_Z22inline_assertion_checkILb1EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|  8.92k|{
   91|  8.92k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 8.92k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  8.92k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 8.92k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  8.92k|    }
   96|  8.92k|    return std::forward<T>(val);
   97|  8.92k|}
_Z22inline_assertion_checkILb0EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|   109M|{
   91|   109M|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [Folded, False: 0]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|   109M|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 109M]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|   109M|    }
   96|   109M|    return std::forward<T>(val);
   97|   109M|}

setup_common.cpp:_ZN2fsL12PathToStringERKNS_4pathE:
  163|      2|{
  164|       |    // Implementation note: On Windows, the std::filesystem::path(string)
  165|       |    // constructor and std::filesystem::path::string() method are not safe to
  166|       |    // use here, because these methods encode the path using C++'s narrow
  167|       |    // multibyte encoding, which on Windows corresponds to the current "code
  168|       |    // page", which is unpredictable and typically not able to represent all
  169|       |    // valid paths. So fs::path::utf8string() and
  170|       |    // fs::u8path() functions are used instead on Windows. On
  171|       |    // POSIX, u8string/utf8string/u8path functions are not safe to use because paths are
  172|       |    // not always valid UTF-8, so plain string methods which do not transform
  173|       |    // the path there are used.
  174|       |#ifdef WIN32
  175|       |    return path.utf8string();
  176|       |#else
  177|      2|    static_assert(std::is_same_v<path::string_type, std::string>, "PathToString not implemented on this platform");
  178|      2|    return path.std::filesystem::path::string();
  179|      2|#endif
  180|      2|}

_ZN4util3log22LogPrintFormatInternalIJPKcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEvO14SourceLocationN5BCLog8LogFlagsENS0_5LevelENS_21ConstevalFormatStringIXsZT_EEEDpRKT_:
  101|  2.23k|{
  102|  2.23k|    return LogPrintFormatInternal_(std::move(source_loc), flag, level, /*should_ratelimit=*/true, fmt, args...);
  103|  2.23k|}
_ZN4util3log23LogPrintFormatInternal_IJPKcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEvO14SourceLocationN5BCLog8LogFlagsENS0_5LevelEbNS_21ConstevalFormatStringIXsZT_EEEDpRKT_:
   84|  2.23k|{
   85|  2.23k|    std::string log_msg;
   86|  2.23k|    try {
   87|  2.23k|        log_msg = tfm::format(fmt, args...);
   88|  2.23k|    } catch (tinyformat::format_error& fmterr) {
   89|      0|        log_msg = "Error \"" + std::string{fmterr.what()} + "\" while formatting log message: " + fmt.fmt;
   90|      0|    }
   91|  2.23k|    util::log::Log(util::log::Entry{
   92|  2.23k|        .category = flag,
   93|  2.23k|        .level = level,
   94|  2.23k|        .should_ratelimit = should_ratelimit,
   95|  2.23k|        .source_loc = std::move(source_loc),
   96|  2.23k|        .message = std::move(log_msg)});
   97|  2.23k|}
_ZN14SourceLocationC2EPKcNSt3__115source_locationE:
   31|  3.86k|        : m_func{func}, m_loc{loc} {}
_ZN4util3log22LogPrintFormatInternalIJEEEvO14SourceLocationN5BCLog8LogFlagsENS0_5LevelENS_21ConstevalFormatStringIXsZT_EEEDpRKT_:
  101|  1.63k|{
  102|  1.63k|    return LogPrintFormatInternal_(std::move(source_loc), flag, level, /*should_ratelimit=*/true, fmt, args...);
  103|  1.63k|}
_ZN4util3log23LogPrintFormatInternal_IJEEEvO14SourceLocationN5BCLog8LogFlagsENS0_5LevelEbNS_21ConstevalFormatStringIXsZT_EEEDpRKT_:
   84|  1.63k|{
   85|  1.63k|    std::string log_msg;
   86|  1.63k|    try {
   87|  1.63k|        log_msg = tfm::format(fmt, args...);
   88|  1.63k|    } catch (tinyformat::format_error& fmterr) {
   89|      0|        log_msg = "Error \"" + std::string{fmterr.what()} + "\" while formatting log message: " + fmt.fmt;
   90|      0|    }
   91|  1.63k|    util::log::Log(util::log::Entry{
   92|  1.63k|        .category = flag,
   93|  1.63k|        .level = level,
   94|  1.63k|        .should_ratelimit = should_ratelimit,
   95|  1.63k|        .source_loc = std::move(source_loc),
   96|  1.63k|        .message = std::move(log_msg)});
   97|  1.63k|}

_Z10CheckedAddImENSt3__18optionalIT_EES2_S2_:
   28|   181M|{
   29|   181M|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (29:9): [True: 0, False: 181M]
  ------------------
   30|      0|        return std::nullopt;
   31|      0|    }
   32|   181M|    return i + j;
   33|   181M|}
_Z16AdditionOverflowITkNSt3__18integralEmEbT_S1_:
   18|   181M|{
   19|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   20|       |        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
   21|       |               (i < 0 && j < std::numeric_limits<T>::min() - i);
   22|       |    }
   23|   181M|    return std::numeric_limits<T>::max() - i < j;
   24|   181M|}

_ZN8StdMutex12CheckNotHeldERS_:
   37|  3.86k|    static inline StdMutex& CheckNotHeld(StdMutex& cs) EXCLUSIVE_LOCKS_REQUIRED(!cs) LOCK_RETURNED(cs) { return cs; }
_ZN8StdMutex5GuardC2ERS_:
   33|  3.86k|        explicit Guard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard<StdMutex>(cs) {}

_Z10ToIntegralIhENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEEm:
  181|     10|{
  182|     10|    static_assert(std::is_integral_v<T>);
  183|     10|    T result;
  184|     10|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result, base);
  185|     10|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (185:9): [True: 0, False: 10]
  |  Branch (185:57): [True: 0, False: 10]
  ------------------
  186|      0|        return std::nullopt;
  187|      0|    }
  188|     10|    return result;
  189|     10|}
_Z10ToIntegralItENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEEm:
  181|      2|{
  182|      2|    static_assert(std::is_integral_v<T>);
  183|      2|    T result;
  184|      2|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result, base);
  185|      2|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (185:9): [True: 0, False: 2]
  |  Branch (185:57): [True: 0, False: 2]
  ------------------
  186|      0|        return std::nullopt;
  187|      0|    }
  188|      2|    return result;
  189|      2|}

_ZN4util9HasPrefixI9prevectorILj16EhjiELm2EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|   134M|{
  264|   134M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 134M, False: 0]
  ------------------
  265|   134M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 23.0k, False: 134M]
  ------------------
  266|   134M|}
_ZN4util9HasPrefixI9prevectorILj16EhjiELm3EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|   483M|{
  264|   483M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 483M, False: 0]
  ------------------
  265|   483M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 147k, False: 483M]
  ------------------
  266|   483M|}
_ZN4util9HasPrefixI9prevectorILj16EhjiELm4EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|   148M|{
  264|   148M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 148M, False: 0]
  ------------------
  265|   148M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 15.5k, False: 148M]
  ------------------
  266|   148M|}
_ZN4util9HasPrefixI9prevectorILj16EhjiELm8EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|  94.9M|{
  264|  94.9M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 94.9M, False: 0]
  ------------------
  265|  94.9M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 12.2k, False: 94.9M]
  ------------------
  266|  94.9M|}
_ZN4util9HasPrefixI9prevectorILj16EhjiELm6EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|  14.3M|{
  264|  14.3M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 14.3M, False: 0]
  ------------------
  265|  14.3M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 460, False: 14.3M]
  ------------------
  266|  14.3M|}
_ZN4util9HasPrefixI9prevectorILj16EhjiELm12EEEbRKT_RKNSt3__15arrayIhXT0_EEE:
  263|  79.9M|{
  264|  79.9M|    return obj.size() >= PREFIX_LEN &&
  ------------------
  |  Branch (264:12): [True: 79.9M, False: 0]
  ------------------
  265|  79.9M|           std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
  ------------------
  |  Branch (265:12): [True: 38.2k, False: 79.9M]
  ------------------
  266|  79.9M|}

_ZN16CThreadInterruptD2Ev:
   32|      4|    virtual ~CThreadInterrupt() = default;

_ZN4util21ThreadGetInternalNameEv:
   56|  3.86k|std::string util::ThreadGetInternalName() { return g_thread_name; }

_ZN10ThreadPoolD2Ev:
   93|     10|    {
   94|     10|        Stop(); // In case it hasn't been stopped.
   95|     10|    }
_ZN10ThreadPool4StopEv:
  129|     10|    {
  130|       |        // Notify workers and join them
  131|     10|        std::vector<std::thread> threads_to_join;
  132|     10|        {
  133|     10|            LOCK(m_mutex);
  ------------------
  |  |  268|     10|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|     10|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|     10|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|     10|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|       |            // Ensure Stop() is not called from a worker thread while workers are still registered,
  135|       |            // otherwise a self-join deadlock would occur.
  136|     10|            auto id = std::this_thread::get_id();
  137|     10|            for (const auto& worker : m_workers) assert(worker.get_id() != id);
  ------------------
  |  Branch (137:37): [True: 0, False: 10]
  |  Branch (137:50): [True: 0, False: 0]
  ------------------
  138|       |            // Early shutdown to return right away on any concurrent Submit() call
  139|     10|            m_interrupt = true;
  140|     10|            threads_to_join.swap(m_workers);
  141|     10|        }
  142|      0|        m_cv.notify_all();
  143|       |        // Help draining queue
  144|     10|        while (ProcessTask()) {}
  ------------------
  |  Branch (144:16): [True: 0, False: 10]
  ------------------
  145|       |        // Free resources
  146|     10|        for (auto& worker : threads_to_join) worker.join();
  ------------------
  |  Branch (146:27): [True: 0, False: 10]
  ------------------
  147|       |
  148|       |        // Since we currently wait for tasks completion, sanity-check empty queue
  149|     10|        LOCK(m_mutex);
  ------------------
  |  |  268|     10|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|     10|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|     10|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|     10|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|     10|        Assume(m_work_queue.empty());
  ------------------
  |  |  128|     10|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  151|       |        // Re-allow Start() now that all workers have exited
  152|     10|        m_interrupt = false;
  153|     10|    }
_ZN10ThreadPool11ProcessTaskEv:
  244|     10|    {
  245|     10|        std::packaged_task<void()> task;
  246|     10|        {
  247|     10|            LOCK(m_mutex);
  ------------------
  |  |  268|     10|#define LOCK(cs) UniqueLock BITCOIN_UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|     10|#define BITCOIN_UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|     10|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|     10|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|     10|            if (m_work_queue.empty()) return false;
  ------------------
  |  Branch (248:17): [True: 10, False: 0]
  ------------------
  249|       |
  250|       |            // Pop the task
  251|      0|            task = std::move(m_work_queue.front());
  252|      0|            m_work_queue.pop();
  253|      0|        }
  254|      0|        task();
  255|      0|        return true;
  256|     10|    }

_ZN9NodeClock3nowEv:
   39|  10.0M|{
   40|  10.0M|    const auto mocktime{g_mock_time.load(std::memory_order_relaxed)};
   41|  10.0M|    if (!mocktime.count()) {
  ------------------
  |  Branch (41:9): [True: 0, False: 10.0M]
  ------------------
   42|      0|        g_used_system_time = true;
   43|      0|    }
   44|  10.0M|    const auto ret{
   45|  10.0M|        mocktime.count() ?
  ------------------
  |  Branch (45:9): [True: 10.0M, False: 0]
  ------------------
   46|  10.0M|            mocktime :
   47|  10.0M|            std::chrono::system_clock::now().time_since_epoch()};
   48|  10.0M|    assert(ret > 0s);
  ------------------
  |  Branch (48:5): [True: 10.0M, False: 0]
  ------------------
   49|  10.0M|    return time_point{ret};
   50|  10.0M|};
_Z11SetMockTimeNSt3__16chrono10time_pointI9NodeClockNS0_8durationIxNS_5ratioILl1ELl1EEEEEEE:
   52|  4.46k|void SetMockTime(std::chrono::time_point<NodeClock, std::chrono::seconds> mock) { SetMockTime(mock.time_since_epoch()); }
_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   54|  6.69k|{
   55|  6.69k|    Assert(mock_time_in >= 0s);
  ------------------
  |  |  116|  6.69k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
   56|  6.69k|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   57|  6.69k|}
_Z11GetMockTimev:
   60|  3.86k|{
   61|  3.86k|    return g_mock_time.load(std::memory_order_relaxed);
   62|  3.86k|}
_ZN19MockableSteadyClock13ClearMockTimeEv:
   84|  2.23k|{
   85|  2.23k|    g_mock_steady_time.store(0ms, std::memory_order_relaxed);
   86|  2.23k|}
_Z20ParseISO8601DateTimeNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
  108|      2|{
  109|      2|    constexpr auto FMT_SIZE{std::string_view{"2000-01-01T01:01:01Z"}.size()};
  110|      2|    if (str.size() != FMT_SIZE || str[4] != '-' || str[7] != '-' || str[10] != 'T' || str[13] != ':' || str[16] != ':' || str[19] != 'Z') {
  ------------------
  |  Branch (110:9): [True: 0, False: 2]
  |  Branch (110:35): [True: 0, False: 2]
  |  Branch (110:52): [True: 0, False: 2]
  |  Branch (110:69): [True: 0, False: 2]
  |  Branch (110:87): [True: 0, False: 2]
  |  Branch (110:105): [True: 0, False: 2]
  |  Branch (110:123): [True: 0, False: 2]
  ------------------
  111|      0|        return {};
  112|      0|    }
  113|      2|    const auto year{ToIntegral<uint16_t>(str.substr(0, 4))};
  114|      2|    const auto month{ToIntegral<uint8_t>(str.substr(5, 2))};
  115|      2|    const auto day{ToIntegral<uint8_t>(str.substr(8, 2))};
  116|      2|    const auto hour{ToIntegral<uint8_t>(str.substr(11, 2))};
  117|      2|    const auto min{ToIntegral<uint8_t>(str.substr(14, 2))};
  118|      2|    const auto sec{ToIntegral<uint8_t>(str.substr(17, 2))};
  119|      2|    if (!year || !month || !day || !hour || !min || !sec) {
  ------------------
  |  Branch (119:9): [True: 0, False: 2]
  |  Branch (119:18): [True: 0, False: 2]
  |  Branch (119:28): [True: 0, False: 2]
  |  Branch (119:36): [True: 0, False: 2]
  |  Branch (119:45): [True: 0, False: 2]
  |  Branch (119:53): [True: 0, False: 2]
  ------------------
  120|      0|        return {};
  121|      0|    }
  122|      2|    const std::chrono::year_month_day ymd{std::chrono::year{*year}, std::chrono::month{*month}, std::chrono::day{*day}};
  123|      2|    if (!ymd.ok()) {
  ------------------
  |  Branch (123:9): [True: 0, False: 2]
  ------------------
  124|      0|        return {};
  125|      0|    }
  126|      2|    const auto time{std::chrono::hours{*hour} + std::chrono::minutes{*min} + std::chrono::seconds{*sec}};
  127|      2|    const auto tp{std::chrono::sys_days{ymd} + time};
  128|      2|    return int64_t{TicksSinceEpoch<std::chrono::seconds>(tp)};
  129|      2|}

_Z5TicksINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEES5_EDaT0_:
   83|  37.3M|{
   84|  37.3M|    return std::chrono::duration_cast<Dur1>(d).count();
   85|  37.3M|}
_Z15TicksSinceEpochINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEENS1_10time_pointI9NodeClockS5_EEEDaT0_:
   94|  37.3M|{
   95|  37.3M|    return Ticks<Duration>(t.time_since_epoch());
   96|  37.3M|}
_Z15TicksSinceEpochINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEENS1_10time_pointINS1_12system_clockES5_EEEDaT0_:
   94|      2|{
   95|      2|    return Ticks<Duration>(t.time_since_epoch());
   96|      2|}
_Z5TicksINSt3__16chrono8durationIdNS0_5ratioILl1ELl1000EEEEENS2_IxNS3_ILl1ELl1000000000EEEEEEDaT0_:
   83|  2.23k|{
   84|  2.23k|    return std::chrono::duration_cast<Dur1>(d).count();
   85|  2.23k|}
_Z3NowINSt3__16chrono10time_pointI9NodeClockNS1_8durationIxNS0_5ratioILl1ELl1EEEEEEEET_v:
  128|  8.60M|{
  129|  8.60M|    return std::chrono::time_point_cast<typename T::duration>(T::clock::now());
  130|  8.60M|}

_ZN12TokenPipeEndD2Ev:
   37|      4|{
   38|      4|    Close();
   39|      4|}
_ZN12TokenPipeEnd5CloseEv:
   80|      4|{
   81|      4|    if (m_fd != -1) close(m_fd);
  ------------------
  |  Branch (81:9): [True: 4, False: 0]
  ------------------
   82|      4|    m_fd = -1;
   83|      4|}

_ZN19WalletInitInterfaceD2Ev:
   25|      2|    virtual ~WalletInitInterface() = default;

