_ZN10ScriptHashC2ERK7CScript:
   20|  10.4k|ScriptHash::ScriptHash(const CScript& in) : BaseHash(Hash160(in)) {}
_ZN6PKHashC2ERK6CKeyID:
   24|  16.5k|PKHash::PKHash(const CKeyID& pubkey_id) : BaseHash(pubkey_id) {}
_Z7ToKeyIDRK6PKHash:
   30|  33.2k|{
   31|  33.2k|    return CKeyID{uint160{key_hash}};
   32|  33.2k|}
_Z7ToKeyIDRK16WitnessV0KeyHash:
   35|  4.34k|{
   36|  4.34k|    return CKeyID{uint160{key_hash}};
   37|  4.34k|}
_Z10ToScriptIDRK10ScriptHash:
   40|  4.19k|{
   41|  4.19k|    return CScriptID{uint160{script_hash}};
   42|  4.19k|}
_ZN19WitnessV0ScriptHashC2ERK7CScript:
   45|  3.58k|{
   46|  3.58k|    CSHA256().Write(in.data(), in.size()).Finalize(begin());
   47|  3.58k|}
_Z18ExtractDestinationRK7CScriptRNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
   50|  54.1k|{
   51|  54.1k|    std::vector<valtype> vSolutions;
   52|  54.1k|    TxoutType whichType = Solver(scriptPubKey, vSolutions);
   53|       |
   54|  54.1k|    switch (whichType) {
  ------------------
  |  Branch (54:13): [True: 0, False: 54.1k]
  ------------------
   55|  5.43k|    case TxoutType::PUBKEY: {
  ------------------
  |  Branch (55:5): [True: 5.43k, False: 48.6k]
  ------------------
   56|  5.43k|        CPubKey pubKey(vSolutions[0]);
   57|  5.43k|        if (!pubKey.IsValid()) {
  ------------------
  |  Branch (57:13): [True: 0, False: 5.43k]
  ------------------
   58|      0|            addressRet = CNoDestination(scriptPubKey);
   59|  5.43k|        } else {
   60|  5.43k|            addressRet = PubKeyDestination(pubKey);
   61|  5.43k|        }
   62|  5.43k|        return false;
   63|      0|    }
   64|  22.6k|    case TxoutType::PUBKEYHASH: {
  ------------------
  |  Branch (64:5): [True: 22.6k, False: 31.4k]
  ------------------
   65|  22.6k|        addressRet = PKHash(uint160(vSolutions[0]));
   66|  22.6k|        return true;
   67|      0|    }
   68|  7.39k|    case TxoutType::SCRIPTHASH: {
  ------------------
  |  Branch (68:5): [True: 7.39k, False: 46.7k]
  ------------------
   69|  7.39k|        addressRet = ScriptHash(uint160(vSolutions[0]));
   70|  7.39k|        return true;
   71|      0|    }
   72|  4.63k|    case TxoutType::WITNESS_V0_KEYHASH: {
  ------------------
  |  Branch (72:5): [True: 4.63k, False: 49.4k]
  ------------------
   73|  4.63k|        WitnessV0KeyHash hash;
   74|  4.63k|        std::copy(vSolutions[0].begin(), vSolutions[0].end(), hash.begin());
   75|  4.63k|        addressRet = hash;
   76|  4.63k|        return true;
   77|      0|    }
   78|  2.45k|    case TxoutType::WITNESS_V0_SCRIPTHASH: {
  ------------------
  |  Branch (78:5): [True: 2.45k, False: 51.6k]
  ------------------
   79|  2.45k|        WitnessV0ScriptHash hash;
   80|  2.45k|        std::copy(vSolutions[0].begin(), vSolutions[0].end(), hash.begin());
   81|  2.45k|        addressRet = hash;
   82|  2.45k|        return true;
   83|      0|    }
   84|  3.79k|    case TxoutType::WITNESS_V1_TAPROOT: {
  ------------------
  |  Branch (84:5): [True: 3.79k, False: 50.3k]
  ------------------
   85|  3.79k|        WitnessV1Taproot tap;
   86|  3.79k|        std::copy(vSolutions[0].begin(), vSolutions[0].end(), tap.begin());
   87|  3.79k|        addressRet = tap;
   88|  3.79k|        return true;
   89|      0|    }
   90|     70|    case TxoutType::ANCHOR: {
  ------------------
  |  Branch (90:5): [True: 70, False: 54.0k]
  ------------------
   91|     70|        addressRet = PayToAnchor();
   92|     70|        return true;
   93|      0|    }
   94|  1.15k|    case TxoutType::WITNESS_UNKNOWN: {
  ------------------
  |  Branch (94:5): [True: 1.15k, False: 52.9k]
  ------------------
   95|  1.15k|        addressRet = WitnessUnknown{vSolutions[0][0], vSolutions[1]};
   96|  1.15k|        return true;
   97|      0|    }
   98|  3.26k|    case TxoutType::MULTISIG:
  ------------------
  |  Branch (98:5): [True: 3.26k, False: 50.8k]
  ------------------
   99|  3.37k|    case TxoutType::NULL_DATA:
  ------------------
  |  Branch (99:5): [True: 111, False: 54.0k]
  ------------------
  100|  6.56k|    case TxoutType::NONSTANDARD:
  ------------------
  |  Branch (100:5): [True: 3.19k, False: 50.9k]
  ------------------
  101|  6.56k|        addressRet = CNoDestination(scriptPubKey);
  102|  6.56k|        return false;
  103|  54.1k|    } // no default case, so the compiler can warn about missing cases
  104|      0|    assert(false);
  105|      0|}
_Z23GetScriptForDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  167|  95.3k|{
  168|  95.3k|    return std::visit(CScriptVisitor(), dest);
  169|  95.3k|}
_Z18IsValidDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  171|  9.95k|bool IsValidDestination(const CTxDestination& dest) {
  172|  9.95k|    return std::visit(ValidDestinationVisitor(), dest);
  173|  9.95k|}
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK6PKHash:
  122|  62.7k|    {
  123|  62.7k|        return CScript() << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
  124|  62.7k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK10ScriptHash:
  127|  14.9k|    {
  128|  14.9k|        return CScript() << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
  129|  14.9k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK19WitnessV0ScriptHash:
  137|  4.64k|    {
  138|  4.64k|        return CScript() << OP_0 << ToByteVector(id);
  139|  4.64k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK16WitnessV0KeyHash:
  132|  5.22k|    {
  133|  5.22k|        return CScript() << OP_0 << ToByteVector(id);
  134|  5.22k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK16WitnessV1Taproot:
  142|  7.28k|    {
  143|  7.28k|        return CScript() << OP_1 << ToByteVector(tap);
  144|  7.28k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK14WitnessUnknown:
  147|    507|    {
  148|    507|        return CScript() << CScript::EncodeOP_N(id.GetWitnessVersion()) << id.GetWitnessProgram();
  149|    507|    }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK14CNoDestination:
  155|    227|    bool operator()(const CNoDestination& dest) const { return false; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK6PKHash:
  157|  3.95k|    bool operator()(const PKHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK10ScriptHash:
  158|  2.89k|    bool operator()(const ScriptHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK19WitnessV0ScriptHash:
  160|  1.21k|    bool operator()(const WitnessV0ScriptHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK16WitnessV0KeyHash:
  159|    141|    bool operator()(const WitnessV0KeyHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK16WitnessV1Taproot:
  161|  1.52k|    bool operator()(const WitnessV1Taproot& dest) const { return true; }

_ZN14CNoDestinationC2ERK7CScript:
   26|  6.56k|    explicit CNoDestination(const CScript& script) : m_script(script) {}
_ZN17PubKeyDestinationC2ERK7CPubKey:
   39|  5.43k|    explicit PubKeyDestination(const CPubKey& pubkey) : m_pubkey(pubkey) {}
_ZN6PKHashC2ERK7uint160:
   50|  35.2k|    explicit PKHash(const uint160& hash) : BaseHash(hash) {}
_ZN10ScriptHashC2ERK7uint160:
   66|  7.41k|    explicit ScriptHash(const uint160& hash) : BaseHash(hash) {}
_ZN19WitnessV0ScriptHashC2Ev:
   74|  2.45k|    WitnessV0ScriptHash() : BaseHash() {}
_ZN16WitnessV0KeyHashC2Ev:
   81|  4.63k|    WitnessV0KeyHash() : BaseHash() {}
_ZN16WitnessV0KeyHashC2ERK7uint160:
   82|  2.84k|    explicit WitnessV0KeyHash(const uint160& hash) : BaseHash(hash) {}
_ZN16WitnessV1TaprootC2Ev:
   90|  3.79k|    WitnessV1Taproot() : XOnlyPubKey() {}
_ZN16WitnessV1TaprootC2ERK11XOnlyPubKey:
   91|  5.43k|    explicit WitnessV1Taproot(const XOnlyPubKey& xpk) : XOnlyPubKey(xpk) {}
_ZN14WitnessUnknownC2EiRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  103|  1.22k|    WitnessUnknown(int version, const std::vector<unsigned char>& program) : m_version(static_cast<unsigned int>(version)), m_program(program) {}
_ZNK14WitnessUnknown17GetWitnessVersionEv:
  105|  1.61k|    unsigned int GetWitnessVersion() const { return m_version; }
_ZNK14WitnessUnknown17GetWitnessProgramEv:
  106|    949|    const std::vector<unsigned char>& GetWitnessProgram() const LIFETIMEBOUND { return m_program; }
_ZltRK14WitnessUnknownS1_:
  113|    110|    friend bool operator<(const WitnessUnknown& w1, const WitnessUnknown& w2) {
  114|    110|        if (w1.GetWitnessVersion() < w2.GetWitnessVersion()) return true;
  ------------------
  |  Branch (114:13): [True: 0, False: 110]
  ------------------
  115|    110|        if (w1.GetWitnessVersion() > w2.GetWitnessVersion()) return false;
  ------------------
  |  Branch (115:13): [True: 0, False: 110]
  ------------------
  116|    110|        return w1.GetWitnessProgram() < w2.GetWitnessProgram();
  117|    110|    }
_ZN11PayToAnchorC2Ev:
  122|     70|    PayToAnchor() : WitnessUnknown(1, {0x4e, 0x73}) {
  123|     70|        Assume(CScript::IsPayToAnchor(1, {0x4e, 0x73}));
  ------------------
  |  |   97|     70|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  124|     70|    };
_ZN14CNoDestinationC2Ev:
   25|  54.3k|    CNoDestination() = default;

_ZN11AddrManImplD2Ev:
  128|      2|{
  129|      2|    nKey.SetNull();
  130|      2|}
_ZN7AddrManD2Ev:
 1275|      2|AddrMan::~AddrMan() = default;

_ZN6BanManD2Ev:
   25|      2|{
   26|      2|    DumpBanlist();
   27|      2|}
_ZN6BanMan11DumpBanlistEv:
   49|      2|{
   50|      2|    static Mutex dump_mutex;
   51|      2|    LOCK(dump_mutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   52|       |
   53|      2|    banmap_t banmap;
   54|      2|    {
   55|      2|        LOCK(m_banned_mutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   56|      2|        SweepBanned();
   57|      2|        if (!m_is_dirty) return;
  ------------------
  |  Branch (57:13): [True: 2, False: 0]
  ------------------
   58|      0|        banmap = m_banned;
   59|      0|        m_is_dirty = false;
   60|      0|    }
   61|       |
   62|      0|    const auto start{SteadyClock::now()};
   63|      0|    if (!m_ban_db.Write(banmap)) {
  ------------------
  |  Branch (63:9): [True: 0, False: 0]
  ------------------
   64|      0|        LOCK(m_banned_mutex);
  ------------------
  |  |  257|      0|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      0|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      0|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      0|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   65|      0|        m_is_dirty = true;
   66|      0|    }
   67|       |
   68|      0|    LogDebug(BCLog::NET, "Flushed %d banned node addresses/subnets to disk  %dms\n", banmap.size(),
  ------------------
  |  |  280|      0|#define LogDebug(category, ...) LogPrintLevel(category, BCLog::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  273|      0|    do {                                                  \
  |  |  |  |  274|      0|        if (LogAcceptCategory((category), (level))) {     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  275|      0|            LogPrintLevel_(category, level, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  255|      0|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  276|      0|        }                                                 \
  |  |  |  |  277|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|      0|             Ticks<std::chrono::milliseconds>(SteadyClock::now() - start));
   70|      0|}
_ZN6BanMan11SweepBannedEv:
  183|      2|{
  184|      2|    AssertLockHeld(m_banned_mutex);
  ------------------
  |  |  142|      2|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  185|       |
  186|      2|    int64_t now = GetTime();
  187|      2|    bool notify_ui = false;
  188|      2|    banmap_t::iterator it = m_banned.begin();
  189|      2|    while (it != m_banned.end()) {
  ------------------
  |  Branch (189:12): [True: 0, False: 2]
  ------------------
  190|      0|        CSubNet sub_net = (*it).first;
  191|      0|        CBanEntry ban_entry = (*it).second;
  192|      0|        if (!sub_net.IsValid() || now > ban_entry.nBanUntil) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  |  Branch (192:35): [True: 0, False: 0]
  ------------------
  193|      0|            m_banned.erase(it++);
  194|      0|            m_is_dirty = true;
  195|      0|            notify_ui = true;
  196|      0|            LogDebug(BCLog::NET, "Removed banned node address/subnet: %s\n", sub_net.ToString());
  ------------------
  |  |  280|      0|#define LogDebug(category, ...) LogPrintLevel(category, BCLog::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  273|      0|    do {                                                  \
  |  |  |  |  274|      0|        if (LogAcceptCategory((category), (level))) {     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  275|      0|            LogPrintLevel_(category, level, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  255|      0|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  276|      0|        }                                                 \
  |  |  |  |  277|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|      0|        } else {
  198|      0|            ++it;
  199|      0|        }
  200|      0|    }
  201|       |
  202|       |    // update UI
  203|      2|    if (notify_ui && m_client_interface) {
  ------------------
  |  Branch (203:9): [True: 0, False: 2]
  |  Branch (203:22): [True: 0, False: 0]
  ------------------
  204|      0|        m_client_interface->BannedListChanged();
  205|      0|    }
  206|      2|}

_Z12EncodeBase584SpanIKhE:
   90|   292k|{
   91|       |    // Skip & count leading zeroes.
   92|   292k|    int zeroes = 0;
   93|   292k|    int length = 0;
   94|   293k|    while (input.size() > 0 && input[0] == 0) {
  ------------------
  |  Branch (94:12): [True: 293k, False: 0]
  |  Branch (94:32): [True: 272, False: 292k]
  ------------------
   95|    272|        input = input.subspan(1);
   96|    272|        zeroes++;
   97|    272|    }
   98|       |    // Allocate enough space in big-endian base58 representation.
   99|   292k|    int size = input.size() * 138 / 100 + 1; // log(256) / log(58), rounded up.
  100|   292k|    std::vector<unsigned char> b58(size);
  101|       |    // Process the bytes.
  102|  24.1M|    while (input.size() > 0) {
  ------------------
  |  Branch (102:12): [True: 23.8M, False: 292k]
  ------------------
  103|  23.8M|        int carry = input[0];
  104|  23.8M|        int i = 0;
  105|       |        // Apply "b58 = b58 * 256 + ch".
  106|  1.36G|        for (std::vector<unsigned char>::reverse_iterator it = b58.rbegin(); (carry != 0 || i < length) && (it != b58.rend()); it++, i++) {
  ------------------
  |  Branch (106:78): [True: 1.33G, False: 23.8M]
  |  Branch (106:79): [True: 1.33G, False: 31.2M]
  |  Branch (106:93): [True: 7.36M, False: 23.8M]
  |  Branch (106:108): [True: 1.33G, False: 0]
  ------------------
  107|  1.33G|            carry += 256 * (*it);
  108|  1.33G|            *it = carry % 58;
  109|  1.33G|            carry /= 58;
  110|  1.33G|        }
  111|       |
  112|  23.8M|        assert(carry == 0);
  113|  23.8M|        length = i;
  114|  23.8M|        input = input.subspan(1);
  115|  23.8M|    }
  116|       |    // Skip leading zeroes in base58 result.
  117|   292k|    std::vector<unsigned char>::iterator it = b58.begin() + (size - length);
  118|   292k|    while (it != b58.end() && *it == 0)
  ------------------
  |  Branch (118:12): [True: 292k, False: 0]
  |  Branch (118:12): [True: 0, False: 292k]
  |  Branch (118:31): [True: 0, False: 292k]
  ------------------
  119|      0|        it++;
  120|       |    // Translate the result into a string.
  121|   292k|    std::string str;
  122|   292k|    str.reserve(zeroes + (b58.end() - it));
  123|   292k|    str.assign(zeroes, '1');
  124|  32.6M|    while (it != b58.end())
  ------------------
  |  Branch (124:12): [True: 32.3M, False: 292k]
  ------------------
  125|  32.3M|        str += pszBase58[*(it++)];
  126|   292k|    return str;
  127|   292k|}
_Z12DecodeBase58RKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  130|     27|{
  131|     27|    if (!ContainsNoNUL(str)) {
  ------------------
  |  Branch (131:9): [True: 0, False: 27]
  ------------------
  132|      0|        return false;
  133|      0|    }
  134|     27|    return DecodeBase58(str.c_str(), vchRet, max_ret_len);
  135|     27|}
_Z17EncodeBase58Check4SpanIKhE:
  138|   292k|{
  139|       |    // add 4-byte hash check to the end
  140|   292k|    std::vector<unsigned char> vch(input.begin(), input.end());
  141|   292k|    uint256 hash = Hash(vch);
  142|   292k|    vch.insert(vch.end(), hash.data(), hash.data() + 4);
  143|   292k|    return EncodeBase58(vch);
  144|   292k|}
_Z17DecodeBase58CheckRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  164|   168k|{
  165|   168k|    if (!ContainsNoNUL(str)) {
  ------------------
  |  Branch (165:9): [True: 0, False: 168k]
  ------------------
  166|      0|        return false;
  167|      0|    }
  168|   168k|    return DecodeBase58Check(str.c_str(), vchRet, max_ret);
  169|   168k|}
base58.cpp:_ZL12DecodeBase58PKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
   41|   168k|{
   42|       |    // Skip leading spaces.
   43|   169k|    while (*psz && IsSpace(*psz))
  ------------------
  |  Branch (43:12): [True: 169k, False: 12]
  |  Branch (43:20): [True: 395, False: 168k]
  ------------------
   44|    395|        psz++;
   45|       |    // Skip and count leading '1's.
   46|   168k|    int zeroes = 0;
   47|   168k|    int length = 0;
   48|   169k|    while (*psz == '1') {
  ------------------
  |  Branch (48:12): [True: 693, False: 168k]
  ------------------
   49|    693|        zeroes++;
   50|    693|        if (zeroes > max_ret_len) return false;
  ------------------
  |  Branch (50:13): [True: 6, False: 687]
  ------------------
   51|    687|        psz++;
   52|    687|    }
   53|       |    // Allocate enough space in big-endian base256 representation.
   54|   168k|    int size = strlen(psz) * 733 /1000 + 1; // log(58) / log(256), rounded up.
   55|   168k|    std::vector<unsigned char> b256(size);
   56|       |    // Process the characters.
   57|   168k|    static_assert(std::size(mapBase58) == 256, "mapBase58.size() should be 256"); // guarantee not out of range
   58|  14.8M|    while (*psz && !IsSpace(*psz)) {
  ------------------
  |  Branch (58:12): [True: 14.6M, False: 145k]
  |  Branch (58:20): [True: 14.6M, False: 267]
  ------------------
   59|       |        // Decode base58 character
   60|  14.6M|        int carry = mapBase58[(uint8_t)*psz];
   61|  14.6M|        if (carry == -1)  // Invalid b58 character
  ------------------
  |  Branch (61:13): [True: 258, False: 14.6M]
  ------------------
   62|    258|            return false;
   63|  14.6M|        int i = 0;
   64|   546M|        for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
  ------------------
  |  Branch (64:79): [True: 531M, False: 14.6M]
  |  Branch (64:80): [True: 522M, False: 24.0M]
  |  Branch (64:94): [True: 9.40M, False: 14.6M]
  |  Branch (64:109): [True: 531M, False: 0]
  ------------------
   65|   531M|            carry += 58 * (*it);
   66|   531M|            *it = carry % 256;
   67|   531M|            carry /= 256;
   68|   531M|        }
   69|  14.6M|        assert(carry == 0);
   70|  14.6M|        length = i;
   71|  14.6M|        if (length + zeroes > max_ret_len) return false;
  ------------------
  |  Branch (71:13): [True: 23.0k, False: 14.6M]
  ------------------
   72|  14.6M|        psz++;
   73|  14.6M|    }
   74|       |    // Skip trailing spaces.
   75|   148k|    while (IsSpace(*psz))
  ------------------
  |  Branch (75:12): [True: 2.61k, False: 145k]
  ------------------
   76|  2.61k|        psz++;
   77|   145k|    if (*psz != 0)
  ------------------
  |  Branch (77:9): [True: 19, False: 145k]
  ------------------
   78|     19|        return false;
   79|       |    // Skip leading zeroes in b256.
   80|   145k|    std::vector<unsigned char>::iterator it = b256.begin() + (size - length);
   81|       |    // Copy result into output vector.
   82|   145k|    vch.reserve(zeroes + (b256.end() - it));
   83|   145k|    vch.assign(zeroes, 0x00);
   84|  10.0M|    while (it != b256.end())
  ------------------
  |  Branch (84:12): [True: 9.93M, False: 145k]
  ------------------
   85|  9.93M|        vch.push_back(*(it++));
   86|   145k|    return true;
   87|   145k|}
base58.cpp:_ZL17DecodeBase58CheckPKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
  147|   168k|{
  148|   168k|    if (!DecodeBase58(psz, vchRet, max_ret_len > std::numeric_limits<int>::max() - 4 ? std::numeric_limits<int>::max() : max_ret_len + 4) ||
  ------------------
  |  Branch (148:9): [True: 23.3k, False: 145k]
  |  Branch (148:36): [True: 0, False: 168k]
  ------------------
  149|   168k|        (vchRet.size() < 4)) {
  ------------------
  |  Branch (149:9): [True: 59, False: 145k]
  ------------------
  150|  23.3k|        vchRet.clear();
  151|  23.3k|        return false;
  152|  23.3k|    }
  153|       |    // re-calculate the checksum, ensure it matches the included 4-byte checksum
  154|   145k|    uint256 hash = Hash(Span{vchRet}.first(vchRet.size() - 4));
  155|   145k|    if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
  ------------------
  |  Branch (155:9): [True: 31, False: 145k]
  ------------------
  156|     31|        vchRet.clear();
  157|     31|        return false;
  158|     31|    }
  159|   145k|    vchRet.resize(vchRet.size() - 4);
  160|   145k|    return true;
  161|   145k|}

_ZN6bech326EncodeENS_8EncodingERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
  358|    902|std::string Encode(Encoding encoding, const std::string& hrp, const data& values) {
  359|       |    // First ensure that the HRP is all lowercase. BIP-173 and BIP350 require an encoder
  360|       |    // to return a lowercase Bech32/Bech32m string, but if given an uppercase HRP, the
  361|       |    // result will always be invalid.
  362|    902|    for (const char& c : hrp) assert(c < 'A' || c > 'Z');
  ------------------
  |  Branch (362:24): [True: 1.80k, False: 902]
  ------------------
  363|       |
  364|    902|    std::string ret;
  365|    902|    ret.reserve(hrp.size() + 1 + values.size() + CHECKSUM_SIZE);
  366|    902|    ret += hrp;
  367|    902|    ret += SEPARATOR;
  368|  43.2k|    for (const uint8_t& i : values) ret += CHARSET[i];
  ------------------
  |  Branch (368:27): [True: 43.2k, False: 902]
  ------------------
  369|  5.41k|    for (const uint8_t& i : CreateChecksum(encoding, hrp, values)) ret += CHARSET[i];
  ------------------
  |  Branch (369:27): [True: 5.41k, False: 902]
  ------------------
  370|    902|    return ret;
  371|    902|}
_ZN6bech326DecodeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS_9CharLimitE:
  374|    200|DecodeResult Decode(const std::string& str, CharLimit limit) {
  375|    200|    std::vector<int> errors;
  376|    200|    if (!CheckCharacters(str, errors)) return {};
  ------------------
  |  Branch (376:9): [True: 72, False: 128]
  ------------------
  377|    128|    size_t pos = str.rfind(SEPARATOR);
  378|    128|    if (str.size() > limit) return {};
  ------------------
  |  Branch (378:9): [True: 16, False: 112]
  ------------------
  379|    112|    if (pos == str.npos || pos == 0 || pos + CHECKSUM_SIZE >= str.size()) {
  ------------------
  |  Branch (379:9): [True: 7, False: 105]
  |  Branch (379:28): [True: 0, False: 105]
  |  Branch (379:40): [True: 6, False: 99]
  ------------------
  380|     13|        return {};
  381|     13|    }
  382|     99|    data values(str.size() - 1 - pos);
  383|  1.86k|    for (size_t i = 0; i < str.size() - 1 - pos; ++i) {
  ------------------
  |  Branch (383:24): [True: 1.77k, False: 88]
  ------------------
  384|  1.77k|        unsigned char c = str[i + pos + 1];
  385|  1.77k|        int8_t rev = CHARSET_REV[c];
  386|       |
  387|  1.77k|        if (rev == -1) {
  ------------------
  |  Branch (387:13): [True: 11, False: 1.76k]
  ------------------
  388|     11|            return {};
  389|     11|        }
  390|  1.76k|        values[i] = rev;
  391|  1.76k|    }
  392|     88|    std::string hrp;
  393|     88|    hrp.reserve(pos);
  394|  1.63k|    for (size_t i = 0; i < pos; ++i) {
  ------------------
  |  Branch (394:24): [True: 1.54k, False: 88]
  ------------------
  395|  1.54k|        hrp += LowerCase(str[i]);
  396|  1.54k|    }
  397|     88|    Encoding result = VerifyChecksum(hrp, values);
  398|     88|    if (result == Encoding::INVALID) return {};
  ------------------
  |  Branch (398:9): [True: 88, False: 0]
  ------------------
  399|      0|    return {result, std::move(hrp), data(values.begin(), values.end() - CHECKSUM_SIZE)};
  400|     88|}
_ZN6bech3212LocateErrorsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS_9CharLimitE:
  403|    200|std::pair<std::string, std::vector<int>> LocateErrors(const std::string& str, CharLimit limit) {
  404|    200|    std::vector<int> error_locations{};
  405|       |
  406|    200|    if (str.size() > limit) {
  ------------------
  |  Branch (406:9): [True: 66, False: 134]
  ------------------
  407|     66|        error_locations.resize(str.size() - limit);
  408|     66|        std::iota(error_locations.begin(), error_locations.end(), static_cast<int>(limit));
  409|     66|        return std::make_pair("Bech32 string too long", std::move(error_locations));
  410|     66|    }
  411|       |
  412|    134|    if (!CheckCharacters(str, error_locations)){
  ------------------
  |  Branch (412:9): [True: 22, False: 112]
  ------------------
  413|     22|        return std::make_pair("Invalid character or mixed case", std::move(error_locations));
  414|     22|    }
  415|       |
  416|    112|    size_t pos = str.rfind(SEPARATOR);
  417|    112|    if (pos == str.npos) {
  ------------------
  |  Branch (417:9): [True: 7, False: 105]
  ------------------
  418|      7|        return std::make_pair("Missing separator", std::vector<int>{});
  419|      7|    }
  420|    105|    if (pos == 0 || pos + CHECKSUM_SIZE >= str.size()) {
  ------------------
  |  Branch (420:9): [True: 0, False: 105]
  |  Branch (420:21): [True: 6, False: 99]
  ------------------
  421|      6|        error_locations.push_back(pos);
  422|      6|        return std::make_pair("Invalid separator position", std::move(error_locations));
  423|      6|    }
  424|       |
  425|     99|    std::string hrp;
  426|     99|    hrp.reserve(pos);
  427|  1.78k|    for (size_t i = 0; i < pos; ++i) {
  ------------------
  |  Branch (427:24): [True: 1.68k, False: 99]
  ------------------
  428|  1.68k|        hrp += LowerCase(str[i]);
  429|  1.68k|    }
  430|       |
  431|     99|    size_t length = str.size() - 1 - pos; // length of data part
  432|     99|    data values(length);
  433|  1.86k|    for (size_t i = pos + 1; i < str.size(); ++i) {
  ------------------
  |  Branch (433:30): [True: 1.77k, False: 88]
  ------------------
  434|  1.77k|        unsigned char c = str[i];
  435|  1.77k|        int8_t rev = CHARSET_REV[c];
  436|  1.77k|        if (rev == -1) {
  ------------------
  |  Branch (436:13): [True: 11, False: 1.76k]
  ------------------
  437|     11|            error_locations.push_back(i);
  438|     11|            return std::make_pair("Invalid Base 32 character", std::move(error_locations));
  439|     11|        }
  440|  1.76k|        values[i - pos - 1] = rev;
  441|  1.76k|    }
  442|       |
  443|       |    // We attempt error detection with both bech32 and bech32m, and choose the one with the fewest errors
  444|       |    // We can't simply use the segwit version, because that may be one of the errors
  445|     88|    std::optional<Encoding> error_encoding;
  446|    176|    for (Encoding encoding : {Encoding::BECH32, Encoding::BECH32M}) {
  ------------------
  |  Branch (446:28): [True: 176, False: 88]
  ------------------
  447|    176|        std::vector<int> possible_errors;
  448|       |        // Recall that (expanded hrp + values) is interpreted as a list of coefficients of a polynomial
  449|       |        // over GF(32). PolyMod computes the "remainder" of this polynomial modulo the generator G(x).
  450|    176|        auto enc = PreparePolynomialCoefficients(hrp, values);
  451|    176|        uint32_t residue = PolyMod(enc) ^ EncodingConstant(encoding);
  452|       |
  453|       |        // All valid codewords should be multiples of G(x), so this remainder (after XORing with the encoding
  454|       |        // constant) should be 0 - hence 0 indicates there are no errors present.
  455|    176|        if (residue != 0) {
  ------------------
  |  Branch (455:13): [True: 176, False: 0]
  ------------------
  456|       |            // If errors are present, our polynomial must be of the form C(x) + E(x) where C is the valid
  457|       |            // codeword (a multiple of G(x)), and E encodes the errors.
  458|    176|            uint32_t syn = Syndrome(residue);
  459|       |
  460|       |            // Unpack the three 10-bit syndrome values
  461|    176|            int s0 = syn & 0x3FF;
  462|    176|            int s1 = (syn >> 10) & 0x3FF;
  463|    176|            int s2 = syn >> 20;
  464|       |
  465|       |            // Get the discrete logs of these values in GF1024 for more efficient computation
  466|    176|            int l_s0 = GF1024_LOG.at(s0);
  467|    176|            int l_s1 = GF1024_LOG.at(s1);
  468|    176|            int l_s2 = GF1024_LOG.at(s2);
  469|       |
  470|       |            // First, suppose there is only a single error. Then E(x) = e1*x^p1 for some position p1
  471|       |            // Then s0 = E((e)^997) = e1*(e)^(997*p1) and s1 = E((e)^998) = e1*(e)^(998*p1)
  472|       |            // Therefore s1/s0 = (e)^p1, and by the same logic, s2/s1 = (e)^p1 too.
  473|       |            // Hence, s1^2 == s0*s2, which is exactly the condition we check first:
  474|    176|            if (l_s0 != -1 && l_s1 != -1 && l_s2 != -1 && (2 * l_s1 - l_s2 - l_s0 + 2046) % 1023 == 0) {
  ------------------
  |  Branch (474:17): [True: 169, False: 7]
  |  Branch (474:31): [True: 165, False: 4]
  |  Branch (474:45): [True: 164, False: 1]
  |  Branch (474:59): [True: 3, False: 161]
  ------------------
  475|       |                // Compute the error position p1 as l_s1 - l_s0 = p1 (mod 1023)
  476|      3|                size_t p1 = (l_s1 - l_s0 + 1023) % 1023; // the +1023 ensures it is positive
  477|       |                // Now because s0 = e1*(e)^(997*p1), we get e1 = s0/((e)^(997*p1)). Remember that (e)^1023 = 1,
  478|       |                // so 1/((e)^997) = (e)^(1023-997).
  479|      3|                int l_e1 = l_s0 + (1023 - 997) * p1;
  480|       |                // Finally, some sanity checks on the result:
  481|       |                // - The error position should be within the length of the data
  482|       |                // - e1 should be in GF(32), which implies that e1 = (e)^(33k) for some k (the 31 non-zero elements
  483|       |                // of GF(32) form an index 33 subgroup of the 1023 non-zero elements of GF(1024)).
  484|      3|                if (p1 < length && !(l_e1 % 33)) {
  ------------------
  |  Branch (484:21): [True: 0, False: 3]
  |  Branch (484:36): [True: 0, False: 0]
  ------------------
  485|       |                    // Polynomials run from highest power to lowest, so the index p1 is from the right.
  486|       |                    // We don't return e1 because it is dangerous to suggest corrections to the user,
  487|       |                    // the user should check the address themselves.
  488|      0|                    possible_errors.push_back(str.size() - p1 - 1);
  489|      0|                }
  490|       |            // Otherwise, suppose there are two errors. Then E(x) = e1*x^p1 + e2*x^p2.
  491|    173|            } else {
  492|       |                // For all possible first error positions p1
  493|  3.52k|                for (size_t p1 = 0; p1 < length; ++p1) {
  ------------------
  |  Branch (493:37): [True: 3.35k, False: 168]
  ------------------
  494|       |                    // We have guessed p1, and want to solve for p2. Recall that E(x) = e1*x^p1 + e2*x^p2, so
  495|       |                    // s0 = E((e)^997) = e1*(e)^(997^p1) + e2*(e)^(997*p2), and similar for s1 and s2.
  496|       |                    //
  497|       |                    // Consider s2 + s1*(e)^p1
  498|       |                    //          = 2e1*(e)^(999^p1) + e2*(e)^(999*p2) + e2*(e)^(998*p2)*(e)^p1
  499|       |                    //          = e2*(e)^(999*p2) + e2*(e)^(998*p2)*(e)^p1
  500|       |                    //    (Because we are working in characteristic 2.)
  501|       |                    //          = e2*(e)^(998*p2) ((e)^p2 + (e)^p1)
  502|       |                    //
  503|  3.35k|                    int s2_s1p1 = s2 ^ (s1 == 0 ? 0 : GF1024_EXP.at((l_s1 + p1) % 1023));
  ------------------
  |  Branch (503:41): [True: 121, False: 3.23k]
  ------------------
  504|  3.35k|                    if (s2_s1p1 == 0) continue;
  ------------------
  |  Branch (504:25): [True: 12, False: 3.34k]
  ------------------
  505|  3.34k|                    int l_s2_s1p1 = GF1024_LOG.at(s2_s1p1);
  506|       |
  507|       |                    // Similarly, s1 + s0*(e)^p1
  508|       |                    //          = e2*(e)^(997*p2) ((e)^p2 + (e)^p1)
  509|  3.34k|                    int s1_s0p1 = s1 ^ (s0 == 0 ? 0 : GF1024_EXP.at((l_s0 + p1) % 1023));
  ------------------
  |  Branch (509:41): [True: 229, False: 3.11k]
  ------------------
  510|  3.34k|                    if (s1_s0p1 == 0) continue;
  ------------------
  |  Branch (510:25): [True: 57, False: 3.28k]
  ------------------
  511|  3.28k|                    int l_s1_s0p1 = GF1024_LOG.at(s1_s0p1);
  512|       |
  513|       |                    // So, putting these together, we can compute the second error position as
  514|       |                    // (e)^p2 = (s2 + s1^p1)/(s1 + s0^p1)
  515|       |                    // p2 = log((e)^p2)
  516|  3.28k|                    size_t p2 = (l_s2_s1p1 - l_s1_s0p1 + 1023) % 1023;
  517|       |
  518|       |                    // Sanity checks that p2 is a valid position and not the same as p1
  519|  3.28k|                    if (p2 >= length || p1 == p2) continue;
  ------------------
  |  Branch (519:25): [True: 3.13k, False: 154]
  |  Branch (519:41): [True: 4, False: 150]
  ------------------
  520|       |
  521|       |                    // Now we want to compute the error values e1 and e2.
  522|       |                    // Similar to above, we compute s1 + s0*(e)^p2
  523|       |                    //          = e1*(e)^(997*p1) ((e)^p1 + (e)^p2)
  524|    150|                    int s1_s0p2 = s1 ^ (s0 == 0 ? 0 : GF1024_EXP.at((l_s0 + p2) % 1023));
  ------------------
  |  Branch (524:41): [True: 14, False: 136]
  ------------------
  525|    150|                    if (s1_s0p2 == 0) continue;
  ------------------
  |  Branch (525:25): [True: 0, False: 150]
  ------------------
  526|    150|                    int l_s1_s0p2 = GF1024_LOG.at(s1_s0p2);
  527|       |
  528|       |                    // And compute (the log of) 1/((e)^p1 + (e)^p2))
  529|    150|                    int inv_p1_p2 = 1023 - GF1024_LOG.at(GF1024_EXP.at(p1) ^ GF1024_EXP.at(p2));
  530|       |
  531|       |                    // Then (s1 + s0*(e)^p1) * (1/((e)^p1 + (e)^p2)))
  532|       |                    //         = e2*(e)^(997*p2)
  533|       |                    // Then recover e2 by dividing by (e)^(997*p2)
  534|    150|                    int l_e2 = l_s1_s0p1 + inv_p1_p2 + (1023 - 997) * p2;
  535|       |                    // Check that e2 is in GF(32)
  536|    150|                    if (l_e2 % 33) continue;
  ------------------
  |  Branch (536:25): [True: 133, False: 17]
  ------------------
  537|       |
  538|       |                    // In the same way, (s1 + s0*(e)^p2) * (1/((e)^p1 + (e)^p2)))
  539|       |                    //         = e1*(e)^(997*p1)
  540|       |                    // So recover e1 by dividing by (e)^(997*p1)
  541|     17|                    int l_e1 = l_s1_s0p2 + inv_p1_p2 + (1023 - 997) * p1;
  542|       |                    // Check that e1 is in GF(32)
  543|     17|                    if (l_e1 % 33) continue;
  ------------------
  |  Branch (543:25): [True: 12, False: 5]
  ------------------
  544|       |
  545|       |                    // Again, we do not return e1 or e2 for safety.
  546|       |                    // Order the error positions from the left of the string and return them
  547|      5|                    if (p1 > p2) {
  ------------------
  |  Branch (547:25): [True: 0, False: 5]
  ------------------
  548|      0|                        possible_errors.push_back(str.size() - p1 - 1);
  549|      0|                        possible_errors.push_back(str.size() - p2 - 1);
  550|      5|                    } else {
  551|      5|                        possible_errors.push_back(str.size() - p2 - 1);
  552|      5|                        possible_errors.push_back(str.size() - p1 - 1);
  553|      5|                    }
  554|      5|                    break;
  555|     17|                }
  556|    173|            }
  557|    176|        } else {
  558|       |            // No errors
  559|      0|            return std::make_pair("", std::vector<int>{});
  560|      0|        }
  561|       |
  562|    176|        if (error_locations.empty() || (!possible_errors.empty() && possible_errors.size() < error_locations.size())) {
  ------------------
  |  Branch (562:13): [True: 174, False: 2]
  |  Branch (562:41): [True: 0, False: 2]
  |  Branch (562:69): [True: 0, False: 0]
  ------------------
  563|    174|            error_locations = std::move(possible_errors);
  564|    174|            if (!error_locations.empty()) error_encoding = encoding;
  ------------------
  |  Branch (564:17): [True: 5, False: 169]
  ------------------
  565|    174|        }
  566|    176|    }
  567|     88|    std::string error_message = error_encoding == Encoding::BECH32M ? "Invalid Bech32m checksum"
  ------------------
  |  Branch (567:33): [True: 3, False: 85]
  ------------------
  568|     88|                              : error_encoding == Encoding::BECH32 ? "Invalid Bech32 checksum"
  ------------------
  |  Branch (568:33): [True: 2, False: 83]
  ------------------
  569|     85|                              : "Invalid checksum";
  570|       |
  571|     88|    return std::make_pair(error_message, std::move(error_locations));
  572|     88|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_114CreateChecksumENS_8EncodingERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS2_6vectorIhNS6_IhEEEE:
  343|    902|{
  344|    902|    auto enc = PreparePolynomialCoefficients(hrp, values);
  345|    902|    enc.insert(enc.end(), CHECKSUM_SIZE, 0x00);
  346|    902|    uint32_t mod = PolyMod(enc) ^ EncodingConstant(encoding); // Determine what to XOR into those 6 zeroes.
  347|    902|    data ret(CHECKSUM_SIZE);
  348|  6.31k|    for (size_t i = 0; i < CHECKSUM_SIZE; ++i) {
  ------------------
  |  Branch (348:24): [True: 5.41k, False: 902]
  ------------------
  349|       |        // Convert the 5-bit groups in mod to checksum values.
  350|  5.41k|        ret[i] = (mod >> (5 * (5 - i))) & 31;
  351|  5.41k|    }
  352|    902|    return ret;
  353|    902|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_115CheckCharactersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS1_6vectorIiNS5_IiEEEE:
  288|    334|{
  289|    334|    bool lower = false, upper = false;
  290|  37.3M|    for (size_t i = 0; i < str.size(); ++i) {
  ------------------
  |  Branch (290:24): [True: 37.3M, False: 334]
  ------------------
  291|  37.3M|        unsigned char c{(unsigned char)(str[i])};
  292|  37.3M|        if (c >= 'a' && c <= 'z') {
  ------------------
  |  Branch (292:13): [True: 15.7M, False: 21.6M]
  |  Branch (292:25): [True: 15.7M, False: 1.07k]
  ------------------
  293|  15.7M|            if (upper) {
  ------------------
  |  Branch (293:17): [True: 15.5M, False: 126k]
  ------------------
  294|  15.5M|                errors.push_back(i);
  295|  15.5M|            } else {
  296|   126k|                lower = true;
  297|   126k|            }
  298|  21.6M|        } else if (c >= 'A' && c <= 'Z') {
  ------------------
  |  Branch (298:20): [True: 2.24M, False: 19.4M]
  |  Branch (298:32): [True: 2.24M, False: 1.45k]
  ------------------
  299|  2.24M|            if (lower) {
  ------------------
  |  Branch (299:17): [True: 37.0k, False: 2.20M]
  ------------------
  300|  37.0k|                errors.push_back(i);
  301|  2.20M|            } else {
  302|  2.20M|                upper = true;
  303|  2.20M|            }
  304|  19.4M|        } else if (c < 33 || c > 126) {
  ------------------
  |  Branch (304:20): [True: 556, False: 19.4M]
  |  Branch (304:30): [True: 0, False: 19.4M]
  ------------------
  305|    556|            errors.push_back(i);
  306|    556|        }
  307|  37.3M|    }
  308|    334|    return errors.empty();
  309|    334|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_19LowerCaseEh:
  282|  3.22k|{
  283|  3.22k|    return (c >= 'A' && c <= 'Z') ? (c - 'A') + 'a' : c;
  ------------------
  |  Branch (283:13): [True: 1.65k, False: 1.57k]
  |  Branch (283:25): [True: 91, False: 1.56k]
  ------------------
  284|  3.22k|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_114VerifyChecksumERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
  328|     88|{
  329|       |    // PolyMod computes what value to xor into the final values to make the checksum 0. However,
  330|       |    // if we required that the checksum was 0, it would be the case that appending a 0 to a valid
  331|       |    // list of values would result in a new valid list. For that reason, Bech32 requires the
  332|       |    // resulting checksum to be 1 instead. In Bech32m, this constant was amended. See
  333|       |    // https://gist.github.com/sipa/14c248c288c3880a3b191f978a34508e for details.
  334|     88|    auto enc = PreparePolynomialCoefficients(hrp, values);
  335|     88|    const uint32_t check = PolyMod(enc);
  336|     88|    if (check == EncodingConstant(Encoding::BECH32)) return Encoding::BECH32;
  ------------------
  |  Branch (336:9): [True: 0, False: 88]
  ------------------
  337|     88|    if (check == EncodingConstant(Encoding::BECH32M)) return Encoding::BECH32M;
  ------------------
  |  Branch (337:9): [True: 0, False: 88]
  ------------------
  338|     88|    return Encoding::INVALID;
  339|     88|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_129PreparePolynomialCoefficientsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
  312|  1.16k|{
  313|  1.16k|    data ret;
  314|  1.16k|    ret.reserve(hrp.size() + 1 + hrp.size() + values.size() + CHECKSUM_SIZE);
  315|       |
  316|       |    /** Expand a HRP for use in checksum computation. */
  317|  7.61k|    for (size_t i = 0; i < hrp.size(); ++i) ret.push_back(hrp[i] >> 5);
  ------------------
  |  Branch (317:24): [True: 6.44k, False: 1.16k]
  ------------------
  318|  1.16k|    ret.push_back(0);
  319|  7.61k|    for (size_t i = 0; i < hrp.size(); ++i) ret.push_back(hrp[i] & 0x1f);
  ------------------
  |  Branch (319:24): [True: 6.44k, False: 1.16k]
  ------------------
  320|       |
  321|  1.16k|    ret.insert(ret.end(), values.begin(), values.end());
  322|       |
  323|  1.16k|    return ret;
  324|  1.16k|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_17PolyModERKNSt3__16vectorIhNS1_9allocatorIhEEEE:
  131|  1.16k|{
  132|       |    // The input is interpreted as a list of coefficients of a polynomial over F = GF(32), with an
  133|       |    // implicit 1 in front. If the input is [v0,v1,v2,v3,v4], that polynomial is v(x) =
  134|       |    // 1*x^5 + v0*x^4 + v1*x^3 + v2*x^2 + v3*x + v4. The implicit 1 guarantees that
  135|       |    // [v0,v1,v2,...] has a distinct checksum from [0,v0,v1,v2,...].
  136|       |
  137|       |    // The output is a 30-bit integer whose 5-bit groups are the coefficients of the remainder of
  138|       |    // v(x) mod g(x), where g(x) is the Bech32 generator,
  139|       |    // x^6 + {29}x^5 + {22}x^4 + {20}x^3 + {21}x^2 + {29}x + {18}. g(x) is chosen in such a way
  140|       |    // that the resulting code is a BCH code, guaranteeing detection of up to 3 errors within a
  141|       |    // window of 1023 characters. Among the various possible BCH codes, one was selected to in
  142|       |    // fact guarantee detection of up to 4 errors within a window of 89 characters.
  143|       |
  144|       |    // Note that the coefficients are elements of GF(32), here represented as decimal numbers
  145|       |    // between {}. In this finite field, addition is just XOR of the corresponding numbers. For
  146|       |    // example, {27} + {13} = {27 ^ 13} = {22}. Multiplication is more complicated, and requires
  147|       |    // treating the bits of values themselves as coefficients of a polynomial over a smaller field,
  148|       |    // GF(2), and multiplying those polynomials mod a^5 + a^3 + 1. For example, {5} * {26} =
  149|       |    // (a^2 + 1) * (a^4 + a^3 + a) = (a^4 + a^3 + a) * a^2 + (a^4 + a^3 + a) = a^6 + a^5 + a^4 + a
  150|       |    // = a^3 + 1 (mod a^5 + a^3 + 1) = {9}.
  151|       |
  152|       |    // During the course of the loop below, `c` contains the bitpacked coefficients of the
  153|       |    // polynomial constructed from just the values of v that were processed so far, mod g(x). In
  154|       |    // the above example, `c` initially corresponds to 1 mod g(x), and after processing 2 inputs of
  155|       |    // v, it corresponds to x^2 + v0*x + v1 mod g(x). As 1 mod g(x) = 1, that is the starting value
  156|       |    // for `c`.
  157|       |
  158|       |    // The following Sage code constructs the generator used:
  159|       |    //
  160|       |    // B = GF(2) # Binary field
  161|       |    // BP.<b> = B[] # Polynomials over the binary field
  162|       |    // F_mod = b**5 + b**3 + 1
  163|       |    // F.<f> = GF(32, modulus=F_mod, repr='int') # GF(32) definition
  164|       |    // FP.<x> = F[] # Polynomials over GF(32)
  165|       |    // E_mod = x**2 + F.fetch_int(9)*x + F.fetch_int(23)
  166|       |    // E.<e> = F.extension(E_mod) # GF(1024) extension field definition
  167|       |    // for p in divisors(E.order() - 1): # Verify e has order 1023.
  168|       |    //    assert((e**p == 1) == (p % 1023 == 0))
  169|       |    // G = lcm([(e**i).minpoly() for i in range(997,1000)])
  170|       |    // print(G) # Print out the generator
  171|       |    //
  172|       |    // It demonstrates that g(x) is the least common multiple of the minimal polynomials
  173|       |    // of 3 consecutive powers (997,998,999) of a primitive element (e) of GF(1024).
  174|       |    // That guarantees it is, in fact, the generator of a primitive BCH code with cycle
  175|       |    // length 1023 and distance 4. See https://en.wikipedia.org/wiki/BCH_code for more details.
  176|       |
  177|  1.16k|    uint32_t c = 1;
  178|  67.9k|    for (const auto v_i : v) {
  ------------------
  |  Branch (178:25): [True: 67.9k, False: 1.16k]
  ------------------
  179|       |        // We want to update `c` to correspond to a polynomial with one extra term. If the initial
  180|       |        // value of `c` consists of the coefficients of c(x) = f(x) mod g(x), we modify it to
  181|       |        // correspond to c'(x) = (f(x) * x + v_i) mod g(x), where v_i is the next input to
  182|       |        // process. Simplifying:
  183|       |        // c'(x) = (f(x) * x + v_i) mod g(x)
  184|       |        //         ((f(x) mod g(x)) * x + v_i) mod g(x)
  185|       |        //         (c(x) * x + v_i) mod g(x)
  186|       |        // If c(x) = c0*x^5 + c1*x^4 + c2*x^3 + c3*x^2 + c4*x + c5, we want to compute
  187|       |        // c'(x) = (c0*x^5 + c1*x^4 + c2*x^3 + c3*x^2 + c4*x + c5) * x + v_i mod g(x)
  188|       |        //       = c0*x^6 + c1*x^5 + c2*x^4 + c3*x^3 + c4*x^2 + c5*x + v_i mod g(x)
  189|       |        //       = c0*(x^6 mod g(x)) + c1*x^5 + c2*x^4 + c3*x^3 + c4*x^2 + c5*x + v_i
  190|       |        // If we call (x^6 mod g(x)) = k(x), this can be written as
  191|       |        // c'(x) = (c1*x^5 + c2*x^4 + c3*x^3 + c4*x^2 + c5*x + v_i) + c0*k(x)
  192|       |
  193|       |        // First, determine the value of c0:
  194|  67.9k|        uint8_t c0 = c >> 25;
  195|       |
  196|       |        // Then compute c1*x^5 + c2*x^4 + c3*x^3 + c4*x^2 + c5*x + v_i:
  197|  67.9k|        c = ((c & 0x1ffffff) << 5) ^ v_i;
  198|       |
  199|       |        // Finally, for each set bit n in c0, conditionally add {2^n}k(x). These constants can be
  200|       |        // computed using the following Sage code (continuing the code above):
  201|       |        //
  202|       |        // for i in [1,2,4,8,16]: # Print out {1,2,4,8,16}*(g(x) mod x^6), packed in hex integers.
  203|       |        //     v = 0
  204|       |        //     for coef in reversed((F.fetch_int(i)*(G % x**6)).coefficients(sparse=True)):
  205|       |        //         v = v*32 + coef.integer_representation()
  206|       |        //     print("0x%x" % v)
  207|       |        //
  208|  67.9k|        if (c0 & 1)  c ^= 0x3b6a57b2; //     k(x) = {29}x^5 + {22}x^4 + {20}x^3 + {21}x^2 + {29}x + {18}
  ------------------
  |  Branch (208:13): [True: 30.1k, False: 37.8k]
  ------------------
  209|  67.9k|        if (c0 & 2)  c ^= 0x26508e6d; //  {2}k(x) = {19}x^5 +  {5}x^4 +     x^3 +  {3}x^2 + {19}x + {13}
  ------------------
  |  Branch (209:13): [True: 29.5k, False: 38.4k]
  ------------------
  210|  67.9k|        if (c0 & 4)  c ^= 0x1ea119fa; //  {4}k(x) = {15}x^5 + {10}x^4 +  {2}x^3 +  {6}x^2 + {15}x + {26}
  ------------------
  |  Branch (210:13): [True: 30.0k, False: 37.8k]
  ------------------
  211|  67.9k|        if (c0 & 8)  c ^= 0x3d4233dd; //  {8}k(x) = {30}x^5 + {20}x^4 +  {4}x^3 + {12}x^2 + {30}x + {29}
  ------------------
  |  Branch (211:13): [True: 31.5k, False: 36.4k]
  ------------------
  212|  67.9k|        if (c0 & 16) c ^= 0x2a1462b3; // {16}k(x) = {21}x^5 +     x^4 +  {8}x^3 + {24}x^2 + {21}x + {19}
  ------------------
  |  Branch (212:13): [True: 29.5k, False: 38.4k]
  ------------------
  213|       |
  214|  67.9k|    }
  215|  1.16k|    return c;
  216|  1.16k|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_116EncodingConstantENS_8EncodingE:
  122|  1.25k|uint32_t EncodingConstant(Encoding encoding) {
  123|  1.25k|    assert(encoding == Encoding::BECH32 || encoding == Encoding::BECH32M);
  124|  1.25k|    return encoding == Encoding::BECH32 ? 1 : 0x2bc830a3;
  ------------------
  |  Branch (124:12): [True: 535, False: 719]
  ------------------
  125|  1.25k|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_18SyndromeEj:
  261|    176|uint32_t Syndrome(const uint32_t residue) {
  262|       |    // low is the first 5 bits, corresponding to the r6 in the residue
  263|       |    // (the constant term of the polynomial).
  264|    176|    uint32_t low = residue & 0x1f;
  265|       |
  266|       |    // We begin by setting s_j = low = r6 for all three values of j, because these are unconditional.
  267|    176|    uint32_t result = low ^ (low << 10) ^ (low << 20);
  268|       |
  269|       |    // Then for each following bit, we add the corresponding precomputed constant if the bit is 1.
  270|       |    // For example, 0x31edd3c4 is 1100011110 1101110100 1111000100 when unpacked in groups of 10
  271|       |    // bits, corresponding exactly to a^999 || a^998 || a^997 (matching the corresponding values in
  272|       |    // GF1024_EXP above). In this way, we compute all three values of s_j for j in (997, 998, 999)
  273|       |    // simultaneously. Recall that XOR corresponds to addition in a characteristic 2 field.
  274|  4.57k|    for (int i = 0; i < 25; ++i) {
  ------------------
  |  Branch (274:21): [True: 4.40k, False: 176]
  ------------------
  275|  4.40k|        result ^= ((residue >> (5+i)) & 1 ? SYNDROME_CONSTS.at(i) : 0);
  ------------------
  |  Branch (275:20): [True: 2.25k, False: 2.14k]
  ------------------
  276|  4.40k|    }
  277|    176|    return result;
  278|    176|}

_ZN6bech3212DecodeResultC2Ev:
   52|    200|    DecodeResult() : encoding(Encoding::INVALID) {}

_ZNK11CBlockIndex12GetBlockHashEv:
  244|  11.6k|    {
  245|  11.6k|        assert(phashBlock != nullptr);
  246|  11.6k|        return *phashBlock;
  247|  11.6k|    }
_ZNK6CChain3TipEv:
  434|  11.6k|    {
  435|  11.6k|        return vChain.size() > 0 ? vChain[vChain.size() - 1] : nullptr;
  ------------------
  |  Branch (435:16): [True: 11.6k, False: 0]
  ------------------
  436|  11.6k|    }
_ZNK6CChain6HeightEv:
  463|  11.6k|    {
  464|  11.6k|        return int(vChain.size()) - 1;
  465|  11.6k|    }

_Z6Paramsv:
  105|   439k|const CChainParams &Params() {
  106|   439k|    assert(globalChainParams);
  107|   439k|    return *globalChainParams;
  108|   439k|}

_ZN11CCheckQueueI12CScriptCheckNSt3__14pairI13ScriptError_tNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEE4LoopEb:
   73|      0|    {
   74|      0|        std::condition_variable& cond = fMaster ? m_master_cv : m_worker_cv;
  ------------------
  |  Branch (74:41): [True: 0, False: 0]
  ------------------
   75|      0|        std::vector<T> vChecks;
   76|      0|        vChecks.reserve(nBatchSize);
   77|      0|        unsigned int nNow = 0;
   78|      0|        std::optional<R> local_result;
   79|      0|        bool do_work;
   80|      0|        do {
   81|      0|            {
   82|      0|                WAIT_LOCK(m_mutex, lock);
  ------------------
  |  |  262|      0|#define WAIT_LOCK(cs, name) UniqueLock name(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  ------------------
   83|       |                // first do the clean-up of the previous loop run (allowing us to do it in the same critsect)
   84|      0|                if (nNow) {
  ------------------
  |  Branch (84:21): [True: 0, False: 0]
  ------------------
   85|      0|                    if (local_result.has_value() && !m_result.has_value()) {
  ------------------
  |  Branch (85:25): [True: 0, False: 0]
  |  Branch (85:53): [True: 0, False: 0]
  ------------------
   86|      0|                        std::swap(local_result, m_result);
   87|      0|                    }
   88|      0|                    nTodo -= nNow;
   89|      0|                    if (nTodo == 0 && !fMaster) {
  ------------------
  |  Branch (89:25): [True: 0, False: 0]
  |  Branch (89:39): [True: 0, False: 0]
  ------------------
   90|       |                        // We processed the last element; inform the master it can exit and return the result
   91|      0|                        m_master_cv.notify_one();
   92|      0|                    }
   93|      0|                } else {
   94|       |                    // first iteration
   95|      0|                    nTotal++;
   96|      0|                }
   97|       |                // logically, the do loop starts here
   98|      4|                while (queue.empty() && !m_request_stop) {
  ------------------
  |  Branch (98:24): [True: 4, False: 18.4E]
  |  Branch (98:41): [True: 0, False: 4]
  ------------------
   99|      0|                    if (fMaster && nTodo == 0) {
  ------------------
  |  Branch (99:25): [True: 0, False: 0]
  |  Branch (99:36): [True: 0, False: 0]
  ------------------
  100|      0|                        nTotal--;
  101|      0|                        std::optional<R> to_return = std::move(m_result);
  102|       |                        // reset the status for new work later
  103|      0|                        m_result = std::nullopt;
  104|       |                        // return the current status
  105|      0|                        return to_return;
  106|      0|                    }
  107|      0|                    nIdle++;
  108|      0|                    cond.wait(lock); // wait
  109|      0|                    nIdle--;
  110|      0|                }
  111|      4|                if (m_request_stop) {
  ------------------
  |  Branch (111:21): [True: 4, False: 18.4E]
  ------------------
  112|       |                    // return value does not matter, because m_request_stop is only set in the destructor.
  113|      4|                    return std::nullopt;
  114|      4|                }
  115|       |
  116|       |                // Decide how many work units to process now.
  117|       |                // * Do not try to do everything at once, but aim for increasingly smaller batches so
  118|       |                //   all workers finish approximately simultaneously.
  119|       |                // * Try to account for idle jobs which will instantly start helping.
  120|       |                // * Don't do batches smaller than 1 (duh), or larger than nBatchSize.
  121|  18.4E|                nNow = std::max(1U, std::min(nBatchSize, (unsigned int)queue.size() / (nTotal + nIdle + 1)));
  122|  18.4E|                auto start_it = queue.end() - nNow;
  123|  18.4E|                vChecks.assign(std::make_move_iterator(start_it), std::make_move_iterator(queue.end()));
  124|  18.4E|                queue.erase(start_it, queue.end());
  125|       |                // Check whether we need to do work at all
  126|  18.4E|                do_work = !m_result.has_value();
  127|  18.4E|            }
  128|       |            // execute work
  129|  18.4E|            if (do_work) {
  ------------------
  |  Branch (129:17): [True: 0, False: 18.4E]
  ------------------
  130|      0|                for (T& check : vChecks) {
  ------------------
  |  Branch (130:31): [True: 0, False: 0]
  ------------------
  131|      0|                    local_result = check();
  132|      0|                    if (local_result.has_value()) break;
  ------------------
  |  Branch (132:25): [True: 0, False: 0]
  ------------------
  133|      0|                }
  134|      0|            }
  135|  18.4E|            vChecks.clear();
  136|  18.4E|        } while (true);
  ------------------
  |  Branch (136:18): [Folded - Ignored]
  ------------------
  137|      0|    }
_ZN11CCheckQueueI12CScriptCheckNSt3__14pairI13ScriptError_tNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEED2Ev:
  192|      2|    {
  193|      2|        WITH_LOCK(m_mutex, m_request_stop = true);
  ------------------
  |  |  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
  194|      2|        m_worker_cv.notify_all();
  195|      4|        for (std::thread& t : m_worker_threads) {
  ------------------
  |  Branch (195:29): [True: 4, False: 2]
  ------------------
  196|      4|            t.join();
  197|      4|        }
  198|      2|    }

_ZN4CoinC2Ev:
   55|  13.3k|    Coin() : fCoinBase(false), nHeight(0) { }
_ZNK4Coin7IsSpentEv:
   81|  55.0k|    bool IsSpent() const {
   82|  55.0k|        return out.IsNull();
   83|  55.0k|    }
_ZN16CCoinsCacheEntryD2Ev:
  173|      2|    {
  174|      2|        SetClean();
  175|      2|    }
_ZN16CCoinsCacheEntry8SetCleanEv:
  181|      2|    {
  182|      2|        if (!m_flags) return;
  ------------------
  |  Branch (182:13): [True: 0, False: 2]
  ------------------
  183|      2|        m_next->second.m_prev = m_prev;
  184|      2|        m_prev->second.m_next = m_next;
  185|      2|        m_flags = 0;
  186|      2|        m_prev = m_next = nullptr;
  187|      2|    }
_ZN10CCoinsViewD2Ev:
  335|      6|    virtual ~CCoinsView() = default;
_ZN4Coin11UnserializeI10DataStreamEEvRT_:
   70|  8.63k|    void Unserialize(Stream &s) {
   71|  8.63k|        uint32_t code = 0;
   72|  8.63k|        ::Unserialize(s, VARINT(code));
  ------------------
  |  |  500|  8.63k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   73|  8.63k|        nHeight = code >> 1;
   74|  8.63k|        fCoinBase = code & 1;
   75|  8.63k|        ::Unserialize(s, Using<TxOutCompression>(out));
   76|  8.63k|    }

_ZN11ArgsManagerD2Ev:
  134|      2|ArgsManager::~ArgsManager() = default;

_ZN11ArgsManager9ClearArgsEv:
  362|      2|    void ClearArgs() {
  363|      2|        LOCK(cs_args);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  364|      2|        m_available_args.clear();
  365|      2|        m_network_only_args.clear();
  366|      2|    }

_Z11MessageSignRK4CKeyRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERS8_:
   61|  14.7k|{
   62|  14.7k|    std::vector<unsigned char> signature_bytes;
   63|       |
   64|  14.7k|    if (!privkey.SignCompact(MessageHash(message), signature_bytes)) {
  ------------------
  |  Branch (64:9): [True: 0, False: 14.7k]
  ------------------
   65|      0|        return false;
   66|      0|    }
   67|       |
   68|  14.7k|    signature = EncodeBase64(signature_bytes);
   69|       |
   70|  14.7k|    return true;
   71|  14.7k|}
_Z11MessageHashRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   74|  14.7k|{
   75|  14.7k|    HashWriter hasher{};
   76|  14.7k|    hasher << MESSAGE_MAGIC << message;
   77|       |
   78|  14.7k|    return hasher.GetHash();
   79|  14.7k|}

_Z17internal_bswap_32j:
   54|  23.5M|{
   55|  23.5M|#ifdef bitcoin_builtin_bswap32
   56|  23.5M|    return bitcoin_builtin_bswap32(x);
  ------------------
  |  |   24|  23.5M|#      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|  23.5M|}
_Z17internal_bswap_64m:
   64|  14.3M|{
   65|  14.3M|#ifdef bitcoin_builtin_bswap64
   66|  14.3M|    return bitcoin_builtin_bswap64(x);
  ------------------
  |  |   27|  14.3M|#      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|  14.3M|}

_Z16htole16_internalt:
   19|  14.8k|{
   20|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_16(host_16bits);
   21|  14.8k|        else return host_16bits;
   22|  14.8k|}
_Z16le16toh_internalt:
   29|  1.97k|{
   30|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_16(little_endian_16bits);
   31|  1.97k|        else return little_endian_16bits;
   32|  1.97k|}
_Z16htobe32_internalj:
   34|  23.2M|{
   35|  23.2M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(host_32bits);
   36|       |        else return host_32bits;
   37|  23.2M|}
_Z16htole32_internalj:
   39|  12.7M|{
   40|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(host_32bits);
   41|  12.7M|        else return host_32bits;
   42|  12.7M|}
_Z16be32toh_internalj:
   44|   306k|{
   45|   306k|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(big_endian_32bits);
   46|       |        else return big_endian_32bits;
   47|   306k|}
_Z16le32toh_internalj:
   49|  32.1M|{
   50|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(little_endian_32bits);
   51|  32.1M|        else return little_endian_32bits;
   52|  32.1M|}
_Z16htobe64_internalm:
   54|  5.77M|{
   55|  5.77M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_64(host_64bits);
   56|       |        else return host_64bits;
   57|  5.77M|}
_Z16htole64_internalm:
   59|  1.94M|{
   60|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(host_64bits);
   61|  1.94M|        else return host_64bits;
   62|  1.94M|}
_Z16be64toh_internalm:
   64|  8.58M|{
   65|  8.58M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_64(big_endian_64bits);
   66|       |        else return big_endian_64bits;
   67|  8.58M|}
_Z16le64toh_internalm:
   69|   139k|{
   70|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(little_endian_64bits);
   71|   139k|        else return little_endian_64bits;
   72|   139k|}

_Z20GetSpecialScriptSizej:
   87|  5.53k|{
   88|  5.53k|    if (nSize == 0 || nSize == 1)
  ------------------
  |  Branch (88:9): [True: 982, False: 4.55k]
  |  Branch (88:23): [True: 613, False: 3.94k]
  ------------------
   89|  1.59k|        return 20;
   90|  3.94k|    if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
  ------------------
  |  Branch (90:9): [True: 124, False: 3.81k]
  |  Branch (90:23): [True: 156, False: 3.66k]
  |  Branch (90:37): [True: 126, False: 3.53k]
  |  Branch (90:51): [True: 3.53k, False: 0]
  ------------------
   91|  3.94k|        return 32;
   92|      0|    return 0;
   93|  3.94k|}
_Z16DecompressScriptR7CScriptjRK9prevectorILj33EhjiE:
   96|  5.50k|{
   97|  5.50k|    switch(nSize) {
  ------------------
  |  Branch (97:12): [True: 0, False: 5.50k]
  ------------------
   98|    965|    case 0x00:
  ------------------
  |  Branch (98:5): [True: 965, False: 4.53k]
  ------------------
   99|    965|        script.resize(25);
  100|    965|        script[0] = OP_DUP;
  101|    965|        script[1] = OP_HASH160;
  102|    965|        script[2] = 20;
  103|    965|        memcpy(&script[3], in.data(), 20);
  104|    965|        script[23] = OP_EQUALVERIFY;
  105|    965|        script[24] = OP_CHECKSIG;
  106|    965|        return true;
  107|    606|    case 0x01:
  ------------------
  |  Branch (107:5): [True: 606, False: 4.89k]
  ------------------
  108|    606|        script.resize(23);
  109|    606|        script[0] = OP_HASH160;
  110|    606|        script[1] = 20;
  111|    606|        memcpy(&script[2], in.data(), 20);
  112|    606|        script[22] = OP_EQUAL;
  113|    606|        return true;
  114|    116|    case 0x02:
  ------------------
  |  Branch (114:5): [True: 116, False: 5.38k]
  ------------------
  115|    272|    case 0x03:
  ------------------
  |  Branch (115:5): [True: 156, False: 5.34k]
  ------------------
  116|    272|        script.resize(35);
  117|    272|        script[0] = 33;
  118|    272|        script[1] = nSize;
  119|    272|        memcpy(&script[2], in.data(), 32);
  120|    272|        script[34] = OP_CHECKSIG;
  121|    272|        return true;
  122|    125|    case 0x04:
  ------------------
  |  Branch (122:5): [True: 125, False: 5.37k]
  ------------------
  123|  3.65k|    case 0x05:
  ------------------
  |  Branch (123:5): [True: 3.53k, False: 1.96k]
  ------------------
  124|  3.65k|        unsigned char vch[33] = {};
  125|  3.65k|        vch[0] = nSize - 2;
  126|  3.65k|        memcpy(&vch[1], in.data(), 32);
  127|  3.65k|        CPubKey pubkey{vch};
  128|  3.65k|        if (!pubkey.Decompress())
  ------------------
  |  Branch (128:13): [True: 1.82k, False: 1.83k]
  ------------------
  129|  1.82k|            return false;
  130|  1.83k|        assert(pubkey.size() == 65);
  131|  1.83k|        script.resize(67);
  132|  1.83k|        script[0] = 65;
  133|  1.83k|        memcpy(&script[1], pubkey.begin(), 65);
  134|  1.83k|        script[66] = OP_CHECKSIG;
  135|  1.83k|        return true;
  136|  5.50k|    }
  137|      0|    return false;
  138|  5.50k|}
_Z16DecompressAmountm:
  169|  8.48k|{
  170|       |    // x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
  171|  8.48k|    if (x == 0)
  ------------------
  |  Branch (171:9): [True: 986, False: 7.49k]
  ------------------
  172|    986|        return 0;
  173|  7.49k|    x--;
  174|       |    // x = 10*(9*n + d - 1) + e
  175|  7.49k|    int e = x % 10;
  176|  7.49k|    x /= 10;
  177|  7.49k|    uint64_t n = 0;
  178|  7.49k|    if (e < 9) {
  ------------------
  |  Branch (178:9): [True: 6.48k, False: 1.01k]
  ------------------
  179|       |        // x = 9*n + d - 1
  180|  6.48k|        int d = (x % 9) + 1;
  181|  6.48k|        x /= 9;
  182|       |        // x = n
  183|  6.48k|        n = x*10 + d;
  184|  6.48k|    } else {
  185|  1.01k|        n = x+1;
  186|  1.01k|    }
  187|  43.7k|    while (e) {
  ------------------
  |  Branch (187:12): [True: 36.2k, False: 7.49k]
  ------------------
  188|  36.2k|        n *= 10;
  189|  36.2k|        e--;
  190|  36.2k|    }
  191|  7.49k|    return n;
  192|  8.48k|}

_ZN16TxOutCompression16SerializationOpsI10DataStream6CTxOut17ActionUnserializeEEvRT0_RT_T1_:
  115|  8.51k|    FORMATTER_METHODS(CTxOut, obj) { READWRITE(Using<AmountCompression>(obj.nValue), Using<ScriptCompression>(obj.scriptPubKey)); }
  ------------------
  |  |  156|  8.51k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN17AmountCompression5UnserI10DataStreamlEEvRT_RT0_:
  105|  8.51k|    {
  106|  8.51k|        uint64_t v;
  107|  8.51k|        s >> VARINT(v);
  ------------------
  |  |  500|  8.51k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  108|  8.51k|        val = DecompressAmount(v);
  109|  8.51k|    }
_ZN17ScriptCompression5UnserI10DataStreamEEvRT_R7CScript:
   77|  8.48k|    void Unser(Stream &s, CScript& script) {
   78|  8.48k|        unsigned int nSize = 0;
   79|  8.48k|        s >> VARINT(nSize);
  ------------------
  |  |  500|  8.48k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   80|  8.48k|        if (nSize < nSpecialScripts) {
  ------------------
  |  Branch (80:13): [True: 5.53k, False: 2.94k]
  ------------------
   81|  5.53k|            CompressedScript vch(GetSpecialScriptSize(nSize), 0x00);
   82|  5.53k|            s >> Span{vch};
   83|  5.53k|            DecompressScript(script, nSize, vch);
   84|  5.53k|            return;
   85|  5.53k|        }
   86|  2.94k|        nSize -= nSpecialScripts;
   87|  2.94k|        if (nSize > MAX_SCRIPT_SIZE) {
  ------------------
  |  Branch (87:13): [True: 66, False: 2.87k]
  ------------------
   88|       |            // Overly long script, replace with a short invalid one
   89|     66|            script << OP_RETURN;
   90|     66|            s.ignore(nSize);
   91|  2.87k|        } else {
   92|  2.87k|            script.resize(nSize);
   93|  2.87k|            s >> Span{script};
   94|  2.87k|        }
   95|  2.94k|    }

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

_ZN8ChaCha20C2E4SpanIKSt4byteE:
   92|   124k|    ChaCha20(Span<const std::byte> key) noexcept : m_aligned(key) {}

_Z9WriteLE32ITk8ByteTypehEvPT_j:
   51|  9.35M|{
   52|  9.35M|    uint32_t v = htole32_internal(x);
   53|  9.35M|    memcpy(ptr, &v, 4);
   54|  9.35M|}
_Z8ReadLE64ITk8ByteTypeSt4byteEmPKT_:
   36|   124k|{
   37|   124k|    uint64_t x;
   38|   124k|    memcpy(&x, ptr, 8);
   39|   124k|    return le64toh_internal(x);
   40|   124k|}
_Z9WriteLE32ITk8ByteTypeSt4byteEvPT_j:
   51|  2.79M|{
   52|  2.79M|    uint32_t v = htole32_internal(x);
   53|  2.79M|    memcpy(ptr, &v, 4);
   54|  2.79M|}
_Z8ReadLE16ITk8ByteTypehEtPKT_:
   20|  1.74k|{
   21|  1.74k|    uint16_t x;
   22|  1.74k|    memcpy(&x, ptr, 2);
   23|  1.74k|    return le16toh_internal(x);
   24|  1.74k|}
_Z8ReadLE32ITk8ByteTypehEjPKT_:
   28|  29.9M|{
   29|  29.9M|    uint32_t x;
   30|  29.9M|    memcpy(&x, ptr, 4);
   31|  29.9M|    return le32toh_internal(x);
   32|  29.9M|}
_Z9WriteLE64ITk8ByteTypehEvPT_m:
   58|  1.87M|{
   59|  1.87M|    uint64_t v = htole64_internal(x);
   60|  1.87M|    memcpy(ptr, &v, 8);
   61|  1.87M|}
_Z9WriteBE32ITk8ByteTypehEvPT_j:
   96|  23.2M|{
   97|  23.2M|    uint32_t v = htobe32_internal(x);
   98|  23.2M|    memcpy(ptr, &v, 4);
   99|  23.2M|}
_Z8ReadBE32ITk8ByteTypehEjPKT_:
   73|   306k|{
   74|   306k|    uint32_t x;
   75|   306k|    memcpy(&x, ptr, 4);
   76|   306k|    return be32toh_internal(x);
   77|   306k|}
_Z9WriteBE64ITk8ByteTypehEvPT_m:
  103|  5.77M|{
  104|  5.77M|    uint64_t v = htobe64_internal(x);
  105|  5.77M|    memcpy(ptr, &v, 8);
  106|  5.77M|}
_Z8ReadBE64ITk8ByteTypehEmPKT_:
   81|  8.58M|{
   82|  8.58M|    uint64_t x;
   83|  8.58M|    memcpy(&x, ptr, 8);
   84|  8.58M|    return be64toh_internal(x);
   85|  8.58M|}
_Z8ReadLE32ITk8ByteTypeSt4byteEjPKT_:
   28|  1.89M|{
   29|  1.89M|    uint32_t x;
   30|  1.89M|    memcpy(&x, ptr, 4);
   31|  1.89M|    return le32toh_internal(x);
   32|  1.89M|}

_Z6HexStr4SpanIKhE:
   30|   449k|{
   31|   449k|    std::string rv(s.size() * 2, '\0');
   32|   449k|    static constexpr auto byte_to_hex = CreateByteToHexMap();
   33|   449k|    static_assert(sizeof(byte_to_hex) == 512);
   34|       |
   35|   449k|    char* it = rv.data();
   36|  18.4M|    for (uint8_t v : s) {
  ------------------
  |  Branch (36:20): [True: 18.4M, False: 449k]
  ------------------
   37|  18.4M|        std::memcpy(it, byte_to_hex[v].data(), 2);
   38|  18.4M|        it += 2;
   39|  18.4M|    }
   40|       |
   41|   449k|    assert(it == rv.data() + rv.size());
   42|   449k|    return rv;
   43|   449k|}
_Z8HexDigitc:
   64|  10.0M|{
   65|  10.0M|    return p_util_hexdigit[(unsigned char)c];
   66|  10.0M|}

_ZN12CHMAC_SHA512C2EPKhm:
   10|   106k|{
   11|   106k|    unsigned char rkey[128];
   12|   106k|    if (keylen <= 128) {
  ------------------
  |  Branch (12:9): [True: 106k, False: 0]
  ------------------
   13|   106k|        memcpy(rkey, key, keylen);
   14|   106k|        memset(rkey + keylen, 0, 128 - keylen);
   15|   106k|    } else {
   16|      0|        CSHA512().Write(key, keylen).Finalize(rkey);
   17|      0|        memset(rkey + 64, 0, 64);
   18|      0|    }
   19|       |
   20|  13.6M|    for (int n = 0; n < 128; n++)
  ------------------
  |  Branch (20:21): [True: 13.5M, False: 106k]
  ------------------
   21|  13.5M|        rkey[n] ^= 0x5c;
   22|   106k|    outer.Write(rkey, 128);
   23|       |
   24|  13.6M|    for (int n = 0; n < 128; n++)
  ------------------
  |  Branch (24:21): [True: 13.5M, False: 106k]
  ------------------
   25|  13.5M|        rkey[n] ^= 0x5c ^ 0x36;
   26|   106k|    inner.Write(rkey, 128);
   27|   106k|}
_ZN12CHMAC_SHA5128FinalizeEPh:
   30|   106k|{
   31|   106k|    unsigned char temp[64];
   32|   106k|    inner.Finalize(temp);
   33|   106k|    outer.Write(temp, 64).Finalize(hash);
   34|   106k|}

_ZN12CHMAC_SHA5125WriteEPKhm:
   25|   318k|    {
   26|   318k|        inner.Write(data, len);
   27|   318k|        return *this;
   28|   318k|    }

_ZN10CRIPEMD160C2Ev:
  243|  1.87M|{
  244|  1.87M|    ripemd160::Initialize(s);
  245|  1.87M|}
_ZN10CRIPEMD1605WriteEPKhm:
  248|  5.61M|{
  249|  5.61M|    const unsigned char* end = data + len;
  250|  5.61M|    size_t bufsize = bytes % 64;
  251|  5.61M|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (251:9): [True: 3.74M, False: 1.87M]
  |  Branch (251:20): [True: 1.87M, False: 1.87M]
  ------------------
  252|       |        // Fill the buffer, and process it.
  253|  1.87M|        memcpy(buf + bufsize, data, 64 - bufsize);
  254|  1.87M|        bytes += 64 - bufsize;
  255|  1.87M|        data += 64 - bufsize;
  256|  1.87M|        ripemd160::Transform(s, buf);
  257|  1.87M|        bufsize = 0;
  258|  1.87M|    }
  259|  5.61M|    while (end - data >= 64) {
  ------------------
  |  Branch (259:12): [True: 336, False: 5.61M]
  ------------------
  260|       |        // Process full chunks directly from the source.
  261|    336|        ripemd160::Transform(s, data);
  262|    336|        bytes += 64;
  263|    336|        data += 64;
  264|    336|    }
  265|  5.61M|    if (end > data) {
  ------------------
  |  Branch (265:9): [True: 3.74M, False: 1.87M]
  ------------------
  266|       |        // Fill the buffer with what remains.
  267|  3.74M|        memcpy(buf + bufsize, data, end - data);
  268|  3.74M|        bytes += end - data;
  269|  3.74M|    }
  270|  5.61M|    return *this;
  271|  5.61M|}
_ZN10CRIPEMD1608FinalizeEPh:
  274|  1.87M|{
  275|  1.87M|    static const unsigned char pad[64] = {0x80};
  276|  1.87M|    unsigned char sizedesc[8];
  277|  1.87M|    WriteLE64(sizedesc, bytes << 3);
  278|  1.87M|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  279|  1.87M|    Write(sizedesc, 8);
  280|  1.87M|    WriteLE32(hash, s[0]);
  281|  1.87M|    WriteLE32(hash + 4, s[1]);
  282|  1.87M|    WriteLE32(hash + 8, s[2]);
  283|  1.87M|    WriteLE32(hash + 12, s[3]);
  284|  1.87M|    WriteLE32(hash + 16, s[4]);
  285|  1.87M|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd16010InitializeEPj:
   25|  1.87M|{
   26|  1.87M|    s[0] = 0x67452301ul;
   27|  1.87M|    s[1] = 0xEFCDAB89ul;
   28|  1.87M|    s[2] = 0x98BADCFEul;
   29|  1.87M|    s[3] = 0x10325476ul;
   30|  1.87M|    s[4] = 0xC3D2E1F0ul;
   31|  1.87M|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1609TransformEPjPKh:
   55|  1.87M|{
   56|  1.87M|    uint32_t a1 = s[0], b1 = s[1], c1 = s[2], d1 = s[3], e1 = s[4];
   57|  1.87M|    uint32_t a2 = a1, b2 = b1, c2 = c1, d2 = d1, e2 = e1;
   58|  1.87M|    uint32_t w0 = ReadLE32(chunk + 0), w1 = ReadLE32(chunk + 4), w2 = ReadLE32(chunk + 8), w3 = ReadLE32(chunk + 12);
   59|  1.87M|    uint32_t w4 = ReadLE32(chunk + 16), w5 = ReadLE32(chunk + 20), w6 = ReadLE32(chunk + 24), w7 = ReadLE32(chunk + 28);
   60|  1.87M|    uint32_t w8 = ReadLE32(chunk + 32), w9 = ReadLE32(chunk + 36), w10 = ReadLE32(chunk + 40), w11 = ReadLE32(chunk + 44);
   61|  1.87M|    uint32_t w12 = ReadLE32(chunk + 48), w13 = ReadLE32(chunk + 52), w14 = ReadLE32(chunk + 56), w15 = ReadLE32(chunk + 60);
   62|       |
   63|  1.87M|    R11(a1, b1, c1, d1, e1, w0, 11);
   64|  1.87M|    R12(a2, b2, c2, d2, e2, w5, 8);
   65|  1.87M|    R11(e1, a1, b1, c1, d1, w1, 14);
   66|  1.87M|    R12(e2, a2, b2, c2, d2, w14, 9);
   67|  1.87M|    R11(d1, e1, a1, b1, c1, w2, 15);
   68|  1.87M|    R12(d2, e2, a2, b2, c2, w7, 9);
   69|  1.87M|    R11(c1, d1, e1, a1, b1, w3, 12);
   70|  1.87M|    R12(c2, d2, e2, a2, b2, w0, 11);
   71|  1.87M|    R11(b1, c1, d1, e1, a1, w4, 5);
   72|  1.87M|    R12(b2, c2, d2, e2, a2, w9, 13);
   73|  1.87M|    R11(a1, b1, c1, d1, e1, w5, 8);
   74|  1.87M|    R12(a2, b2, c2, d2, e2, w2, 15);
   75|  1.87M|    R11(e1, a1, b1, c1, d1, w6, 7);
   76|  1.87M|    R12(e2, a2, b2, c2, d2, w11, 15);
   77|  1.87M|    R11(d1, e1, a1, b1, c1, w7, 9);
   78|  1.87M|    R12(d2, e2, a2, b2, c2, w4, 5);
   79|  1.87M|    R11(c1, d1, e1, a1, b1, w8, 11);
   80|  1.87M|    R12(c2, d2, e2, a2, b2, w13, 7);
   81|  1.87M|    R11(b1, c1, d1, e1, a1, w9, 13);
   82|  1.87M|    R12(b2, c2, d2, e2, a2, w6, 7);
   83|  1.87M|    R11(a1, b1, c1, d1, e1, w10, 14);
   84|  1.87M|    R12(a2, b2, c2, d2, e2, w15, 8);
   85|  1.87M|    R11(e1, a1, b1, c1, d1, w11, 15);
   86|  1.87M|    R12(e2, a2, b2, c2, d2, w8, 11);
   87|  1.87M|    R11(d1, e1, a1, b1, c1, w12, 6);
   88|  1.87M|    R12(d2, e2, a2, b2, c2, w1, 14);
   89|  1.87M|    R11(c1, d1, e1, a1, b1, w13, 7);
   90|  1.87M|    R12(c2, d2, e2, a2, b2, w10, 14);
   91|  1.87M|    R11(b1, c1, d1, e1, a1, w14, 9);
   92|  1.87M|    R12(b2, c2, d2, e2, a2, w3, 12);
   93|  1.87M|    R11(a1, b1, c1, d1, e1, w15, 8);
   94|  1.87M|    R12(a2, b2, c2, d2, e2, w12, 6);
   95|       |
   96|  1.87M|    R21(e1, a1, b1, c1, d1, w7, 7);
   97|  1.87M|    R22(e2, a2, b2, c2, d2, w6, 9);
   98|  1.87M|    R21(d1, e1, a1, b1, c1, w4, 6);
   99|  1.87M|    R22(d2, e2, a2, b2, c2, w11, 13);
  100|  1.87M|    R21(c1, d1, e1, a1, b1, w13, 8);
  101|  1.87M|    R22(c2, d2, e2, a2, b2, w3, 15);
  102|  1.87M|    R21(b1, c1, d1, e1, a1, w1, 13);
  103|  1.87M|    R22(b2, c2, d2, e2, a2, w7, 7);
  104|  1.87M|    R21(a1, b1, c1, d1, e1, w10, 11);
  105|  1.87M|    R22(a2, b2, c2, d2, e2, w0, 12);
  106|  1.87M|    R21(e1, a1, b1, c1, d1, w6, 9);
  107|  1.87M|    R22(e2, a2, b2, c2, d2, w13, 8);
  108|  1.87M|    R21(d1, e1, a1, b1, c1, w15, 7);
  109|  1.87M|    R22(d2, e2, a2, b2, c2, w5, 9);
  110|  1.87M|    R21(c1, d1, e1, a1, b1, w3, 15);
  111|  1.87M|    R22(c2, d2, e2, a2, b2, w10, 11);
  112|  1.87M|    R21(b1, c1, d1, e1, a1, w12, 7);
  113|  1.87M|    R22(b2, c2, d2, e2, a2, w14, 7);
  114|  1.87M|    R21(a1, b1, c1, d1, e1, w0, 12);
  115|  1.87M|    R22(a2, b2, c2, d2, e2, w15, 7);
  116|  1.87M|    R21(e1, a1, b1, c1, d1, w9, 15);
  117|  1.87M|    R22(e2, a2, b2, c2, d2, w8, 12);
  118|  1.87M|    R21(d1, e1, a1, b1, c1, w5, 9);
  119|  1.87M|    R22(d2, e2, a2, b2, c2, w12, 7);
  120|  1.87M|    R21(c1, d1, e1, a1, b1, w2, 11);
  121|  1.87M|    R22(c2, d2, e2, a2, b2, w4, 6);
  122|  1.87M|    R21(b1, c1, d1, e1, a1, w14, 7);
  123|  1.87M|    R22(b2, c2, d2, e2, a2, w9, 15);
  124|  1.87M|    R21(a1, b1, c1, d1, e1, w11, 13);
  125|  1.87M|    R22(a2, b2, c2, d2, e2, w1, 13);
  126|  1.87M|    R21(e1, a1, b1, c1, d1, w8, 12);
  127|  1.87M|    R22(e2, a2, b2, c2, d2, w2, 11);
  128|       |
  129|  1.87M|    R31(d1, e1, a1, b1, c1, w3, 11);
  130|  1.87M|    R32(d2, e2, a2, b2, c2, w15, 9);
  131|  1.87M|    R31(c1, d1, e1, a1, b1, w10, 13);
  132|  1.87M|    R32(c2, d2, e2, a2, b2, w5, 7);
  133|  1.87M|    R31(b1, c1, d1, e1, a1, w14, 6);
  134|  1.87M|    R32(b2, c2, d2, e2, a2, w1, 15);
  135|  1.87M|    R31(a1, b1, c1, d1, e1, w4, 7);
  136|  1.87M|    R32(a2, b2, c2, d2, e2, w3, 11);
  137|  1.87M|    R31(e1, a1, b1, c1, d1, w9, 14);
  138|  1.87M|    R32(e2, a2, b2, c2, d2, w7, 8);
  139|  1.87M|    R31(d1, e1, a1, b1, c1, w15, 9);
  140|  1.87M|    R32(d2, e2, a2, b2, c2, w14, 6);
  141|  1.87M|    R31(c1, d1, e1, a1, b1, w8, 13);
  142|  1.87M|    R32(c2, d2, e2, a2, b2, w6, 6);
  143|  1.87M|    R31(b1, c1, d1, e1, a1, w1, 15);
  144|  1.87M|    R32(b2, c2, d2, e2, a2, w9, 14);
  145|  1.87M|    R31(a1, b1, c1, d1, e1, w2, 14);
  146|  1.87M|    R32(a2, b2, c2, d2, e2, w11, 12);
  147|  1.87M|    R31(e1, a1, b1, c1, d1, w7, 8);
  148|  1.87M|    R32(e2, a2, b2, c2, d2, w8, 13);
  149|  1.87M|    R31(d1, e1, a1, b1, c1, w0, 13);
  150|  1.87M|    R32(d2, e2, a2, b2, c2, w12, 5);
  151|  1.87M|    R31(c1, d1, e1, a1, b1, w6, 6);
  152|  1.87M|    R32(c2, d2, e2, a2, b2, w2, 14);
  153|  1.87M|    R31(b1, c1, d1, e1, a1, w13, 5);
  154|  1.87M|    R32(b2, c2, d2, e2, a2, w10, 13);
  155|  1.87M|    R31(a1, b1, c1, d1, e1, w11, 12);
  156|  1.87M|    R32(a2, b2, c2, d2, e2, w0, 13);
  157|  1.87M|    R31(e1, a1, b1, c1, d1, w5, 7);
  158|  1.87M|    R32(e2, a2, b2, c2, d2, w4, 7);
  159|  1.87M|    R31(d1, e1, a1, b1, c1, w12, 5);
  160|  1.87M|    R32(d2, e2, a2, b2, c2, w13, 5);
  161|       |
  162|  1.87M|    R41(c1, d1, e1, a1, b1, w1, 11);
  163|  1.87M|    R42(c2, d2, e2, a2, b2, w8, 15);
  164|  1.87M|    R41(b1, c1, d1, e1, a1, w9, 12);
  165|  1.87M|    R42(b2, c2, d2, e2, a2, w6, 5);
  166|  1.87M|    R41(a1, b1, c1, d1, e1, w11, 14);
  167|  1.87M|    R42(a2, b2, c2, d2, e2, w4, 8);
  168|  1.87M|    R41(e1, a1, b1, c1, d1, w10, 15);
  169|  1.87M|    R42(e2, a2, b2, c2, d2, w1, 11);
  170|  1.87M|    R41(d1, e1, a1, b1, c1, w0, 14);
  171|  1.87M|    R42(d2, e2, a2, b2, c2, w3, 14);
  172|  1.87M|    R41(c1, d1, e1, a1, b1, w8, 15);
  173|  1.87M|    R42(c2, d2, e2, a2, b2, w11, 14);
  174|  1.87M|    R41(b1, c1, d1, e1, a1, w12, 9);
  175|  1.87M|    R42(b2, c2, d2, e2, a2, w15, 6);
  176|  1.87M|    R41(a1, b1, c1, d1, e1, w4, 8);
  177|  1.87M|    R42(a2, b2, c2, d2, e2, w0, 14);
  178|  1.87M|    R41(e1, a1, b1, c1, d1, w13, 9);
  179|  1.87M|    R42(e2, a2, b2, c2, d2, w5, 6);
  180|  1.87M|    R41(d1, e1, a1, b1, c1, w3, 14);
  181|  1.87M|    R42(d2, e2, a2, b2, c2, w12, 9);
  182|  1.87M|    R41(c1, d1, e1, a1, b1, w7, 5);
  183|  1.87M|    R42(c2, d2, e2, a2, b2, w2, 12);
  184|  1.87M|    R41(b1, c1, d1, e1, a1, w15, 6);
  185|  1.87M|    R42(b2, c2, d2, e2, a2, w13, 9);
  186|  1.87M|    R41(a1, b1, c1, d1, e1, w14, 8);
  187|  1.87M|    R42(a2, b2, c2, d2, e2, w9, 12);
  188|  1.87M|    R41(e1, a1, b1, c1, d1, w5, 6);
  189|  1.87M|    R42(e2, a2, b2, c2, d2, w7, 5);
  190|  1.87M|    R41(d1, e1, a1, b1, c1, w6, 5);
  191|  1.87M|    R42(d2, e2, a2, b2, c2, w10, 15);
  192|  1.87M|    R41(c1, d1, e1, a1, b1, w2, 12);
  193|  1.87M|    R42(c2, d2, e2, a2, b2, w14, 8);
  194|       |
  195|  1.87M|    R51(b1, c1, d1, e1, a1, w4, 9);
  196|  1.87M|    R52(b2, c2, d2, e2, a2, w12, 8);
  197|  1.87M|    R51(a1, b1, c1, d1, e1, w0, 15);
  198|  1.87M|    R52(a2, b2, c2, d2, e2, w15, 5);
  199|  1.87M|    R51(e1, a1, b1, c1, d1, w5, 5);
  200|  1.87M|    R52(e2, a2, b2, c2, d2, w10, 12);
  201|  1.87M|    R51(d1, e1, a1, b1, c1, w9, 11);
  202|  1.87M|    R52(d2, e2, a2, b2, c2, w4, 9);
  203|  1.87M|    R51(c1, d1, e1, a1, b1, w7, 6);
  204|  1.87M|    R52(c2, d2, e2, a2, b2, w1, 12);
  205|  1.87M|    R51(b1, c1, d1, e1, a1, w12, 8);
  206|  1.87M|    R52(b2, c2, d2, e2, a2, w5, 5);
  207|  1.87M|    R51(a1, b1, c1, d1, e1, w2, 13);
  208|  1.87M|    R52(a2, b2, c2, d2, e2, w8, 14);
  209|  1.87M|    R51(e1, a1, b1, c1, d1, w10, 12);
  210|  1.87M|    R52(e2, a2, b2, c2, d2, w7, 6);
  211|  1.87M|    R51(d1, e1, a1, b1, c1, w14, 5);
  212|  1.87M|    R52(d2, e2, a2, b2, c2, w6, 8);
  213|  1.87M|    R51(c1, d1, e1, a1, b1, w1, 12);
  214|  1.87M|    R52(c2, d2, e2, a2, b2, w2, 13);
  215|  1.87M|    R51(b1, c1, d1, e1, a1, w3, 13);
  216|  1.87M|    R52(b2, c2, d2, e2, a2, w13, 6);
  217|  1.87M|    R51(a1, b1, c1, d1, e1, w8, 14);
  218|  1.87M|    R52(a2, b2, c2, d2, e2, w14, 5);
  219|  1.87M|    R51(e1, a1, b1, c1, d1, w11, 11);
  220|  1.87M|    R52(e2, a2, b2, c2, d2, w0, 15);
  221|  1.87M|    R51(d1, e1, a1, b1, c1, w6, 8);
  222|  1.87M|    R52(d2, e2, a2, b2, c2, w3, 13);
  223|  1.87M|    R51(c1, d1, e1, a1, b1, w15, 5);
  224|  1.87M|    R52(c2, d2, e2, a2, b2, w9, 11);
  225|  1.87M|    R51(b1, c1, d1, e1, a1, w13, 6);
  226|  1.87M|    R52(b2, c2, d2, e2, a2, w11, 11);
  227|       |
  228|  1.87M|    uint32_t t = s[0];
  229|  1.87M|    s[0] = s[1] + c1 + d2;
  230|  1.87M|    s[1] = s[2] + d1 + e2;
  231|  1.87M|    s[2] = s[3] + e1 + a2;
  232|  1.87M|    s[3] = s[4] + a1 + b2;
  233|  1.87M|    s[4] = t + b1 + c2;
  234|  1.87M|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R11ERjjS1_jjji:
   41|  29.9M|void inline R11(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x, 0, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1605RoundERjjS1_jjjjji:
   36|   299M|{
   37|   299M|    a = rol(a + f + x + k, r) + e;
   38|   299M|    c = rol(c, 10);
   39|   299M|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603rolEji:
   33|   598M|uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f1Ejjj:
   17|  59.8M|uint32_t inline f1(uint32_t x, uint32_t y, uint32_t z) { return x ^ y ^ z; }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R12ERjjS1_jjji:
   47|  29.9M|void inline R12(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0x50A28BE6ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f5Ejjj:
   21|  59.8M|uint32_t inline f5(uint32_t x, uint32_t y, uint32_t z) { return x ^ (y | ~z); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R21ERjjS1_jjji:
   42|  29.9M|void inline R21(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x5A827999ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f2Ejjj:
   18|  59.8M|uint32_t inline f2(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (~x & z); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R22ERjjS1_jjji:
   48|  29.9M|void inline R22(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x5C4DD124ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f4Ejjj:
   20|  59.8M|uint32_t inline f4(uint32_t x, uint32_t y, uint32_t z) { return (x & z) | (y & ~z); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R31ERjjS1_jjji:
   43|  29.9M|void inline R31(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6ED9EBA1ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f3Ejjj:
   19|  59.8M|uint32_t inline f3(uint32_t x, uint32_t y, uint32_t z) { return (x | ~y) ^ z; }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R32ERjjS1_jjji:
   49|  29.9M|void inline R32(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6D703EF3ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R41ERjjS1_jjji:
   44|  29.9M|void inline R41(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x8F1BBCDCul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R42ERjjS1_jjji:
   50|  29.9M|void inline R42(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x7A6D76E9ul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R51ERjjS1_jjji:
   45|  29.9M|void inline R51(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0xA953FD4Eul, r); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R52ERjjS1_jjji:
   51|  29.9M|void inline R52(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x, 0, r); }

_ZN5CSHA1C2Ev:
  150|  15.6k|{
  151|  15.6k|    sha1::Initialize(s);
  152|  15.6k|}
_ZN5CSHA15WriteEPKhm:
  155|  46.8k|{
  156|  46.8k|    const unsigned char* end = data + len;
  157|  46.8k|    size_t bufsize = bytes % 64;
  158|  46.8k|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (158:9): [True: 31.1k, False: 15.6k]
  |  Branch (158:20): [True: 15.6k, False: 15.5k]
  ------------------
  159|       |        // Fill the buffer, and process it.
  160|  15.6k|        memcpy(buf + bufsize, data, 64 - bufsize);
  161|  15.6k|        bytes += 64 - bufsize;
  162|  15.6k|        data += 64 - bufsize;
  163|  15.6k|        sha1::Transform(s, buf);
  164|  15.6k|        bufsize = 0;
  165|  15.6k|    }
  166|  47.1k|    while (end - data >= 64) {
  ------------------
  |  Branch (166:12): [True: 386, False: 46.8k]
  ------------------
  167|       |        // Process full chunks directly from the source.
  168|    386|        sha1::Transform(s, data);
  169|    386|        bytes += 64;
  170|    386|        data += 64;
  171|    386|    }
  172|  46.8k|    if (end > data) {
  ------------------
  |  Branch (172:9): [True: 31.1k, False: 15.6k]
  ------------------
  173|       |        // Fill the buffer with what remains.
  174|  31.1k|        memcpy(buf + bufsize, data, end - data);
  175|  31.1k|        bytes += end - data;
  176|  31.1k|    }
  177|  46.8k|    return *this;
  178|  46.8k|}
_ZN5CSHA18FinalizeEPh:
  181|  15.6k|{
  182|  15.6k|    static const unsigned char pad[64] = {0x80};
  183|  15.6k|    unsigned char sizedesc[8];
  184|  15.6k|    WriteBE64(sizedesc, bytes << 3);
  185|  15.6k|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  186|  15.6k|    Write(sizedesc, 8);
  187|  15.6k|    WriteBE32(hash, s[0]);
  188|  15.6k|    WriteBE32(hash + 4, s[1]);
  189|  15.6k|    WriteBE32(hash + 8, s[2]);
  190|  15.6k|    WriteBE32(hash + 12, s[3]);
  191|  15.6k|    WriteBE32(hash + 16, s[4]);
  192|  15.6k|}
sha1.cpp:_ZN12_GLOBAL__N_14sha110InitializeEPj:
   32|  15.6k|{
   33|  15.6k|    s[0] = 0x67452301ul;
   34|  15.6k|    s[1] = 0xEFCDAB89ul;
   35|  15.6k|    s[2] = 0x98BADCFEul;
   36|  15.6k|    s[3] = 0x10325476ul;
   37|  15.6k|    s[4] = 0xC3D2E1F0ul;
   38|  15.6k|}
sha1.cpp:_ZN12_GLOBAL__N_14sha19TransformEPjPKh:
   47|  15.9k|{
   48|  15.9k|    uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4];
   49|  15.9k|    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
   50|       |
   51|  15.9k|    Round(a, b, c, d, e, f1(b, c, d), k1, w0 = ReadBE32(chunk + 0));
   52|  15.9k|    Round(e, a, b, c, d, f1(a, b, c), k1, w1 = ReadBE32(chunk + 4));
   53|  15.9k|    Round(d, e, a, b, c, f1(e, a, b), k1, w2 = ReadBE32(chunk + 8));
   54|  15.9k|    Round(c, d, e, a, b, f1(d, e, a), k1, w3 = ReadBE32(chunk + 12));
   55|  15.9k|    Round(b, c, d, e, a, f1(c, d, e), k1, w4 = ReadBE32(chunk + 16));
   56|  15.9k|    Round(a, b, c, d, e, f1(b, c, d), k1, w5 = ReadBE32(chunk + 20));
   57|  15.9k|    Round(e, a, b, c, d, f1(a, b, c), k1, w6 = ReadBE32(chunk + 24));
   58|  15.9k|    Round(d, e, a, b, c, f1(e, a, b), k1, w7 = ReadBE32(chunk + 28));
   59|  15.9k|    Round(c, d, e, a, b, f1(d, e, a), k1, w8 = ReadBE32(chunk + 32));
   60|  15.9k|    Round(b, c, d, e, a, f1(c, d, e), k1, w9 = ReadBE32(chunk + 36));
   61|  15.9k|    Round(a, b, c, d, e, f1(b, c, d), k1, w10 = ReadBE32(chunk + 40));
   62|  15.9k|    Round(e, a, b, c, d, f1(a, b, c), k1, w11 = ReadBE32(chunk + 44));
   63|  15.9k|    Round(d, e, a, b, c, f1(e, a, b), k1, w12 = ReadBE32(chunk + 48));
   64|  15.9k|    Round(c, d, e, a, b, f1(d, e, a), k1, w13 = ReadBE32(chunk + 52));
   65|  15.9k|    Round(b, c, d, e, a, f1(c, d, e), k1, w14 = ReadBE32(chunk + 56));
   66|  15.9k|    Round(a, b, c, d, e, f1(b, c, d), k1, w15 = ReadBE32(chunk + 60));
   67|       |
   68|  15.9k|    Round(e, a, b, c, d, f1(a, b, c), k1, w0 = left(w0 ^ w13 ^ w8 ^ w2));
   69|  15.9k|    Round(d, e, a, b, c, f1(e, a, b), k1, w1 = left(w1 ^ w14 ^ w9 ^ w3));
   70|  15.9k|    Round(c, d, e, a, b, f1(d, e, a), k1, w2 = left(w2 ^ w15 ^ w10 ^ w4));
   71|  15.9k|    Round(b, c, d, e, a, f1(c, d, e), k1, w3 = left(w3 ^ w0 ^ w11 ^ w5));
   72|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k2, w4 = left(w4 ^ w1 ^ w12 ^ w6));
   73|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k2, w5 = left(w5 ^ w2 ^ w13 ^ w7));
   74|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k2, w6 = left(w6 ^ w3 ^ w14 ^ w8));
   75|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k2, w7 = left(w7 ^ w4 ^ w15 ^ w9));
   76|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k2, w8 = left(w8 ^ w5 ^ w0 ^ w10));
   77|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k2, w9 = left(w9 ^ w6 ^ w1 ^ w11));
   78|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k2, w10 = left(w10 ^ w7 ^ w2 ^ w12));
   79|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k2, w11 = left(w11 ^ w8 ^ w3 ^ w13));
   80|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k2, w12 = left(w12 ^ w9 ^ w4 ^ w14));
   81|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k2, w13 = left(w13 ^ w10 ^ w5 ^ w15));
   82|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k2, w14 = left(w14 ^ w11 ^ w6 ^ w0));
   83|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k2, w15 = left(w15 ^ w12 ^ w7 ^ w1));
   84|       |
   85|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k2, w0 = left(w0 ^ w13 ^ w8 ^ w2));
   86|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k2, w1 = left(w1 ^ w14 ^ w9 ^ w3));
   87|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k2, w2 = left(w2 ^ w15 ^ w10 ^ w4));
   88|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k2, w3 = left(w3 ^ w0 ^ w11 ^ w5));
   89|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k2, w4 = left(w4 ^ w1 ^ w12 ^ w6));
   90|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k2, w5 = left(w5 ^ w2 ^ w13 ^ w7));
   91|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k2, w6 = left(w6 ^ w3 ^ w14 ^ w8));
   92|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k2, w7 = left(w7 ^ w4 ^ w15 ^ w9));
   93|  15.9k|    Round(a, b, c, d, e, f3(b, c, d), k3, w8 = left(w8 ^ w5 ^ w0 ^ w10));
   94|  15.9k|    Round(e, a, b, c, d, f3(a, b, c), k3, w9 = left(w9 ^ w6 ^ w1 ^ w11));
   95|  15.9k|    Round(d, e, a, b, c, f3(e, a, b), k3, w10 = left(w10 ^ w7 ^ w2 ^ w12));
   96|  15.9k|    Round(c, d, e, a, b, f3(d, e, a), k3, w11 = left(w11 ^ w8 ^ w3 ^ w13));
   97|  15.9k|    Round(b, c, d, e, a, f3(c, d, e), k3, w12 = left(w12 ^ w9 ^ w4 ^ w14));
   98|  15.9k|    Round(a, b, c, d, e, f3(b, c, d), k3, w13 = left(w13 ^ w10 ^ w5 ^ w15));
   99|  15.9k|    Round(e, a, b, c, d, f3(a, b, c), k3, w14 = left(w14 ^ w11 ^ w6 ^ w0));
  100|  15.9k|    Round(d, e, a, b, c, f3(e, a, b), k3, w15 = left(w15 ^ w12 ^ w7 ^ w1));
  101|       |
  102|  15.9k|    Round(c, d, e, a, b, f3(d, e, a), k3, w0 = left(w0 ^ w13 ^ w8 ^ w2));
  103|  15.9k|    Round(b, c, d, e, a, f3(c, d, e), k3, w1 = left(w1 ^ w14 ^ w9 ^ w3));
  104|  15.9k|    Round(a, b, c, d, e, f3(b, c, d), k3, w2 = left(w2 ^ w15 ^ w10 ^ w4));
  105|  15.9k|    Round(e, a, b, c, d, f3(a, b, c), k3, w3 = left(w3 ^ w0 ^ w11 ^ w5));
  106|  15.9k|    Round(d, e, a, b, c, f3(e, a, b), k3, w4 = left(w4 ^ w1 ^ w12 ^ w6));
  107|  15.9k|    Round(c, d, e, a, b, f3(d, e, a), k3, w5 = left(w5 ^ w2 ^ w13 ^ w7));
  108|  15.9k|    Round(b, c, d, e, a, f3(c, d, e), k3, w6 = left(w6 ^ w3 ^ w14 ^ w8));
  109|  15.9k|    Round(a, b, c, d, e, f3(b, c, d), k3, w7 = left(w7 ^ w4 ^ w15 ^ w9));
  110|  15.9k|    Round(e, a, b, c, d, f3(a, b, c), k3, w8 = left(w8 ^ w5 ^ w0 ^ w10));
  111|  15.9k|    Round(d, e, a, b, c, f3(e, a, b), k3, w9 = left(w9 ^ w6 ^ w1 ^ w11));
  112|  15.9k|    Round(c, d, e, a, b, f3(d, e, a), k3, w10 = left(w10 ^ w7 ^ w2 ^ w12));
  113|  15.9k|    Round(b, c, d, e, a, f3(c, d, e), k3, w11 = left(w11 ^ w8 ^ w3 ^ w13));
  114|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k4, w12 = left(w12 ^ w9 ^ w4 ^ w14));
  115|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k4, w13 = left(w13 ^ w10 ^ w5 ^ w15));
  116|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k4, w14 = left(w14 ^ w11 ^ w6 ^ w0));
  117|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k4, w15 = left(w15 ^ w12 ^ w7 ^ w1));
  118|       |
  119|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k4, w0 = left(w0 ^ w13 ^ w8 ^ w2));
  120|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k4, w1 = left(w1 ^ w14 ^ w9 ^ w3));
  121|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k4, w2 = left(w2 ^ w15 ^ w10 ^ w4));
  122|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k4, w3 = left(w3 ^ w0 ^ w11 ^ w5));
  123|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k4, w4 = left(w4 ^ w1 ^ w12 ^ w6));
  124|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k4, w5 = left(w5 ^ w2 ^ w13 ^ w7));
  125|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k4, w6 = left(w6 ^ w3 ^ w14 ^ w8));
  126|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k4, w7 = left(w7 ^ w4 ^ w15 ^ w9));
  127|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k4, w8 = left(w8 ^ w5 ^ w0 ^ w10));
  128|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k4, w9 = left(w9 ^ w6 ^ w1 ^ w11));
  129|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k4, w10 = left(w10 ^ w7 ^ w2 ^ w12));
  130|  15.9k|    Round(a, b, c, d, e, f2(b, c, d), k4, w11 = left(w11 ^ w8 ^ w3 ^ w13));
  131|  15.9k|    Round(e, a, b, c, d, f2(a, b, c), k4, w12 = left(w12 ^ w9 ^ w4 ^ w14));
  132|  15.9k|    Round(d, e, a, b, c, f2(e, a, b), k4, left(w13 ^ w10 ^ w5 ^ w15));
  133|  15.9k|    Round(c, d, e, a, b, f2(d, e, a), k4, left(w14 ^ w11 ^ w6 ^ w0));
  134|  15.9k|    Round(b, c, d, e, a, f2(c, d, e), k4, left(w15 ^ w12 ^ w7 ^ w1));
  135|       |
  136|  15.9k|    s[0] += a;
  137|  15.9k|    s[1] += b;
  138|  15.9k|    s[2] += c;
  139|  15.9k|    s[3] += d;
  140|  15.9k|    s[4] += e;
  141|  15.9k|}
sha1.cpp:_ZN12_GLOBAL__N_14sha15RoundEjRjjjS1_jjj:
   19|  1.27M|{
   20|  1.27M|    e += ((a << 5) | (a >> 27)) + f + k + w;
   21|  1.27M|    b = (b << 30) | (b >> 2);
   22|  1.27M|}
sha1.cpp:_ZN12_GLOBAL__N_14sha12f1Ejjj:
   24|   319k|uint32_t inline f1(uint32_t b, uint32_t c, uint32_t d) { return d ^ (b & (c ^ d)); }
sha1.cpp:_ZN12_GLOBAL__N_14sha14leftEj:
   28|  1.02M|uint32_t inline left(uint32_t x) { return (x << 1) | (x >> 31); }
sha1.cpp:_ZN12_GLOBAL__N_14sha12f2Ejjj:
   25|   639k|uint32_t inline f2(uint32_t b, uint32_t c, uint32_t d) { return b ^ c ^ d; }
sha1.cpp:_ZN12_GLOBAL__N_14sha12f3Ejjj:
   26|   319k|uint32_t inline f3(uint32_t b, uint32_t c, uint32_t d) { return (b & c) | (d & (b | c)); }

_ZN7CSHA256C2Ev:
  697|  2.35M|{
  698|  2.35M|    sha256::Initialize(s);
  699|  2.35M|}
_ZN7CSHA2565WriteEPKhm:
  702|  9.45M|{
  703|  9.45M|    const unsigned char* end = data + len;
  704|  9.45M|    size_t bufsize = bytes % 64;
  705|  9.45M|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (705:9): [True: 6.57M, False: 2.88M]
  |  Branch (705:20): [True: 3.04M, False: 3.52M]
  ------------------
  706|       |        // Fill the buffer, and process it.
  707|  3.04M|        memcpy(buf + bufsize, data, 64 - bufsize);
  708|  3.04M|        bytes += 64 - bufsize;
  709|  3.04M|        data += 64 - bufsize;
  710|  3.04M|        Transform(s, buf, 1);
  711|  3.04M|        bufsize = 0;
  712|  3.04M|    }
  713|  9.45M|    if (end - data >= 64) {
  ------------------
  |  Branch (713:9): [True: 460k, False: 8.99M]
  ------------------
  714|   460k|        size_t blocks = (end - data) / 64;
  715|   460k|        Transform(s, data, blocks);
  716|   460k|        data += 64 * blocks;
  717|   460k|        bytes += 64 * blocks;
  718|   460k|    }
  719|  9.45M|    if (end > data) {
  ------------------
  |  Branch (719:9): [True: 6.56M, False: 2.88M]
  ------------------
  720|       |        // Fill the buffer with what remains.
  721|  6.56M|        memcpy(buf + bufsize, data, end - data);
  722|  6.56M|        bytes += end - data;
  723|  6.56M|    }
  724|  9.45M|    return *this;
  725|  9.45M|}
_ZN7CSHA2568FinalizeEPh:
  728|  2.84M|{
  729|  2.84M|    static const unsigned char pad[64] = {0x80};
  730|  2.84M|    unsigned char sizedesc[8];
  731|  2.84M|    WriteBE64(sizedesc, bytes << 3);
  732|  2.84M|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  733|  2.84M|    Write(sizedesc, 8);
  734|  2.84M|    WriteBE32(hash, s[0]);
  735|  2.84M|    WriteBE32(hash + 4, s[1]);
  736|  2.84M|    WriteBE32(hash + 8, s[2]);
  737|  2.84M|    WriteBE32(hash + 12, s[3]);
  738|  2.84M|    WriteBE32(hash + 16, s[4]);
  739|  2.84M|    WriteBE32(hash + 20, s[5]);
  740|  2.84M|    WriteBE32(hash + 24, s[6]);
  741|  2.84M|    WriteBE32(hash + 28, s[7]);
  742|  2.84M|}
_ZN7CSHA2565ResetEv:
  745|   465k|{
  746|   465k|    bytes = 0;
  747|   465k|    sha256::Initialize(s);
  748|   465k|    return *this;
  749|   465k|}
sha256.cpp:_ZN12_GLOBAL__N_16sha25610InitializeEPj:
   89|  2.82M|{
   90|  2.82M|    s[0] = 0x6a09e667ul;
   91|  2.82M|    s[1] = 0xbb67ae85ul;
   92|  2.82M|    s[2] = 0x3c6ef372ul;
   93|  2.82M|    s[3] = 0xa54ff53aul;
   94|  2.82M|    s[4] = 0x510e527ful;
   95|  2.82M|    s[5] = 0x9b05688cul;
   96|  2.82M|    s[6] = 0x1f83d9abul;
   97|  2.82M|    s[7] = 0x5be0cd19ul;
   98|  2.82M|}

_ZN11sha256_sse49TransformEPjPKhm:
   23|  3.50M|{
   24|  3.50M|    static const uint32_t K256 alignas(16) [] = {
   25|  3.50M|        0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
   26|  3.50M|        0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
   27|  3.50M|        0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
   28|  3.50M|        0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
   29|  3.50M|        0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
   30|  3.50M|        0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
   31|  3.50M|        0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
   32|  3.50M|        0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
   33|  3.50M|        0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
   34|  3.50M|        0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
   35|  3.50M|        0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
   36|  3.50M|        0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
   37|  3.50M|        0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
   38|  3.50M|        0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
   39|  3.50M|        0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
   40|  3.50M|        0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
   41|  3.50M|    };
   42|  3.50M|    static const uint32_t FLIP_MASK alignas(16) [] = {0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e0f};
   43|  3.50M|    static const uint32_t SHUF_00BA alignas(16) [] = {0x03020100, 0x0b0a0908, 0xffffffff, 0xffffffff};
   44|  3.50M|    static const uint32_t SHUF_DC00 alignas(16) [] = {0xffffffff, 0xffffffff, 0x03020100, 0x0b0a0908};
   45|  3.50M|    uint32_t a, b, c, d, f, g, h, y0, y1, y2;
   46|  3.50M|    uint64_t tbl;
   47|  3.50M|    uint64_t inp_end, inp;
   48|  3.50M|    uint32_t xfer alignas(16) [4];
   49|       |
   50|  3.50M|    __asm__ __volatile__(
   51|  3.50M|        "shl    $0x6,%2;"
   52|  3.50M|        "je     Ldone_hash_%=;"
   53|  3.50M|        "add    %1,%2;"
   54|  3.50M|        "mov    %2,%14;"
   55|  3.50M|        "mov    (%0),%3;"
   56|  3.50M|        "mov    0x4(%0),%4;"
   57|  3.50M|        "mov    0x8(%0),%5;"
   58|  3.50M|        "mov    0xc(%0),%6;"
   59|  3.50M|        "mov    0x10(%0),%k2;"
   60|  3.50M|        "mov    0x14(%0),%7;"
   61|  3.50M|        "mov    0x18(%0),%8;"
   62|  3.50M|        "mov    0x1c(%0),%9;"
   63|  3.50M|        "movdqa %18,%%xmm12;"
   64|  3.50M|        "movdqa %19,%%xmm10;"
   65|  3.50M|        "movdqa %20,%%xmm11;"
   66|       |
   67|  3.50M|        "Lloop0_%=:"
   68|  3.50M|        "lea    %17,%13;"
   69|  3.50M|        "movdqu (%1),%%xmm4;"
   70|  3.50M|        "pshufb %%xmm12,%%xmm4;"
   71|  3.50M|        "movdqu 0x10(%1),%%xmm5;"
   72|  3.50M|        "pshufb %%xmm12,%%xmm5;"
   73|  3.50M|        "movdqu 0x20(%1),%%xmm6;"
   74|  3.50M|        "pshufb %%xmm12,%%xmm6;"
   75|  3.50M|        "movdqu 0x30(%1),%%xmm7;"
   76|  3.50M|        "pshufb %%xmm12,%%xmm7;"
   77|  3.50M|        "mov    %1,%15;"
   78|  3.50M|        "mov    $3,%1;"
   79|       |
   80|  3.50M|        "Lloop1_%=:"
   81|  3.50M|        "movdqa 0x0(%13),%%xmm9;"
   82|  3.50M|        "paddd  %%xmm4,%%xmm9;"
   83|  3.50M|        "movdqa %%xmm9,%16;"
   84|  3.50M|        "movdqa %%xmm7,%%xmm0;"
   85|  3.50M|        "mov    %k2,%10;"
   86|  3.50M|        "ror    $0xe,%10;"
   87|  3.50M|        "mov    %3,%11;"
   88|  3.50M|        "palignr $0x4,%%xmm6,%%xmm0;"
   89|  3.50M|        "ror    $0x9,%11;"
   90|  3.50M|        "xor    %k2,%10;"
   91|  3.50M|        "mov    %7,%12;"
   92|  3.50M|        "ror    $0x5,%10;"
   93|  3.50M|        "movdqa %%xmm5,%%xmm1;"
   94|  3.50M|        "xor    %3,%11;"
   95|  3.50M|        "xor    %8,%12;"
   96|  3.50M|        "paddd  %%xmm4,%%xmm0;"
   97|  3.50M|        "xor    %k2,%10;"
   98|  3.50M|        "and    %k2,%12;"
   99|  3.50M|        "ror    $0xb,%11;"
  100|  3.50M|        "palignr $0x4,%%xmm4,%%xmm1;"
  101|  3.50M|        "xor    %3,%11;"
  102|  3.50M|        "ror    $0x6,%10;"
  103|  3.50M|        "xor    %8,%12;"
  104|  3.50M|        "movdqa %%xmm1,%%xmm2;"
  105|  3.50M|        "ror    $0x2,%11;"
  106|  3.50M|        "add    %10,%12;"
  107|  3.50M|        "add    %16,%12;"
  108|  3.50M|        "movdqa %%xmm1,%%xmm3;"
  109|  3.50M|        "mov    %3,%10;"
  110|  3.50M|        "add    %12,%9;"
  111|  3.50M|        "mov    %3,%12;"
  112|  3.50M|        "pslld  $0x19,%%xmm1;"
  113|  3.50M|        "or     %5,%10;"
  114|  3.50M|        "add    %9,%6;"
  115|  3.50M|        "and    %5,%12;"
  116|  3.50M|        "psrld  $0x7,%%xmm2;"
  117|  3.50M|        "and    %4,%10;"
  118|  3.50M|        "add    %11,%9;"
  119|  3.50M|        "por    %%xmm2,%%xmm1;"
  120|  3.50M|        "or     %12,%10;"
  121|  3.50M|        "add    %10,%9;"
  122|  3.50M|        "movdqa %%xmm3,%%xmm2;"
  123|  3.50M|        "mov    %6,%10;"
  124|  3.50M|        "mov    %9,%11;"
  125|  3.50M|        "movdqa %%xmm3,%%xmm8;"
  126|  3.50M|        "ror    $0xe,%10;"
  127|  3.50M|        "xor    %6,%10;"
  128|  3.50M|        "mov    %k2,%12;"
  129|  3.50M|        "ror    $0x9,%11;"
  130|  3.50M|        "pslld  $0xe,%%xmm3;"
  131|  3.50M|        "xor    %9,%11;"
  132|  3.50M|        "ror    $0x5,%10;"
  133|  3.50M|        "xor    %7,%12;"
  134|  3.50M|        "psrld  $0x12,%%xmm2;"
  135|  3.50M|        "ror    $0xb,%11;"
  136|  3.50M|        "xor    %6,%10;"
  137|  3.50M|        "and    %6,%12;"
  138|  3.50M|        "ror    $0x6,%10;"
  139|  3.50M|        "pxor   %%xmm3,%%xmm1;"
  140|  3.50M|        "xor    %9,%11;"
  141|  3.50M|        "xor    %7,%12;"
  142|  3.50M|        "psrld  $0x3,%%xmm8;"
  143|  3.50M|        "add    %10,%12;"
  144|  3.50M|        "add    4+%16,%12;"
  145|  3.50M|        "ror    $0x2,%11;"
  146|  3.50M|        "pxor   %%xmm2,%%xmm1;"
  147|  3.50M|        "mov    %9,%10;"
  148|  3.50M|        "add    %12,%8;"
  149|  3.50M|        "mov    %9,%12;"
  150|  3.50M|        "pxor   %%xmm8,%%xmm1;"
  151|  3.50M|        "or     %4,%10;"
  152|  3.50M|        "add    %8,%5;"
  153|  3.50M|        "and    %4,%12;"
  154|  3.50M|        "pshufd $0xfa,%%xmm7,%%xmm2;"
  155|  3.50M|        "and    %3,%10;"
  156|  3.50M|        "add    %11,%8;"
  157|  3.50M|        "paddd  %%xmm1,%%xmm0;"
  158|  3.50M|        "or     %12,%10;"
  159|  3.50M|        "add    %10,%8;"
  160|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  161|  3.50M|        "mov    %5,%10;"
  162|  3.50M|        "mov    %8,%11;"
  163|  3.50M|        "ror    $0xe,%10;"
  164|  3.50M|        "movdqa %%xmm2,%%xmm8;"
  165|  3.50M|        "xor    %5,%10;"
  166|  3.50M|        "ror    $0x9,%11;"
  167|  3.50M|        "mov    %6,%12;"
  168|  3.50M|        "xor    %8,%11;"
  169|  3.50M|        "ror    $0x5,%10;"
  170|  3.50M|        "psrlq  $0x11,%%xmm2;"
  171|  3.50M|        "xor    %k2,%12;"
  172|  3.50M|        "psrlq  $0x13,%%xmm3;"
  173|  3.50M|        "xor    %5,%10;"
  174|  3.50M|        "and    %5,%12;"
  175|  3.50M|        "psrld  $0xa,%%xmm8;"
  176|  3.50M|        "ror    $0xb,%11;"
  177|  3.50M|        "xor    %8,%11;"
  178|  3.50M|        "xor    %k2,%12;"
  179|  3.50M|        "ror    $0x6,%10;"
  180|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  181|  3.50M|        "add    %10,%12;"
  182|  3.50M|        "ror    $0x2,%11;"
  183|  3.50M|        "add    8+%16,%12;"
  184|  3.50M|        "pxor   %%xmm2,%%xmm8;"
  185|  3.50M|        "mov    %8,%10;"
  186|  3.50M|        "add    %12,%7;"
  187|  3.50M|        "mov    %8,%12;"
  188|  3.50M|        "pshufb %%xmm10,%%xmm8;"
  189|  3.50M|        "or     %3,%10;"
  190|  3.50M|        "add    %7,%4;"
  191|  3.50M|        "and    %3,%12;"
  192|  3.50M|        "paddd  %%xmm8,%%xmm0;"
  193|  3.50M|        "and    %9,%10;"
  194|  3.50M|        "add    %11,%7;"
  195|  3.50M|        "pshufd $0x50,%%xmm0,%%xmm2;"
  196|  3.50M|        "or     %12,%10;"
  197|  3.50M|        "add    %10,%7;"
  198|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  199|  3.50M|        "mov    %4,%10;"
  200|  3.50M|        "ror    $0xe,%10;"
  201|  3.50M|        "mov    %7,%11;"
  202|  3.50M|        "movdqa %%xmm2,%%xmm4;"
  203|  3.50M|        "ror    $0x9,%11;"
  204|  3.50M|        "xor    %4,%10;"
  205|  3.50M|        "mov    %5,%12;"
  206|  3.50M|        "ror    $0x5,%10;"
  207|  3.50M|        "psrlq  $0x11,%%xmm2;"
  208|  3.50M|        "xor    %7,%11;"
  209|  3.50M|        "xor    %6,%12;"
  210|  3.50M|        "psrlq  $0x13,%%xmm3;"
  211|  3.50M|        "xor    %4,%10;"
  212|  3.50M|        "and    %4,%12;"
  213|  3.50M|        "ror    $0xb,%11;"
  214|  3.50M|        "psrld  $0xa,%%xmm4;"
  215|  3.50M|        "xor    %7,%11;"
  216|  3.50M|        "ror    $0x6,%10;"
  217|  3.50M|        "xor    %6,%12;"
  218|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  219|  3.50M|        "ror    $0x2,%11;"
  220|  3.50M|        "add    %10,%12;"
  221|  3.50M|        "add    12+%16,%12;"
  222|  3.50M|        "pxor   %%xmm2,%%xmm4;"
  223|  3.50M|        "mov    %7,%10;"
  224|  3.50M|        "add    %12,%k2;"
  225|  3.50M|        "mov    %7,%12;"
  226|  3.50M|        "pshufb %%xmm11,%%xmm4;"
  227|  3.50M|        "or     %9,%10;"
  228|  3.50M|        "add    %k2,%3;"
  229|  3.50M|        "and    %9,%12;"
  230|  3.50M|        "paddd  %%xmm0,%%xmm4;"
  231|  3.50M|        "and    %8,%10;"
  232|  3.50M|        "add    %11,%k2;"
  233|  3.50M|        "or     %12,%10;"
  234|  3.50M|        "add    %10,%k2;"
  235|  3.50M|        "movdqa 0x10(%13),%%xmm9;"
  236|  3.50M|        "paddd  %%xmm5,%%xmm9;"
  237|  3.50M|        "movdqa %%xmm9,%16;"
  238|  3.50M|        "movdqa %%xmm4,%%xmm0;"
  239|  3.50M|        "mov    %3,%10;"
  240|  3.50M|        "ror    $0xe,%10;"
  241|  3.50M|        "mov    %k2,%11;"
  242|  3.50M|        "palignr $0x4,%%xmm7,%%xmm0;"
  243|  3.50M|        "ror    $0x9,%11;"
  244|  3.50M|        "xor    %3,%10;"
  245|  3.50M|        "mov    %4,%12;"
  246|  3.50M|        "ror    $0x5,%10;"
  247|  3.50M|        "movdqa %%xmm6,%%xmm1;"
  248|  3.50M|        "xor    %k2,%11;"
  249|  3.50M|        "xor    %5,%12;"
  250|  3.50M|        "paddd  %%xmm5,%%xmm0;"
  251|  3.50M|        "xor    %3,%10;"
  252|  3.50M|        "and    %3,%12;"
  253|  3.50M|        "ror    $0xb,%11;"
  254|  3.50M|        "palignr $0x4,%%xmm5,%%xmm1;"
  255|  3.50M|        "xor    %k2,%11;"
  256|  3.50M|        "ror    $0x6,%10;"
  257|  3.50M|        "xor    %5,%12;"
  258|  3.50M|        "movdqa %%xmm1,%%xmm2;"
  259|  3.50M|        "ror    $0x2,%11;"
  260|  3.50M|        "add    %10,%12;"
  261|  3.50M|        "add    %16,%12;"
  262|  3.50M|        "movdqa %%xmm1,%%xmm3;"
  263|  3.50M|        "mov    %k2,%10;"
  264|  3.50M|        "add    %12,%6;"
  265|  3.50M|        "mov    %k2,%12;"
  266|  3.50M|        "pslld  $0x19,%%xmm1;"
  267|  3.50M|        "or     %8,%10;"
  268|  3.50M|        "add    %6,%9;"
  269|  3.50M|        "and    %8,%12;"
  270|  3.50M|        "psrld  $0x7,%%xmm2;"
  271|  3.50M|        "and    %7,%10;"
  272|  3.50M|        "add    %11,%6;"
  273|  3.50M|        "por    %%xmm2,%%xmm1;"
  274|  3.50M|        "or     %12,%10;"
  275|  3.50M|        "add    %10,%6;"
  276|  3.50M|        "movdqa %%xmm3,%%xmm2;"
  277|  3.50M|        "mov    %9,%10;"
  278|  3.50M|        "mov    %6,%11;"
  279|  3.50M|        "movdqa %%xmm3,%%xmm8;"
  280|  3.50M|        "ror    $0xe,%10;"
  281|  3.50M|        "xor    %9,%10;"
  282|  3.50M|        "mov    %3,%12;"
  283|  3.50M|        "ror    $0x9,%11;"
  284|  3.50M|        "pslld  $0xe,%%xmm3;"
  285|  3.50M|        "xor    %6,%11;"
  286|  3.50M|        "ror    $0x5,%10;"
  287|  3.50M|        "xor    %4,%12;"
  288|  3.50M|        "psrld  $0x12,%%xmm2;"
  289|  3.50M|        "ror    $0xb,%11;"
  290|  3.50M|        "xor    %9,%10;"
  291|  3.50M|        "and    %9,%12;"
  292|  3.50M|        "ror    $0x6,%10;"
  293|  3.50M|        "pxor   %%xmm3,%%xmm1;"
  294|  3.50M|        "xor    %6,%11;"
  295|  3.50M|        "xor    %4,%12;"
  296|  3.50M|        "psrld  $0x3,%%xmm8;"
  297|  3.50M|        "add    %10,%12;"
  298|  3.50M|        "add    4+%16,%12;"
  299|  3.50M|        "ror    $0x2,%11;"
  300|  3.50M|        "pxor   %%xmm2,%%xmm1;"
  301|  3.50M|        "mov    %6,%10;"
  302|  3.50M|        "add    %12,%5;"
  303|  3.50M|        "mov    %6,%12;"
  304|  3.50M|        "pxor   %%xmm8,%%xmm1;"
  305|  3.50M|        "or     %7,%10;"
  306|  3.50M|        "add    %5,%8;"
  307|  3.50M|        "and    %7,%12;"
  308|  3.50M|        "pshufd $0xfa,%%xmm4,%%xmm2;"
  309|  3.50M|        "and    %k2,%10;"
  310|  3.50M|        "add    %11,%5;"
  311|  3.50M|        "paddd  %%xmm1,%%xmm0;"
  312|  3.50M|        "or     %12,%10;"
  313|  3.50M|        "add    %10,%5;"
  314|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  315|  3.50M|        "mov    %8,%10;"
  316|  3.50M|        "mov    %5,%11;"
  317|  3.50M|        "ror    $0xe,%10;"
  318|  3.50M|        "movdqa %%xmm2,%%xmm8;"
  319|  3.50M|        "xor    %8,%10;"
  320|  3.50M|        "ror    $0x9,%11;"
  321|  3.50M|        "mov    %9,%12;"
  322|  3.50M|        "xor    %5,%11;"
  323|  3.50M|        "ror    $0x5,%10;"
  324|  3.50M|        "psrlq  $0x11,%%xmm2;"
  325|  3.50M|        "xor    %3,%12;"
  326|  3.50M|        "psrlq  $0x13,%%xmm3;"
  327|  3.50M|        "xor    %8,%10;"
  328|  3.50M|        "and    %8,%12;"
  329|  3.50M|        "psrld  $0xa,%%xmm8;"
  330|  3.50M|        "ror    $0xb,%11;"
  331|  3.50M|        "xor    %5,%11;"
  332|  3.50M|        "xor    %3,%12;"
  333|  3.50M|        "ror    $0x6,%10;"
  334|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  335|  3.50M|        "add    %10,%12;"
  336|  3.50M|        "ror    $0x2,%11;"
  337|  3.50M|        "add    8+%16,%12;"
  338|  3.50M|        "pxor   %%xmm2,%%xmm8;"
  339|  3.50M|        "mov    %5,%10;"
  340|  3.50M|        "add    %12,%4;"
  341|  3.50M|        "mov    %5,%12;"
  342|  3.50M|        "pshufb %%xmm10,%%xmm8;"
  343|  3.50M|        "or     %k2,%10;"
  344|  3.50M|        "add    %4,%7;"
  345|  3.50M|        "and    %k2,%12;"
  346|  3.50M|        "paddd  %%xmm8,%%xmm0;"
  347|  3.50M|        "and    %6,%10;"
  348|  3.50M|        "add    %11,%4;"
  349|  3.50M|        "pshufd $0x50,%%xmm0,%%xmm2;"
  350|  3.50M|        "or     %12,%10;"
  351|  3.50M|        "add    %10,%4;"
  352|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  353|  3.50M|        "mov    %7,%10;"
  354|  3.50M|        "ror    $0xe,%10;"
  355|  3.50M|        "mov    %4,%11;"
  356|  3.50M|        "movdqa %%xmm2,%%xmm5;"
  357|  3.50M|        "ror    $0x9,%11;"
  358|  3.50M|        "xor    %7,%10;"
  359|  3.50M|        "mov    %8,%12;"
  360|  3.50M|        "ror    $0x5,%10;"
  361|  3.50M|        "psrlq  $0x11,%%xmm2;"
  362|  3.50M|        "xor    %4,%11;"
  363|  3.50M|        "xor    %9,%12;"
  364|  3.50M|        "psrlq  $0x13,%%xmm3;"
  365|  3.50M|        "xor    %7,%10;"
  366|  3.50M|        "and    %7,%12;"
  367|  3.50M|        "ror    $0xb,%11;"
  368|  3.50M|        "psrld  $0xa,%%xmm5;"
  369|  3.50M|        "xor    %4,%11;"
  370|  3.50M|        "ror    $0x6,%10;"
  371|  3.50M|        "xor    %9,%12;"
  372|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  373|  3.50M|        "ror    $0x2,%11;"
  374|  3.50M|        "add    %10,%12;"
  375|  3.50M|        "add    12+%16,%12;"
  376|  3.50M|        "pxor   %%xmm2,%%xmm5;"
  377|  3.50M|        "mov    %4,%10;"
  378|  3.50M|        "add    %12,%3;"
  379|  3.50M|        "mov    %4,%12;"
  380|  3.50M|        "pshufb %%xmm11,%%xmm5;"
  381|  3.50M|        "or     %6,%10;"
  382|  3.50M|        "add    %3,%k2;"
  383|  3.50M|        "and    %6,%12;"
  384|  3.50M|        "paddd  %%xmm0,%%xmm5;"
  385|  3.50M|        "and    %5,%10;"
  386|  3.50M|        "add    %11,%3;"
  387|  3.50M|        "or     %12,%10;"
  388|  3.50M|        "add    %10,%3;"
  389|  3.50M|        "movdqa 0x20(%13),%%xmm9;"
  390|  3.50M|        "paddd  %%xmm6,%%xmm9;"
  391|  3.50M|        "movdqa %%xmm9,%16;"
  392|  3.50M|        "movdqa %%xmm5,%%xmm0;"
  393|  3.50M|        "mov    %k2,%10;"
  394|  3.50M|        "ror    $0xe,%10;"
  395|  3.50M|        "mov    %3,%11;"
  396|  3.50M|        "palignr $0x4,%%xmm4,%%xmm0;"
  397|  3.50M|        "ror    $0x9,%11;"
  398|  3.50M|        "xor    %k2,%10;"
  399|  3.50M|        "mov    %7,%12;"
  400|  3.50M|        "ror    $0x5,%10;"
  401|  3.50M|        "movdqa %%xmm7,%%xmm1;"
  402|  3.50M|        "xor    %3,%11;"
  403|  3.50M|        "xor    %8,%12;"
  404|  3.50M|        "paddd  %%xmm6,%%xmm0;"
  405|  3.50M|        "xor    %k2,%10;"
  406|  3.50M|        "and    %k2,%12;"
  407|  3.50M|        "ror    $0xb,%11;"
  408|  3.50M|        "palignr $0x4,%%xmm6,%%xmm1;"
  409|  3.50M|        "xor    %3,%11;"
  410|  3.50M|        "ror    $0x6,%10;"
  411|  3.50M|        "xor    %8,%12;"
  412|  3.50M|        "movdqa %%xmm1,%%xmm2;"
  413|  3.50M|        "ror    $0x2,%11;"
  414|  3.50M|        "add    %10,%12;"
  415|  3.50M|        "add    %16,%12;"
  416|  3.50M|        "movdqa %%xmm1,%%xmm3;"
  417|  3.50M|        "mov    %3,%10;"
  418|  3.50M|        "add    %12,%9;"
  419|  3.50M|        "mov    %3,%12;"
  420|  3.50M|        "pslld  $0x19,%%xmm1;"
  421|  3.50M|        "or     %5,%10;"
  422|  3.50M|        "add    %9,%6;"
  423|  3.50M|        "and    %5,%12;"
  424|  3.50M|        "psrld  $0x7,%%xmm2;"
  425|  3.50M|        "and    %4,%10;"
  426|  3.50M|        "add    %11,%9;"
  427|  3.50M|        "por    %%xmm2,%%xmm1;"
  428|  3.50M|        "or     %12,%10;"
  429|  3.50M|        "add    %10,%9;"
  430|  3.50M|        "movdqa %%xmm3,%%xmm2;"
  431|  3.50M|        "mov    %6,%10;"
  432|  3.50M|        "mov    %9,%11;"
  433|  3.50M|        "movdqa %%xmm3,%%xmm8;"
  434|  3.50M|        "ror    $0xe,%10;"
  435|  3.50M|        "xor    %6,%10;"
  436|  3.50M|        "mov    %k2,%12;"
  437|  3.50M|        "ror    $0x9,%11;"
  438|  3.50M|        "pslld  $0xe,%%xmm3;"
  439|  3.50M|        "xor    %9,%11;"
  440|  3.50M|        "ror    $0x5,%10;"
  441|  3.50M|        "xor    %7,%12;"
  442|  3.50M|        "psrld  $0x12,%%xmm2;"
  443|  3.50M|        "ror    $0xb,%11;"
  444|  3.50M|        "xor    %6,%10;"
  445|  3.50M|        "and    %6,%12;"
  446|  3.50M|        "ror    $0x6,%10;"
  447|  3.50M|        "pxor   %%xmm3,%%xmm1;"
  448|  3.50M|        "xor    %9,%11;"
  449|  3.50M|        "xor    %7,%12;"
  450|  3.50M|        "psrld  $0x3,%%xmm8;"
  451|  3.50M|        "add    %10,%12;"
  452|  3.50M|        "add    4+%16,%12;"
  453|  3.50M|        "ror    $0x2,%11;"
  454|  3.50M|        "pxor   %%xmm2,%%xmm1;"
  455|  3.50M|        "mov    %9,%10;"
  456|  3.50M|        "add    %12,%8;"
  457|  3.50M|        "mov    %9,%12;"
  458|  3.50M|        "pxor   %%xmm8,%%xmm1;"
  459|  3.50M|        "or     %4,%10;"
  460|  3.50M|        "add    %8,%5;"
  461|  3.50M|        "and    %4,%12;"
  462|  3.50M|        "pshufd $0xfa,%%xmm5,%%xmm2;"
  463|  3.50M|        "and    %3,%10;"
  464|  3.50M|        "add    %11,%8;"
  465|  3.50M|        "paddd  %%xmm1,%%xmm0;"
  466|  3.50M|        "or     %12,%10;"
  467|  3.50M|        "add    %10,%8;"
  468|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  469|  3.50M|        "mov    %5,%10;"
  470|  3.50M|        "mov    %8,%11;"
  471|  3.50M|        "ror    $0xe,%10;"
  472|  3.50M|        "movdqa %%xmm2,%%xmm8;"
  473|  3.50M|        "xor    %5,%10;"
  474|  3.50M|        "ror    $0x9,%11;"
  475|  3.50M|        "mov    %6,%12;"
  476|  3.50M|        "xor    %8,%11;"
  477|  3.50M|        "ror    $0x5,%10;"
  478|  3.50M|        "psrlq  $0x11,%%xmm2;"
  479|  3.50M|        "xor    %k2,%12;"
  480|  3.50M|        "psrlq  $0x13,%%xmm3;"
  481|  3.50M|        "xor    %5,%10;"
  482|  3.50M|        "and    %5,%12;"
  483|  3.50M|        "psrld  $0xa,%%xmm8;"
  484|  3.50M|        "ror    $0xb,%11;"
  485|  3.50M|        "xor    %8,%11;"
  486|  3.50M|        "xor    %k2,%12;"
  487|  3.50M|        "ror    $0x6,%10;"
  488|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  489|  3.50M|        "add    %10,%12;"
  490|  3.50M|        "ror    $0x2,%11;"
  491|  3.50M|        "add    8+%16,%12;"
  492|  3.50M|        "pxor   %%xmm2,%%xmm8;"
  493|  3.50M|        "mov    %8,%10;"
  494|  3.50M|        "add    %12,%7;"
  495|  3.50M|        "mov    %8,%12;"
  496|  3.50M|        "pshufb %%xmm10,%%xmm8;"
  497|  3.50M|        "or     %3,%10;"
  498|  3.50M|        "add    %7,%4;"
  499|  3.50M|        "and    %3,%12;"
  500|  3.50M|        "paddd  %%xmm8,%%xmm0;"
  501|  3.50M|        "and    %9,%10;"
  502|  3.50M|        "add    %11,%7;"
  503|  3.50M|        "pshufd $0x50,%%xmm0,%%xmm2;"
  504|  3.50M|        "or     %12,%10;"
  505|  3.50M|        "add    %10,%7;"
  506|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  507|  3.50M|        "mov    %4,%10;"
  508|  3.50M|        "ror    $0xe,%10;"
  509|  3.50M|        "mov    %7,%11;"
  510|  3.50M|        "movdqa %%xmm2,%%xmm6;"
  511|  3.50M|        "ror    $0x9,%11;"
  512|  3.50M|        "xor    %4,%10;"
  513|  3.50M|        "mov    %5,%12;"
  514|  3.50M|        "ror    $0x5,%10;"
  515|  3.50M|        "psrlq  $0x11,%%xmm2;"
  516|  3.50M|        "xor    %7,%11;"
  517|  3.50M|        "xor    %6,%12;"
  518|  3.50M|        "psrlq  $0x13,%%xmm3;"
  519|  3.50M|        "xor    %4,%10;"
  520|  3.50M|        "and    %4,%12;"
  521|  3.50M|        "ror    $0xb,%11;"
  522|  3.50M|        "psrld  $0xa,%%xmm6;"
  523|  3.50M|        "xor    %7,%11;"
  524|  3.50M|        "ror    $0x6,%10;"
  525|  3.50M|        "xor    %6,%12;"
  526|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  527|  3.50M|        "ror    $0x2,%11;"
  528|  3.50M|        "add    %10,%12;"
  529|  3.50M|        "add    12+%16,%12;"
  530|  3.50M|        "pxor   %%xmm2,%%xmm6;"
  531|  3.50M|        "mov    %7,%10;"
  532|  3.50M|        "add    %12,%k2;"
  533|  3.50M|        "mov    %7,%12;"
  534|  3.50M|        "pshufb %%xmm11,%%xmm6;"
  535|  3.50M|        "or     %9,%10;"
  536|  3.50M|        "add    %k2,%3;"
  537|  3.50M|        "and    %9,%12;"
  538|  3.50M|        "paddd  %%xmm0,%%xmm6;"
  539|  3.50M|        "and    %8,%10;"
  540|  3.50M|        "add    %11,%k2;"
  541|  3.50M|        "or     %12,%10;"
  542|  3.50M|        "add    %10,%k2;"
  543|  3.50M|        "movdqa 0x30(%13),%%xmm9;"
  544|  3.50M|        "paddd  %%xmm7,%%xmm9;"
  545|  3.50M|        "movdqa %%xmm9,%16;"
  546|  3.50M|        "add    $0x40,%13;"
  547|  3.50M|        "movdqa %%xmm6,%%xmm0;"
  548|  3.50M|        "mov    %3,%10;"
  549|  3.50M|        "ror    $0xe,%10;"
  550|  3.50M|        "mov    %k2,%11;"
  551|  3.50M|        "palignr $0x4,%%xmm5,%%xmm0;"
  552|  3.50M|        "ror    $0x9,%11;"
  553|  3.50M|        "xor    %3,%10;"
  554|  3.50M|        "mov    %4,%12;"
  555|  3.50M|        "ror    $0x5,%10;"
  556|  3.50M|        "movdqa %%xmm4,%%xmm1;"
  557|  3.50M|        "xor    %k2,%11;"
  558|  3.50M|        "xor    %5,%12;"
  559|  3.50M|        "paddd  %%xmm7,%%xmm0;"
  560|  3.50M|        "xor    %3,%10;"
  561|  3.50M|        "and    %3,%12;"
  562|  3.50M|        "ror    $0xb,%11;"
  563|  3.50M|        "palignr $0x4,%%xmm7,%%xmm1;"
  564|  3.50M|        "xor    %k2,%11;"
  565|  3.50M|        "ror    $0x6,%10;"
  566|  3.50M|        "xor    %5,%12;"
  567|  3.50M|        "movdqa %%xmm1,%%xmm2;"
  568|  3.50M|        "ror    $0x2,%11;"
  569|  3.50M|        "add    %10,%12;"
  570|  3.50M|        "add    %16,%12;"
  571|  3.50M|        "movdqa %%xmm1,%%xmm3;"
  572|  3.50M|        "mov    %k2,%10;"
  573|  3.50M|        "add    %12,%6;"
  574|  3.50M|        "mov    %k2,%12;"
  575|  3.50M|        "pslld  $0x19,%%xmm1;"
  576|  3.50M|        "or     %8,%10;"
  577|  3.50M|        "add    %6,%9;"
  578|  3.50M|        "and    %8,%12;"
  579|  3.50M|        "psrld  $0x7,%%xmm2;"
  580|  3.50M|        "and    %7,%10;"
  581|  3.50M|        "add    %11,%6;"
  582|  3.50M|        "por    %%xmm2,%%xmm1;"
  583|  3.50M|        "or     %12,%10;"
  584|  3.50M|        "add    %10,%6;"
  585|  3.50M|        "movdqa %%xmm3,%%xmm2;"
  586|  3.50M|        "mov    %9,%10;"
  587|  3.50M|        "mov    %6,%11;"
  588|  3.50M|        "movdqa %%xmm3,%%xmm8;"
  589|  3.50M|        "ror    $0xe,%10;"
  590|  3.50M|        "xor    %9,%10;"
  591|  3.50M|        "mov    %3,%12;"
  592|  3.50M|        "ror    $0x9,%11;"
  593|  3.50M|        "pslld  $0xe,%%xmm3;"
  594|  3.50M|        "xor    %6,%11;"
  595|  3.50M|        "ror    $0x5,%10;"
  596|  3.50M|        "xor    %4,%12;"
  597|  3.50M|        "psrld  $0x12,%%xmm2;"
  598|  3.50M|        "ror    $0xb,%11;"
  599|  3.50M|        "xor    %9,%10;"
  600|  3.50M|        "and    %9,%12;"
  601|  3.50M|        "ror    $0x6,%10;"
  602|  3.50M|        "pxor   %%xmm3,%%xmm1;"
  603|  3.50M|        "xor    %6,%11;"
  604|  3.50M|        "xor    %4,%12;"
  605|  3.50M|        "psrld  $0x3,%%xmm8;"
  606|  3.50M|        "add    %10,%12;"
  607|  3.50M|        "add    4+%16,%12;"
  608|  3.50M|        "ror    $0x2,%11;"
  609|  3.50M|        "pxor   %%xmm2,%%xmm1;"
  610|  3.50M|        "mov    %6,%10;"
  611|  3.50M|        "add    %12,%5;"
  612|  3.50M|        "mov    %6,%12;"
  613|  3.50M|        "pxor   %%xmm8,%%xmm1;"
  614|  3.50M|        "or     %7,%10;"
  615|  3.50M|        "add    %5,%8;"
  616|  3.50M|        "and    %7,%12;"
  617|  3.50M|        "pshufd $0xfa,%%xmm6,%%xmm2;"
  618|  3.50M|        "and    %k2,%10;"
  619|  3.50M|        "add    %11,%5;"
  620|  3.50M|        "paddd  %%xmm1,%%xmm0;"
  621|  3.50M|        "or     %12,%10;"
  622|  3.50M|        "add    %10,%5;"
  623|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  624|  3.50M|        "mov    %8,%10;"
  625|  3.50M|        "mov    %5,%11;"
  626|  3.50M|        "ror    $0xe,%10;"
  627|  3.50M|        "movdqa %%xmm2,%%xmm8;"
  628|  3.50M|        "xor    %8,%10;"
  629|  3.50M|        "ror    $0x9,%11;"
  630|  3.50M|        "mov    %9,%12;"
  631|  3.50M|        "xor    %5,%11;"
  632|  3.50M|        "ror    $0x5,%10;"
  633|  3.50M|        "psrlq  $0x11,%%xmm2;"
  634|  3.50M|        "xor    %3,%12;"
  635|  3.50M|        "psrlq  $0x13,%%xmm3;"
  636|  3.50M|        "xor    %8,%10;"
  637|  3.50M|        "and    %8,%12;"
  638|  3.50M|        "psrld  $0xa,%%xmm8;"
  639|  3.50M|        "ror    $0xb,%11;"
  640|  3.50M|        "xor    %5,%11;"
  641|  3.50M|        "xor    %3,%12;"
  642|  3.50M|        "ror    $0x6,%10;"
  643|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  644|  3.50M|        "add    %10,%12;"
  645|  3.50M|        "ror    $0x2,%11;"
  646|  3.50M|        "add    8+%16,%12;"
  647|  3.50M|        "pxor   %%xmm2,%%xmm8;"
  648|  3.50M|        "mov    %5,%10;"
  649|  3.50M|        "add    %12,%4;"
  650|  3.50M|        "mov    %5,%12;"
  651|  3.50M|        "pshufb %%xmm10,%%xmm8;"
  652|  3.50M|        "or     %k2,%10;"
  653|  3.50M|        "add    %4,%7;"
  654|  3.50M|        "and    %k2,%12;"
  655|  3.50M|        "paddd  %%xmm8,%%xmm0;"
  656|  3.50M|        "and    %6,%10;"
  657|  3.50M|        "add    %11,%4;"
  658|  3.50M|        "pshufd $0x50,%%xmm0,%%xmm2;"
  659|  3.50M|        "or     %12,%10;"
  660|  3.50M|        "add    %10,%4;"
  661|  3.50M|        "movdqa %%xmm2,%%xmm3;"
  662|  3.50M|        "mov    %7,%10;"
  663|  3.50M|        "ror    $0xe,%10;"
  664|  3.50M|        "mov    %4,%11;"
  665|  3.50M|        "movdqa %%xmm2,%%xmm7;"
  666|  3.50M|        "ror    $0x9,%11;"
  667|  3.50M|        "xor    %7,%10;"
  668|  3.50M|        "mov    %8,%12;"
  669|  3.50M|        "ror    $0x5,%10;"
  670|  3.50M|        "psrlq  $0x11,%%xmm2;"
  671|  3.50M|        "xor    %4,%11;"
  672|  3.50M|        "xor    %9,%12;"
  673|  3.50M|        "psrlq  $0x13,%%xmm3;"
  674|  3.50M|        "xor    %7,%10;"
  675|  3.50M|        "and    %7,%12;"
  676|  3.50M|        "ror    $0xb,%11;"
  677|  3.50M|        "psrld  $0xa,%%xmm7;"
  678|  3.50M|        "xor    %4,%11;"
  679|  3.50M|        "ror    $0x6,%10;"
  680|  3.50M|        "xor    %9,%12;"
  681|  3.50M|        "pxor   %%xmm3,%%xmm2;"
  682|  3.50M|        "ror    $0x2,%11;"
  683|  3.50M|        "add    %10,%12;"
  684|  3.50M|        "add    12+%16,%12;"
  685|  3.50M|        "pxor   %%xmm2,%%xmm7;"
  686|  3.50M|        "mov    %4,%10;"
  687|  3.50M|        "add    %12,%3;"
  688|  3.50M|        "mov    %4,%12;"
  689|  3.50M|        "pshufb %%xmm11,%%xmm7;"
  690|  3.50M|        "or     %6,%10;"
  691|  3.50M|        "add    %3,%k2;"
  692|  3.50M|        "and    %6,%12;"
  693|  3.50M|        "paddd  %%xmm0,%%xmm7;"
  694|  3.50M|        "and    %5,%10;"
  695|  3.50M|        "add    %11,%3;"
  696|  3.50M|        "or     %12,%10;"
  697|  3.50M|        "add    %10,%3;"
  698|  3.50M|        "sub    $0x1,%1;"
  699|  3.50M|        "jne    Lloop1_%=;"
  700|  3.50M|        "mov    $0x2,%1;"
  701|       |
  702|  3.50M|        "Lloop2_%=:"
  703|  3.50M|        "paddd  0x0(%13),%%xmm4;"
  704|  3.50M|        "movdqa %%xmm4,%16;"
  705|  3.50M|        "mov    %k2,%10;"
  706|  3.50M|        "ror    $0xe,%10;"
  707|  3.50M|        "mov    %3,%11;"
  708|  3.50M|        "xor    %k2,%10;"
  709|  3.50M|        "ror    $0x9,%11;"
  710|  3.50M|        "mov    %7,%12;"
  711|  3.50M|        "xor    %3,%11;"
  712|  3.50M|        "ror    $0x5,%10;"
  713|  3.50M|        "xor    %8,%12;"
  714|  3.50M|        "xor    %k2,%10;"
  715|  3.50M|        "ror    $0xb,%11;"
  716|  3.50M|        "and    %k2,%12;"
  717|  3.50M|        "xor    %3,%11;"
  718|  3.50M|        "ror    $0x6,%10;"
  719|  3.50M|        "xor    %8,%12;"
  720|  3.50M|        "add    %10,%12;"
  721|  3.50M|        "ror    $0x2,%11;"
  722|  3.50M|        "add    %16,%12;"
  723|  3.50M|        "mov    %3,%10;"
  724|  3.50M|        "add    %12,%9;"
  725|  3.50M|        "mov    %3,%12;"
  726|  3.50M|        "or     %5,%10;"
  727|  3.50M|        "add    %9,%6;"
  728|  3.50M|        "and    %5,%12;"
  729|  3.50M|        "and    %4,%10;"
  730|  3.50M|        "add    %11,%9;"
  731|  3.50M|        "or     %12,%10;"
  732|  3.50M|        "add    %10,%9;"
  733|  3.50M|        "mov    %6,%10;"
  734|  3.50M|        "ror    $0xe,%10;"
  735|  3.50M|        "mov    %9,%11;"
  736|  3.50M|        "xor    %6,%10;"
  737|  3.50M|        "ror    $0x9,%11;"
  738|  3.50M|        "mov    %k2,%12;"
  739|  3.50M|        "xor    %9,%11;"
  740|  3.50M|        "ror    $0x5,%10;"
  741|  3.50M|        "xor    %7,%12;"
  742|  3.50M|        "xor    %6,%10;"
  743|  3.50M|        "ror    $0xb,%11;"
  744|  3.50M|        "and    %6,%12;"
  745|  3.50M|        "xor    %9,%11;"
  746|  3.50M|        "ror    $0x6,%10;"
  747|  3.50M|        "xor    %7,%12;"
  748|  3.50M|        "add    %10,%12;"
  749|  3.50M|        "ror    $0x2,%11;"
  750|  3.50M|        "add    4+%16,%12;"
  751|  3.50M|        "mov    %9,%10;"
  752|  3.50M|        "add    %12,%8;"
  753|  3.50M|        "mov    %9,%12;"
  754|  3.50M|        "or     %4,%10;"
  755|  3.50M|        "add    %8,%5;"
  756|  3.50M|        "and    %4,%12;"
  757|  3.50M|        "and    %3,%10;"
  758|  3.50M|        "add    %11,%8;"
  759|  3.50M|        "or     %12,%10;"
  760|  3.50M|        "add    %10,%8;"
  761|  3.50M|        "mov    %5,%10;"
  762|  3.50M|        "ror    $0xe,%10;"
  763|  3.50M|        "mov    %8,%11;"
  764|  3.50M|        "xor    %5,%10;"
  765|  3.50M|        "ror    $0x9,%11;"
  766|  3.50M|        "mov    %6,%12;"
  767|  3.50M|        "xor    %8,%11;"
  768|  3.50M|        "ror    $0x5,%10;"
  769|  3.50M|        "xor    %k2,%12;"
  770|  3.50M|        "xor    %5,%10;"
  771|  3.50M|        "ror    $0xb,%11;"
  772|  3.50M|        "and    %5,%12;"
  773|  3.50M|        "xor    %8,%11;"
  774|  3.50M|        "ror    $0x6,%10;"
  775|  3.50M|        "xor    %k2,%12;"
  776|  3.50M|        "add    %10,%12;"
  777|  3.50M|        "ror    $0x2,%11;"
  778|  3.50M|        "add    8+%16,%12;"
  779|  3.50M|        "mov    %8,%10;"
  780|  3.50M|        "add    %12,%7;"
  781|  3.50M|        "mov    %8,%12;"
  782|  3.50M|        "or     %3,%10;"
  783|  3.50M|        "add    %7,%4;"
  784|  3.50M|        "and    %3,%12;"
  785|  3.50M|        "and    %9,%10;"
  786|  3.50M|        "add    %11,%7;"
  787|  3.50M|        "or     %12,%10;"
  788|  3.50M|        "add    %10,%7;"
  789|  3.50M|        "mov    %4,%10;"
  790|  3.50M|        "ror    $0xe,%10;"
  791|  3.50M|        "mov    %7,%11;"
  792|  3.50M|        "xor    %4,%10;"
  793|  3.50M|        "ror    $0x9,%11;"
  794|  3.50M|        "mov    %5,%12;"
  795|  3.50M|        "xor    %7,%11;"
  796|  3.50M|        "ror    $0x5,%10;"
  797|  3.50M|        "xor    %6,%12;"
  798|  3.50M|        "xor    %4,%10;"
  799|  3.50M|        "ror    $0xb,%11;"
  800|  3.50M|        "and    %4,%12;"
  801|  3.50M|        "xor    %7,%11;"
  802|  3.50M|        "ror    $0x6,%10;"
  803|  3.50M|        "xor    %6,%12;"
  804|  3.50M|        "add    %10,%12;"
  805|  3.50M|        "ror    $0x2,%11;"
  806|  3.50M|        "add    12+%16,%12;"
  807|  3.50M|        "mov    %7,%10;"
  808|  3.50M|        "add    %12,%k2;"
  809|  3.50M|        "mov    %7,%12;"
  810|  3.50M|        "or     %9,%10;"
  811|  3.50M|        "add    %k2,%3;"
  812|  3.50M|        "and    %9,%12;"
  813|  3.50M|        "and    %8,%10;"
  814|  3.50M|        "add    %11,%k2;"
  815|  3.50M|        "or     %12,%10;"
  816|  3.50M|        "add    %10,%k2;"
  817|  3.50M|        "paddd  0x10(%13),%%xmm5;"
  818|  3.50M|        "movdqa %%xmm5,%16;"
  819|  3.50M|        "add    $0x20,%13;"
  820|  3.50M|        "mov    %3,%10;"
  821|  3.50M|        "ror    $0xe,%10;"
  822|  3.50M|        "mov    %k2,%11;"
  823|  3.50M|        "xor    %3,%10;"
  824|  3.50M|        "ror    $0x9,%11;"
  825|  3.50M|        "mov    %4,%12;"
  826|  3.50M|        "xor    %k2,%11;"
  827|  3.50M|        "ror    $0x5,%10;"
  828|  3.50M|        "xor    %5,%12;"
  829|  3.50M|        "xor    %3,%10;"
  830|  3.50M|        "ror    $0xb,%11;"
  831|  3.50M|        "and    %3,%12;"
  832|  3.50M|        "xor    %k2,%11;"
  833|  3.50M|        "ror    $0x6,%10;"
  834|  3.50M|        "xor    %5,%12;"
  835|  3.50M|        "add    %10,%12;"
  836|  3.50M|        "ror    $0x2,%11;"
  837|  3.50M|        "add    %16,%12;"
  838|  3.50M|        "mov    %k2,%10;"
  839|  3.50M|        "add    %12,%6;"
  840|  3.50M|        "mov    %k2,%12;"
  841|  3.50M|        "or     %8,%10;"
  842|  3.50M|        "add    %6,%9;"
  843|  3.50M|        "and    %8,%12;"
  844|  3.50M|        "and    %7,%10;"
  845|  3.50M|        "add    %11,%6;"
  846|  3.50M|        "or     %12,%10;"
  847|  3.50M|        "add    %10,%6;"
  848|  3.50M|        "mov    %9,%10;"
  849|  3.50M|        "ror    $0xe,%10;"
  850|  3.50M|        "mov    %6,%11;"
  851|  3.50M|        "xor    %9,%10;"
  852|  3.50M|        "ror    $0x9,%11;"
  853|  3.50M|        "mov    %3,%12;"
  854|  3.50M|        "xor    %6,%11;"
  855|  3.50M|        "ror    $0x5,%10;"
  856|  3.50M|        "xor    %4,%12;"
  857|  3.50M|        "xor    %9,%10;"
  858|  3.50M|        "ror    $0xb,%11;"
  859|  3.50M|        "and    %9,%12;"
  860|  3.50M|        "xor    %6,%11;"
  861|  3.50M|        "ror    $0x6,%10;"
  862|  3.50M|        "xor    %4,%12;"
  863|  3.50M|        "add    %10,%12;"
  864|  3.50M|        "ror    $0x2,%11;"
  865|  3.50M|        "add    4+%16,%12;"
  866|  3.50M|        "mov    %6,%10;"
  867|  3.50M|        "add    %12,%5;"
  868|  3.50M|        "mov    %6,%12;"
  869|  3.50M|        "or     %7,%10;"
  870|  3.50M|        "add    %5,%8;"
  871|  3.50M|        "and    %7,%12;"
  872|  3.50M|        "and    %k2,%10;"
  873|  3.50M|        "add    %11,%5;"
  874|  3.50M|        "or     %12,%10;"
  875|  3.50M|        "add    %10,%5;"
  876|  3.50M|        "mov    %8,%10;"
  877|  3.50M|        "ror    $0xe,%10;"
  878|  3.50M|        "mov    %5,%11;"
  879|  3.50M|        "xor    %8,%10;"
  880|  3.50M|        "ror    $0x9,%11;"
  881|  3.50M|        "mov    %9,%12;"
  882|  3.50M|        "xor    %5,%11;"
  883|  3.50M|        "ror    $0x5,%10;"
  884|  3.50M|        "xor    %3,%12;"
  885|  3.50M|        "xor    %8,%10;"
  886|  3.50M|        "ror    $0xb,%11;"
  887|  3.50M|        "and    %8,%12;"
  888|  3.50M|        "xor    %5,%11;"
  889|  3.50M|        "ror    $0x6,%10;"
  890|  3.50M|        "xor    %3,%12;"
  891|  3.50M|        "add    %10,%12;"
  892|  3.50M|        "ror    $0x2,%11;"
  893|  3.50M|        "add    8+%16,%12;"
  894|  3.50M|        "mov    %5,%10;"
  895|  3.50M|        "add    %12,%4;"
  896|  3.50M|        "mov    %5,%12;"
  897|  3.50M|        "or     %k2,%10;"
  898|  3.50M|        "add    %4,%7;"
  899|  3.50M|        "and    %k2,%12;"
  900|  3.50M|        "and    %6,%10;"
  901|  3.50M|        "add    %11,%4;"
  902|  3.50M|        "or     %12,%10;"
  903|  3.50M|        "add    %10,%4;"
  904|  3.50M|        "mov    %7,%10;"
  905|  3.50M|        "ror    $0xe,%10;"
  906|  3.50M|        "mov    %4,%11;"
  907|  3.50M|        "xor    %7,%10;"
  908|  3.50M|        "ror    $0x9,%11;"
  909|  3.50M|        "mov    %8,%12;"
  910|  3.50M|        "xor    %4,%11;"
  911|  3.50M|        "ror    $0x5,%10;"
  912|  3.50M|        "xor    %9,%12;"
  913|  3.50M|        "xor    %7,%10;"
  914|  3.50M|        "ror    $0xb,%11;"
  915|  3.50M|        "and    %7,%12;"
  916|  3.50M|        "xor    %4,%11;"
  917|  3.50M|        "ror    $0x6,%10;"
  918|  3.50M|        "xor    %9,%12;"
  919|  3.50M|        "add    %10,%12;"
  920|  3.50M|        "ror    $0x2,%11;"
  921|  3.50M|        "add    12+%16,%12;"
  922|  3.50M|        "mov    %4,%10;"
  923|  3.50M|        "add    %12,%3;"
  924|  3.50M|        "mov    %4,%12;"
  925|  3.50M|        "or     %6,%10;"
  926|  3.50M|        "add    %3,%k2;"
  927|  3.50M|        "and    %6,%12;"
  928|  3.50M|        "and    %5,%10;"
  929|  3.50M|        "add    %11,%3;"
  930|  3.50M|        "or     %12,%10;"
  931|  3.50M|        "add    %10,%3;"
  932|  3.50M|        "movdqa %%xmm6,%%xmm4;"
  933|  3.50M|        "movdqa %%xmm7,%%xmm5;"
  934|  3.50M|        "sub    $0x1,%1;"
  935|  3.50M|        "jne    Lloop2_%=;"
  936|  3.50M|        "add    (%0),%3;"
  937|  3.50M|        "mov    %3,(%0);"
  938|  3.50M|        "add    0x4(%0),%4;"
  939|  3.50M|        "mov    %4,0x4(%0);"
  940|  3.50M|        "add    0x8(%0),%5;"
  941|  3.50M|        "mov    %5,0x8(%0);"
  942|  3.50M|        "add    0xc(%0),%6;"
  943|  3.50M|        "mov    %6,0xc(%0);"
  944|  3.50M|        "add    0x10(%0),%k2;"
  945|  3.50M|        "mov    %k2,0x10(%0);"
  946|  3.50M|        "add    0x14(%0),%7;"
  947|  3.50M|        "mov    %7,0x14(%0);"
  948|  3.50M|        "add    0x18(%0),%8;"
  949|  3.50M|        "mov    %8,0x18(%0);"
  950|  3.50M|        "add    0x1c(%0),%9;"
  951|  3.50M|        "mov    %9,0x1c(%0);"
  952|  3.50M|        "mov    %15,%1;"
  953|  3.50M|        "add    $0x40,%1;"
  954|  3.50M|        "cmp    %14,%1;"
  955|  3.50M|        "jne    Lloop0_%=;"
  956|       |
  957|  3.50M|        "Ldone_hash_%=:"
  958|       |
  959|  3.50M|        : "+r"(s), "+r"(chunk), "+r"(blocks), "=r"(a), "=r"(b), "=r"(c), "=r"(d), /* e = chunk */ "=r"(f), "=r"(g), "=r"(h), "=r"(y0), "=r"(y1), "=r"(y2), "=r"(tbl), "+m"(inp_end), "+m"(inp), "+m"(xfer)
  960|  3.50M|        : "m"(K256), "m"(FLIP_MASK), "m"(SHUF_00BA), "m"(SHUF_DC00)
  961|  3.50M|        : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12"
  962|  3.50M|   );
  963|  3.50M|}

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

_ZN10CSipHasherC2Emm:
   19|  69.0k|{
   20|  69.0k|    v[0] = 0x736f6d6570736575ULL ^ k0;
   21|  69.0k|    v[1] = 0x646f72616e646f6dULL ^ k1;
   22|  69.0k|    v[2] = 0x6c7967656e657261ULL ^ k0;
   23|  69.0k|    v[3] = 0x7465646279746573ULL ^ k1;
   24|  69.0k|    count = 0;
   25|  69.0k|    tmp = 0;
   26|  69.0k|}
_ZN10CSipHasher5WriteE4SpanIKhE:
   49|  69.0k|{
   50|  69.0k|    uint64_t v0 = v[0], v1 = v[1], v2 = v[2], v3 = v[3];
   51|  69.0k|    uint64_t t = tmp;
   52|  69.0k|    uint8_t c = count;
   53|       |
   54|  4.52M|    while (data.size() > 0) {
  ------------------
  |  Branch (54:12): [True: 4.45M, False: 69.0k]
  ------------------
   55|  4.45M|        t |= uint64_t{data.front()} << (8 * (c % 8));
   56|  4.45M|        c++;
   57|  4.45M|        if ((c & 7) == 0) {
  ------------------
  |  Branch (57:13): [True: 531k, False: 3.92M]
  ------------------
   58|   531k|            v3 ^= t;
   59|   531k|            SIPROUND;
  ------------------
  |  |    9|   531k|#define SIPROUND do { \
  |  |   10|   531k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|   531k|    v0 = std::rotl(v0, 32); \
  |  |   12|   531k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|   531k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|   531k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|   531k|    v2 = std::rotl(v2, 32); \
  |  |   16|   531k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|   531k|            SIPROUND;
  ------------------
  |  |    9|   531k|#define SIPROUND do { \
  |  |   10|   531k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|   531k|    v0 = std::rotl(v0, 32); \
  |  |   12|   531k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|   531k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|   531k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|   531k|    v2 = std::rotl(v2, 32); \
  |  |   16|   531k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|   531k|            v0 ^= t;
   62|   531k|            t = 0;
   63|   531k|        }
   64|  4.45M|        data = data.subspan(1);
   65|  4.45M|    }
   66|       |
   67|  69.0k|    v[0] = v0;
   68|  69.0k|    v[1] = v1;
   69|  69.0k|    v[2] = v2;
   70|  69.0k|    v[3] = v3;
   71|  69.0k|    count = c;
   72|  69.0k|    tmp = t;
   73|       |
   74|  69.0k|    return *this;
   75|  69.0k|}
_ZNK10CSipHasher8FinalizeEv:
   78|  69.0k|{
   79|  69.0k|    uint64_t v0 = v[0], v1 = v[1], v2 = v[2], v3 = v[3];
   80|       |
   81|  69.0k|    uint64_t t = tmp | (((uint64_t)count) << 56);
   82|       |
   83|  69.0k|    v3 ^= t;
   84|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|  69.0k|    v0 ^= t;
   87|  69.0k|    v2 ^= 0xFF;
   88|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   89|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   91|  69.0k|    SIPROUND;
  ------------------
  |  |    9|  69.0k|#define SIPROUND do { \
  |  |   10|  69.0k|    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
  |  |   11|  69.0k|    v0 = std::rotl(v0, 32); \
  |  |   12|  69.0k|    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
  |  |   13|  69.0k|    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
  |  |   14|  69.0k|    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
  |  |   15|  69.0k|    v2 = std::rotl(v2, 32); \
  |  |   16|  69.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (16:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|  69.0k|    return v0 ^ v1 ^ v2 ^ v3;
   93|  69.0k|}

_ZN10CDBWrapperD2Ev:
  279|      4|{
  280|      4|    delete DBContext().pdb;
  281|      4|    DBContext().pdb = nullptr;
  282|      4|    delete DBContext().options.filter_policy;
  283|      4|    DBContext().options.filter_policy = nullptr;
  284|      4|    delete DBContext().options.info_log;
  285|      4|    DBContext().options.info_log = nullptr;
  286|      4|    delete DBContext().options.block_cache;
  287|      4|    DBContext().options.block_cache = nullptr;
  288|      4|    delete DBContext().penv;
  289|      4|    DBContext().options.env = nullptr;
  290|      4|}

_ZNK10CDBWrapper9DBContextEv:
  212|     40|    auto& DBContext() const LIFETIMEBOUND { return *Assert(m_db_context); }
  ------------------
  |  |   85|     40|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------

_Z9BIP32HashRK7uint256jhPKhPh:
   72|   106k|{
   73|   106k|    unsigned char num[4];
   74|   106k|    WriteBE32(num, nChild);
   75|   106k|    CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output);
   76|   106k|}
_Z13SHA256Uint256RK7uint256:
   79|  17.8k|{
   80|  17.8k|    uint256 result;
   81|  17.8k|    CSHA256().Write(input.begin(), 32).Finalize(result.begin());
   82|  17.8k|    return result;
   83|  17.8k|}

_ZN8CHash2568FinalizeE4SpanIhE:
   30|   447k|    void Finalize(Span<unsigned char> output) {
   31|   447k|        assert(output.size() == OUTPUT_SIZE);
   32|   447k|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   33|   447k|        sha.Finalize(buf);
   34|   447k|        sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   35|   447k|    }
_ZN8CHash2565WriteE4SpanIKhE:
   37|   447k|    CHash256& Write(Span<const unsigned char> input) {
   38|   447k|        sha.Write(input.data(), input.size());
   39|   447k|        return *this;
   40|   447k|    }
_ZN8CHash1608FinalizeE4SpanIhE:
   55|  1.83M|    void Finalize(Span<unsigned char> output) {
   56|  1.83M|        assert(output.size() == OUTPUT_SIZE);
   57|  1.83M|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   58|  1.83M|        sha.Finalize(buf);
   59|  1.83M|        CRIPEMD160().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   60|  1.83M|    }
_ZN8CHash1605WriteE4SpanIKhE:
   62|  1.83M|    CHash160& Write(Span<const unsigned char> input) {
   63|  1.83M|        sha.Write(input.data(), input.size());
   64|  1.83M|        return *this;
   65|  1.83M|    }
_ZN10HashWriter5writeE4SpanIKSt4byteE:
  107|   989k|    {
  108|   989k|        ctx.Write(UCharCast(src.data()), src.size());
  109|   989k|    }
_ZN10HashWriter7GetHashEv:
  115|  17.6k|    uint256 GetHash() {
  116|  17.6k|        uint256 result;
  117|  17.6k|        ctx.Finalize(result.begin());
  118|  17.6k|        ctx.Reset().Write(result.begin(), CSHA256::OUTPUT_SIZE).Finalize(result.begin());
  119|  17.6k|        return result;
  120|  17.6k|    }
_ZN10HashWriter9GetSHA256Ev:
  126|  37.4k|    uint256 GetSHA256() {
  127|  37.4k|        uint256 result;
  128|  37.4k|        ctx.Finalize(result.begin());
  129|  37.4k|        return result;
  130|  37.4k|    }
_Z9RIPEMD1604SpanIKhE:
  223|    395|{
  224|    395|    uint160 result;
  225|    395|    CRIPEMD160().Write(data.data(), data.size()).Finalize(result.begin());
  226|    395|    return result;
  227|    395|}
_Z7Hash160I4SpanIKhEE7uint160RKT_:
   93|  1.79M|{
   94|  1.79M|    uint160 result;
   95|  1.79M|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
   96|  1.79M|    return result;
   97|  1.79M|}
_Z4HashINSt3__16vectorIhNS0_9allocatorIhEEEEE7uint256RKT_:
   76|   300k|{
   77|   300k|    uint256 result;
   78|   300k|    CHash256().Write(MakeUCharSpan(in1)).Finalize(result);
   79|   300k|    return result;
   80|   300k|}
_Z7Hash160I11XOnlyPubKeyE7uint160RKT_:
   93|  1.95k|{
   94|  1.95k|    uint160 result;
   95|  1.95k|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
   96|  1.95k|    return result;
   97|  1.95k|}
_ZN10HashWriterlsIjEERS_RKT_:
  142|   106k|    {
  143|   106k|        ::Serialize(*this, obj);
  144|   106k|        return *this;
  145|   106k|    }
_Z7Hash160I7CScriptE7uint160RKT_:
   93|  35.5k|{
   94|  35.5k|    uint160 result;
   95|  35.5k|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
   96|  35.5k|    return result;
   97|  35.5k|}
_Z4HashI4SpanIhEE7uint256RKT_:
   76|   145k|{
   77|   145k|    uint256 result;
   78|   145k|    CHash256().Write(MakeUCharSpan(in1)).Finalize(result);
   79|   145k|    return result;
   80|   145k|}
_ZN10HashWriterlsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEERS_RKT_:
  142|  29.4k|    {
  143|  29.4k|        ::Serialize(*this, obj);
  144|  29.4k|        return *this;
  145|  29.4k|    }
_ZN10HashWriterlsI7uint256EERS_RKT_:
  142|  8.53k|    {
  143|  8.53k|        ::Serialize(*this, obj);
  144|  8.53k|        return *this;
  145|  8.53k|    }
_ZN10HashWriterlsI4SpanIKhEEERS_RKT_:
  142|   131k|    {
  143|   131k|        ::Serialize(*this, obj);
  144|   131k|        return *this;
  145|   131k|    }
_ZN10HashWriterlsIhEERS_RKT_:
  142|  8.27k|    {
  143|  8.27k|        ::Serialize(*this, obj);
  144|  8.27k|        return *this;
  145|  8.27k|    }
_ZN10HashWriterlsI9COutPointEERS_RKT_:
  142|   106k|    {
  143|   106k|        ::Serialize(*this, obj);
  144|   106k|        return *this;
  145|   106k|    }
_ZN10HashWriterlsI6CTxOutEERS_RKT_:
  142|  12.7k|    {
  143|  12.7k|        ::Serialize(*this, obj);
  144|  12.7k|        return *this;
  145|  12.7k|    }
_ZN10HashWriterlsI13ParamsWrapperI20TransactionSerParamsK12CTransactionEEERS_RKT_:
  142|  2.90k|    {
  143|  2.90k|        ::Serialize(*this, obj);
  144|  2.90k|        return *this;
  145|  2.90k|    }
_ZN10HashWriterlsIlEERS_RKT_:
  142|  1.71k|    {
  143|  1.71k|        ::Serialize(*this, obj);
  144|  1.71k|        return *this;
  145|  1.71k|    }
_ZN10HashWriterlsI7CScriptEERS_RKT_:
  142|  1.71k|    {
  143|  1.71k|        ::Serialize(*this, obj);
  144|  1.71k|        return *this;
  145|  1.71k|    }
_ZN10HashWriterlsI17CompactSizeWriterEERS_RKT_:
  142|  8.27k|    {
  143|  8.27k|        ::Serialize(*this, obj);
  144|  8.27k|        return *this;
  145|  8.27k|    }

_ZN10interfaces5Chain13NotificationsD2Ev:
  320|  11.6k|        virtual ~Notifications() = default;
_ZN10interfaces5ChainD2Ev:
  131|      2|    virtual ~Chain() = default;

_ZNK12CChainParams12Base58PrefixENS_10Base58TypeE:
  118|   438k|    const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
_ZNK12CChainParams9Bech32HRPEv:
  119|  1.40k|    const std::string& Bech32HRP() const { return bech32_hrp; }

_ZN6kernel13NotificationsD2Ev:
   38|      2|    virtual ~Notifications() = default;

_Z20ec_seckey_export_derPK24secp256k1_context_structPhPmPKhb:
   95|  7.55k|int ec_seckey_export_der(const secp256k1_context *ctx, unsigned char *seckey, size_t *seckeylen, const unsigned char *key32, bool compressed) {
   96|  7.55k|    assert(*seckeylen >= CKey::SIZE);
   97|  7.55k|    secp256k1_pubkey pubkey;
   98|  7.55k|    size_t pubkeylen = 0;
   99|  7.55k|    if (!secp256k1_ec_pubkey_create(ctx, &pubkey, key32)) {
  ------------------
  |  Branch (99:9): [True: 0, False: 7.55k]
  ------------------
  100|      0|        *seckeylen = 0;
  101|      0|        return 0;
  102|      0|    }
  103|  7.55k|    if (compressed) {
  ------------------
  |  Branch (103:9): [True: 7.55k, False: 0]
  ------------------
  104|  7.55k|        static const unsigned char begin[] = {
  105|  7.55k|            0x30,0x81,0xD3,0x02,0x01,0x01,0x04,0x20
  106|  7.55k|        };
  107|  7.55k|        static const unsigned char middle[] = {
  108|  7.55k|            0xA0,0x81,0x85,0x30,0x81,0x82,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48,
  109|  7.55k|            0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  110|  7.55k|            0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  111|  7.55k|            0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04,
  112|  7.55k|            0x21,0x02,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87,
  113|  7.55k|            0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8,
  114|  7.55k|            0x17,0x98,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  115|  7.55k|            0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E,
  116|  7.55k|            0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x24,0x03,0x22,0x00
  117|  7.55k|        };
  118|  7.55k|        unsigned char *ptr = seckey;
  119|  7.55k|        memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin);
  120|  7.55k|        memcpy(ptr, key32, 32); ptr += 32;
  121|  7.55k|        memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
  122|  7.55k|        pubkeylen = CPubKey::COMPRESSED_SIZE;
  123|  7.55k|        secp256k1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED);
  ------------------
  |  |  212|  7.55k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|  7.55k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  198|  7.55k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
  124|  7.55k|        ptr += pubkeylen;
  125|  7.55k|        *seckeylen = ptr - seckey;
  126|  7.55k|        assert(*seckeylen == CKey::COMPRESSED_SIZE);
  127|  7.55k|    } else {
  128|      0|        static const unsigned char begin[] = {
  129|      0|            0x30,0x82,0x01,0x13,0x02,0x01,0x01,0x04,0x20
  130|      0|        };
  131|      0|        static const unsigned char middle[] = {
  132|      0|            0xA0,0x81,0xA5,0x30,0x81,0xA2,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48,
  133|      0|            0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  134|      0|            0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  135|      0|            0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04,
  136|      0|            0x41,0x04,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87,
  137|      0|            0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8,
  138|      0|            0x17,0x98,0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,0x5D,0xA4,0xFB,0xFC,0x0E,0x11,
  139|      0|            0x08,0xA8,0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,0x9C,0x47,0xD0,0x8F,0xFB,0x10,
  140|      0|            0xD4,0xB8,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  141|      0|            0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E,
  142|      0|            0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x44,0x03,0x42,0x00
  143|      0|        };
  144|      0|        unsigned char *ptr = seckey;
  145|      0|        memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin);
  146|      0|        memcpy(ptr, key32, 32); ptr += 32;
  147|      0|        memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
  148|      0|        pubkeylen = CPubKey::SIZE;
  149|      0|        secp256k1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  213|      0|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|      0|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  150|      0|        ptr += pubkeylen;
  151|      0|        *seckeylen = ptr - seckey;
  152|      0|        assert(*seckeylen == CKey::SIZE);
  153|      0|    }
  154|  7.55k|    return 1;
  155|  7.55k|}
_ZN4CKey5CheckEPKh:
  157|   153k|bool CKey::Check(const unsigned char *vch) {
  158|   153k|    return secp256k1_ec_seckey_verify(secp256k1_context_sign, vch);
  159|   153k|}
_ZNK4CKey10GetPrivKeyEv:
  169|  7.55k|CPrivKey CKey::GetPrivKey() const {
  170|  7.55k|    assert(keydata);
  171|  7.55k|    CPrivKey seckey;
  172|  7.55k|    int ret;
  173|  7.55k|    size_t seckeylen;
  174|  7.55k|    seckey.resize(SIZE);
  175|  7.55k|    seckeylen = SIZE;
  176|  7.55k|    ret = ec_seckey_export_der(secp256k1_context_sign, seckey.data(), &seckeylen, UCharCast(begin()), fCompressed);
  177|  7.55k|    assert(ret);
  178|  7.55k|    seckey.resize(seckeylen);
  179|  7.55k|    return seckey;
  180|  7.55k|}
_ZNK4CKey9GetPubKeyEv:
  182|   261k|CPubKey CKey::GetPubKey() const {
  183|   261k|    assert(keydata);
  184|   261k|    secp256k1_pubkey pubkey;
  185|   261k|    size_t clen = CPubKey::SIZE;
  186|   261k|    CPubKey result;
  187|   261k|    int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, UCharCast(begin()));
  188|   261k|    assert(ret);
  189|   261k|    secp256k1_ec_pubkey_serialize(secp256k1_context_sign, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  212|   261k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|   261k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  198|   261k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
                  secp256k1_ec_pubkey_serialize(secp256k1_context_sign, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  213|   261k|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|      0|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (189:107): [True: 261k, False: 0]
  ------------------
  190|   261k|    assert(result.size() == clen);
  191|   261k|    assert(result.IsValid());
  192|   261k|    return result;
  193|   261k|}
_ZNK4CKey11SignCompactERK7uint256RNSt3__16vectorIhNS3_9allocatorIhEEEE:
  249|  14.7k|bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
  250|  14.7k|    if (!keydata)
  ------------------
  |  Branch (250:9): [True: 0, False: 14.7k]
  ------------------
  251|      0|        return false;
  252|  14.7k|    vchSig.resize(CPubKey::COMPACT_SIGNATURE_SIZE);
  253|  14.7k|    int rec = -1;
  254|  14.7k|    secp256k1_ecdsa_recoverable_signature rsig;
  255|  14.7k|    int ret = secp256k1_ecdsa_sign_recoverable(secp256k1_context_sign, &rsig, hash.begin(), UCharCast(begin()), secp256k1_nonce_function_rfc6979, nullptr);
  256|  14.7k|    assert(ret);
  257|  14.7k|    ret = secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_sign, &vchSig[1], &rec, &rsig);
  258|  14.7k|    assert(ret);
  259|  14.7k|    assert(rec != -1);
  260|  14.7k|    vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);
  ------------------
  |  Branch (260:29): [True: 14.7k, False: 0]
  ------------------
  261|       |    // Additional verification step to prevent using a potentially corrupted signature
  262|  14.7k|    secp256k1_pubkey epk, rpk;
  263|  14.7k|    ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &epk, UCharCast(begin()));
  264|  14.7k|    assert(ret);
  265|  14.7k|    ret = secp256k1_ecdsa_recover(secp256k1_context_static, &rpk, &rsig, hash.begin());
  266|  14.7k|    assert(ret);
  267|  14.7k|    ret = secp256k1_ec_pubkey_cmp(secp256k1_context_static, &epk, &rpk);
  268|  14.7k|    assert(ret == 0);
  269|  14.7k|    return true;
  270|  14.7k|}
_ZNK4CKey6DeriveERS_R7uint256jRKS1_:
  292|  62.9k|bool CKey::Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const {
  293|  62.9k|    assert(IsValid());
  294|  62.9k|    assert(IsCompressed());
  295|  62.9k|    std::vector<unsigned char, secure_allocator<unsigned char>> vout(64);
  296|  62.9k|    if ((nChild >> 31) == 0) {
  ------------------
  |  Branch (296:9): [True: 30.2k, False: 32.7k]
  ------------------
  297|  30.2k|        CPubKey pubkey = GetPubKey();
  298|  30.2k|        assert(pubkey.size() == CPubKey::COMPRESSED_SIZE);
  299|  30.2k|        BIP32Hash(cc, nChild, *pubkey.begin(), pubkey.begin()+1, vout.data());
  300|  32.7k|    } else {
  301|  32.7k|        assert(size() == 32);
  302|  32.7k|        BIP32Hash(cc, nChild, 0, UCharCast(begin()), vout.data());
  303|  32.7k|    }
  304|  62.9k|    memcpy(ccChild.begin(), vout.data()+32, 32);
  305|  62.9k|    keyChild.Set(begin(), begin() + 32, true);
  306|  62.9k|    bool ret = secp256k1_ec_seckey_tweak_add(secp256k1_context_sign, (unsigned char*)keyChild.begin(), vout.data());
  307|  62.9k|    if (!ret) keyChild.ClearKeyData();
  ------------------
  |  Branch (307:9): [True: 0, False: 62.9k]
  ------------------
  308|  62.9k|    return ret;
  309|  62.9k|}
_ZNK7CExtKey6DeriveERS_j:
  359|  62.9k|bool CExtKey::Derive(CExtKey &out, unsigned int _nChild) const {
  360|  62.9k|    if (nDepth == std::numeric_limits<unsigned char>::max()) return false;
  ------------------
  |  Branch (360:9): [True: 0, False: 62.9k]
  ------------------
  361|  62.9k|    out.nDepth = nDepth + 1;
  362|  62.9k|    CKeyID id = key.GetPubKey().GetID();
  363|  62.9k|    memcpy(out.vchFingerprint, &id, 4);
  364|  62.9k|    out.nChild = _nChild;
  365|  62.9k|    return key.Derive(out.key, out.chaincode, _nChild, chaincode);
  366|  62.9k|}
_ZNK7CExtKey6NeuterEv:
  380|   100k|CExtPubKey CExtKey::Neuter() const {
  381|   100k|    CExtPubKey ret;
  382|   100k|    ret.nDepth = nDepth;
  383|   100k|    memcpy(ret.vchFingerprint, vchFingerprint, 4);
  384|   100k|    ret.nChild = nChild;
  385|   100k|    ret.pubkey = key.GetPubKey();
  386|   100k|    ret.chaincode = chaincode;
  387|   100k|    return ret;
  388|   100k|}
_ZNK7CExtKey6EncodeEPh:
  390|  1.76k|void CExtKey::Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const {
  391|  1.76k|    code[0] = nDepth;
  392|  1.76k|    memcpy(code+1, vchFingerprint, 4);
  393|  1.76k|    WriteBE32(code+5, nChild);
  394|  1.76k|    memcpy(code+9, chaincode.begin(), 32);
  395|  1.76k|    code[41] = 0;
  396|  1.76k|    assert(key.size() == 32);
  397|  1.76k|    memcpy(code+42, key.begin(), 32);
  398|  1.76k|}
_ZN7CExtKey6DecodeEPKh:
  400|  45.0k|void CExtKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
  401|  45.0k|    nDepth = code[0];
  402|  45.0k|    memcpy(vchFingerprint, code+1, 4);
  403|  45.0k|    nChild = ReadBE32(code+5);
  404|  45.0k|    memcpy(chaincode.begin(), code+9, 32);
  405|  45.0k|    key.Set(code+42, code+BIP32_EXTKEY_SIZE, true);
  406|  45.0k|    if ((nDepth == 0 && (nChild != 0 || ReadLE32(vchFingerprint) != 0)) || code[41] != 0) key = CKey();
  ------------------
  |  Branch (406:10): [True: 44.5k, False: 535]
  |  Branch (406:26): [True: 0, False: 44.5k]
  |  Branch (406:41): [True: 0, False: 44.5k]
  |  Branch (406:76): [True: 0, False: 45.0k]
  ------------------
  407|  45.0k|}
_ZN11ECC_ContextD2Ev:
  482|      2|{
  483|      2|    ECC_Stop();
  484|      2|}
key.cpp:_ZL8ECC_Stopv:
  467|      2|static void ECC_Stop() {
  468|      2|    secp256k1_context *ctx = secp256k1_context_sign;
  469|      2|    secp256k1_context_sign = nullptr;
  470|       |
  471|      2|    if (ctx) {
  ------------------
  |  Branch (471:9): [True: 2, False: 0]
  ------------------
  472|      2|        secp256k1_context_destroy(ctx);
  473|      2|    }
  474|      2|}

_ZN4CKey11MakeKeyDataEv:
   64|   369k|    {
   65|   369k|        if (!keydata) keydata = make_secure_unique<KeyType>();
  ------------------
  |  Branch (65:13): [True: 306k, False: 63.0k]
  ------------------
   66|   369k|    }
_ZN4CKeyaSERKS_:
   79|   215k|    {
   80|   215k|        if (this != &other) {
  ------------------
  |  Branch (80:13): [True: 215k, False: 0]
  ------------------
   81|   215k|            if (other.keydata) {
  ------------------
  |  Branch (81:17): [True: 215k, False: 0]
  ------------------
   82|   215k|                MakeKeyData();
   83|   215k|                *keydata = *other.keydata;
   84|   215k|            } else {
   85|      0|                ClearKeyData();
   86|      0|            }
   87|   215k|            fCompressed = other.fCompressed;
   88|   215k|        }
   89|   215k|        return *this;
   90|   215k|    }
_ZN4CKeyC2ERKS_:
   92|  88.2k|    CKey(const CKey& other) { *this = other; }
_ZNK4CKey4sizeEv:
  117|  36.7k|    unsigned int size() const { return keydata ? keydata->size() : 0; }
  ------------------
  |  Branch (117:40): [True: 36.7k, False: 0]
  ------------------
_ZNK4CKey4dataEv:
  118|   525k|    const std::byte* data() const { return keydata ? reinterpret_cast<const std::byte*>(keydata->data()) : nullptr; }
  ------------------
  |  Branch (118:44): [True: 525k, False: 0]
  ------------------
_ZNK4CKey5beginEv:
  119|   523k|    const std::byte* begin() const { return data(); }
_ZNK4CKey3endEv:
  120|  2.22k|    const std::byte* end() const { return data() + size(); }
_ZNK4CKey7IsValidEv:
  123|   259k|    bool IsValid() const { return !!keydata; }
_ZNK4CKey12IsCompressedEv:
  126|   109k|    bool IsCompressed() const { return fCompressed; }
_ZN4CKeyC2Ev:
   74|   303k|    CKey() noexcept = default;
_ZN4CKey3SetIPKSt4byteEEvT_S4_b:
  104|  62.9k|    {
  105|  62.9k|        if (size_t(pend - pbegin) != std::tuple_size_v<KeyType>) {
  ------------------
  |  Branch (105:13): [True: 0, False: 62.9k]
  ------------------
  106|      0|            ClearKeyData();
  107|  62.9k|        } else if (Check(UCharCast(&pbegin[0]))) {
  ------------------
  |  Branch (107:20): [True: 62.9k, False: 0]
  ------------------
  108|  62.9k|            MakeKeyData();
  109|  62.9k|            memcpy(keydata->data(), (unsigned char*)&pbegin[0], keydata->size());
  110|  62.9k|            fCompressed = fCompressedIn;
  111|  62.9k|        } else {
  112|      0|            ClearKeyData();
  113|      0|        }
  114|  62.9k|    }
_ZN7CExtKeyC2Ev:
  243|   144k|    CExtKey() = default;
_ZN4CKey3SetINSt3__111__wrap_iterIPhEEEEvT_S5_b:
  104|  45.3k|    {
  105|  45.3k|        if (size_t(pend - pbegin) != std::tuple_size_v<KeyType>) {
  ------------------
  |  Branch (105:13): [True: 0, False: 45.3k]
  ------------------
  106|      0|            ClearKeyData();
  107|  45.3k|        } else if (Check(UCharCast(&pbegin[0]))) {
  ------------------
  |  Branch (107:20): [True: 45.3k, False: 0]
  ------------------
  108|  45.3k|            MakeKeyData();
  109|  45.3k|            memcpy(keydata->data(), (unsigned char*)&pbegin[0], keydata->size());
  110|  45.3k|            fCompressed = fCompressedIn;
  111|  45.3k|        } else {
  112|      0|            ClearKeyData();
  113|      0|        }
  114|  45.3k|    }
_ZN4CKey3SetIPKhEEvT_S3_b:
  104|  45.0k|    {
  105|  45.0k|        if (size_t(pend - pbegin) != std::tuple_size_v<KeyType>) {
  ------------------
  |  Branch (105:13): [True: 0, False: 45.0k]
  ------------------
  106|      0|            ClearKeyData();
  107|  45.0k|        } else if (Check(UCharCast(&pbegin[0]))) {
  ------------------
  |  Branch (107:20): [True: 45.0k, False: 0]
  ------------------
  108|  45.0k|            MakeKeyData();
  109|  45.0k|            memcpy(keydata->data(), (unsigned char*)&pbegin[0], keydata->size());
  110|  45.0k|            fCompressed = fCompressedIn;
  111|  45.0k|        } else {
  112|      0|            ClearKeyData();
  113|      0|        }
  114|  45.0k|    }

_Z12DecodeSecretRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  214|  68.4k|{
  215|  68.4k|    CKey key;
  216|  68.4k|    std::vector<unsigned char> data;
  217|  68.4k|    if (DecodeBase58Check(str, data, 34)) {
  ------------------
  |  Branch (217:9): [True: 45.3k, False: 23.1k]
  ------------------
  218|  45.3k|        const std::vector<unsigned char>& privkey_prefix = Params().Base58Prefix(CChainParams::SECRET_KEY);
  219|  45.3k|        if ((data.size() == 32 + privkey_prefix.size() || (data.size() == 33 + privkey_prefix.size() && data.back() == 1)) &&
  ------------------
  |  Branch (219:14): [True: 0, False: 45.3k]
  |  Branch (219:60): [True: 45.3k, False: 1]
  |  Branch (219:105): [True: 45.3k, False: 0]
  ------------------
  220|  45.3k|            std::equal(privkey_prefix.begin(), privkey_prefix.end(), data.begin())) {
  ------------------
  |  Branch (220:13): [True: 45.3k, False: 0]
  ------------------
  221|  45.3k|            bool compressed = data.size() == 33 + privkey_prefix.size();
  222|  45.3k|            key.Set(data.begin() + privkey_prefix.size(), data.begin() + privkey_prefix.size() + 32, compressed);
  223|  45.3k|        }
  224|  45.3k|    }
  225|  68.4k|    if (!data.empty()) {
  ------------------
  |  Branch (225:9): [True: 45.3k, False: 23.1k]
  ------------------
  226|  45.3k|        memory_cleanse(data.data(), data.size());
  227|  45.3k|    }
  228|  68.4k|    return key;
  229|  68.4k|}
_Z12EncodeSecretRK4CKey:
  232|  2.22k|{
  233|  2.22k|    assert(key.IsValid());
  234|  2.22k|    std::vector<unsigned char> data = Params().Base58Prefix(CChainParams::SECRET_KEY);
  235|  2.22k|    data.insert(data.end(), UCharCast(key.begin()), UCharCast(key.end()));
  236|  2.22k|    if (key.IsCompressed()) {
  ------------------
  |  Branch (236:9): [True: 2.22k, False: 0]
  ------------------
  237|  2.22k|        data.push_back(1);
  238|  2.22k|    }
  239|  2.22k|    std::string ret = EncodeBase58Check(data);
  240|  2.22k|    memory_cleanse(data.data(), data.size());
  241|  2.22k|    return ret;
  242|  2.22k|}
_Z15DecodeExtPubKeyRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  245|  50.1k|{
  246|  50.1k|    CExtPubKey key;
  247|  50.1k|    std::vector<unsigned char> data;
  248|  50.1k|    if (DecodeBase58Check(str, data, 78)) {
  ------------------
  |  Branch (248:9): [True: 50.0k, False: 136]
  ------------------
  249|  50.0k|        const std::vector<unsigned char>& prefix = Params().Base58Prefix(CChainParams::EXT_PUBLIC_KEY);
  250|  50.0k|        if (data.size() == BIP32_EXTKEY_SIZE + prefix.size() && std::equal(prefix.begin(), prefix.end(), data.begin())) {
  ------------------
  |  Branch (250:13): [True: 50.0k, False: 2]
  |  Branch (250:65): [True: 4.96k, False: 45.0k]
  ------------------
  251|  4.96k|            key.Decode(data.data() + prefix.size());
  252|  4.96k|        }
  253|  50.0k|    }
  254|  50.1k|    return key;
  255|  50.1k|}
_Z15EncodeExtPubKeyRK10CExtPubKey:
  258|   288k|{
  259|   288k|    std::vector<unsigned char> data = Params().Base58Prefix(CChainParams::EXT_PUBLIC_KEY);
  260|   288k|    size_t size = data.size();
  261|   288k|    data.resize(size + BIP32_EXTKEY_SIZE);
  262|   288k|    key.Encode(data.data() + size);
  263|   288k|    std::string ret = EncodeBase58Check(data);
  264|   288k|    return ret;
  265|   288k|}
_Z12DecodeExtKeyRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  268|  50.1k|{
  269|  50.1k|    CExtKey key;
  270|  50.1k|    std::vector<unsigned char> data;
  271|  50.1k|    if (DecodeBase58Check(str, data, 78)) {
  ------------------
  |  Branch (271:9): [True: 50.0k, False: 136]
  ------------------
  272|  50.0k|        const std::vector<unsigned char>& prefix = Params().Base58Prefix(CChainParams::EXT_SECRET_KEY);
  273|  50.0k|        if (data.size() == BIP32_EXTKEY_SIZE + prefix.size() && std::equal(prefix.begin(), prefix.end(), data.begin())) {
  ------------------
  |  Branch (273:13): [True: 50.0k, False: 2]
  |  Branch (273:65): [True: 45.0k, False: 4.96k]
  ------------------
  274|  45.0k|            key.Decode(data.data() + prefix.size());
  275|  45.0k|        }
  276|  50.0k|    }
  277|  50.1k|    if (!data.empty()) {
  ------------------
  |  Branch (277:9): [True: 50.0k, False: 136]
  ------------------
  278|  50.0k|        memory_cleanse(data.data(), data.size());
  279|  50.0k|    }
  280|  50.1k|    return key;
  281|  50.1k|}
_Z12EncodeExtKeyRK7CExtKey:
  284|  1.76k|{
  285|  1.76k|    std::vector<unsigned char> data = Params().Base58Prefix(CChainParams::EXT_SECRET_KEY);
  286|  1.76k|    size_t size = data.size();
  287|  1.76k|    data.resize(size + BIP32_EXTKEY_SIZE);
  288|  1.76k|    key.Encode(data.data() + size);
  289|  1.76k|    std::string ret = EncodeBase58Check(data);
  290|  1.76k|    memory_cleanse(data.data(), data.size());
  291|  1.76k|    return ret;
  292|  1.76k|}
_Z17EncodeDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  295|  1.57k|{
  296|  1.57k|    return std::visit(DestinationEncoder(Params()), dest);
  297|  1.57k|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_PNS_6vectorIiNS3_IiEEEE:
  300|    253|{
  301|    253|    return DecodeDestination(str, Params(), error_msg, error_locations);
  302|    253|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  305|    253|{
  306|    253|    std::string error_msg;
  307|    253|    return DecodeDestination(str, error_msg);
  308|    253|}
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK6PKHash:
   31|    265|    {
   32|    265|        std::vector<unsigned char> data = m_params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
   33|    265|        data.insert(data.end(), id.begin(), id.end());
   34|    265|        return EncodeBase58Check(data);
   35|    265|    }
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK10ScriptHash:
   38|    406|    {
   39|    406|        std::vector<unsigned char> data = m_params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
   40|    406|        data.insert(data.end(), id.begin(), id.end());
   41|    406|        return EncodeBase58Check(data);
   42|    406|    }
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK19WitnessV0ScriptHash:
   53|    224|    {
   54|    224|        std::vector<unsigned char> data = {0};
   55|    224|        data.reserve(53);
   56|    224|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, id.begin(), id.end());
   57|    224|        return bech32::Encode(bech32::Encoding::BECH32, m_params.Bech32HRP(), data);
   58|    224|    }
key_io.cpp:_ZZNK12_GLOBAL__N_118DestinationEncoderclERK19WitnessV0ScriptHashENKUlhE_clEh:
   56|  11.6k|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, id.begin(), id.end());
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV0KeyHash:
   45|    135|    {
   46|    135|        std::vector<unsigned char> data = {0};
   47|    135|        data.reserve(33);
   48|    135|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, id.begin(), id.end());
   49|    135|        return bech32::Encode(bech32::Encoding::BECH32, m_params.Bech32HRP(), data);
   50|    135|    }
key_io.cpp:_ZZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV0KeyHashENKUlhE_clEh:
   48|  4.32k|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, id.begin(), id.end());
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV1Taproot:
   61|    321|    {
   62|    321|        std::vector<unsigned char> data = {1};
   63|    321|        data.reserve(53);
   64|    321|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, tap.begin(), tap.end());
   65|    321|        return bech32::Encode(bech32::Encoding::BECH32M, m_params.Bech32HRP(), data);
   66|    321|    }
key_io.cpp:_ZZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV1TaprootENKUlhE_clEh:
   64|  16.6k|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, tap.begin(), tap.end());
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK14WitnessUnknown:
   69|    222|    {
   70|    222|        const std::vector<unsigned char>& program = id.GetWitnessProgram();
   71|    222|        if (id.GetWitnessVersion() < 1 || id.GetWitnessVersion() > 16 || program.size() < 2 || program.size() > 40) {
  ------------------
  |  Branch (71:13): [True: 0, False: 222]
  |  Branch (71:43): [True: 0, False: 222]
  |  Branch (71:74): [True: 0, False: 222]
  |  Branch (71:96): [True: 0, False: 222]
  ------------------
   72|      0|            return {};
   73|      0|        }
   74|    222|        std::vector<unsigned char> data = {(unsigned char)id.GetWitnessVersion()};
   75|    222|        data.reserve(1 + (program.size() * 8 + 4) / 5);
   76|    222|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, program.begin(), program.end());
   77|    222|        return bech32::Encode(bech32::Encoding::BECH32M, m_params.Bech32HRP(), data);
   78|    222|    }
key_io.cpp:_ZZNK12_GLOBAL__N_118DestinationEncoderclERK14WitnessUnknownENKUlhE_clEh:
   76|  9.71k|        ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, program.begin(), program.end());
key_io.cpp:_ZN12_GLOBAL__N_118DestinationEncoderC2ERK12CChainParams:
   28|  1.57k|    explicit DestinationEncoder(const CChainParams& params) : m_params(params) {}
key_io.cpp:_ZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK12CChainParamsRS6_PNS0_6vectorIiNS4_IiEEEE:
   85|    253|{
   86|    253|    std::vector<unsigned char> data;
   87|    253|    uint160 hash;
   88|    253|    error_str = "";
   89|       |
   90|       |    // Note this will be false if it is a valid Bech32 address for a different network
   91|    253|    bool is_bech32 = (ToLower(str.substr(0, params.Bech32HRP().size())) == params.Bech32HRP());
   92|       |
   93|    253|    if (!is_bech32 && DecodeBase58Check(str, data, 21)) {
  ------------------
  |  Branch (93:9): [True: 53, False: 200]
  |  Branch (93:23): [True: 26, False: 27]
  ------------------
   94|       |        // base58-encoded Bitcoin addresses.
   95|       |        // Public-key-hash-addresses have version 0 (or 111 testnet).
   96|       |        // The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key.
   97|     26|        const std::vector<unsigned char>& pubkey_prefix = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
   98|     26|        if (data.size() == hash.size() + pubkey_prefix.size() && std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin())) {
  ------------------
  |  Branch (98:13): [True: 26, False: 0]
  |  Branch (98:66): [True: 0, False: 26]
  ------------------
   99|      0|            std::copy(data.begin() + pubkey_prefix.size(), data.end(), hash.begin());
  100|      0|            return PKHash(hash);
  101|      0|        }
  102|       |        // Script-hash-addresses have version 5 (or 196 testnet).
  103|       |        // The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script.
  104|     26|        const std::vector<unsigned char>& script_prefix = params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
  105|     26|        if (data.size() == hash.size() + script_prefix.size() && std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) {
  ------------------
  |  Branch (105:13): [True: 26, False: 0]
  |  Branch (105:66): [True: 26, False: 0]
  ------------------
  106|     26|            std::copy(data.begin() + script_prefix.size(), data.end(), hash.begin());
  107|     26|            return ScriptHash(hash);
  108|     26|        }
  109|       |
  110|       |        // If the prefix of data matches either the script or pubkey prefix, the length must have been wrong
  111|      0|        if ((data.size() >= script_prefix.size() &&
  ------------------
  |  Branch (111:14): [True: 0, False: 0]
  ------------------
  112|      0|                std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) ||
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|            (data.size() >= pubkey_prefix.size() &&
  ------------------
  |  Branch (113:14): [True: 0, False: 0]
  ------------------
  114|      0|                std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin()))) {
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|      0|            error_str = "Invalid length for Base58 address (P2PKH or P2SH)";
  116|      0|        } else {
  117|      0|            error_str = "Invalid or unsupported Base58-encoded address.";
  118|      0|        }
  119|      0|        return CNoDestination();
  120|    227|    } else if (!is_bech32) {
  ------------------
  |  Branch (120:16): [True: 27, False: 200]
  ------------------
  121|       |        // Try Base58 decoding without the checksum, using a much larger max length
  122|     27|        if (!DecodeBase58(str, data, 100)) {
  ------------------
  |  Branch (122:13): [True: 10, False: 17]
  ------------------
  123|     10|            error_str = "Invalid or unsupported Segwit (Bech32) or Base58 encoding.";
  124|     17|        } else {
  125|     17|            error_str = "Invalid checksum or length of Base58 address (P2PKH or P2SH)";
  126|     17|        }
  127|     27|        return CNoDestination();
  128|     27|    }
  129|       |
  130|    200|    data.clear();
  131|    200|    const auto dec = bech32::Decode(str);
  132|    200|    if (dec.encoding == bech32::Encoding::BECH32 || dec.encoding == bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (132:9): [True: 0, False: 200]
  |  Branch (132:53): [True: 0, False: 200]
  ------------------
  133|      0|        if (dec.data.empty()) {
  ------------------
  |  Branch (133:13): [True: 0, False: 0]
  ------------------
  134|      0|            error_str = "Empty Bech32 data section";
  135|      0|            return CNoDestination();
  136|      0|        }
  137|       |        // Bech32 decoding
  138|      0|        if (dec.hrp != params.Bech32HRP()) {
  ------------------
  |  Branch (138:13): [True: 0, False: 0]
  ------------------
  139|      0|            error_str = strprintf("Invalid or unsupported prefix for Segwit (Bech32) address (expected %s, got %s).", params.Bech32HRP(), dec.hrp);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  140|      0|            return CNoDestination();
  141|      0|        }
  142|      0|        int version = dec.data[0]; // The first 5 bit symbol is the witness version (0-16)
  143|      0|        if (version == 0 && dec.encoding != bech32::Encoding::BECH32) {
  ------------------
  |  Branch (143:13): [True: 0, False: 0]
  |  Branch (143:29): [True: 0, False: 0]
  ------------------
  144|      0|            error_str = "Version 0 witness address must use Bech32 checksum";
  145|      0|            return CNoDestination();
  146|      0|        }
  147|      0|        if (version != 0 && dec.encoding != bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (147:13): [True: 0, False: 0]
  |  Branch (147:29): [True: 0, False: 0]
  ------------------
  148|      0|            error_str = "Version 1+ witness address must use Bech32m checksum";
  149|      0|            return CNoDestination();
  150|      0|        }
  151|       |        // The rest of the symbols are converted witness program bytes.
  152|      0|        data.reserve(((dec.data.size() - 1) * 5) / 8);
  153|      0|        if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end())) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|       |
  155|      0|            std::string_view byte_str{data.size() == 1 ? "byte" : "bytes"};
  ------------------
  |  Branch (155:39): [True: 0, False: 0]
  ------------------
  156|       |
  157|      0|            if (version == 0) {
  ------------------
  |  Branch (157:17): [True: 0, False: 0]
  ------------------
  158|      0|                {
  159|      0|                    WitnessV0KeyHash keyid;
  160|      0|                    if (data.size() == keyid.size()) {
  ------------------
  |  Branch (160:25): [True: 0, False: 0]
  ------------------
  161|      0|                        std::copy(data.begin(), data.end(), keyid.begin());
  162|      0|                        return keyid;
  163|      0|                    }
  164|      0|                }
  165|      0|                {
  166|      0|                    WitnessV0ScriptHash scriptid;
  167|      0|                    if (data.size() == scriptid.size()) {
  ------------------
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|      0|                        std::copy(data.begin(), data.end(), scriptid.begin());
  169|      0|                        return scriptid;
  170|      0|                    }
  171|      0|                }
  172|       |
  173|      0|                error_str = strprintf("Invalid Bech32 v0 address program size (%d %s), per BIP141", data.size(), byte_str);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  174|      0|                return CNoDestination();
  175|      0|            }
  176|       |
  177|      0|            if (version == 1 && data.size() == WITNESS_V1_TAPROOT_SIZE) {
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  |  Branch (177:33): [True: 0, False: 0]
  ------------------
  178|      0|                static_assert(WITNESS_V1_TAPROOT_SIZE == WitnessV1Taproot::size());
  179|      0|                WitnessV1Taproot tap;
  180|      0|                std::copy(data.begin(), data.end(), tap.begin());
  181|      0|                return tap;
  182|      0|            }
  183|       |
  184|      0|            if (CScript::IsPayToAnchor(version, data)) {
  ------------------
  |  Branch (184:17): [True: 0, False: 0]
  ------------------
  185|      0|                return PayToAnchor();
  186|      0|            }
  187|       |
  188|      0|            if (version > 16) {
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                error_str = "Invalid Bech32 address witness version";
  190|      0|                return CNoDestination();
  191|      0|            }
  192|       |
  193|      0|            if (data.size() < 2 || data.size() > BECH32_WITNESS_PROG_MAX_LEN) {
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  |  Branch (193:36): [True: 0, False: 0]
  ------------------
  194|      0|                error_str = strprintf("Invalid Bech32 address program size (%d %s)", data.size(), byte_str);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  195|      0|                return CNoDestination();
  196|      0|            }
  197|       |
  198|      0|            return WitnessUnknown{version, data};
  199|      0|        } else {
  200|      0|            error_str = strprintf("Invalid padding in Bech32 data section");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  201|      0|            return CNoDestination();
  202|      0|        }
  203|      0|    }
  204|       |
  205|       |    // Perform Bech32 error location
  206|    200|    auto res = bech32::LocateErrors(str);
  207|    200|    error_str = res.first;
  208|    200|    if (error_locations) *error_locations = std::move(res.second);
  ------------------
  |  Branch (208:9): [True: 0, False: 200]
  ------------------
  209|    200|    return CNoDestination();
  210|    200|}

_ZN7leveldb6DBImplD2Ev:
  153|      4|DBImpl::~DBImpl() {
  154|       |  // Wait for background work to finish.
  155|      4|  mutex_.Lock();
  156|      4|  shutting_down_.store(true, std::memory_order_release);
  157|      4|  while (background_compaction_scheduled_) {
  ------------------
  |  Branch (157:10): [True: 0, False: 4]
  ------------------
  158|      0|    background_work_finished_signal_.Wait();
  159|      0|  }
  160|      4|  mutex_.Unlock();
  161|       |
  162|      4|  if (db_lock_ != nullptr) {
  ------------------
  |  Branch (162:7): [True: 4, False: 0]
  ------------------
  163|      4|    env_->UnlockFile(db_lock_);
  164|      4|  }
  165|       |
  166|      4|  delete versions_;
  167|      4|  if (mem_ != nullptr) mem_->Unref();
  ------------------
  |  Branch (167:7): [True: 4, False: 0]
  ------------------
  168|      4|  if (imm_ != nullptr) imm_->Unref();
  ------------------
  |  Branch (168:7): [True: 0, False: 4]
  ------------------
  169|      4|  delete tmp_batch_;
  170|      4|  delete log_;
  171|      4|  delete logfile_;
  172|      4|  delete table_cache_;
  173|       |
  174|      4|  if (owns_info_log_) {
  ------------------
  |  Branch (174:7): [True: 0, False: 4]
  ------------------
  175|      0|    delete options_.info_log;
  176|      0|  }
  177|      4|  if (owns_cache_) {
  ------------------
  |  Branch (177:7): [True: 0, False: 4]
  ------------------
  178|      0|    delete options_.block_cache;
  179|      0|  }
  180|      4|}
_ZN7leveldb2DBD2Ev:
 1477|      4|DB::~DB() = default;
_ZN7leveldb8SnapshotD2Ev:
 1522|      4|Snapshot::~Snapshot() = default;

_ZN7leveldb3log6WriterD2Ev:
   32|      8|Writer::~Writer() = default;

_ZN7leveldb8MemTableD2Ev:
   24|      4|MemTable::~MemTable() { assert(refs_ == 0); }

_ZN7leveldb8MemTable5UnrefEv:
   33|      4|  void Unref() {
   34|      4|    --refs_;
   35|      4|    assert(refs_ >= 0);
   36|      4|    if (refs_ <= 0) {
  ------------------
  |  Branch (36:9): [True: 4, False: 0]
  ------------------
   37|      4|      delete this;
   38|      4|    }
   39|      4|  }

_ZN7leveldb10TableCacheD2Ev:
   39|      4|TableCache::~TableCache() { delete cache_; }

_ZN7leveldb7VersionD2Ev:
   68|      8|Version::~Version() {
   69|      8|  assert(refs_ == 0);
   70|       |
   71|       |  // Remove from linked list
   72|      8|  prev_->next_ = next_;
   73|      8|  next_->prev_ = prev_;
   74|       |
   75|       |  // Drop references to files
   76|     64|  for (int level = 0; level < config::kNumLevels; level++) {
  ------------------
  |  Branch (76:23): [True: 56, False: 8]
  ------------------
   77|     56|    for (size_t i = 0; i < files_[level].size(); i++) {
  ------------------
  |  Branch (77:24): [True: 0, False: 56]
  ------------------
   78|      0|      FileMetaData* f = files_[level][i];
   79|      0|      assert(f->refs > 0);
   80|      0|      f->refs--;
   81|      0|      if (f->refs <= 0) {
  ------------------
  |  Branch (81:11): [True: 0, False: 0]
  ------------------
   82|      0|        delete f;
   83|      0|      }
   84|      0|    }
   85|     56|  }
   86|      8|}
_ZN7leveldb7Version5UnrefEv:
  456|      4|void Version::Unref() {
  457|      4|  assert(this != &vset_->dummy_versions_);
  458|      4|  assert(refs_ >= 1);
  459|      4|  --refs_;
  460|      4|  if (refs_ == 0) {
  ------------------
  |  Branch (460:7): [True: 4, False: 0]
  ------------------
  461|      4|    delete this;
  462|      4|  }
  463|      4|}
_ZN7leveldb10VersionSetD2Ev:
  754|      4|VersionSet::~VersionSet() {
  755|      4|  current_->Unref();
  756|      4|  assert(dummy_versions_.next_ == &dummy_versions_);  // List must be empty
  757|      4|  delete descriptor_log_;
  758|      4|  delete descriptor_file_;
  759|      4|}

_ZN7leveldb10WriteBatchD2Ev:
   31|      4|WriteBatch::~WriteBatch() = default;

memenv.cc:_ZN7leveldb12_GLOBAL__N_111InMemoryEnvD2Ev:
  229|      4|  ~InMemoryEnv() override {
  230|     12|    for (const auto& kvp : file_map_) {
  ------------------
  |  Branch (230:26): [True: 12, False: 4]
  ------------------
  231|     12|      kvp.second->Unref();
  232|     12|    }
  233|      4|  }
memenv.cc:_ZN7leveldb12_GLOBAL__N_19FileState5UnrefEv:
   41|     20|  void Unref() {
   42|     20|    bool do_delete = false;
   43|       |
   44|     20|    {
   45|     20|      MutexLock lock(&refs_mutex_);
   46|     20|      --refs_;
   47|     20|      assert(refs_ >= 0);
   48|     20|      if (refs_ <= 0) {
  ------------------
  |  Branch (48:11): [True: 12, False: 8]
  ------------------
   49|     12|        do_delete = true;
   50|     12|      }
   51|     20|    }
   52|       |
   53|     20|    if (do_delete) {
  ------------------
  |  Branch (53:9): [True: 12, False: 8]
  ------------------
   54|     12|      delete this;
   55|     12|    }
   56|     20|  }
memenv.cc:_ZN7leveldb12_GLOBAL__N_19FileStateD2Ev:
  143|     12|  ~FileState() { Truncate(); }
memenv.cc:_ZN7leveldb12_GLOBAL__N_19FileState8TruncateEv:
   63|     12|  void Truncate() {
   64|     12|    MutexLock lock(&blocks_mutex_);
   65|     12|    for (char*& block : blocks_) {
  ------------------
  |  Branch (65:23): [True: 10, False: 12]
  ------------------
   66|     10|      delete[] block;
   67|     10|    }
   68|     12|    blocks_.clear();
   69|     12|    size_ = 0;
   70|     12|  }
memenv.cc:_ZN7leveldb12_GLOBAL__N_116WritableFileImplD2Ev:
  207|      8|  ~WritableFileImpl() override { file_->Unref(); }
memenv.cc:_ZN7leveldb12_GLOBAL__N_111InMemoryEnv10UnlockFileEPNS_8FileLockE:
  367|      4|  Status UnlockFile(FileLock* lock) override {
  368|      4|    delete lock;
  369|      4|    return Status::OK();
  370|      4|  }

_ZN7leveldb6StatusD2Ev:
   28|      8|  ~Status() { delete[] state_; }
_ZN7leveldb6StatusC2Ev:
   27|      4|  Status() noexcept : state_(nullptr) {}
_ZN7leveldb6Status2OKEv:
   37|      4|  static Status OK() { return Status(); }

_ZN7leveldb4port7CondVarD2Ev:
   68|      4|  ~CondVar() = default;
_ZN7leveldb4port5Mutex4LockEv:
   55|     36|  void Lock() EXCLUSIVE_LOCK_FUNCTION() { mu_.lock(); }
_ZN7leveldb4port5Mutex6UnlockEv:
   56|     36|  void Unlock() UNLOCK_FUNCTION() { mu_.unlock(); }

_ZN7leveldb5ArenaD2Ev:
   14|      4|Arena::~Arena() {
   15|      8|  for (size_t i = 0; i < blocks_.size(); i++) {
  ------------------
  |  Branch (15:22): [True: 4, False: 4]
  ------------------
   16|      4|    delete[] blocks_[i];
   17|      4|  }
   18|      4|}

_ZN7leveldb5CacheD2Ev:
   17|      8|Cache::~Cache() {}
cache.cc:_ZN7leveldb12_GLOBAL__N_18LRUCacheD2Ev:
  205|    128|LRUCache::~LRUCache() {
  206|    128|  assert(in_use_.next == &in_use_);  // Error if caller has an unreleased handle
  207|    128|  for (LRUHandle* e = lru_.next; e != &lru_;) {
  ------------------
  |  Branch (207:34): [True: 0, False: 128]
  ------------------
  208|      0|    LRUHandle* next = e->next;
  209|      0|    assert(e->in_cache);
  210|      0|    e->in_cache = false;
  211|      0|    assert(e->refs == 1);  // Invariant of lru_ list.
  212|      0|    Unref(e);
  213|      0|    e = next;
  214|      0|  }
  215|    128|}
cache.cc:_ZN7leveldb12_GLOBAL__N_111HandleTableD2Ev:
   72|    128|  ~HandleTable() { delete[] list_; }
cache.cc:_ZN7leveldb12_GLOBAL__N_115ShardedLRUCacheD2Ev:
  357|      8|  ~ShardedLRUCache() override {}

_ZN7leveldb10ComparatorD2Ev:
   18|     16|Comparator::~Comparator() = default;

_ZN7leveldb3EnvD2Ev:
    9|      4|Env::~Env() = default;
_ZN7leveldb12WritableFileD2Ev:
   19|      8|WritableFile::~WritableFile() = default;
_ZN7leveldb6LoggerD2Ev:
   21|      4|Logger::~Logger() = default;
_ZN7leveldb8FileLockD2Ev:
   23|      4|FileLock::~FileLock() = default;

_ZN7leveldb12FilterPolicyD2Ev:
    9|      8|FilterPolicy::~FilterPolicy() {}

_ZN7leveldb9MutexLockC2EPNS_4port5MutexE:
   25|     32|  explicit MutexLock(port::Mutex* mu) EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
   26|     32|    this->mu_->Lock();
   27|     32|  }
_ZN7leveldb9MutexLockD2Ev:
   28|     32|  ~MutexLock() UNLOCK_FUNCTION() { this->mu_->Unlock(); }

_Z11LogInstancev:
   25|  14.2k|{
   26|       |/**
   27|       | * NOTE: the logger instances is leaked on exit. This is ugly, but will be
   28|       | * cleaned up by the OS/libc. Defining a logger as a global object doesn't work
   29|       | * since the order of destruction of static/global objects is undefined.
   30|       | * Consider if the logger gets destroyed, and then some later destructor calls
   31|       | * LogPrintf, maybe indirectly, and you get a core dump at shutdown trying to
   32|       | * access the logger. When the shutdown sequence is fully audited and tested,
   33|       | * explicit destruction of these objects can be implemented by changing this
   34|       | * from a raw pointer to a std::unique_ptr.
   35|       | * Since the ~Logger() destructor is never called, the Logger class and all
   36|       | * its subclasses must have implicitly-defined destructors.
   37|       | *
   38|       | * This method of initialization was originally introduced in
   39|       | * ee3374234c60aba2cc4c5cd5cac1c0aefc2d817c.
   40|       | */
   41|  14.2k|    static BCLog::Logger* g_logger{new BCLog::Logger()};
   42|  14.2k|    return *g_logger;
   43|  14.2k|}
_ZN5BCLog6Logger20DisconnectTestLoggerEv:
   97|      2|{
   98|      2|    StdLockGuard scoped_lock(m_cs);
   99|      2|    m_buffering = true;
  100|      2|    if (m_fileout != nullptr) fclose(m_fileout);
  ------------------
  |  Branch (100:9): [True: 0, False: 2]
  ------------------
  101|      2|    m_fileout = nullptr;
  102|      2|    m_print_callbacks.clear();
  103|      2|    m_max_buffer_memusage = DEFAULT_MAX_LOG_BUFFER;
  104|      2|    m_cur_buffer_memusage = 0;
  105|      2|    m_buffer_lines_discarded = 0;
  106|      2|    m_msgs_before_open.clear();
  107|      2|}

_ZNK5BCLog6Logger7EnabledEv:
  150|  14.2k|        {
  151|  14.2k|            StdLockGuard scoped_lock(m_cs);
  152|  14.2k|            return m_buffering || m_print_to_console || m_print_to_file || !m_print_callbacks.empty();
  ------------------
  |  Branch (152:20): [True: 0, False: 14.2k]
  |  Branch (152:35): [True: 0, False: 14.2k]
  |  Branch (152:57): [True: 0, False: 14.2k]
  |  Branch (152:76): [True: 0, False: 14.2k]
  ------------------
  153|  14.2k|        }
_Z22LogPrintFormatInternalIJNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES6_EEvNS0_17basic_string_viewIcS3_EES8_iN5BCLog8LogFlagsENS9_5LevelEN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  243|  2.55k|{
  244|  2.55k|    if (LogInstance().Enabled()) {
  ------------------
  |  Branch (244:9): [True: 0, False: 2.55k]
  ------------------
  245|      0|        std::string log_msg;
  246|      0|        try {
  247|      0|            log_msg = tfm::format(fmt, args...);
  248|      0|        } catch (tinyformat::format_error& fmterr) {
  249|      0|            log_msg = "Error \"" + std::string{fmterr.what()} + "\" while formatting log message: " + fmt.fmt;
  250|      0|        }
  251|      0|        LogInstance().LogPrintStr(log_msg, logging_function, source_file, source_line, flag, level);
  252|      0|    }
  253|  2.55k|}
_Z22LogPrintFormatInternalIJNSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEEEvS4_S4_iN5BCLog8LogFlagsENS5_5LevelEN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  243|      2|{
  244|      2|    if (LogInstance().Enabled()) {
  ------------------
  |  Branch (244:9): [True: 0, False: 2]
  ------------------
  245|      0|        std::string log_msg;
  246|      0|        try {
  247|      0|            log_msg = tfm::format(fmt, args...);
  248|      0|        } catch (tinyformat::format_error& fmterr) {
  249|      0|            log_msg = "Error \"" + std::string{fmterr.what()} + "\" while formatting log message: " + fmt.fmt;
  250|      0|        }
  251|      0|        LogInstance().LogPrintStr(log_msg, logging_function, source_file, source_line, flag, level);
  252|      0|    }
  253|      2|}
_Z22LogPrintFormatInternalIJPKcNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEvNS2_17basic_string_viewIcS5_EESA_iN5BCLog8LogFlagsENSB_5LevelEN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  243|  11.6k|{
  244|  11.6k|    if (LogInstance().Enabled()) {
  ------------------
  |  Branch (244:9): [True: 0, False: 11.6k]
  ------------------
  245|      0|        std::string log_msg;
  246|      0|        try {
  247|      0|            log_msg = tfm::format(fmt, args...);
  248|      0|        } catch (tinyformat::format_error& fmterr) {
  249|      0|            log_msg = "Error \"" + std::string{fmterr.what()} + "\" while formatting log message: " + fmt.fmt;
  250|      0|        }
  251|      0|        LogInstance().LogPrintStr(log_msg, logging_function, source_file, source_line, flag, level);
  252|      0|    }
  253|  11.6k|}

_ZN8CConnman9InterruptEv:
 3416|      2|{
 3417|      2|    {
 3418|      2|        LOCK(mutexMsgProc);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3419|      2|        flagInterruptMsgProc = true;
 3420|      2|    }
 3421|      2|    condMsgProc.notify_all();
 3422|       |
 3423|      2|    interruptNet();
 3424|      2|    g_socks5_interrupt();
 3425|       |
 3426|      2|    if (semOutbound) {
  ------------------
  |  Branch (3426:9): [True: 0, False: 2]
  ------------------
 3427|      0|        for (int i=0; i<m_max_automatic_outbound; i++) {
  ------------------
  |  Branch (3427:23): [True: 0, False: 0]
  ------------------
 3428|      0|            semOutbound->post();
 3429|      0|        }
 3430|      0|    }
 3431|       |
 3432|      2|    if (semAddnode) {
  ------------------
  |  Branch (3432:9): [True: 0, False: 2]
  ------------------
 3433|      0|        for (int i=0; i<m_max_addnode; i++) {
  ------------------
  |  Branch (3433:23): [True: 0, False: 0]
  ------------------
 3434|      0|            semAddnode->post();
 3435|      0|        }
 3436|      0|    }
 3437|      2|}
_ZN8CConnman11StopThreadsEv:
 3440|      2|{
 3441|      2|    if (threadI2PAcceptIncoming.joinable()) {
  ------------------
  |  Branch (3441:9): [True: 0, False: 2]
  ------------------
 3442|      0|        threadI2PAcceptIncoming.join();
 3443|      0|    }
 3444|      2|    if (threadMessageHandler.joinable())
  ------------------
  |  Branch (3444:9): [True: 0, False: 2]
  ------------------
 3445|      0|        threadMessageHandler.join();
 3446|      2|    if (threadOpenConnections.joinable())
  ------------------
  |  Branch (3446:9): [True: 0, False: 2]
  ------------------
 3447|      0|        threadOpenConnections.join();
 3448|      2|    if (threadOpenAddedConnections.joinable())
  ------------------
  |  Branch (3448:9): [True: 0, False: 2]
  ------------------
 3449|      0|        threadOpenAddedConnections.join();
 3450|      2|    if (threadDNSAddressSeed.joinable())
  ------------------
  |  Branch (3450:9): [True: 0, False: 2]
  ------------------
 3451|      0|        threadDNSAddressSeed.join();
 3452|      2|    if (threadSocketHandler.joinable())
  ------------------
  |  Branch (3452:9): [True: 0, False: 2]
  ------------------
 3453|      0|        threadSocketHandler.join();
 3454|      2|}
_ZN8CConnman9StopNodesEv:
 3457|      2|{
 3458|      2|    if (fAddressesInitialized) {
  ------------------
  |  Branch (3458:9): [True: 0, False: 2]
  ------------------
 3459|      0|        DumpAddresses();
 3460|      0|        fAddressesInitialized = false;
 3461|       |
 3462|      0|        if (m_use_addrman_outgoing) {
  ------------------
  |  Branch (3462:13): [True: 0, False: 0]
  ------------------
 3463|       |            // Anchor connections are only dumped during clean shutdown.
 3464|      0|            std::vector<CAddress> anchors_to_dump = GetCurrentBlockRelayOnlyConns();
 3465|      0|            if (anchors_to_dump.size() > MAX_BLOCK_RELAY_ONLY_ANCHORS) {
  ------------------
  |  Branch (3465:17): [True: 0, False: 0]
  ------------------
 3466|      0|                anchors_to_dump.resize(MAX_BLOCK_RELAY_ONLY_ANCHORS);
 3467|      0|            }
 3468|      0|            DumpAnchors(gArgs.GetDataDirNet() / ANCHORS_DATABASE_FILENAME, anchors_to_dump);
 3469|      0|        }
 3470|      0|    }
 3471|       |
 3472|       |    // Delete peer connections.
 3473|      2|    std::vector<CNode*> nodes;
 3474|      2|    WITH_LOCK(m_nodes_mutex, nodes.swap(m_nodes));
  ------------------
  |  |  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
 3475|      2|    for (CNode* pnode : nodes) {
  ------------------
  |  Branch (3475:23): [True: 0, False: 2]
  ------------------
 3476|      0|        LogDebug(BCLog::NET, "Stopping node, %s", pnode->DisconnectMsg(fLogIPs));
  ------------------
  |  |  280|      0|#define LogDebug(category, ...) LogPrintLevel(category, BCLog::Level::Debug, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  273|      0|    do {                                                  \
  |  |  |  |  274|      0|        if (LogAcceptCategory((category), (level))) {     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  275|      0|            LogPrintLevel_(category, level, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  255|      0|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  276|      0|        }                                                 \
  |  |  |  |  277|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3477|      0|        pnode->CloseSocketDisconnect();
 3478|      0|        DeleteNode(pnode);
 3479|      0|    }
 3480|       |
 3481|      2|    for (CNode* pnode : m_nodes_disconnected) {
  ------------------
  |  Branch (3481:23): [True: 0, False: 2]
  ------------------
 3482|      0|        DeleteNode(pnode);
 3483|      0|    }
 3484|      2|    m_nodes_disconnected.clear();
 3485|      2|    vhListenSocket.clear();
 3486|      2|    semOutbound.reset();
 3487|      2|    semAddnode.reset();
 3488|      2|}
_ZN8CConnmanD2Ev:
 3498|      2|{
 3499|      2|    Interrupt();
 3500|      2|    Stop();
 3501|      2|}

_ZN8CConnman4StopEv:
 1130|      2|    {
 1131|      2|        StopThreads();
 1132|      2|        StopNodes();
 1133|      2|    };

_ZN11PeerManagerD2Ev:
   86|      2|    virtual ~PeerManager() = default;

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

_ZN4node17TxDownloadManagerD2Ev:
   20|      2|TxDownloadManager::~TxDownloadManager() = default;

_Z25OutputTypeFromDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  110|  2.28k|std::optional<OutputType> OutputTypeFromDestination(const CTxDestination& dest) {
  111|  2.28k|    if (std::holds_alternative<PKHash>(dest) ||
  ------------------
  |  Branch (111:9): [True: 0, False: 2.28k]
  ------------------
  112|  2.28k|        std::holds_alternative<ScriptHash>(dest)) {
  ------------------
  |  Branch (112:9): [True: 34, False: 2.24k]
  ------------------
  113|     34|        return OutputType::LEGACY;
  114|     34|    }
  115|  2.24k|    if (std::holds_alternative<WitnessV0KeyHash>(dest) ||
  ------------------
  |  Branch (115:9): [True: 0, False: 2.24k]
  ------------------
  116|  2.24k|        std::holds_alternative<WitnessV0ScriptHash>(dest)) {
  ------------------
  |  Branch (116:9): [True: 53, False: 2.19k]
  ------------------
  117|     53|        return OutputType::BECH32;
  118|     53|    }
  119|  2.19k|    if (std::holds_alternative<WitnessV1Taproot>(dest) ||
  ------------------
  |  Branch (119:9): [True: 44, False: 2.14k]
  ------------------
  120|  2.19k|        std::holds_alternative<WitnessUnknown>(dest)) {
  ------------------
  |  Branch (120:9): [True: 692, False: 1.45k]
  ------------------
  121|    736|        return OutputType::BECH32M;
  122|    736|    }
  123|  1.45k|    return std::nullopt;
  124|  2.19k|}

_ZN8CFeeRateC2ITkNSt3__18integralElEET_:
   42|  58.3k|    explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
   43|  58.3k|    }

_ZN9prevectorILj28EhjiE3endEv:
  304|  11.1M|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj28EhjiE8item_ptrEi:
  206|  34.1M|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (206:47): [True: 4.04M, False: 30.0M]
  ------------------
_ZNK9prevectorILj28EhjiE9is_directEv:
  173|   121M|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj28EhjiE10direct_ptrEi:
  169|  4.39M|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj28EhjiE12indirect_ptrEi:
  171|  30.0M|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj28EhjiE6insertENS0_8iteratorERKh:
  359|  4.23M|    iterator insert(iterator pos, const T& value) {
  360|  4.23M|        size_type p = pos - begin();
  361|  4.23M|        size_type new_size = size() + 1;
  362|  4.23M|        if (capacity() < new_size) {
  ------------------
  |  Branch (362:13): [True: 10.2k, False: 4.22M]
  ------------------
  363|  10.2k|            change_capacity(new_size + (new_size >> 1));
  364|  10.2k|        }
  365|  4.23M|        T* ptr = item_ptr(p);
  366|  4.23M|        T* dst = ptr + 1;
  367|  4.23M|        memmove(dst, ptr, (size() - p) * sizeof(T));
  368|  4.23M|        _size++;
  369|  4.23M|        new(static_cast<void*>(ptr)) T(value);
  370|  4.23M|        return iterator(ptr);
  371|  4.23M|    }
_ZN9prevectorILj28EhjiE5beginEv:
  302|  11.0M|    iterator begin() { return iterator(item_ptr(0)); }
_ZmiN9prevectorILj28EhjiE8iteratorES1_:
   66|  11.0M|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj28EhjiE8iteratordeEv:
   59|  29.3M|        T& operator*() const { return *ptr; }
_ZNK9prevectorILj28EhjiE8capacityEv:
  312|  11.3M|    size_t capacity() const {
  313|  11.3M|        if (is_direct()) {
  ------------------
  |  Branch (313:13): [True: 1.37M, False: 9.92M]
  ------------------
  314|  1.37M|            return N;
  315|  9.92M|        } else {
  316|  9.92M|            return _union.indirect_contents.capacity;
  317|  9.92M|        }
  318|  11.3M|    }
_ZN9prevectorILj28EhjiE15change_capacityEj:
  175|   860k|    void change_capacity(size_type new_capacity) {
  176|   860k|        if (new_capacity <= N) {
  ------------------
  |  Branch (176:13): [True: 408k, False: 451k]
  ------------------
  177|   408k|            if (!is_direct()) {
  ------------------
  |  Branch (177:17): [True: 0, False: 408k]
  ------------------
  178|      0|                T* indirect = indirect_ptr(0);
  179|      0|                T* src = indirect;
  180|      0|                T* dst = direct_ptr(0);
  181|      0|                memcpy(dst, src, size() * sizeof(T));
  182|      0|                free(indirect);
  183|      0|                _size -= N + 1;
  184|      0|            }
  185|   451k|        } else {
  186|   451k|            if (!is_direct()) {
  ------------------
  |  Branch (186:17): [True: 100k, False: 351k]
  ------------------
  187|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  188|       |                    success. These should instead use an allocator or new/delete so that handlers
  189|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  190|   100k|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  191|   100k|                assert(_union.indirect_contents.indirect);
  192|   100k|                _union.indirect_contents.capacity = new_capacity;
  193|   351k|            } else {
  194|   351k|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  195|   351k|                assert(new_indirect);
  196|   351k|                T* src = direct_ptr(0);
  197|   351k|                T* dst = reinterpret_cast<T*>(new_indirect);
  198|   351k|                memcpy(dst, src, size() * sizeof(T));
  199|   351k|                _union.indirect_contents.indirect = new_indirect;
  200|   351k|                _union.indirect_contents.capacity = new_capacity;
  201|   351k|                _size += N + 1;
  202|   351k|            }
  203|   451k|        }
  204|   860k|    }
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvNS0_8iteratorET_S8_:
  387|  2.55M|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  2.55M|        size_type p = pos - begin();
  389|  2.55M|        difference_type count = last - first;
  390|  2.55M|        size_type new_size = size() + count;
  391|  2.55M|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 80.8k, False: 2.47M]
  ------------------
  392|  80.8k|            change_capacity(new_size + (new_size >> 1));
  393|  80.8k|        }
  394|  2.55M|        T* ptr = item_ptr(p);
  395|  2.55M|        T* dst = ptr + count;
  396|  2.55M|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  2.55M|        _size += count;
  398|  2.55M|        fill(ptr, first, last);
  399|  2.55M|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvPhT_S8_:
  214|  2.55M|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|   118M|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 115M, False: 2.55M]
  ------------------
  216|   115M|            new(static_cast<void*>(dst)) T(*first);
  217|   115M|            ++dst;
  218|   115M|            ++first;
  219|   115M|        }
  220|  2.55M|    }
_ZN9prevectorILj28EhjiE9push_backERKh:
  444|  98.9k|    void push_back(const T& value) {
  445|  98.9k|        emplace_back(value);
  446|  98.9k|    }
_ZN9prevectorILj28EhjiE12emplace_backIJRKhEEEvDpOT_:
  435|  98.9k|    void emplace_back(Args&&... args) {
  436|  98.9k|        size_type new_size = size() + 1;
  437|  98.9k|        if (capacity() < new_size) {
  ------------------
  |  Branch (437:13): [True: 1.02k, False: 97.9k]
  ------------------
  438|  1.02k|            change_capacity(new_size + (new_size >> 1));
  439|  1.02k|        }
  440|  98.9k|        new(item_ptr(size())) T(std::forward<Args>(args)...);
  441|  98.9k|        _size++;
  442|  98.9k|    }
_ZNK9prevectorILj28EhjiE3endEv:
  305|  13.6M|    const_iterator end() const { return const_iterator(item_ptr(size())); }
_ZNK9prevectorILj28EhjiE8item_ptrEi:
  207|  18.9M|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (207:59): [True: 7.37M, False: 11.5M]
  ------------------
_ZNK9prevectorILj28EhjiE10direct_ptrEi:
  170|  7.37M|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj28EhjiE12indirect_ptrEi:
  172|  11.5M|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZNK9prevectorILj28EhjiE4sizeEv:
  294|  54.3M|    size_type size() const {
  295|  54.3M|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (295:16): [True: 12.3M, False: 41.9M]
  ------------------
  296|  54.3M|    }
_ZNK9prevectorILj28EhjiE5beginEv:
  303|  4.48M|    const_iterator begin() const { return const_iterator(item_ptr(0)); }
_ZNK9prevectorILj28EhjiE14const_iteratordeEv:
  111|   120M|        const T& operator*() const { return *ptr; }
_ZN9prevectorILj28EhjiE5clearEv:
  355|   288k|    void clear() {
  356|   288k|        resize(0);
  357|   288k|    }
_ZN9prevectorILj28EhjiE6resizeEj:
  328|   295k|    void resize(size_type new_size) {
  329|   295k|        size_type cur_size = size();
  330|   295k|        if (cur_size == new_size) {
  ------------------
  |  Branch (330:13): [True: 267k, False: 27.9k]
  ------------------
  331|   267k|            return;
  332|   267k|        }
  333|  27.9k|        if (cur_size > new_size) {
  ------------------
  |  Branch (333:13): [True: 21.4k, False: 6.47k]
  ------------------
  334|  21.4k|            erase(item_ptr(new_size), end());
  335|  21.4k|            return;
  336|  21.4k|        }
  337|  6.47k|        if (new_size > capacity()) {
  ------------------
  |  Branch (337:13): [True: 4.47k, False: 1.99k]
  ------------------
  338|  4.47k|            change_capacity(new_size);
  339|  4.47k|        }
  340|  6.47k|        ptrdiff_t increase = new_size - cur_size;
  341|  6.47k|        fill(item_ptr(cur_size), increase);
  342|  6.47k|        _size += increase;
  343|  6.47k|    }
_ZN9prevectorILj28EhjiE5eraseENS0_8iteratorES1_:
  420|  21.4k|    iterator erase(iterator first, iterator last) {
  421|       |        // Erase is not allowed to the change the object's capacity. That means
  422|       |        // that when starting with an indirectly allocated prevector with
  423|       |        // size and capacity > N, the result may be a still indirectly allocated
  424|       |        // prevector with size <= N and capacity > N. A shrink_to_fit() call is
  425|       |        // necessary to switch to the (more efficient) directly allocated
  426|       |        // representation (with capacity N and size <= N).
  427|  21.4k|        iterator p = first;
  428|  21.4k|        char* endp = (char*)&(*end());
  429|  21.4k|        _size -= last - p;
  430|  21.4k|        memmove(&(*first), &(*last), endp - ((char*)(&(*last))));
  431|  21.4k|        return first;
  432|  21.4k|    }
_ZN9prevectorILj28EhjiE4fillEPhlRKh:
  209|  6.47k|    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
  210|  6.47k|        std::fill_n(dst, count, value);
  211|  6.47k|    }
_ZN9prevectorILj28EhjiE13shrink_to_fitEv:
  351|  34.0k|    void shrink_to_fit() {
  352|  34.0k|        change_capacity(size());
  353|  34.0k|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS0_14const_iteratorEEEvPhT_S5_:
  214|  3.01M|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|  50.4M|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 47.4M, False: 3.01M]
  ------------------
  216|  47.4M|            new(static_cast<void*>(dst)) T(*first);
  217|  47.4M|            ++dst;
  218|  47.4M|            ++first;
  219|  47.4M|        }
  220|  3.01M|    }
_ZNK9prevectorILj28EhjiE14const_iteratorneES1_:
  125|  56.8M|        bool operator!=(const_iterator x) const { return ptr != x.ptr; }
_ZN9prevectorILj28EhjiE14const_iteratorppEv:
  114|  68.5M|        const_iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj28EhjiEeqERKS0_:
  481|  1.61k|    bool operator==(const prevector<N, T, Size, Diff>& other) const {
  482|  1.61k|        if (other.size() != size()) {
  ------------------
  |  Branch (482:13): [True: 0, False: 1.61k]
  ------------------
  483|      0|            return false;
  484|      0|        }
  485|  1.61k|        const_iterator b1 = begin();
  486|  1.61k|        const_iterator b2 = other.begin();
  487|  1.61k|        const_iterator e1 = end();
  488|  47.6k|        while (b1 != e1) {
  ------------------
  |  Branch (488:16): [True: 46.0k, False: 1.61k]
  ------------------
  489|  46.0k|            if ((*b1) != (*b2)) {
  ------------------
  |  Branch (489:17): [True: 0, False: 46.0k]
  ------------------
  490|      0|                return false;
  491|      0|            }
  492|  46.0k|            ++b1;
  493|  46.0k|            ++b2;
  494|  46.0k|        }
  495|  1.61k|        return true;
  496|  1.61k|    }
_ZNK9prevectorILj28EhjiEltERKS0_:
  502|   476k|    bool operator<(const prevector<N, T, Size, Diff>& other) const {
  503|   476k|        if (size() < other.size()) {
  ------------------
  |  Branch (503:13): [True: 59.7k, False: 417k]
  ------------------
  504|  59.7k|            return true;
  505|  59.7k|        }
  506|   417k|        if (size() > other.size()) {
  ------------------
  |  Branch (506:13): [True: 36.0k, False: 381k]
  ------------------
  507|  36.0k|            return false;
  508|  36.0k|        }
  509|   381k|        const_iterator b1 = begin();
  510|   381k|        const_iterator b2 = other.begin();
  511|   381k|        const_iterator e1 = end();
  512|  6.36M|        while (b1 != e1) {
  ------------------
  |  Branch (512:16): [True: 6.19M, False: 163k]
  ------------------
  513|  6.19M|            if ((*b1) < (*b2)) {
  ------------------
  |  Branch (513:17): [True: 136k, False: 6.06M]
  ------------------
  514|   136k|                return true;
  515|   136k|            }
  516|  6.06M|            if ((*b2) < (*b1)) {
  ------------------
  |  Branch (516:17): [True: 80.8k, False: 5.98M]
  ------------------
  517|  80.8k|                return false;
  518|  80.8k|            }
  519|  5.98M|            ++b1;
  520|  5.98M|            ++b2;
  521|  5.98M|        }
  522|   163k|        return false;
  523|   381k|    }
_ZN9prevectorILj33EhjiE4dataEv:
  533|  5.53k|    value_type* data() {
  534|  5.53k|        return item_ptr(0);
  535|  5.53k|    }
_ZN9prevectorILj33EhjiE8item_ptrEi:
  206|  11.0k|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (206:47): [True: 11.0k, False: 0]
  ------------------
_ZNK9prevectorILj33EhjiE9is_directEv:
  173|  33.1k|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj33EhjiE10direct_ptrEi:
  169|  11.0k|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZNK9prevectorILj33EhjiE4sizeEv:
  294|  5.53k|    size_type size() const {
  295|  5.53k|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (295:16): [True: 5.53k, False: 0]
  ------------------
  296|  5.53k|    }
_ZNK9prevectorILj28EhjiE4dataEv:
  537|   184k|    const value_type* data() const {
  538|   184k|        return item_ptr(0);
  539|   184k|    }
_ZN9prevectorILj28EhjiE4dataEv:
  533|  2.90k|    value_type* data() {
  534|  2.90k|        return item_ptr(0);
  535|  2.90k|    }
_ZNK9prevectorILj28EhjiE5emptyEv:
  298|   166k|    bool empty() const {
  299|   166k|        return size() == 0;
  300|   166k|    }
_ZNK9prevectorILj28EhjiEixEj:
  324|   574k|    const T& operator[](size_type pos) const {
  325|   574k|        return *item_ptr(pos);
  326|   574k|    }
_ZN9prevectorILj28EhjiED2Ev:
  474|  1.60M|    ~prevector() {
  475|  1.60M|        if (!is_direct()) {
  ------------------
  |  Branch (475:13): [True: 337k, False: 1.26M]
  ------------------
  476|   337k|            free(_union.indirect_contents.indirect);
  477|   337k|            _union.indirect_contents.indirect = nullptr;
  478|   337k|        }
  479|  1.60M|    }
_ZN9prevectorILj28EhjiEC2EOS0_:
  271|   224k|        : _union(std::move(other._union)), _size(other._size)
  272|   224k|    {
  273|   224k|        other._size = 0;
  274|   224k|    }
_ZN9prevectorILj28EhjiEC2Ev:
  243|   790k|    prevector() = default;
_ZN9prevectorILj28EhjiE8iteratorC2EPh:
   58|  26.4M|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj28EhjiE20resize_uninitializedEj:
  401|  59.1k|    inline void resize_uninitialized(size_type new_size) {
  402|       |        // resize_uninitialized changes the size of the prevector but does not initialize it.
  403|       |        // If size < new_size, the added elements must be initialized explicitly.
  404|  59.1k|        if (capacity() < new_size) {
  ------------------
  |  Branch (404:13): [True: 40.5k, False: 18.6k]
  ------------------
  405|  40.5k|            change_capacity(new_size);
  406|  40.5k|            _size += new_size - size();
  407|  40.5k|            return;
  408|  40.5k|        }
  409|  18.6k|        if (new_size < size()) {
  ------------------
  |  Branch (409:13): [True: 0, False: 18.6k]
  ------------------
  410|      0|            erase(item_ptr(new_size), end());
  411|  18.6k|        } else {
  412|  18.6k|            _size += new_size - size();
  413|  18.6k|        }
  414|  18.6k|    }
_ZN9prevectorILj28EhjiEixEj:
  320|  73.9k|    T& operator[](size_type pos) {
  321|  73.9k|        return *item_ptr(pos);
  322|  73.9k|    }
_ZN9prevectorILj28EhjiE14const_iteratorC2EPKh:
  109|  20.5M|        const_iterator(const T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj28EhjiEC2ERKS0_:
  263|   565k|    prevector(const prevector<N, T, Size, Diff>& other) {
  264|   565k|        size_type n = other.size();
  265|   565k|        change_capacity(n);
  266|   565k|        _size += n;
  267|   565k|        fill(item_ptr(0), other.begin(),  other.end());
  268|   565k|    }
_ZN9prevectorILj33EhjiEC2EjRKh:
  249|  5.53k|    explicit prevector(size_type n, const T& val) {
  250|  5.53k|        change_capacity(n);
  251|  5.53k|        _size += n;
  252|  5.53k|        fill(item_ptr(0), n, val);
  253|  5.53k|    }
_ZN9prevectorILj33EhjiE15change_capacityEj:
  175|  5.53k|    void change_capacity(size_type new_capacity) {
  176|  5.53k|        if (new_capacity <= N) {
  ------------------
  |  Branch (176:13): [True: 5.53k, False: 0]
  ------------------
  177|  5.53k|            if (!is_direct()) {
  ------------------
  |  Branch (177:17): [True: 0, False: 5.53k]
  ------------------
  178|      0|                T* indirect = indirect_ptr(0);
  179|      0|                T* src = indirect;
  180|      0|                T* dst = direct_ptr(0);
  181|      0|                memcpy(dst, src, size() * sizeof(T));
  182|      0|                free(indirect);
  183|      0|                _size -= N + 1;
  184|      0|            }
  185|  5.53k|        } else {
  186|      0|            if (!is_direct()) {
  ------------------
  |  Branch (186:17): [True: 0, False: 0]
  ------------------
  187|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  188|       |                    success. These should instead use an allocator or new/delete so that handlers
  189|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  190|      0|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  191|      0|                assert(_union.indirect_contents.indirect);
  192|      0|                _union.indirect_contents.capacity = new_capacity;
  193|      0|            } else {
  194|      0|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  195|      0|                assert(new_indirect);
  196|      0|                T* src = direct_ptr(0);
  197|      0|                T* dst = reinterpret_cast<T*>(new_indirect);
  198|      0|                memcpy(dst, src, size() * sizeof(T));
  199|      0|                _union.indirect_contents.indirect = new_indirect;
  200|      0|                _union.indirect_contents.capacity = new_capacity;
  201|      0|                _size += N + 1;
  202|      0|            }
  203|      0|        }
  204|  5.53k|    }
_ZN9prevectorILj33EhjiE4fillEPhlRKh:
  209|  5.53k|    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
  210|  5.53k|        std::fill_n(dst, count, value);
  211|  5.53k|    }
_ZN9prevectorILj33EhjiED2Ev:
  474|  5.53k|    ~prevector() {
  475|  5.53k|        if (!is_direct()) {
  ------------------
  |  Branch (475:13): [True: 0, False: 5.53k]
  ------------------
  476|      0|            free(_union.indirect_contents.indirect);
  477|      0|            _union.indirect_contents.indirect = nullptr;
  478|      0|        }
  479|  5.53k|    }
_ZN9prevectorILj28EhjiEaSERKS0_:
  276|   129k|    prevector& operator=(const prevector<N, T, Size, Diff>& other) {
  277|   129k|        if (&other == this) {
  ------------------
  |  Branch (277:13): [True: 0, False: 129k]
  ------------------
  278|      0|            return *this;
  279|      0|        }
  280|   129k|        assign(other.begin(), other.end());
  281|   129k|        return *this;
  282|   129k|    }
_ZN9prevectorILj28EhjiE6assignITkNSt3__114input_iteratorENS0_14const_iteratorEEEvT_S4_:
  233|   129k|    void assign(InputIterator first, InputIterator last) {
  234|   129k|        size_type n = last - first;
  235|   129k|        clear();
  236|   129k|        if (capacity() < n) {
  ------------------
  |  Branch (236:13): [True: 23.2k, False: 106k]
  ------------------
  237|  23.2k|            change_capacity(n);
  238|  23.2k|        }
  239|   129k|        _size += n;
  240|   129k|        fill(item_ptr(0), first, last);
  241|   129k|    }
_ZmiN9prevectorILj28EhjiE14const_iteratorES1_:
  118|  19.9M|        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj28EhjiE8iteratorptEv:
   60|    592|        T* operator->() const { return ptr; }
_ZN9prevectorILj28EhjiEaSEOS0_:
  284|   119k|    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
  285|   119k|        if (!is_direct()) {
  ------------------
  |  Branch (285:13): [True: 14.3k, False: 105k]
  ------------------
  286|  14.3k|            free(_union.indirect_contents.indirect);
  287|  14.3k|        }
  288|   119k|        _union = std::move(other._union);
  289|   119k|        _size = other._size;
  290|   119k|        other._size = 0;
  291|   119k|        return *this;
  292|   119k|    }
_ZN9prevectorILj28EhjiEC2ITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEET_S7_:
  256|  2.35k|    prevector(InputIterator first, InputIterator last) {
  257|  2.35k|        size_type n = last - first;
  258|  2.35k|        change_capacity(n);
  259|  2.35k|        _size += n;
  260|  2.35k|        fill(item_ptr(0), first, last);
  261|  2.35k|    }
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS0_8iteratorEEEvS3_T_S4_:
  387|  21.2k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  21.2k|        size_type p = pos - begin();
  389|  21.2k|        difference_type count = last - first;
  390|  21.2k|        size_type new_size = size() + count;
  391|  21.2k|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 10.4k, False: 10.8k]
  ------------------
  392|  10.4k|            change_capacity(new_size + (new_size >> 1));
  393|  10.4k|        }
  394|  21.2k|        T* ptr = item_ptr(p);
  395|  21.2k|        T* dst = ptr + count;
  396|  21.2k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  21.2k|        _size += count;
  398|  21.2k|        fill(ptr, first, last);
  399|  21.2k|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS0_8iteratorEEEvPhT_S5_:
  214|  21.2k|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|  7.06M|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 7.04M, False: 21.2k]
  ------------------
  216|  7.04M|            new(static_cast<void*>(dst)) T(*first);
  217|  7.04M|            ++dst;
  218|  7.04M|            ++first;
  219|  7.04M|        }
  220|  21.2k|    }
_ZNK9prevectorILj28EhjiE8iteratorneES1_:
   73|  7.06M|        bool operator!=(iterator x) const { return ptr != x.ptr; }
_ZN9prevectorILj28EhjiE8iteratorppEv:
   62|  7.04M|        iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj28EhjiE14const_iteratorptEv:
  112|  10.6M|        const T* operator->() const { return ptr; }
_ZN9prevectorILj28EhjiEC2ITkNSt3__114input_iteratorENS2_11__wrap_iterIPhEEEET_S6_:
  256|  4.22k|    prevector(InputIterator first, InputIterator last) {
  257|  4.22k|        size_type n = last - first;
  258|  4.22k|        change_capacity(n);
  259|  4.22k|        _size += n;
  260|  4.22k|        fill(item_ptr(0), first, last);
  261|  4.22k|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPhEEEEvS4_T_S6_:
  214|  1.90M|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|  69.7M|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 67.8M, False: 1.90M]
  ------------------
  216|  67.8M|            new(static_cast<void*>(dst)) T(*first);
  217|  67.8M|            ++dst;
  218|  67.8M|            ++first;
  219|  67.8M|        }
  220|  1.90M|    }
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS2_11__wrap_iterIPhEEEEvNS0_8iteratorET_S7_:
  387|  1.89M|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  1.89M|        size_type p = pos - begin();
  389|  1.89M|        difference_type count = last - first;
  390|  1.89M|        size_type new_size = size() + count;
  391|  1.89M|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 1.06k, False: 1.89M]
  ------------------
  392|  1.06k|            change_capacity(new_size + (new_size >> 1));
  393|  1.06k|        }
  394|  1.89M|        T* ptr = item_ptr(p);
  395|  1.89M|        T* dst = ptr + count;
  396|  1.89M|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  1.89M|        _size += count;
  398|  1.89M|        fill(ptr, first, last);
  399|  1.89M|    }
_ZNK9prevectorILj28EhjiE14const_iteratorltES1_:
  129|  6.89M|        bool operator<(const_iterator x) const { return ptr < x.ptr; }
_ZNK9prevectorILj33EhjiE4dataEv:
  537|  5.50k|    const value_type* data() const {
  538|  5.50k|        return item_ptr(0);
  539|  5.50k|    }
_ZNK9prevectorILj33EhjiE8item_ptrEi:
  207|  5.50k|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (207:59): [True: 5.50k, False: 0]
  ------------------
_ZNK9prevectorILj33EhjiE10direct_ptrEi:
  170|  5.50k|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj28EhjiE4backEv:
  464|   100k|    const T& back() const {
  465|   100k|        return *item_ptr(size() - 1);
  466|   100k|    }
_ZNK9prevectorILj28EhjiE14const_iteratorplEj:
  119|  2.43M|        const_iterator operator+(size_type n) const { return const_iterator(ptr + n); }
_ZNK9prevectorILj28EhjiE14const_iteratoreqES1_:
  124|  3.26k|        bool operator==(const_iterator x) const { return ptr == x.ptr; }
_ZN9prevectorILj28EhjiE14const_iteratorpLEj:
  121|  2.51M|        const_iterator& operator+=(size_type n) { ptr += n; return *this; }
_ZN9prevectorILj28EhjiE14const_iteratorC2ENS0_8iteratorE:
  110|  72.3k|        const_iterator(iterator x) : ptr(&(*x)) {}
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS0_14const_iteratorEEEvNS0_8iteratorET_S5_:
  387|  2.29M|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  2.29M|        size_type p = pos - begin();
  389|  2.29M|        difference_type count = last - first;
  390|  2.29M|        size_type new_size = size() + count;
  391|  2.29M|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 63.1k, False: 2.23M]
  ------------------
  392|  63.1k|            change_capacity(new_size + (new_size >> 1));
  393|  63.1k|        }
  394|  2.29M|        T* ptr = item_ptr(p);
  395|  2.29M|        T* dst = ptr + count;
  396|  2.29M|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  2.29M|        _size += count;
  398|  2.29M|        fill(ptr, first, last);
  399|  2.29M|    }
_ZN9prevectorILj28EhjiEC2ITkNSt3__114input_iteratorENS0_14const_iteratorEEET_S4_:
  256|  19.5k|    prevector(InputIterator first, InputIterator last) {
  257|  19.5k|        size_type n = last - first;
  258|  19.5k|        change_capacity(n);
  259|  19.5k|        _size += n;
  260|  19.5k|        fill(item_ptr(0), first, last);
  261|  19.5k|    }
_ZNK9prevectorILj28EhjiE14const_iteratorixEj:
  113|  3.69k|        const T& operator[](size_type pos) const { return ptr[pos]; }
_ZNK9prevectorILj28EhjiE14const_iteratorgeES1_:
  126|  9.05M|        bool operator>=(const_iterator x) const { return ptr >= x.ptr; }
_ZN9prevectorILj28EhjiE14const_iteratorppEi:
  116|  9.04M|        const_iterator operator++(int) { const_iterator copy(*this); ++(*this); return copy; }

_ZN6CTxOutC2ERKl7CScript:
   56|  1.80k|{
   57|  1.80k|    nValue = nValueIn;
   58|  1.80k|    scriptPubKey = scriptPubKeyIn;
   59|  1.80k|}
_ZN19CMutableTransactionC2Ev:
   66|  10.2k|CMutableTransaction::CMutableTransaction() : version{CTransaction::CURRENT_VERSION}, nLockTime{0} {}
_ZNK12CTransaction17ComputeHasWitnessEv:
   75|  2.81k|{
   76|  2.81k|    return std::any_of(vin.begin(), vin.end(), [](const auto& input) {
   77|  2.81k|        return !input.scriptWitness.IsNull();
   78|  2.81k|    });
   79|  2.81k|}
_ZNK12CTransaction11ComputeHashEv:
   82|  2.81k|{
   83|  2.81k|    return Txid::FromUint256((HashWriter{} << TX_NO_WITNESS(*this)).GetHash());
   84|  2.81k|}
_ZNK12CTransaction18ComputeWitnessHashEv:
   87|  2.81k|{
   88|  2.81k|    if (!HasWitness()) {
  ------------------
  |  Branch (88:9): [True: 2.72k, False: 89]
  ------------------
   89|  2.72k|        return Wtxid::FromUint256(hash.ToUint256());
   90|  2.72k|    }
   91|       |
   92|     89|    return Wtxid::FromUint256((HashWriter{} << TX_WITH_WITNESS(*this)).GetHash());
   93|  2.81k|}
_ZN12CTransactionC2ERK19CMutableTransaction:
   95|  2.78k|CTransaction::CTransaction(const CMutableTransaction& tx) : vin(tx.vin), vout(tx.vout), version{tx.version}, nLockTime{tx.nLockTime}, m_has_witness{ComputeHasWitness()}, hash{ComputeHash()}, m_witness_hash{ComputeWitnessHash()} {}
_ZN12CTransactionC2EO19CMutableTransaction:
   96|     26|CTransaction::CTransaction(CMutableTransaction&& tx) : vin(std::move(tx.vin)), vout(std::move(tx.vout)), version{tx.version}, nLockTime{tx.nLockTime}, m_has_witness{ComputeHasWitness()}, hash{ComputeHash()}, m_witness_hash{ComputeWitnessHash()} {}
transaction.cpp:_ZZNK12CTransaction17ComputeHasWitnessEvENK3$_0clI5CTxInEEDaRKT_:
   76|   103k|    return std::any_of(vin.begin(), vin.end(), [](const auto& input) {
   77|   103k|        return !input.scriptWitness.IsNull();
   78|   103k|    });

_ZN9COutPointC2Ev:
   36|   118k|    COutPoint(): n(NULL_INDEX) { }
_ZltRK9COutPointS1_:
   45|   223k|    {
   46|   223k|        return std::tie(a.hash, a.n) < std::tie(b.hash, b.n);
   47|   223k|    }
_ZN5CTxInC2Ev:
  122|   109k|    {
  123|   109k|        nSequence = SEQUENCE_FINAL;
  124|   109k|    }
_ZN6CTxOutC2Ev:
  156|  34.0k|    {
  157|  34.0k|        SetNull();
  158|  34.0k|    }
_ZN6CTxOut7SetNullEv:
  165|  34.0k|    {
  166|  34.0k|        nValue = -1;
  167|  34.0k|        scriptPubKey.clear();
  168|  34.0k|    }
_ZNK6CTxOut6IsNullEv:
  171|  61.2k|    {
  172|  61.2k|        return (nValue == -1);
  173|  61.2k|    }
_ZNK12CTransaction7GetHashEv:
  343|     13|    const Txid& GetHash() const LIFETIMEBOUND { return hash; }
_ZNK12CTransaction10HasWitnessEv:
  373|  2.90k|    bool HasWitness() const { return m_has_witness; }
_ZNK19CMutableTransaction10HasWitnessEv:
  413|     97|    {
  414|    483|        for (size_t i = 0; i < vin.size(); i++) {
  ------------------
  |  Branch (414:28): [True: 477, False: 6]
  ------------------
  415|    477|            if (!vin[i].scriptWitness.IsNull()) {
  ------------------
  |  Branch (415:17): [True: 91, False: 386]
  ------------------
  416|     91|                return true;
  417|     91|            }
  418|    477|        }
  419|      6|        return false;
  420|     97|    }
_ZN12CTransactionC2I12ParamsStreamIR10DataStream20TransactionSerParamsEEE16deserialize_typeRT_:
  337|     30|    CTransaction(deserialize_type, Stream& s) : CTransaction(CMutableTransaction(deserialize, s)) {}
_ZN19CMutableTransactionC2I12ParamsStreamIR10DataStream20TransactionSerParamsEEE16deserialize_typeRT_:
  403|     30|    CMutableTransaction(deserialize_type, Stream& s) {
  404|     30|        Unserialize(s);
  405|     30|    }
_ZN19CMutableTransaction11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  393|  7.14k|    inline void Unserialize(Stream& s) {
  394|  7.14k|        UnserializeTransaction(*this, s, s.template GetParams<TransactionSerParams>());
  395|  7.14k|    }
_Z22UnserializeTransactionI12ParamsStreamIR10DataStream20TransactionSerParamsE19CMutableTransactionEvRT0_RT_RKS3_:
  217|  7.14k|{
  218|  7.14k|    const bool fAllowWitness = params.allow_witness;
  219|       |
  220|  7.14k|    s >> tx.version;
  221|  7.14k|    unsigned char flags = 0;
  222|  7.14k|    tx.vin.clear();
  223|  7.14k|    tx.vout.clear();
  224|       |    /* Try to read the vin. In case the dummy is there, this will be read as an empty vector. */
  225|  7.14k|    s >> tx.vin;
  226|  7.14k|    if (tx.vin.size() == 0 && fAllowWitness) {
  ------------------
  |  Branch (226:9): [True: 1.87k, False: 5.27k]
  |  Branch (226:31): [True: 626, False: 1.24k]
  ------------------
  227|       |        /* We read a dummy or an empty vin. */
  228|    626|        s >> flags;
  229|    626|        if (flags != 0) {
  ------------------
  |  Branch (229:13): [True: 163, False: 463]
  ------------------
  230|    163|            s >> tx.vin;
  231|    163|            s >> tx.vout;
  232|    163|        }
  233|  6.52k|    } else {
  234|       |        /* We read a non-empty vin. Assume a normal vout follows. */
  235|  6.52k|        s >> tx.vout;
  236|  6.52k|    }
  237|  7.14k|    if ((flags & 1) && fAllowWitness) {
  ------------------
  |  Branch (237:9): [True: 136, False: 7.01k]
  |  Branch (237:24): [True: 136, False: 0]
  ------------------
  238|       |        /* The witness flag is present, and we support witnesses. */
  239|    136|        flags ^= 1;
  240|  2.18k|        for (size_t i = 0; i < tx.vin.size(); i++) {
  ------------------
  |  Branch (240:28): [True: 2.04k, False: 136]
  ------------------
  241|  2.04k|            s >> tx.vin[i].scriptWitness.stack;
  242|  2.04k|        }
  243|    136|        if (!tx.HasWitness()) {
  ------------------
  |  Branch (243:13): [True: 6, False: 130]
  ------------------
  244|       |            /* It's illegal to encode witnesses when all witness stacks are empty. */
  245|      6|            throw std::ios_base::failure("Superfluous witness record");
  246|      6|        }
  247|    136|    }
  248|  7.14k|    if (flags) {
  ------------------
  |  Branch (248:9): [True: 4, False: 7.13k]
  ------------------
  249|       |        /* Unknown flag in the serialization */
  250|      4|        throw std::ios_base::failure("Unknown transaction optional data");
  251|      4|    }
  252|  7.13k|    s >> tx.nLockTime;
  253|  7.13k|}
_ZN5CTxIn16SerializationOpsI12ParamsStreamIR10DataStream20TransactionSerParamsES_17ActionUnserializeEEvRT0_RT_T1_:
  129|   109k|    SERIALIZE_METHODS(CTxIn, obj) { READWRITE(obj.prevout, obj.scriptSig, obj.nSequence); }
  ------------------
  |  |  156|   109k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN9COutPoint16SerializationOpsI12ParamsStreamIR10DataStream20TransactionSerParamsES_17ActionUnserializeEEvRT0_RT_T1_:
   39|   109k|    SERIALIZE_METHODS(COutPoint, obj) { READWRITE(obj.hash, obj.n); }
  ------------------
  |  |  156|   109k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN6CTxOut16SerializationOpsI12ParamsStreamIR10DataStream20TransactionSerParamsES_17ActionUnserializeEEvRT0_RT_T1_:
  162|  14.0k|    SERIALIZE_METHODS(CTxOut, obj) { READWRITE(obj.nValue, obj.scriptPubKey); }
  ------------------
  |  |  156|  14.0k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN9COutPoint16SerializationOpsI10DataStreamS_17ActionUnserializeEEvRT0_RT_T1_:
   39|  8.86k|    SERIALIZE_METHODS(COutPoint, obj) { READWRITE(obj.hash, obj.n); }
  ------------------
  |  |  156|  8.86k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN6CTxOut16SerializationOpsI10DataStreamS_17ActionUnserializeEEvRT0_RT_T1_:
  162|    932|    SERIALIZE_METHODS(CTxOut, obj) { READWRITE(obj.nValue, obj.scriptPubKey); }
  ------------------
  |  |  156|    932|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN9COutPoint16SerializationOpsI10HashWriterKS_15ActionSerializeEEvRT0_RT_T1_:
   39|   106k|    SERIALIZE_METHODS(COutPoint, obj) { READWRITE(obj.hash, obj.n); }
  ------------------
  |  |  156|   106k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN6CTxOut16SerializationOpsI10HashWriterKS_15ActionSerializeEEvRT0_RT_T1_:
  162|  12.7k|    SERIALIZE_METHODS(CTxOut, obj) { READWRITE(obj.nValue, obj.scriptPubKey); }
  ------------------
  |  |  156|  12.7k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN5CTxIn16SerializationOpsI12ParamsStreamIR10HashWriter20TransactionSerParamsEKS_15ActionSerializeEEvRT0_RT_T1_:
  129|   105k|    SERIALIZE_METHODS(CTxIn, obj) { READWRITE(obj.prevout, obj.scriptSig, obj.nSequence); }
  ------------------
  |  |  156|   105k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN9COutPoint16SerializationOpsI12ParamsStreamIR10HashWriter20TransactionSerParamsEKS_15ActionSerializeEEvRT0_RT_T1_:
   39|   105k|    SERIALIZE_METHODS(COutPoint, obj) { READWRITE(obj.hash, obj.n); }
  ------------------
  |  |  156|   105k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN6CTxOut16SerializationOpsI12ParamsStreamIR10HashWriter20TransactionSerParamsEKS_15ActionSerializeEEvRT0_RT_T1_:
  162|  13.2k|    SERIALIZE_METHODS(CTxOut, obj) { READWRITE(obj.nValue, obj.scriptPubKey); }
  ------------------
  |  |  156|  13.2k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZNK12CTransaction9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  328|  2.90k|    inline void Serialize(Stream& s) const {
  329|  2.90k|        SerializeTransaction(*this, s, s.template GetParams<TransactionSerParams>());
  330|  2.90k|    }
_Z20SerializeTransactionI12ParamsStreamIR10HashWriter20TransactionSerParamsE12CTransactionEvRKT0_RT_RKS3_:
  257|  2.90k|{
  258|  2.90k|    const bool fAllowWitness = params.allow_witness;
  259|       |
  260|  2.90k|    s << tx.version;
  261|  2.90k|    unsigned char flags = 0;
  262|       |    // Consistency check
  263|  2.90k|    if (fAllowWitness) {
  ------------------
  |  Branch (263:9): [True: 89, False: 2.81k]
  ------------------
  264|       |        /* Check whether witnesses need to be serialized. */
  265|     89|        if (tx.HasWitness()) {
  ------------------
  |  Branch (265:13): [True: 89, False: 0]
  ------------------
  266|     89|            flags |= 1;
  267|     89|        }
  268|     89|    }
  269|  2.90k|    if (flags) {
  ------------------
  |  Branch (269:9): [True: 89, False: 2.81k]
  ------------------
  270|       |        /* Use extended format in case witnesses are to be serialized. */
  271|     89|        std::vector<CTxIn> vinDummy;
  272|     89|        s << vinDummy;
  273|     89|        s << flags;
  274|     89|    }
  275|  2.90k|    s << tx.vin;
  276|  2.90k|    s << tx.vout;
  277|  2.90k|    if (flags & 1) {
  ------------------
  |  Branch (277:9): [True: 89, False: 2.81k]
  ------------------
  278|  1.38k|        for (size_t i = 0; i < tx.vin.size(); i++) {
  ------------------
  |  Branch (278:28): [True: 1.29k, False: 89]
  ------------------
  279|  1.29k|            s << tx.vin[i].scriptWitness.stack;
  280|  1.29k|        }
  281|     89|    }
  282|  2.90k|    s << tx.nLockTime;
  283|  2.90k|}

_ZNK26PartiallySignedTransaction12GetInputUTXOER6CTxOuti:
   70|  2.28k|{
   71|  2.28k|    const PSBTInput& input = inputs[input_index];
   72|  2.28k|    uint32_t prevout_index = tx->vin[input_index].prevout.n;
   73|  2.28k|    if (input.non_witness_utxo) {
  ------------------
  |  Branch (73:9): [True: 0, False: 2.28k]
  ------------------
   74|      0|        if (prevout_index >= input.non_witness_utxo->vout.size()) {
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  ------------------
   75|      0|            return false;
   76|      0|        }
   77|      0|        if (input.non_witness_utxo->GetHash() != tx->vin[input_index].prevout.hash) {
  ------------------
  |  Branch (77:13): [True: 0, False: 0]
  ------------------
   78|      0|            return false;
   79|      0|        }
   80|      0|        utxo = input.non_witness_utxo->vout[prevout_index];
   81|  2.28k|    } else if (!input.witness_utxo.IsNull()) {
  ------------------
  |  Branch (81:16): [True: 903, False: 1.37k]
  ------------------
   82|    903|        utxo = input.witness_utxo;
   83|  1.37k|    } else {
   84|  1.37k|        return false;
   85|  1.37k|    }
   86|    903|    return true;
   87|  2.28k|}
_ZNK9PSBTInput17FillSignatureDataER13SignatureData:
   95|    889|{
   96|    889|    if (!final_script_sig.empty()) {
  ------------------
  |  Branch (96:9): [True: 0, False: 889]
  ------------------
   97|      0|        sigdata.scriptSig = final_script_sig;
   98|      0|        sigdata.complete = true;
   99|      0|    }
  100|    889|    if (!final_script_witness.IsNull()) {
  ------------------
  |  Branch (100:9): [True: 0, False: 889]
  ------------------
  101|      0|        sigdata.scriptWitness = final_script_witness;
  102|      0|        sigdata.complete = true;
  103|      0|    }
  104|    889|    if (sigdata.complete) {
  ------------------
  |  Branch (104:9): [True: 0, False: 889]
  ------------------
  105|      0|        return;
  106|      0|    }
  107|       |
  108|    889|    sigdata.signatures.insert(partial_sigs.begin(), partial_sigs.end());
  109|    889|    if (!redeem_script.empty()) {
  ------------------
  |  Branch (109:9): [True: 140, False: 749]
  ------------------
  110|    140|        sigdata.redeem_script = redeem_script;
  111|    140|    }
  112|    889|    if (!witness_script.empty()) {
  ------------------
  |  Branch (112:9): [True: 60, False: 829]
  ------------------
  113|     60|        sigdata.witness_script = witness_script;
  114|     60|    }
  115|    889|    for (const auto& key_pair : hd_keypaths) {
  ------------------
  |  Branch (115:31): [True: 8, False: 889]
  ------------------
  116|      8|        sigdata.misc_pubkeys.emplace(key_pair.first.GetID(), key_pair);
  117|      8|    }
  118|    889|    if (!m_tap_key_sig.empty()) {
  ------------------
  |  Branch (118:9): [True: 10, False: 879]
  ------------------
  119|     10|        sigdata.taproot_key_path_sig = m_tap_key_sig;
  120|     10|    }
  121|    889|    for (const auto& [pubkey_leaf, sig] : m_tap_script_sigs) {
  ------------------
  |  Branch (121:41): [True: 84, False: 889]
  ------------------
  122|     84|        sigdata.taproot_script_sigs.emplace(pubkey_leaf, sig);
  123|     84|    }
  124|    889|    if (!m_tap_internal_key.IsNull()) {
  ------------------
  |  Branch (124:9): [True: 0, False: 889]
  ------------------
  125|      0|        sigdata.tr_spenddata.internal_key = m_tap_internal_key;
  126|      0|    }
  127|    889|    if (!m_tap_merkle_root.IsNull()) {
  ------------------
  |  Branch (127:9): [True: 0, False: 889]
  ------------------
  128|      0|        sigdata.tr_spenddata.merkle_root = m_tap_merkle_root;
  129|      0|    }
  130|  1.38k|    for (const auto& [leaf_script, control_block] : m_tap_scripts) {
  ------------------
  |  Branch (130:51): [True: 1.38k, False: 889]
  ------------------
  131|  1.38k|        sigdata.tr_spenddata.scripts.emplace(leaf_script, control_block);
  132|  1.38k|    }
  133|    889|    for (const auto& [pubkey, leaf_origin] : m_tap_bip32_paths) {
  ------------------
  |  Branch (133:44): [True: 600, False: 889]
  ------------------
  134|    600|        sigdata.taproot_misc_pubkeys.emplace(pubkey, leaf_origin);
  135|    600|        sigdata.tap_pubkeys.emplace(Hash160(pubkey), pubkey);
  136|    600|    }
  137|    889|    for (const auto& [hash, preimage] : ripemd160_preimages) {
  ------------------
  |  Branch (137:39): [True: 292, False: 889]
  ------------------
  138|    292|        sigdata.ripemd160_preimages.emplace(std::vector<unsigned char>(hash.begin(), hash.end()), preimage);
  139|    292|    }
  140|    889|    for (const auto& [hash, preimage] : sha256_preimages) {
  ------------------
  |  Branch (140:39): [True: 249, False: 889]
  ------------------
  141|    249|        sigdata.sha256_preimages.emplace(std::vector<unsigned char>(hash.begin(), hash.end()), preimage);
  142|    249|    }
  143|    889|    for (const auto& [hash, preimage] : hash160_preimages) {
  ------------------
  |  Branch (143:39): [True: 604, False: 889]
  ------------------
  144|    604|        sigdata.hash160_preimages.emplace(std::vector<unsigned char>(hash.begin(), hash.end()), preimage);
  145|    604|    }
  146|    889|    for (const auto& [hash, preimage] : hash256_preimages) {
  ------------------
  |  Branch (146:39): [True: 839, False: 889]
  ------------------
  147|    839|        sigdata.hash256_preimages.emplace(std::vector<unsigned char>(hash.begin(), hash.end()), preimage);
  148|    839|    }
  149|    889|}
_Z15PSBTInputSignedRK9PSBTInput:
  294|  3.18k|{
  295|  3.18k|    return !input.final_script_sig.empty() || !input.final_script_witness.IsNull();
  ------------------
  |  Branch (295:12): [True: 46, False: 3.13k]
  |  Branch (295:47): [True: 37, False: 3.10k]
  ------------------
  296|  3.18k|}
_Z26PSBTInputSignedAndVerified26PartiallySignedTransactionjPK26PrecomputedTransactionData:
  299|    903|{
  300|    903|    CTxOut utxo;
  301|    903|    assert(psbt.inputs.size() >= input_index);
  302|    903|    const PSBTInput& input = psbt.inputs[input_index];
  303|       |
  304|    903|    if (input.non_witness_utxo) {
  ------------------
  |  Branch (304:9): [True: 0, False: 903]
  ------------------
  305|       |        // If we're taking our information from a non-witness UTXO, verify that it matches the prevout.
  306|      0|        COutPoint prevout = psbt.tx->vin[input_index].prevout;
  307|      0|        if (prevout.n >= input.non_witness_utxo->vout.size()) {
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  ------------------
  308|      0|            return false;
  309|      0|        }
  310|      0|        if (input.non_witness_utxo->GetHash() != prevout.hash) {
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            return false;
  312|      0|        }
  313|      0|        utxo = input.non_witness_utxo->vout[prevout.n];
  314|    903|    } else if (!input.witness_utxo.IsNull()) {
  ------------------
  |  Branch (314:16): [True: 903, False: 0]
  ------------------
  315|    903|        utxo = input.witness_utxo;
  316|    903|    } else {
  317|      0|        return false;
  318|      0|    }
  319|       |
  320|    903|    if (txdata) {
  ------------------
  |  Branch (320:9): [True: 903, False: 0]
  ------------------
  321|    903|        return VerifyScript(input.final_script_sig, utxo.scriptPubKey, &input.final_script_witness, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker{&(*psbt.tx), input_index, utxo.nValue, *txdata, MissingDataBehavior::FAIL});
  322|    903|    } else {
  323|      0|        return VerifyScript(input.final_script_sig, utxo.scriptPubKey, &input.final_script_witness, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker{&(*psbt.tx), input_index, utxo.nValue, MissingDataBehavior::FAIL});
  324|      0|    }
  325|    903|}
_Z18PrecomputePSBTDataRK26PartiallySignedTransaction:
  359|  3.15k|{
  360|  3.15k|    const CMutableTransaction& tx = *psbt.tx;
  361|  3.15k|    bool have_all_spent_outputs = true;
  362|  3.15k|    std::vector<CTxOut> utxos(tx.vin.size());
  363|  5.43k|    for (size_t idx = 0; idx < tx.vin.size(); ++idx) {
  ------------------
  |  Branch (363:26): [True: 2.28k, False: 3.15k]
  ------------------
  364|  2.28k|        if (!psbt.GetInputUTXO(utxos[idx], idx)) have_all_spent_outputs = false;
  ------------------
  |  Branch (364:13): [True: 1.37k, False: 903]
  ------------------
  365|  2.28k|    }
  366|  3.15k|    PrecomputedTransactionData txdata;
  367|  3.15k|    if (have_all_spent_outputs) {
  ------------------
  |  Branch (367:9): [True: 1.77k, False: 1.37k]
  ------------------
  368|  1.77k|        txdata.Init(tx, std::move(utxos), true);
  369|  1.77k|    } else {
  370|  1.37k|        txdata.Init(tx, {}, true);
  371|  1.37k|    }
  372|  3.15k|    return txdata;
  373|  3.15k|}
_Z13SignPSBTInputRK15SigningProviderR26PartiallySignedTransactioniPK26PrecomputedTransactionDataiP13SignatureDatab:
  376|    903|{
  377|    903|    PSBTInput& input = psbt.inputs.at(index);
  378|    903|    const CMutableTransaction& tx = *psbt.tx;
  379|       |
  380|    903|    if (PSBTInputSignedAndVerified(psbt, index, txdata)) {
  ------------------
  |  Branch (380:9): [True: 14, False: 889]
  ------------------
  381|     14|        return true;
  382|     14|    }
  383|       |
  384|       |    // Fill SignatureData with input info
  385|    889|    SignatureData sigdata;
  386|    889|    input.FillSignatureData(sigdata);
  387|       |
  388|       |    // Get UTXO
  389|    889|    bool require_witness_sig = false;
  390|    889|    CTxOut utxo;
  391|       |
  392|    889|    if (input.non_witness_utxo) {
  ------------------
  |  Branch (392:9): [True: 0, False: 889]
  ------------------
  393|       |        // If we're taking our information from a non-witness UTXO, verify that it matches the prevout.
  394|      0|        COutPoint prevout = tx.vin[index].prevout;
  395|      0|        if (prevout.n >= input.non_witness_utxo->vout.size()) {
  ------------------
  |  Branch (395:13): [True: 0, False: 0]
  ------------------
  396|      0|            return false;
  397|      0|        }
  398|      0|        if (input.non_witness_utxo->GetHash() != prevout.hash) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            return false;
  400|      0|        }
  401|      0|        utxo = input.non_witness_utxo->vout[prevout.n];
  402|    889|    } else if (!input.witness_utxo.IsNull()) {
  ------------------
  |  Branch (402:16): [True: 889, False: 0]
  ------------------
  403|    889|        utxo = input.witness_utxo;
  404|       |        // When we're taking our information from a witness UTXO, we can't verify it is actually data from
  405|       |        // the output being spent. This is safe in case a witness signature is produced (which includes this
  406|       |        // information directly in the hash), but not for non-witness signatures. Remember that we require
  407|       |        // a witness signature in this situation.
  408|    889|        require_witness_sig = true;
  409|    889|    } else {
  410|      0|        return false;
  411|      0|    }
  412|       |
  413|    889|    sigdata.witness = false;
  414|    889|    bool sig_complete;
  415|    889|    if (txdata == nullptr) {
  ------------------
  |  Branch (415:9): [True: 0, False: 889]
  ------------------
  416|      0|        sig_complete = ProduceSignature(provider, DUMMY_SIGNATURE_CREATOR, utxo.scriptPubKey, sigdata);
  417|    889|    } else {
  418|    889|        MutableTransactionSignatureCreator creator(tx, index, utxo.nValue, txdata, sighash);
  419|    889|        sig_complete = ProduceSignature(provider, creator, utxo.scriptPubKey, sigdata);
  420|    889|    }
  421|       |    // Verify that a witness signature was produced in case one was required.
  422|    889|    if (require_witness_sig && !sigdata.witness) return false;
  ------------------
  |  Branch (422:9): [True: 889, False: 0]
  |  Branch (422:32): [True: 889, False: 0]
  ------------------
  423|       |
  424|       |    // If we are not finalizing, set sigdata.complete to false to not set the scriptWitness
  425|      0|    if (!finalize && sigdata.complete) sigdata.complete = false;
  ------------------
  |  Branch (425:9): [True: 0, False: 0]
  |  Branch (425:22): [True: 0, False: 0]
  ------------------
  426|       |
  427|      0|    input.FromSignatureData(sigdata);
  428|       |
  429|       |    // If we have a witness signature, put a witness UTXO.
  430|      0|    if (sigdata.witness) {
  ------------------
  |  Branch (430:9): [True: 0, False: 0]
  ------------------
  431|      0|        input.witness_utxo = utxo;
  432|       |        // We can remove the non_witness_utxo if and only if there are no non-segwit or segwit v0
  433|       |        // inputs in this transaction. Since this requires inspecting the entire transaction, this
  434|       |        // is something for the caller to deal with (i.e. FillPSBT).
  435|      0|    }
  436|       |
  437|       |    // Fill in the missing info
  438|      0|    if (out_sigdata) {
  ------------------
  |  Branch (438:9): [True: 0, False: 0]
  ------------------
  439|      0|        out_sigdata->missing_pubkeys = sigdata.missing_pubkeys;
  440|      0|        out_sigdata->missing_sigs = sigdata.missing_sigs;
  441|      0|        out_sigdata->missing_redeem_script = sigdata.missing_redeem_script;
  442|      0|        out_sigdata->missing_witness_script = sigdata.missing_witness_script;
  443|      0|    }
  444|       |
  445|      0|    return sig_complete;
  446|    889|}

_ZN26PartiallySignedTransactionC2Ev:
  970|  4.60k|    PartiallySignedTransaction() = default;
_ZNK15PSBTProprietaryltERKS_:
   83|  2.90k|    bool operator<(const PSBTProprietary &b) const {
   84|  2.90k|        return key < b.key;
   85|  2.90k|    }
_ZN9PSBTInputC2Ev:
  228|  2.69k|    PSBTInput() = default;
_ZN10PSBTOutputC2Ev:
  729|  1.35k|    PSBTOutput() = default;
_ZN26PartiallySignedTransaction11UnserializeI10DataStreamEEvRT_:
 1038|  4.60k|    inline void Unserialize(Stream& s) {
 1039|       |        // Read the magic bytes
 1040|  4.60k|        uint8_t magic[5];
 1041|  4.60k|        s >> magic;
 1042|  4.60k|        if (!std::equal(magic, magic + 5, PSBT_MAGIC_BYTES)) {
  ------------------
  |  Branch (1042:13): [True: 209, False: 4.39k]
  ------------------
 1043|    209|            throw std::ios_base::failure("Invalid PSBT magic bytes");
 1044|    209|        }
 1045|       |
 1046|       |        // Used for duplicate key detection
 1047|  4.39k|        std::set<std::vector<unsigned char>> key_lookup;
 1048|       |
 1049|       |        // Track the global xpubs we have already seen. Just for sanity checking
 1050|  4.39k|        std::set<CExtPubKey> global_xpubs;
 1051|       |
 1052|       |        // Read global data
 1053|  4.39k|        bool found_sep = false;
 1054|  10.2k|        while(!s.empty()) {
  ------------------
  |  Branch (1054:15): [True: 10.1k, False: 94]
  ------------------
 1055|       |            // Read
 1056|  10.1k|            std::vector<unsigned char> key;
 1057|  10.1k|            s >> key;
 1058|       |
 1059|       |            // the key is empty if that was actually a separator byte
 1060|       |            // This is a special case for key lengths 0 as those are not allowed (except for separator)
 1061|  10.1k|            if (key.empty()) {
  ------------------
  |  Branch (1061:17): [True: 3.88k, False: 6.30k]
  ------------------
 1062|  3.88k|                found_sep = true;
 1063|  3.88k|                break;
 1064|  3.88k|            }
 1065|       |
 1066|       |            // Type is compact size uint at beginning of key
 1067|  6.30k|            SpanReader skey{key};
 1068|  6.30k|            uint64_t type = ReadCompactSize(skey);
 1069|       |
 1070|       |            // Do stuff based on type
 1071|  6.30k|            switch(type) {
 1072|  4.03k|                case PSBT_GLOBAL_UNSIGNED_TX:
  ------------------
  |  Branch (1072:17): [True: 4.03k, False: 2.27k]
  ------------------
 1073|  4.03k|                {
 1074|  4.03k|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (1074:25): [True: 1, False: 4.03k]
  ------------------
 1075|      1|                        throw std::ios_base::failure("Duplicate Key, unsigned tx already provided");
 1076|  4.03k|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (1076:32): [True: 9, False: 4.02k]
  ------------------
 1077|      9|                        throw std::ios_base::failure("Global unsigned tx key is more than one byte type");
 1078|      9|                    }
 1079|  4.02k|                    CMutableTransaction mtx;
 1080|       |                    // Set the stream to serialize with non-witness since this should always be non-witness
 1081|  4.02k|                    UnserializeFromVector(s, TX_NO_WITNESS(mtx));
 1082|  4.02k|                    tx = std::move(mtx);
 1083|       |                    // Make sure that all scriptSigs and scriptWitnesses are empty
 1084|  4.02k|                    for (const CTxIn& txin : tx->vin) {
  ------------------
  |  Branch (1084:44): [True: 2.71k, False: 4.02k]
  ------------------
 1085|  2.71k|                        if (!txin.scriptSig.empty() || !txin.scriptWitness.IsNull()) {
  ------------------
  |  Branch (1085:29): [True: 1, False: 2.71k]
  |  Branch (1085:56): [True: 0, False: 2.71k]
  ------------------
 1086|      1|                            throw std::ios_base::failure("Unsigned tx does not have empty scriptSigs and scriptWitnesses.");
 1087|      1|                        }
 1088|  2.71k|                    }
 1089|  4.02k|                    break;
 1090|  4.02k|                }
 1091|  4.02k|                case PSBT_GLOBAL_XPUB:
  ------------------
  |  Branch (1091:17): [True: 254, False: 6.05k]
  ------------------
 1092|    254|                {
 1093|    254|                    if (key.size() != BIP32_EXTKEY_WITH_VERSION_SIZE + 1) {
  ------------------
  |  Branch (1093:25): [True: 4, False: 250]
  ------------------
 1094|      4|                        throw std::ios_base::failure("Size of key was not the expected size for the type global xpub");
 1095|      4|                    }
 1096|       |                    // Read in the xpub from key
 1097|    250|                    CExtPubKey xpub;
 1098|    250|                    xpub.DecodeWithVersion(&key.data()[1]);
 1099|    250|                    if (!xpub.pubkey.IsFullyValid()) {
  ------------------
  |  Branch (1099:25): [True: 40, False: 210]
  ------------------
 1100|     40|                       throw std::ios_base::failure("Invalid pubkey");
 1101|     40|                    }
 1102|    210|                    if (global_xpubs.count(xpub) > 0) {
  ------------------
  |  Branch (1102:25): [True: 1, False: 209]
  ------------------
 1103|      1|                       throw std::ios_base::failure("Duplicate key, global xpub already provided");
 1104|      1|                    }
 1105|    209|                    global_xpubs.insert(xpub);
 1106|       |                    // Read in the keypath from stream
 1107|    209|                    KeyOriginInfo keypath;
 1108|    209|                    DeserializeHDKeypath(s, keypath);
 1109|       |
 1110|       |                    // Note that we store these swapped to make searches faster.
 1111|       |                    // Serialization uses xpub -> keypath to enqure key uniqueness
 1112|    209|                    if (m_xpubs.count(keypath) == 0) {
  ------------------
  |  Branch (1112:25): [True: 151, False: 58]
  ------------------
 1113|       |                        // Make a new set to put the xpub in
 1114|    151|                        m_xpubs[keypath] = {xpub};
 1115|    151|                    } else {
 1116|       |                        // Insert xpub into existing set
 1117|     58|                        m_xpubs[keypath].insert(xpub);
 1118|     58|                    }
 1119|    209|                    break;
 1120|    210|                }
 1121|      7|                case PSBT_GLOBAL_VERSION:
  ------------------
  |  Branch (1121:17): [True: 7, False: 6.29k]
  ------------------
 1122|      7|                {
 1123|      7|                    if (m_version) {
  ------------------
  |  Branch (1123:25): [True: 1, False: 6]
  ------------------
 1124|      1|                        throw std::ios_base::failure("Duplicate Key, version already provided");
 1125|      6|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (1125:32): [True: 1, False: 5]
  ------------------
 1126|      1|                        throw std::ios_base::failure("Global version key is more than one byte type");
 1127|      1|                    }
 1128|      5|                    uint32_t v;
 1129|      5|                    UnserializeFromVector(s, v);
 1130|      5|                    m_version = v;
 1131|      5|                    if (*m_version > PSBT_HIGHEST_VERSION) {
  ------------------
  |  Branch (1131:25): [True: 2, False: 3]
  ------------------
 1132|      2|                        throw std::ios_base::failure("Unsupported version number");
 1133|      2|                    }
 1134|      3|                    break;
 1135|      5|                }
 1136|    402|                case PSBT_GLOBAL_PROPRIETARY:
  ------------------
  |  Branch (1136:17): [True: 402, False: 5.90k]
  ------------------
 1137|    402|                {
 1138|    402|                    PSBTProprietary this_prop;
 1139|    402|                    skey >> this_prop.identifier;
 1140|    402|                    this_prop.subtype = ReadCompactSize(skey);
 1141|    402|                    this_prop.key = key;
 1142|       |
 1143|    402|                    if (m_proprietary.count(this_prop) > 0) {
  ------------------
  |  Branch (1143:25): [True: 1, False: 401]
  ------------------
 1144|      1|                        throw std::ios_base::failure("Duplicate Key, proprietary key already found");
 1145|      1|                    }
 1146|    401|                    s >> this_prop.value;
 1147|    401|                    m_proprietary.insert(this_prop);
 1148|    401|                    break;
 1149|    402|                }
 1150|       |                // Unknown stuff
 1151|  1.45k|                default: {
  ------------------
  |  Branch (1151:17): [True: 1.45k, False: 4.84k]
  ------------------
 1152|  1.45k|                    if (unknown.count(key) > 0) {
  ------------------
  |  Branch (1152:25): [True: 8, False: 1.44k]
  ------------------
 1153|      8|                        throw std::ios_base::failure("Duplicate Key, key for unknown value already provided");
 1154|      8|                    }
 1155|       |                    // Read in the value
 1156|  1.44k|                    std::vector<unsigned char> val_bytes;
 1157|  1.44k|                    s >> val_bytes;
 1158|  1.44k|                    unknown.emplace(std::move(key), std::move(val_bytes));
 1159|  1.44k|                }
 1160|  6.30k|            }
 1161|  6.30k|        }
 1162|       |
 1163|  3.97k|        if (!found_sep) {
  ------------------
  |  Branch (1163:13): [True: 5, False: 3.97k]
  ------------------
 1164|      5|            throw std::ios_base::failure("Separator is missing at the end of the global map");
 1165|      5|        }
 1166|       |
 1167|       |        // Make sure that we got an unsigned tx
 1168|  3.97k|        if (!tx) {
  ------------------
  |  Branch (1168:13): [True: 19, False: 3.95k]
  ------------------
 1169|     19|            throw std::ios_base::failure("No unsigned transaction was provided");
 1170|     19|        }
 1171|       |
 1172|       |        // Read input data
 1173|  3.95k|        unsigned int i = 0;
 1174|  6.63k|        while (!s.empty() && i < tx->vin.size()) {
  ------------------
  |  Branch (1174:16): [True: 6.13k, False: 503]
  |  Branch (1174:30): [True: 2.69k, False: 3.43k]
  ------------------
 1175|  2.69k|            PSBTInput input;
 1176|  2.69k|            s >> input;
 1177|  2.69k|            inputs.push_back(input);
 1178|       |
 1179|       |            // Make sure the non-witness utxo matches the outpoint
 1180|  2.69k|            if (input.non_witness_utxo) {
  ------------------
  |  Branch (1180:17): [True: 13, False: 2.68k]
  ------------------
 1181|     13|                if (input.non_witness_utxo->GetHash() != tx->vin[i].prevout.hash) {
  ------------------
  |  Branch (1181:21): [True: 12, False: 1]
  ------------------
 1182|     12|                    throw std::ios_base::failure("Non-witness UTXO does not match outpoint hash");
 1183|     12|                }
 1184|      1|                if (tx->vin[i].prevout.n >= input.non_witness_utxo->vout.size()) {
  ------------------
  |  Branch (1184:21): [True: 1, False: 0]
  ------------------
 1185|      1|                    throw std::ios_base::failure("Input specifies output index that does not exist");
 1186|      1|                }
 1187|      1|            }
 1188|  2.68k|            ++i;
 1189|  2.68k|        }
 1190|       |        // Make sure that the number of inputs matches the number of inputs in the transaction
 1191|  3.94k|        if (inputs.size() != tx->vin.size()) {
  ------------------
  |  Branch (1191:13): [True: 1, False: 3.94k]
  ------------------
 1192|      1|            throw std::ios_base::failure("Inputs provided does not match the number of inputs in transaction.");
 1193|      1|        }
 1194|       |
 1195|       |        // Read output data
 1196|  3.94k|        i = 0;
 1197|  5.29k|        while (!s.empty() && i < tx->vout.size()) {
  ------------------
  |  Branch (1197:16): [True: 4.50k, False: 796]
  |  Branch (1197:30): [True: 1.35k, False: 3.14k]
  ------------------
 1198|  1.35k|            PSBTOutput output;
 1199|  1.35k|            s >> output;
 1200|  1.35k|            outputs.push_back(output);
 1201|  1.35k|            ++i;
 1202|  1.35k|        }
 1203|       |        // Make sure that the number of outputs matches the number of outputs in the transaction
 1204|  3.94k|        if (outputs.size() != tx->vout.size()) {
  ------------------
  |  Branch (1204:13): [True: 3, False: 3.93k]
  ------------------
 1205|      3|            throw std::ios_base::failure("Outputs provided does not match the number of outputs in transaction.");
 1206|      3|        }
 1207|  3.94k|    }
_Z21UnserializeFromVectorI10DataStreamJ13ParamsWrapperI20TransactionSerParams19CMutableTransactionEEEvRT_DpOT0_:
  105|  4.02k|{
  106|  4.02k|    size_t expected_size = ReadCompactSize(s);
  107|  4.02k|    size_t remaining_before = s.size();
  108|  4.02k|    UnserializeMany(s, args...);
  109|  4.02k|    size_t remaining_after = s.size();
  110|  4.02k|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 27, False: 3.99k]
  ------------------
  111|     27|        throw std::ios_base::failure("Size of value was not the stated size");
  112|     27|    }
  113|  4.02k|}
_Z20DeserializeHDKeypathI10DataStreamEvRT_R13KeyOriginInfo:
  137|  1.12k|{
  138|  1.12k|    hd_keypath = DeserializeKeyOrigin(s, ReadCompactSize(s));
  139|  1.12k|}
_Z20DeserializeKeyOriginI10DataStreamE13KeyOriginInfoRT_m:
  118|  2.03k|{
  119|       |    // Read in key path
  120|  2.03k|    if (length % 4 || length == 0) {
  ------------------
  |  Branch (120:9): [True: 9, False: 2.02k]
  |  Branch (120:23): [True: 6, False: 2.01k]
  ------------------
  121|     15|        throw std::ios_base::failure("Invalid length for HD key path");
  122|     15|    }
  123|       |
  124|  2.01k|    KeyOriginInfo hd_keypath;
  125|  2.01k|    s >> hd_keypath.fingerprint;
  126|  36.8k|    for (unsigned int i = 4; i < length; i += sizeof(uint32_t)) {
  ------------------
  |  Branch (126:30): [True: 34.8k, False: 2.01k]
  ------------------
  127|  34.8k|        uint32_t index;
  128|  34.8k|        s >> index;
  129|  34.8k|        hd_keypath.path.push_back(index);
  130|  34.8k|    }
  131|  2.01k|    return hd_keypath;
  132|  2.03k|}
_Z21UnserializeFromVectorI10DataStreamJRjEEvRT_DpOT0_:
  105|      5|{
  106|      5|    size_t expected_size = ReadCompactSize(s);
  107|      5|    size_t remaining_before = s.size();
  108|      5|    UnserializeMany(s, args...);
  109|      5|    size_t remaining_after = s.size();
  110|      5|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 1, False: 4]
  ------------------
  111|      1|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      1|    }
  113|      5|}
_ZN9PSBTInput11UnserializeI10DataStreamEEvRT_:
  370|  2.69k|    inline void Unserialize(Stream& s) {
  371|       |        // Used for duplicate key detection
  372|  2.69k|        std::set<std::vector<unsigned char>> key_lookup;
  373|       |
  374|       |        // Read loop
  375|  2.69k|        bool found_sep = false;
  376|  18.4k|        while(!s.empty()) {
  ------------------
  |  Branch (376:15): [True: 18.4k, False: 1]
  ------------------
  377|       |            // Read
  378|  18.4k|            std::vector<unsigned char> key;
  379|  18.4k|            s >> key;
  380|       |
  381|       |            // the key is empty if that was actually a separator byte
  382|       |            // This is a special case for key lengths 0 as those are not allowed (except for separator)
  383|  18.4k|            if (key.empty()) {
  ------------------
  |  Branch (383:17): [True: 2.29k, False: 16.1k]
  ------------------
  384|  2.29k|                found_sep = true;
  385|  2.29k|                break;
  386|  2.29k|            }
  387|       |
  388|       |            // Type is compact size uint at beginning of key
  389|  16.1k|            SpanReader skey{key};
  390|  16.1k|            uint64_t type = ReadCompactSize(skey);
  391|       |
  392|       |            // Do stuff based on type
  393|  16.1k|            switch(type) {
  394|     39|                case PSBT_IN_NON_WITNESS_UTXO:
  ------------------
  |  Branch (394:17): [True: 39, False: 16.1k]
  ------------------
  395|     39|                {
  396|     39|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (396:25): [True: 1, False: 38]
  ------------------
  397|      1|                        throw std::ios_base::failure("Duplicate Key, input non-witness utxo already provided");
  398|     38|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (398:32): [True: 8, False: 30]
  ------------------
  399|      8|                        throw std::ios_base::failure("Non-witness utxo key is more than one byte type");
  400|      8|                    }
  401|       |                    // Set the stream to unserialize with witness since this is always a valid network transaction
  402|     30|                    UnserializeFromVector(s, TX_WITH_WITNESS(non_witness_utxo));
  403|     30|                    break;
  404|     39|                }
  405|    936|                case PSBT_IN_WITNESS_UTXO:
  ------------------
  |  Branch (405:17): [True: 936, False: 15.2k]
  ------------------
  406|    936|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (406:25): [True: 1, False: 935]
  ------------------
  407|      1|                        throw std::ios_base::failure("Duplicate Key, input witness utxo already provided");
  408|    935|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (408:32): [True: 3, False: 932]
  ------------------
  409|      3|                        throw std::ios_base::failure("Witness utxo key is more than one byte type");
  410|      3|                    }
  411|    932|                    UnserializeFromVector(s, witness_utxo);
  412|    932|                    break;
  413|  1.09k|                case PSBT_IN_PARTIAL_SIG:
  ------------------
  |  Branch (413:17): [True: 1.09k, False: 15.0k]
  ------------------
  414|  1.09k|                {
  415|       |                    // Make sure that the key is the size of pubkey + 1
  416|  1.09k|                    if (key.size() != CPubKey::SIZE + 1 && key.size() != CPubKey::COMPRESSED_SIZE + 1) {
  ------------------
  |  Branch (416:25): [True: 1.09k, False: 1]
  |  Branch (416:60): [True: 6, False: 1.08k]
  ------------------
  417|      6|                        throw std::ios_base::failure("Size of key was not the expected size for the type partial signature pubkey");
  418|      6|                    }
  419|       |                    // Read in the pubkey from key
  420|  1.08k|                    CPubKey pubkey(key.begin() + 1, key.end());
  421|  1.08k|                    if (!pubkey.IsFullyValid()) {
  ------------------
  |  Branch (421:25): [True: 7, False: 1.07k]
  ------------------
  422|      7|                       throw std::ios_base::failure("Invalid pubkey");
  423|      7|                    }
  424|  1.07k|                    if (partial_sigs.count(pubkey.GetID()) > 0) {
  ------------------
  |  Branch (424:25): [True: 1, False: 1.07k]
  ------------------
  425|      1|                        throw std::ios_base::failure("Duplicate Key, input partial signature for pubkey already provided");
  426|      1|                    }
  427|       |
  428|       |                    // Read in the signature from value
  429|  1.07k|                    std::vector<unsigned char> sig;
  430|  1.07k|                    s >> sig;
  431|       |
  432|       |                    // Add to list
  433|  1.07k|                    partial_sigs.emplace(pubkey.GetID(), SigPair(pubkey, std::move(sig)));
  434|  1.07k|                    break;
  435|  1.07k|                }
  436|      8|                case PSBT_IN_SIGHASH:
  ------------------
  |  Branch (436:17): [True: 8, False: 16.1k]
  ------------------
  437|      8|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (437:25): [True: 0, False: 8]
  ------------------
  438|      0|                        throw std::ios_base::failure("Duplicate Key, input sighash type already provided");
  439|      8|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (439:32): [True: 1, False: 7]
  ------------------
  440|      1|                        throw std::ios_base::failure("Sighash type key is more than one byte type");
  441|      1|                    }
  442|      7|                    int sighash;
  443|      7|                    UnserializeFromVector(s, sighash);
  444|      7|                    sighash_type = sighash;
  445|      7|                    break;
  446|    154|                case PSBT_IN_REDEEMSCRIPT:
  ------------------
  |  Branch (446:17): [True: 154, False: 15.9k]
  ------------------
  447|    154|                {
  448|    154|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (448:25): [True: 1, False: 153]
  ------------------
  449|      1|                        throw std::ios_base::failure("Duplicate Key, input redeemScript already provided");
  450|    153|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (450:32): [True: 2, False: 151]
  ------------------
  451|      2|                        throw std::ios_base::failure("Input redeemScript key is more than one byte type");
  452|      2|                    }
  453|    151|                    s >> redeem_script;
  454|    151|                    break;
  455|    154|                }
  456|     70|                case PSBT_IN_WITNESSSCRIPT:
  ------------------
  |  Branch (456:17): [True: 70, False: 16.0k]
  ------------------
  457|     70|                {
  458|     70|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (458:25): [True: 1, False: 69]
  ------------------
  459|      1|                        throw std::ios_base::failure("Duplicate Key, input witnessScript already provided");
  460|     69|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (460:32): [True: 3, False: 66]
  ------------------
  461|      3|                        throw std::ios_base::failure("Input witnessScript key is more than one byte type");
  462|      3|                    }
  463|     66|                    s >> witness_script;
  464|     66|                    break;
  465|     70|                }
  466|     43|                case PSBT_IN_BIP32_DERIVATION:
  ------------------
  |  Branch (466:17): [True: 43, False: 16.1k]
  ------------------
  467|     43|                {
  468|     43|                    DeserializeHDKeypaths(s, key, hd_keypaths);
  469|     43|                    break;
  470|     70|                }
  471|     53|                case PSBT_IN_SCRIPTSIG:
  ------------------
  |  Branch (471:17): [True: 53, False: 16.0k]
  ------------------
  472|     53|                {
  473|     53|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (473:25): [True: 1, False: 52]
  ------------------
  474|      1|                        throw std::ios_base::failure("Duplicate Key, input final scriptSig already provided");
  475|     52|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (475:32): [True: 2, False: 50]
  ------------------
  476|      2|                        throw std::ios_base::failure("Final scriptSig key is more than one byte type");
  477|      2|                    }
  478|     50|                    s >> final_script_sig;
  479|     50|                    break;
  480|     53|                }
  481|     50|                case PSBT_IN_SCRIPTWITNESS:
  ------------------
  |  Branch (481:17): [True: 50, False: 16.1k]
  ------------------
  482|     50|                {
  483|     50|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (483:25): [True: 0, False: 50]
  ------------------
  484|      0|                        throw std::ios_base::failure("Duplicate Key, input final scriptWitness already provided");
  485|     50|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (485:32): [True: 1, False: 49]
  ------------------
  486|      1|                        throw std::ios_base::failure("Final scriptWitness key is more than one byte type");
  487|      1|                    }
  488|     49|                    UnserializeFromVector(s, final_script_witness.stack);
  489|     49|                    break;
  490|     50|                }
  491|    314|                case PSBT_IN_RIPEMD160:
  ------------------
  |  Branch (491:17): [True: 314, False: 15.8k]
  ------------------
  492|    314|                {
  493|       |                    // Make sure that the key is the size of a ripemd160 hash + 1
  494|    314|                    if (key.size() != CRIPEMD160::OUTPUT_SIZE + 1) {
  ------------------
  |  Branch (494:25): [True: 1, False: 313]
  ------------------
  495|      1|                        throw std::ios_base::failure("Size of key was not the expected size for the type ripemd160 preimage");
  496|      1|                    }
  497|       |                    // Read in the hash from key
  498|    313|                    std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
  499|    313|                    uint160 hash(hash_vec);
  500|    313|                    if (ripemd160_preimages.count(hash) > 0) {
  ------------------
  |  Branch (500:25): [True: 1, False: 312]
  ------------------
  501|      1|                        throw std::ios_base::failure("Duplicate Key, input ripemd160 preimage already provided");
  502|      1|                    }
  503|       |
  504|       |                    // Read in the preimage from value
  505|    312|                    std::vector<unsigned char> preimage;
  506|    312|                    s >> preimage;
  507|       |
  508|       |                    // Add to preimages list
  509|    312|                    ripemd160_preimages.emplace(hash, std::move(preimage));
  510|    312|                    break;
  511|    313|                }
  512|  1.38k|                case PSBT_IN_SHA256:
  ------------------
  |  Branch (512:17): [True: 1.38k, False: 14.7k]
  ------------------
  513|  1.38k|                {
  514|       |                    // Make sure that the key is the size of a sha256 hash + 1
  515|  1.38k|                    if (key.size() != CSHA256::OUTPUT_SIZE + 1) {
  ------------------
  |  Branch (515:25): [True: 4, False: 1.37k]
  ------------------
  516|      4|                        throw std::ios_base::failure("Size of key was not the expected size for the type sha256 preimage");
  517|      4|                    }
  518|       |                    // Read in the hash from key
  519|  1.37k|                    std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
  520|  1.37k|                    uint256 hash(hash_vec);
  521|  1.37k|                    if (sha256_preimages.count(hash) > 0) {
  ------------------
  |  Branch (521:25): [True: 1, False: 1.37k]
  ------------------
  522|      1|                        throw std::ios_base::failure("Duplicate Key, input sha256 preimage already provided");
  523|      1|                    }
  524|       |
  525|       |                    // Read in the preimage from value
  526|  1.37k|                    std::vector<unsigned char> preimage;
  527|  1.37k|                    s >> preimage;
  528|       |
  529|       |                    // Add to preimages list
  530|  1.37k|                    sha256_preimages.emplace(hash, std::move(preimage));
  531|  1.37k|                    break;
  532|  1.37k|                }
  533|    709|                case PSBT_IN_HASH160:
  ------------------
  |  Branch (533:17): [True: 709, False: 15.4k]
  ------------------
  534|    709|                {
  535|       |                    // Make sure that the key is the size of a hash160 hash + 1
  536|    709|                    if (key.size() != CHash160::OUTPUT_SIZE + 1) {
  ------------------
  |  Branch (536:25): [True: 1, False: 708]
  ------------------
  537|      1|                        throw std::ios_base::failure("Size of key was not the expected size for the type hash160 preimage");
  538|      1|                    }
  539|       |                    // Read in the hash from key
  540|    708|                    std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
  541|    708|                    uint160 hash(hash_vec);
  542|    708|                    if (hash160_preimages.count(hash) > 0) {
  ------------------
  |  Branch (542:25): [True: 1, False: 707]
  ------------------
  543|      1|                        throw std::ios_base::failure("Duplicate Key, input hash160 preimage already provided");
  544|      1|                    }
  545|       |
  546|       |                    // Read in the preimage from value
  547|    707|                    std::vector<unsigned char> preimage;
  548|    707|                    s >> preimage;
  549|       |
  550|       |                    // Add to preimages list
  551|    707|                    hash160_preimages.emplace(hash, std::move(preimage));
  552|    707|                    break;
  553|    708|                }
  554|    950|                case PSBT_IN_HASH256:
  ------------------
  |  Branch (554:17): [True: 950, False: 15.2k]
  ------------------
  555|    950|                {
  556|       |                    // Make sure that the key is the size of a hash256 hash + 1
  557|    950|                    if (key.size() != CHash256::OUTPUT_SIZE + 1) {
  ------------------
  |  Branch (557:25): [True: 2, False: 948]
  ------------------
  558|      2|                        throw std::ios_base::failure("Size of key was not the expected size for the type hash256 preimage");
  559|      2|                    }
  560|       |                    // Read in the hash from key
  561|    948|                    std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
  562|    948|                    uint256 hash(hash_vec);
  563|    948|                    if (hash256_preimages.count(hash) > 0) {
  ------------------
  |  Branch (563:25): [True: 1, False: 947]
  ------------------
  564|      1|                        throw std::ios_base::failure("Duplicate Key, input hash256 preimage already provided");
  565|      1|                    }
  566|       |
  567|       |                    // Read in the preimage from value
  568|    947|                    std::vector<unsigned char> preimage;
  569|    947|                    s >> preimage;
  570|       |
  571|       |                    // Add to preimages list
  572|    947|                    hash256_preimages.emplace(hash, std::move(preimage));
  573|    947|                    break;
  574|    948|                }
  575|     35|                case PSBT_IN_TAP_KEY_SIG:
  ------------------
  |  Branch (575:17): [True: 35, False: 16.1k]
  ------------------
  576|     35|                {
  577|     35|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (577:25): [True: 1, False: 34]
  ------------------
  578|      1|                        throw std::ios_base::failure("Duplicate Key, input Taproot key signature already provided");
  579|     34|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (579:32): [True: 1, False: 33]
  ------------------
  580|      1|                        throw std::ios_base::failure("Input Taproot key signature key is more than one byte type");
  581|      1|                    }
  582|     33|                    s >> m_tap_key_sig;
  583|     33|                    if (m_tap_key_sig.size() < 64) {
  ------------------
  |  Branch (583:25): [True: 1, False: 32]
  ------------------
  584|      1|                        throw std::ios_base::failure("Input Taproot key path signature is shorter than 64 bytes");
  585|     32|                    } else if (m_tap_key_sig.size() > 65) {
  ------------------
  |  Branch (585:32): [True: 1, False: 31]
  ------------------
  586|      1|                        throw std::ios_base::failure("Input Taproot key path signature is longer than 65 bytes");
  587|      1|                    }
  588|     31|                    break;
  589|     33|                }
  590|    894|                case PSBT_IN_TAP_SCRIPT_SIG:
  ------------------
  |  Branch (590:17): [True: 894, False: 15.2k]
  ------------------
  591|    894|                {
  592|    894|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (592:25): [True: 1, False: 893]
  ------------------
  593|      1|                        throw std::ios_base::failure("Duplicate Key, input Taproot script signature already provided");
  594|    893|                    } else if (key.size() != 65) {
  ------------------
  |  Branch (594:32): [True: 3, False: 890]
  ------------------
  595|      3|                        throw std::ios_base::failure("Input Taproot script signature key is not 65 bytes");
  596|      3|                    }
  597|    890|                    SpanReader s_key{Span{key}.subspan(1)};
  598|    890|                    XOnlyPubKey xonly;
  599|    890|                    uint256 hash;
  600|    890|                    s_key >> xonly;
  601|    890|                    s_key >> hash;
  602|    890|                    std::vector<unsigned char> sig;
  603|    890|                    s >> sig;
  604|    890|                    if (sig.size() < 64) {
  ------------------
  |  Branch (604:25): [True: 6, False: 884]
  ------------------
  605|      6|                        throw std::ios_base::failure("Input Taproot script path signature is shorter than 64 bytes");
  606|    884|                    } else if (sig.size() > 65) {
  ------------------
  |  Branch (606:32): [True: 3, False: 881]
  ------------------
  607|      3|                        throw std::ios_base::failure("Input Taproot script path signature is longer than 65 bytes");
  608|      3|                    }
  609|    881|                    m_tap_script_sigs.emplace(std::make_pair(xonly, hash), sig);
  610|    881|                    break;
  611|    890|                }
  612|  1.80k|                case PSBT_IN_TAP_LEAF_SCRIPT:
  ------------------
  |  Branch (612:17): [True: 1.80k, False: 14.3k]
  ------------------
  613|  1.80k|                {
  614|  1.80k|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (614:25): [True: 1, False: 1.80k]
  ------------------
  615|      1|                        throw std::ios_base::failure("Duplicate Key, input Taproot leaf script already provided");
  616|  1.80k|                    } else if (key.size() < 34) {
  ------------------
  |  Branch (616:32): [True: 2, False: 1.79k]
  ------------------
  617|      2|                        throw std::ios_base::failure("Taproot leaf script key is not at least 34 bytes");
  618|  1.79k|                    } else if ((key.size() - 2) % 32 != 0) {
  ------------------
  |  Branch (618:32): [True: 1, False: 1.79k]
  ------------------
  619|      1|                        throw std::ios_base::failure("Input Taproot leaf script key's control block size is not valid");
  620|      1|                    }
  621|  1.79k|                    std::vector<unsigned char> script_v;
  622|  1.79k|                    s >> script_v;
  623|  1.79k|                    if (script_v.empty()) {
  ------------------
  |  Branch (623:25): [True: 4, False: 1.79k]
  ------------------
  624|      4|                        throw std::ios_base::failure("Input Taproot leaf script must be at least 1 byte");
  625|      4|                    }
  626|  1.79k|                    uint8_t leaf_ver = script_v.back();
  627|  1.79k|                    script_v.pop_back();
  628|  1.79k|                    const auto leaf_script = std::make_pair(script_v, (int)leaf_ver);
  629|  1.79k|                    m_tap_scripts[leaf_script].insert(std::vector<unsigned char>(key.begin() + 1, key.end()));
  630|  1.79k|                    break;
  631|  1.79k|                }
  632|    893|                case PSBT_IN_TAP_BIP32_DERIVATION:
  ------------------
  |  Branch (632:17): [True: 893, False: 15.2k]
  ------------------
  633|    893|                {
  634|    893|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (634:25): [True: 2, False: 891]
  ------------------
  635|      2|                        throw std::ios_base::failure("Duplicate Key, input Taproot BIP32 keypath already provided");
  636|    891|                    } else if (key.size() != 33) {
  ------------------
  |  Branch (636:32): [True: 1, False: 890]
  ------------------
  637|      1|                        throw std::ios_base::failure("Input Taproot BIP32 keypath key is not at 33 bytes");
  638|      1|                    }
  639|    890|                    SpanReader s_key{Span{key}.subspan(1)};
  640|    890|                    XOnlyPubKey xonly;
  641|    890|                    s_key >> xonly;
  642|    890|                    std::set<uint256> leaf_hashes;
  643|    890|                    uint64_t value_len = ReadCompactSize(s);
  644|    890|                    size_t before_hashes = s.size();
  645|    890|                    s >> leaf_hashes;
  646|    890|                    size_t after_hashes = s.size();
  647|    890|                    size_t hashes_len = before_hashes - after_hashes;
  648|    890|                    if (hashes_len > value_len) {
  ------------------
  |  Branch (648:25): [True: 10, False: 880]
  ------------------
  649|     10|                        throw std::ios_base::failure("Input Taproot BIP32 keypath has an invalid length");
  650|     10|                    }
  651|    880|                    size_t origin_len = value_len - hashes_len;
  652|    880|                    m_tap_bip32_paths.emplace(xonly, std::make_pair(leaf_hashes, DeserializeKeyOrigin(s, origin_len)));
  653|    880|                    break;
  654|    890|                }
  655|      7|                case PSBT_IN_TAP_INTERNAL_KEY:
  ------------------
  |  Branch (655:17): [True: 7, False: 16.1k]
  ------------------
  656|      7|                {
  657|      7|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (657:25): [True: 0, False: 7]
  ------------------
  658|      0|                        throw std::ios_base::failure("Duplicate Key, input Taproot internal key already provided");
  659|      7|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (659:32): [True: 6, False: 1]
  ------------------
  660|      6|                        throw std::ios_base::failure("Input Taproot internal key key is more than one byte type");
  661|      6|                    }
  662|      1|                    UnserializeFromVector(s, m_tap_internal_key);
  663|      1|                    break;
  664|      7|                }
  665|      5|                case PSBT_IN_TAP_MERKLE_ROOT:
  ------------------
  |  Branch (665:17): [True: 5, False: 16.1k]
  ------------------
  666|      5|                {
  667|      5|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (667:25): [True: 0, False: 5]
  ------------------
  668|      0|                        throw std::ios_base::failure("Duplicate Key, input Taproot merkle root already provided");
  669|      5|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (669:32): [True: 4, False: 1]
  ------------------
  670|      4|                        throw std::ios_base::failure("Input Taproot merkle root key is more than one byte type");
  671|      4|                    }
  672|      1|                    UnserializeFromVector(s, m_tap_merkle_root);
  673|      1|                    break;
  674|      5|                }
  675|    748|                case PSBT_IN_PROPRIETARY:
  ------------------
  |  Branch (675:17): [True: 748, False: 15.4k]
  ------------------
  676|    748|                {
  677|    748|                    PSBTProprietary this_prop;
  678|    748|                    skey >> this_prop.identifier;
  679|    748|                    this_prop.subtype = ReadCompactSize(skey);
  680|    748|                    this_prop.key = key;
  681|       |
  682|    748|                    if (m_proprietary.count(this_prop) > 0) {
  ------------------
  |  Branch (682:25): [True: 1, False: 747]
  ------------------
  683|      1|                        throw std::ios_base::failure("Duplicate Key, proprietary key already found");
  684|      1|                    }
  685|    747|                    s >> this_prop.value;
  686|    747|                    m_proprietary.insert(this_prop);
  687|    747|                    break;
  688|    748|                }
  689|       |                // Unknown stuff
  690|  5.90k|                default:
  ------------------
  |  Branch (690:17): [True: 5.90k, False: 10.2k]
  ------------------
  691|  5.90k|                    if (unknown.count(key) > 0) {
  ------------------
  |  Branch (691:25): [True: 6, False: 5.90k]
  ------------------
  692|      6|                        throw std::ios_base::failure("Duplicate Key, key for unknown value already provided");
  693|      6|                    }
  694|       |                    // Read in the value
  695|  5.90k|                    std::vector<unsigned char> val_bytes;
  696|  5.90k|                    s >> val_bytes;
  697|  5.90k|                    unknown.emplace(std::move(key), std::move(val_bytes));
  698|  5.90k|                    break;
  699|  16.1k|            }
  700|  16.1k|        }
  701|       |
  702|  2.29k|        if (!found_sep) {
  ------------------
  |  Branch (702:13): [True: 1, False: 2.29k]
  ------------------
  703|      1|            throw std::ios_base::failure("Separator is missing at the end of an input map");
  704|      1|        }
  705|  2.29k|    }
_Z21UnserializeFromVectorI10DataStreamJ13ParamsWrapperI20TransactionSerParamsNSt3__110shared_ptrIK12CTransactionEEEEEvRT_DpOT0_:
  105|     30|{
  106|     30|    size_t expected_size = ReadCompactSize(s);
  107|     30|    size_t remaining_before = s.size();
  108|     30|    UnserializeMany(s, args...);
  109|     30|    size_t remaining_after = s.size();
  110|     30|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 12, False: 18]
  ------------------
  111|     12|        throw std::ios_base::failure("Size of value was not the stated size");
  112|     12|    }
  113|     30|}
_Z21UnserializeFromVectorI10DataStreamJR6CTxOutEEvRT_DpOT0_:
  105|    932|{
  106|    932|    size_t expected_size = ReadCompactSize(s);
  107|    932|    size_t remaining_before = s.size();
  108|    932|    UnserializeMany(s, args...);
  109|    932|    size_t remaining_after = s.size();
  110|    932|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 8, False: 924]
  ------------------
  111|      8|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      8|    }
  113|    932|}
_Z21UnserializeFromVectorI10DataStreamJRiEEvRT_DpOT0_:
  105|      7|{
  106|      7|    size_t expected_size = ReadCompactSize(s);
  107|      7|    size_t remaining_before = s.size();
  108|      7|    UnserializeMany(s, args...);
  109|      7|    size_t remaining_after = s.size();
  110|      7|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 2, False: 5]
  ------------------
  111|      2|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      2|    }
  113|      7|}
_Z21DeserializeHDKeypathsI10DataStreamEvRT_RKNSt3__16vectorIhNS3_9allocatorIhEEEERNS3_3mapI7CPubKey13KeyOriginInfoNS3_4lessISB_EENS5_INS3_4pairIKSB_SC_EEEEEE:
  144|    940|{
  145|       |    // Make sure that the key is the size of pubkey + 1
  146|    940|    if (key.size() != CPubKey::SIZE + 1 && key.size() != CPubKey::COMPRESSED_SIZE + 1) {
  ------------------
  |  Branch (146:9): [True: 939, False: 1]
  |  Branch (146:44): [True: 22, False: 917]
  ------------------
  147|     22|        throw std::ios_base::failure("Size of key was not the expected size for the type BIP32 keypath");
  148|     22|    }
  149|       |    // Read in the pubkey from key
  150|    918|    CPubKey pubkey(key.begin() + 1, key.end());
  151|    918|    if (!pubkey.IsFullyValid()) {
  ------------------
  |  Branch (151:9): [True: 6, False: 912]
  ------------------
  152|      6|       throw std::ios_base::failure("Invalid pubkey");
  153|      6|    }
  154|    912|    if (hd_keypaths.count(pubkey) > 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 911]
  ------------------
  155|      1|        throw std::ios_base::failure("Duplicate Key, pubkey derivation path already provided");
  156|      1|    }
  157|       |
  158|    911|    KeyOriginInfo keypath;
  159|    911|    DeserializeHDKeypath(s, keypath);
  160|       |
  161|       |    // Add to map
  162|    911|    hd_keypaths.emplace(pubkey, std::move(keypath));
  163|    911|}
_Z21UnserializeFromVectorI10DataStreamJRNSt3__16vectorINS2_IhNS1_9allocatorIhEEEENS3_IS5_EEEEEEvRT_DpOT0_:
  105|     49|{
  106|     49|    size_t expected_size = ReadCompactSize(s);
  107|     49|    size_t remaining_before = s.size();
  108|     49|    UnserializeMany(s, args...);
  109|     49|    size_t remaining_after = s.size();
  110|     49|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 1, False: 48]
  ------------------
  111|      1|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      1|    }
  113|     49|}
_Z21UnserializeFromVectorI10DataStreamJR11XOnlyPubKeyEEvRT_DpOT0_:
  105|     22|{
  106|     22|    size_t expected_size = ReadCompactSize(s);
  107|     22|    size_t remaining_before = s.size();
  108|     22|    UnserializeMany(s, args...);
  109|     22|    size_t remaining_after = s.size();
  110|     22|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 2, False: 20]
  ------------------
  111|      2|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      2|    }
  113|     22|}
_Z21UnserializeFromVectorI10DataStreamJR7uint256EEvRT_DpOT0_:
  105|      1|{
  106|      1|    size_t expected_size = ReadCompactSize(s);
  107|      1|    size_t remaining_before = s.size();
  108|      1|    UnserializeMany(s, args...);
  109|      1|    size_t remaining_after = s.size();
  110|      1|    if (remaining_after + expected_size != remaining_before) {
  ------------------
  |  Branch (110:9): [True: 1, False: 0]
  ------------------
  111|      1|        throw std::ios_base::failure("Size of value was not the stated size");
  112|      1|    }
  113|      1|}
_ZN10PSBTOutput11UnserializeI10DataStreamEEvRT_:
  795|  1.35k|    inline void Unserialize(Stream& s) {
  796|       |        // Used for duplicate key detection
  797|  1.35k|        std::set<std::vector<unsigned char>> key_lookup;
  798|       |
  799|       |        // Read loop
  800|  1.35k|        bool found_sep = false;
  801|  6.62k|        while(!s.empty()) {
  ------------------
  |  Branch (801:15): [True: 6.62k, False: 3]
  ------------------
  802|       |            // Read
  803|  6.62k|            std::vector<unsigned char> key;
  804|  6.62k|            s >> key;
  805|       |
  806|       |            // the key is empty if that was actually a separator byte
  807|       |            // This is a special case for key lengths 0 as those are not allowed (except for separator)
  808|  6.62k|            if (key.empty()) {
  ------------------
  |  Branch (808:17): [True: 1.06k, False: 5.55k]
  ------------------
  809|  1.06k|                found_sep = true;
  810|  1.06k|                break;
  811|  1.06k|            }
  812|       |
  813|       |            // Type is compact size uint at beginning of key
  814|  5.55k|            SpanReader skey{key};
  815|  5.55k|            uint64_t type = ReadCompactSize(skey);
  816|       |
  817|       |            // Do stuff based on type
  818|  5.55k|            switch(type) {
  819|    141|                case PSBT_OUT_REDEEMSCRIPT:
  ------------------
  |  Branch (819:17): [True: 141, False: 5.41k]
  ------------------
  820|    141|                {
  821|    141|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (821:25): [True: 1, False: 140]
  ------------------
  822|      1|                        throw std::ios_base::failure("Duplicate Key, output redeemScript already provided");
  823|    140|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (823:32): [True: 9, False: 131]
  ------------------
  824|      9|                        throw std::ios_base::failure("Output redeemScript key is more than one byte type");
  825|      9|                    }
  826|    131|                    s >> redeem_script;
  827|    131|                    break;
  828|    141|                }
  829|    168|                case PSBT_OUT_WITNESSSCRIPT:
  ------------------
  |  Branch (829:17): [True: 168, False: 5.38k]
  ------------------
  830|    168|                {
  831|    168|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (831:25): [True: 4, False: 164]
  ------------------
  832|      4|                        throw std::ios_base::failure("Duplicate Key, output witnessScript already provided");
  833|    164|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (833:32): [True: 1, False: 163]
  ------------------
  834|      1|                        throw std::ios_base::failure("Output witnessScript key is more than one byte type");
  835|      1|                    }
  836|    163|                    s >> witness_script;
  837|    163|                    break;
  838|    168|                }
  839|    897|                case PSBT_OUT_BIP32_DERIVATION:
  ------------------
  |  Branch (839:17): [True: 897, False: 4.65k]
  ------------------
  840|    897|                {
  841|    897|                    DeserializeHDKeypaths(s, key, hd_keypaths);
  842|    897|                    break;
  843|    168|                }
  844|     23|                case PSBT_OUT_TAP_INTERNAL_KEY:
  ------------------
  |  Branch (844:17): [True: 23, False: 5.53k]
  ------------------
  845|     23|                {
  846|     23|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (846:25): [True: 0, False: 23]
  ------------------
  847|      0|                        throw std::ios_base::failure("Duplicate Key, output Taproot internal key already provided");
  848|     23|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (848:32): [True: 2, False: 21]
  ------------------
  849|      2|                        throw std::ios_base::failure("Output Taproot internal key key is more than one byte type");
  850|      2|                    }
  851|     21|                    UnserializeFromVector(s, m_tap_internal_key);
  852|     21|                    break;
  853|     23|                }
  854|    479|                case PSBT_OUT_TAP_TREE:
  ------------------
  |  Branch (854:17): [True: 479, False: 5.07k]
  ------------------
  855|    479|                {
  856|    479|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (856:25): [True: 1, False: 478]
  ------------------
  857|      1|                        throw std::ios_base::failure("Duplicate Key, output Taproot tree already provided");
  858|    478|                    } else if (key.size() != 1) {
  ------------------
  |  Branch (858:32): [True: 8, False: 470]
  ------------------
  859|      8|                        throw std::ios_base::failure("Output Taproot tree key is more than one byte type");
  860|      8|                    }
  861|    470|                    std::vector<unsigned char> tree_v;
  862|    470|                    s >> tree_v;
  863|    470|                    SpanReader s_tree{tree_v};
  864|    470|                    if (s_tree.empty()) {
  ------------------
  |  Branch (864:25): [True: 1, False: 469]
  ------------------
  865|      1|                        throw std::ios_base::failure("Output Taproot tree must not be empty");
  866|      1|                    }
  867|    469|                    TaprootBuilder builder;
  868|  5.33k|                    while (!s_tree.empty()) {
  ------------------
  |  Branch (868:28): [True: 4.88k, False: 459]
  ------------------
  869|  4.88k|                        uint8_t depth;
  870|  4.88k|                        uint8_t leaf_ver;
  871|  4.88k|                        std::vector<unsigned char> script;
  872|  4.88k|                        s_tree >> depth;
  873|  4.88k|                        s_tree >> leaf_ver;
  874|  4.88k|                        s_tree >> script;
  875|  4.88k|                        if (depth > TAPROOT_CONTROL_MAX_NODE_COUNT) {
  ------------------
  |  Branch (875:29): [True: 1, False: 4.87k]
  ------------------
  876|      1|                            throw std::ios_base::failure("Output Taproot tree has as leaf greater than Taproot maximum depth");
  877|      1|                        }
  878|  4.87k|                        if ((leaf_ver & ~TAPROOT_LEAF_MASK) != 0) {
  ------------------
  |  Branch (878:29): [True: 9, False: 4.87k]
  ------------------
  879|      9|                            throw std::ios_base::failure("Output Taproot tree has a leaf with an invalid leaf version");
  880|      9|                        }
  881|  4.87k|                        m_tap_tree.emplace_back(depth, leaf_ver, script);
  882|  4.87k|                        builder.Add((int)depth, script, (int)leaf_ver, /*track=*/true);
  883|  4.87k|                    }
  884|    459|                    if (!builder.IsComplete()) {
  ------------------
  |  Branch (884:25): [True: 10, False: 449]
  ------------------
  885|     10|                        throw std::ios_base::failure("Output Taproot tree is malformed");
  886|     10|                    }
  887|    449|                    break;
  888|    459|                }
  889|    449|                case PSBT_OUT_TAP_BIP32_DERIVATION:
  ------------------
  |  Branch (889:17): [True: 195, False: 5.35k]
  ------------------
  890|    195|                {
  891|    195|                    if (!key_lookup.emplace(key).second) {
  ------------------
  |  Branch (891:25): [True: 1, False: 194]
  ------------------
  892|      1|                        throw std::ios_base::failure("Duplicate Key, output Taproot BIP32 keypath already provided");
  893|    194|                    } else if (key.size() != 33) {
  ------------------
  |  Branch (893:32): [True: 3, False: 191]
  ------------------
  894|      3|                        throw std::ios_base::failure("Output Taproot BIP32 keypath key is not at 33 bytes");
  895|      3|                    }
  896|    191|                    XOnlyPubKey xonly(uint256(Span<uint8_t>(key).last(32)));
  897|    191|                    std::set<uint256> leaf_hashes;
  898|    191|                    uint64_t value_len = ReadCompactSize(s);
  899|    191|                    size_t before_hashes = s.size();
  900|    191|                    s >> leaf_hashes;
  901|    191|                    size_t after_hashes = s.size();
  902|    191|                    size_t hashes_len = before_hashes - after_hashes;
  903|    191|                    if (hashes_len > value_len) {
  ------------------
  |  Branch (903:25): [True: 8, False: 183]
  ------------------
  904|      8|                        throw std::ios_base::failure("Output Taproot BIP32 keypath has an invalid length");
  905|      8|                    }
  906|    183|                    size_t origin_len = value_len - hashes_len;
  907|    183|                    m_tap_bip32_paths.emplace(xonly, std::make_pair(leaf_hashes, DeserializeKeyOrigin(s, origin_len)));
  908|    183|                    break;
  909|    191|                }
  910|    385|                case PSBT_OUT_PROPRIETARY:
  ------------------
  |  Branch (910:17): [True: 385, False: 5.16k]
  ------------------
  911|    385|                {
  912|    385|                    PSBTProprietary this_prop;
  913|    385|                    skey >> this_prop.identifier;
  914|    385|                    this_prop.subtype = ReadCompactSize(skey);
  915|    385|                    this_prop.key = key;
  916|       |
  917|    385|                    if (m_proprietary.count(this_prop) > 0) {
  ------------------
  |  Branch (917:25): [True: 2, False: 383]
  ------------------
  918|      2|                        throw std::ios_base::failure("Duplicate Key, proprietary key already found");
  919|      2|                    }
  920|    383|                    s >> this_prop.value;
  921|    383|                    m_proprietary.insert(this_prop);
  922|    383|                    break;
  923|    385|                }
  924|       |                // Unknown stuff
  925|  3.21k|                default: {
  ------------------
  |  Branch (925:17): [True: 3.21k, False: 2.33k]
  ------------------
  926|  3.21k|                    if (unknown.count(key) > 0) {
  ------------------
  |  Branch (926:25): [True: 10, False: 3.20k]
  ------------------
  927|     10|                        throw std::ios_base::failure("Duplicate Key, key for unknown value already provided");
  928|     10|                    }
  929|       |                    // Read in the value
  930|  3.20k|                    std::vector<unsigned char> val_bytes;
  931|  3.20k|                    s >> val_bytes;
  932|  3.20k|                    unknown.emplace(std::move(key), std::move(val_bytes));
  933|  3.20k|                    break;
  934|  3.21k|                }
  935|  5.55k|            }
  936|  5.55k|        }
  937|       |
  938|  1.07k|        if (!found_sep) {
  ------------------
  |  Branch (938:13): [True: 3, False: 1.06k]
  ------------------
  939|      3|            throw std::ios_base::failure("Separator is missing at the end of an output map");
  940|      3|        }
  941|  1.07k|    }

_ZNK11XOnlyPubKey9GetKeyIDsEv:
  201|  3.67k|{
  202|  3.67k|    std::vector<CKeyID> out;
  203|       |    // For now, use the old full pubkey-based key derivation logic. As it is indexed by
  204|       |    // Hash160(full pubkey), we need to return both a version prefixed with 0x02, and one
  205|       |    // with 0x03.
  206|  3.67k|    unsigned char b[33] = {0x02};
  207|  3.67k|    std::copy(m_keydata.begin(), m_keydata.end(), b + 1);
  208|  3.67k|    CPubKey fullpubkey;
  209|  3.67k|    fullpubkey.Set(b, b + 33);
  210|  3.67k|    out.push_back(fullpubkey.GetID());
  211|  3.67k|    b[0] = 0x03;
  212|  3.67k|    fullpubkey.Set(b, b + 33);
  213|  3.67k|    out.push_back(fullpubkey.GetID());
  214|  3.67k|    return out;
  215|  3.67k|}
_ZNK11XOnlyPubKey12IsFullyValidEv:
  225|  6.86k|{
  226|  6.86k|    secp256k1_xonly_pubkey pubkey;
  227|  6.86k|    return secp256k1_xonly_pubkey_parse(secp256k1_context_static, &pubkey, m_keydata.data());
  228|  6.86k|}
_ZNK11XOnlyPubKey19ComputeTapTweakHashEPK7uint256:
  241|  4.84k|{
  242|  4.84k|    if (merkle_root == nullptr) {
  ------------------
  |  Branch (242:9): [True: 1.16k, False: 3.68k]
  ------------------
  243|       |        // We have no scripts. The actual tweak does not matter, but follow BIP341 here to
  244|       |        // allow for reproducible tweaking.
  245|  1.16k|        return (HashWriter{HASHER_TAPTWEAK} << m_keydata).GetSHA256();
  246|  3.68k|    } else {
  247|  3.68k|        return (HashWriter{HASHER_TAPTWEAK} << m_keydata << *merkle_root).GetSHA256();
  248|  3.68k|    }
  249|  4.84k|}
_ZNK11XOnlyPubKey14CreateTapTweakEPK7uint256:
  260|  4.84k|{
  261|  4.84k|    secp256k1_xonly_pubkey base_point;
  262|  4.84k|    if (!secp256k1_xonly_pubkey_parse(secp256k1_context_static, &base_point, data())) return std::nullopt;
  ------------------
  |  Branch (262:9): [True: 0, False: 4.84k]
  ------------------
  263|  4.84k|    secp256k1_pubkey out;
  264|  4.84k|    uint256 tweak = ComputeTapTweakHash(merkle_root);
  265|  4.84k|    if (!secp256k1_xonly_pubkey_tweak_add(secp256k1_context_static, &out, &base_point, tweak.data())) return std::nullopt;
  ------------------
  |  Branch (265:9): [True: 0, False: 4.84k]
  ------------------
  266|  4.84k|    int parity = -1;
  267|  4.84k|    std::pair<XOnlyPubKey, bool> ret;
  268|  4.84k|    secp256k1_xonly_pubkey out_xonly;
  269|  4.84k|    if (!secp256k1_xonly_pubkey_from_pubkey(secp256k1_context_static, &out_xonly, &parity, &out)) return std::nullopt;
  ------------------
  |  Branch (269:9): [True: 0, False: 4.84k]
  ------------------
  270|  4.84k|    secp256k1_xonly_pubkey_serialize(secp256k1_context_static, ret.first.begin(), &out_xonly);
  271|  4.84k|    assert(parity == 0 || parity == 1);
  272|  4.84k|    ret.second = parity;
  273|  4.84k|    return ret;
  274|  4.84k|}
_ZNK7CPubKey12IsFullyValidEv:
  314|  15.1k|bool CPubKey::IsFullyValid() const {
  315|  15.1k|    if (!IsValid())
  ------------------
  |  Branch (315:9): [True: 1.37k, False: 13.7k]
  ------------------
  316|  1.37k|        return false;
  317|  13.7k|    secp256k1_pubkey pubkey;
  318|  13.7k|    return secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size());
  319|  15.1k|}
_ZN7CPubKey10DecompressEv:
  321|  3.65k|bool CPubKey::Decompress() {
  322|  3.65k|    if (!IsValid())
  ------------------
  |  Branch (322:9): [True: 0, False: 3.65k]
  ------------------
  323|      0|        return false;
  324|  3.65k|    secp256k1_pubkey pubkey;
  325|  3.65k|    if (!secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size())) {
  ------------------
  |  Branch (325:9): [True: 1.82k, False: 1.83k]
  ------------------
  326|  1.82k|        return false;
  327|  1.82k|    }
  328|  1.83k|    unsigned char pub[SIZE];
  329|  1.83k|    size_t publen = SIZE;
  330|  1.83k|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  213|  1.83k|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|  1.83k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  331|  1.83k|    Set(pub, pub + publen);
  332|  1.83k|    return true;
  333|  3.65k|}
_ZNK7CPubKey6DeriveERS_R7uint256jRKS1_:
  335|  43.0k|bool CPubKey::Derive(CPubKey& pubkeyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const {
  336|  43.0k|    assert(IsValid());
  337|  43.0k|    assert((nChild >> 31) == 0);
  338|  43.0k|    assert(size() == COMPRESSED_SIZE);
  339|  43.0k|    unsigned char out[64];
  340|  43.0k|    BIP32Hash(cc, nChild, *begin(), begin()+1, out);
  341|  43.0k|    memcpy(ccChild.begin(), out+32, 32);
  342|  43.0k|    secp256k1_pubkey pubkey;
  343|  43.0k|    if (!secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size())) {
  ------------------
  |  Branch (343:9): [True: 0, False: 43.0k]
  ------------------
  344|      0|        return false;
  345|      0|    }
  346|  43.0k|    if (!secp256k1_ec_pubkey_tweak_add(secp256k1_context_static, &pubkey, out)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 43.0k]
  ------------------
  347|      0|        return false;
  348|      0|    }
  349|  43.0k|    unsigned char pub[COMPRESSED_SIZE];
  350|  43.0k|    size_t publen = COMPRESSED_SIZE;
  351|  43.0k|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, SECP256K1_EC_COMPRESSED);
  ------------------
  |  |  212|  43.0k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|  43.0k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  198|  43.0k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
  352|  43.0k|    pubkeyChild.Set(pub, pub + publen);
  353|  43.0k|    return true;
  354|  43.0k|}
_ZNK10CExtPubKey6EncodeEPh:
  376|   332k|void CExtPubKey::Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const {
  377|   332k|    code[0] = nDepth;
  378|   332k|    memcpy(code+1, vchFingerprint, 4);
  379|   332k|    WriteBE32(code+5, nChild);
  380|   332k|    memcpy(code+9, chaincode.begin(), 32);
  381|   332k|    assert(pubkey.size() == CPubKey::COMPRESSED_SIZE);
  382|   332k|    memcpy(code+41, pubkey.begin(), CPubKey::COMPRESSED_SIZE);
  383|   332k|}
_ZN10CExtPubKey6DecodeEPKh:
  385|  5.21k|void CExtPubKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
  386|  5.21k|    nDepth = code[0];
  387|  5.21k|    memcpy(vchFingerprint, code+1, 4);
  388|  5.21k|    nChild = ReadBE32(code+5);
  389|  5.21k|    memcpy(chaincode.begin(), code+9, 32);
  390|  5.21k|    pubkey.Set(code+41, code+BIP32_EXTKEY_SIZE);
  391|  5.21k|    if ((nDepth == 0 && (nChild != 0 || ReadLE32(vchFingerprint) != 0)) || !pubkey.IsFullyValid()) pubkey = CPubKey();
  ------------------
  |  Branch (391:10): [True: 4.99k, False: 216]
  |  Branch (391:26): [True: 13, False: 4.98k]
  |  Branch (391:41): [True: 3, False: 4.97k]
  |  Branch (391:76): [True: 24, False: 5.17k]
  ------------------
  392|  5.21k|}
_ZN10CExtPubKey17DecodeWithVersionEPKh:
  401|    250|{
  402|    250|    memcpy(version, code, 4);
  403|    250|    Decode(&code[4]);
  404|    250|}
_ZNK10CExtPubKey6DeriveERS_j:
  406|  43.0k|bool CExtPubKey::Derive(CExtPubKey &out, unsigned int _nChild) const {
  407|  43.0k|    if (nDepth == std::numeric_limits<unsigned char>::max()) return false;
  ------------------
  |  Branch (407:9): [True: 0, False: 43.0k]
  ------------------
  408|  43.0k|    out.nDepth = nDepth + 1;
  409|  43.0k|    CKeyID id = pubkey.GetID();
  410|  43.0k|    memcpy(out.vchFingerprint, &id, 4);
  411|  43.0k|    out.nChild = _nChild;
  412|  43.0k|    return pubkey.Derive(out.pubkey, out.chaincode, _nChild, chaincode);
  413|  43.0k|}

_ZN6CKeyIDC2Ev:
   26|  27.6k|    CKeyID() : uint160() {}
_ZN6CKeyIDC2ERK7uint160:
   27|  1.83M|    explicit CKeyID(const uint160& in) : uint160(in) {}
_ZN7CPubKey6GetLenEh:
   61|  4.62M|    {
   62|  4.62M|        if (chHeader == 2 || chHeader == 3)
  ------------------
  |  Branch (62:13): [True: 2.45M, False: 2.16M]
  |  Branch (62:30): [True: 1.99M, False: 169k]
  ------------------
   63|  4.45M|            return COMPRESSED_SIZE;
   64|   169k|        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
  ------------------
  |  Branch (64:13): [True: 65.5k, False: 103k]
  |  Branch (64:30): [True: 554, False: 103k]
  |  Branch (64:47): [True: 677, False: 102k]
  ------------------
   65|  66.7k|            return SIZE;
   66|   102k|        return 0;
   67|   169k|    }
_ZN7CPubKey10InvalidateEv:
   71|  1.87M|    {
   72|  1.87M|        vch[0] = 0xFF;
   73|  1.87M|    }
_ZN7CPubKey9ValidSizeERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
   77|  31.3k|    bool static ValidSize(const std::vector<unsigned char> &vch) {
   78|  31.3k|      return vch.size() > 0 && GetLen(vch[0]) == vch.size();
  ------------------
  |  Branch (78:14): [True: 27.9k, False: 3.39k]
  |  Branch (78:32): [True: 25.3k, False: 2.56k]
  ------------------
   79|  31.3k|    }
_ZN7CPubKeyC2Ev:
   83|  1.87M|    {
   84|  1.87M|        Invalidate();
   85|  1.87M|    }
_ZN7CPubKeyC2E4SpanIKhE:
  107|  18.3k|    {
  108|  18.3k|        Set(_vch.begin(), _vch.end());
  109|  18.3k|    }
_ZNK7CPubKey4sizeEv:
  112|  4.51M|    unsigned int size() const { return GetLen(vch[0]); }
_ZNK7CPubKey4dataEv:
  113|  1.03M|    const unsigned char* data() const { return vch; }
_ZNK7CPubKey5beginEv:
  114|   824k|    const unsigned char* begin() const { return vch; }
_ZNK7CPubKey3endEv:
  115|  82.6k|    const unsigned char* end() const { return vch + size(); }
_ZeqRK7CPubKeyS1_:
  120|  76.2k|    {
  121|  76.2k|        return a.vch[0] == b.vch[0] &&
  ------------------
  |  Branch (121:16): [True: 76.2k, False: 0]
  ------------------
  122|  76.2k|               memcmp(a.vch, b.vch, a.size()) == 0;
  ------------------
  |  Branch (122:16): [True: 76.2k, False: 0]
  ------------------
  123|  76.2k|    }
_ZltRK7CPubKeyS1_:
  129|   430k|    {
  130|   430k|        return a.vch[0] < b.vch[0] ||
  ------------------
  |  Branch (130:16): [True: 86.4k, False: 343k]
  ------------------
  131|   430k|               (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
  ------------------
  |  Branch (131:17): [True: 277k, False: 66.2k]
  |  Branch (131:41): [True: 109k, False: 168k]
  ------------------
  132|   430k|    }
_ZgtRK7CPubKeyS1_:
  134|    419|    {
  135|    419|        return a.vch[0] > b.vch[0] ||
  ------------------
  |  Branch (135:16): [True: 2, False: 417]
  ------------------
  136|    419|               (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) > 0);
  ------------------
  |  Branch (136:17): [True: 417, False: 0]
  |  Branch (136:41): [True: 262, False: 155]
  ------------------
  137|    419|    }
_ZNK7CPubKey5GetIDEv:
  165|  1.79M|    {
  166|  1.79M|        return CKeyID(Hash160(Span{vch}.first(size())));
  167|  1.79M|    }
_ZNK7CPubKey7IsValidEv:
  190|   443k|    {
  191|   443k|        return size() > 0;
  192|   443k|    }
_ZNK7CPubKey16IsValidNonHybridEv:
  196|  5.12k|    {
  197|  5.12k|        return size() > 0 && (vch[0] == 0x02 || vch[0] == 0x03 || vch[0] == 0x04);
  ------------------
  |  Branch (197:16): [True: 5.12k, False: 0]
  |  Branch (197:31): [True: 1.92k, False: 3.20k]
  |  Branch (197:49): [True: 1.18k, False: 2.01k]
  |  Branch (197:67): [True: 2.01k, False: 1]
  ------------------
  198|  5.12k|    }
_ZNK7CPubKey12IsCompressedEv:
  205|  4.56k|    {
  206|  4.56k|        return size() == COMPRESSED_SIZE;
  207|  4.56k|    }
_ZNK11XOnlyPubKey6IsNullEv:
  254|  2.64k|    bool IsNull() const { return m_keydata.IsNull(); }
_ZN11XOnlyPubKeyC2ENSt3__14spanIKhLm18446744073709551615EEE:
  257|   607k|    constexpr explicit XOnlyPubKey(std::span<const unsigned char> bytes) : m_keydata{bytes} {}
_ZN11XOnlyPubKeyC2ERK7CPubKey:
  260|   606k|    explicit XOnlyPubKey(const CPubKey& pubkey) : XOnlyPubKey(Span{pubkey}.subspan(1, 32)) {}
_ZN11XOnlyPubKey4sizeEv:
  293|  1.95k|    static constexpr size_t size() { return decltype(m_keydata)::size(); }
_ZNK11XOnlyPubKey4dataEv:
  294|  6.79k|    const unsigned char* data() const { return m_keydata.begin(); }
_ZNK11XOnlyPubKey5beginEv:
  295|   608k|    const unsigned char* begin() const { return m_keydata.begin(); }
_ZNK11XOnlyPubKey3endEv:
  296|   608k|    const unsigned char* end() const { return m_keydata.end(); }
_ZN11XOnlyPubKey5beginEv:
  298|  8.64k|    unsigned char* begin() { return m_keydata.begin(); }
_ZNK11XOnlyPubKeyltERKS_:
  302|  9.18k|    bool operator<(const XOnlyPubKey& other) const { return m_keydata < other.m_keydata; }
_ZeqRK10CExtPubKeyS1_:
  351|  76.2k|    {
  352|  76.2k|        return a.nDepth == b.nDepth &&
  ------------------
  |  Branch (352:16): [True: 76.2k, False: 0]
  ------------------
  353|  76.2k|            memcmp(a.vchFingerprint, b.vchFingerprint, sizeof(vchFingerprint)) == 0 &&
  ------------------
  |  Branch (353:13): [True: 76.2k, False: 0]
  ------------------
  354|  76.2k|            a.nChild == b.nChild &&
  ------------------
  |  Branch (354:13): [True: 76.2k, False: 0]
  ------------------
  355|  76.2k|            a.chaincode == b.chaincode &&
  ------------------
  |  Branch (355:13): [True: 76.2k, False: 0]
  ------------------
  356|  76.2k|            a.pubkey == b.pubkey;
  ------------------
  |  Branch (356:13): [True: 76.2k, False: 0]
  ------------------
  357|  76.2k|    }
_ZneRK10CExtPubKeyS1_:
  360|  76.2k|    {
  361|  76.2k|        return !(a == b);
  362|  76.2k|    }
_ZltRK10CExtPubKeyS1_:
  365|    780|    {
  366|    780|        if (a.pubkey < b.pubkey) {
  ------------------
  |  Branch (366:13): [True: 361, False: 419]
  ------------------
  367|    361|            return true;
  368|    419|        } else if (a.pubkey > b.pubkey) {
  ------------------
  |  Branch (368:20): [True: 264, False: 155]
  ------------------
  369|    264|            return false;
  370|    264|        }
  371|    155|        return a.chaincode < b.chaincode;
  372|    780|    }
_ZN7CPubKey3SetIPKhEEvT_S3_:
   90|  23.5k|    {
   91|  23.5k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 23.5k]
  ------------------
   92|  23.5k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 22.2k, False: 1.30k]
  |  Branch (92:20): [True: 22.2k, False: 36]
  ------------------
   93|  22.2k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|  1.33k|        else
   95|  1.33k|            Invalidate();
   96|  23.5k|    }
_ZN11XOnlyPubKeyC2Ev:
  242|  97.8k|    XOnlyPubKey() = default;
_ZNK7CPubKey9SerializeI10DataStreamEEvRT_:
  142|  7.55k|    {
  143|  7.55k|        unsigned int len = size();
  144|  7.55k|        ::WriteCompactSize(s, len);
  145|  7.55k|        s << Span{vch, len};
  146|  7.55k|    }
_ZN7CPubKeyC2INSt3__111__wrap_iterIPhEEEET_S5_:
  101|  1.08k|    {
  102|  1.08k|        Set(pbegin, pend);
  103|  1.08k|    }
_ZN7CPubKey3SetINSt3__111__wrap_iterIPhEEEEvT_S5_:
   90|  1.08k|    {
   91|  1.08k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 1.08k]
  ------------------
   92|  1.08k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 1.08k, False: 2]
  |  Branch (92:20): [True: 1.08k, False: 2]
  ------------------
   93|  1.08k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|      4|        else
   95|      4|            Invalidate();
   96|  1.08k|    }
_ZN7CPubKeyC2INSt3__111__wrap_iterIPKhEEEET_S6_:
  101|    918|    {
  102|    918|        Set(pbegin, pend);
  103|    918|    }
_ZN7CPubKey3SetINSt3__111__wrap_iterIPKhEEEEvT_S6_:
   90|    918|    {
   91|    918|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 918]
  ------------------
   92|    918|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 916, False: 2]
  |  Branch (92:20): [True: 913, False: 3]
  ------------------
   93|    913|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|      5|        else
   95|      5|            Invalidate();
   96|    918|    }
_ZN11XOnlyPubKey16SerializationOpsI10SpanReaderS_17ActionUnserializeEEvRT0_RT_T1_:
  305|  1.78k|    SERIALIZE_METHODS(XOnlyPubKey, obj) { READWRITE(obj.m_keydata); }
  ------------------
  |  |  156|  1.78k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN11XOnlyPubKey16SerializationOpsI10DataStreamS_17ActionUnserializeEEvRT0_RT_T1_:
  305|     22|    SERIALIZE_METHODS(XOnlyPubKey, obj) { READWRITE(obj.m_keydata); }
  ------------------
  |  |  156|     22|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN7CPubKey3SetIPhEEvT_S2_:
   90|  54.7k|    {
   91|  54.7k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 54.7k]
  ------------------
   92|  54.7k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 54.7k, False: 0]
  |  Branch (92:20): [True: 54.7k, False: 0]
  ------------------
   93|  54.7k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|      0|        else
   95|      0|            Invalidate();
   96|  54.7k|    }

_Z30MakeRandDeterministicDANGEROUSRK7uint256:
  671|  11.6k|{
  672|  11.6k|    GetRNGState().MakeDeterministic(seed);
  673|  11.6k|}
_Z12GetRandBytes4SpanIhE:
  677|   112k|{
  678|   112k|    g_used_g_prng = true;
  679|   112k|    ProcRand(bytes.data(), bytes.size(), RNGLevel::FAST, /*always_use_real_rng=*/false);
  680|   112k|}
_ZN17FastRandomContext10RandomSeedEv:
  695|   112k|{
  696|   112k|    uint256 seed = GetRandHash();
  697|   112k|    rng.SetKey(MakeByteSpan(seed));
  698|   112k|    requires_seed = false;
  699|   112k|}
_ZN17FastRandomContextC2Eb:
  764|   112k|FastRandomContext::FastRandomContext(bool fDeterministic) noexcept : requires_seed(!fDeterministic), rng(ZERO_KEY)
  765|   112k|{
  766|       |    // Note that despite always initializing with ZERO_KEY, requires_seed is set to true if not
  767|       |    // fDeterministic. That means the rng will be reinitialized with a secure random key upon first
  768|       |    // use.
  769|   112k|}
random.cpp:_ZN12_GLOBAL__N_111GetRNGStateEv:
  526|   124k|{
  527|       |    // This idiom relies on the guarantee that static variable are initialized
  528|       |    // on first call, even when multiple parallel calls are permitted.
  529|   124k|    static std::vector<RNGState, secure_allocator<RNGState>> g_rng(1);
  530|   124k|    return g_rng[0];
  531|   124k|}
random.cpp:_ZN12_GLOBAL__N_18RNGState17MakeDeterministicERK7uint256:
  475|  11.6k|    {
  476|  11.6k|        LOCK(m_mutex);
  ------------------
  |  |  257|  11.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  11.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  11.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  11.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|  11.6k|        m_deterministic_prng.emplace(MakeByteSpan(seed));
  478|  11.6k|    }
random.cpp:_ZN12_GLOBAL__N_18ProcRandEPhiNS_8RNGLevelEb:
  638|   112k|{
  639|       |    // Make sure the RNG is initialized first (as all Seed* function possibly need hwrand to be available).
  640|   112k|    RNGState& rng = GetRNGState();
  641|       |
  642|   112k|    assert(num <= 32);
  643|       |
  644|   112k|    CSHA512 hasher;
  645|   112k|    switch (level) {
  ------------------
  |  Branch (645:13): [True: 0, False: 112k]
  ------------------
  646|   112k|    case RNGLevel::FAST:
  ------------------
  |  Branch (646:5): [True: 112k, False: 0]
  ------------------
  647|   112k|        SeedFast(hasher);
  648|   112k|        break;
  649|      0|    case RNGLevel::SLOW:
  ------------------
  |  Branch (649:5): [True: 0, False: 112k]
  ------------------
  650|      0|        SeedSlow(hasher, rng);
  651|      0|        break;
  652|      0|    case RNGLevel::PERIODIC:
  ------------------
  |  Branch (652:5): [True: 0, False: 112k]
  ------------------
  653|      0|        SeedPeriodic(hasher, rng);
  654|      0|        break;
  655|   112k|    }
  656|       |
  657|       |    // Combine with and update state
  658|   112k|    if (!rng.MixExtract(out, num, std::move(hasher), false, always_use_real_rng)) {
  ------------------
  |  Branch (658:9): [True: 0, False: 112k]
  ------------------
  659|       |        // On the first invocation, also seed with SeedStartup().
  660|      0|        CSHA512 startup_hasher;
  661|      0|        SeedStartup(startup_hasher, rng);
  662|      0|        rng.MixExtract(out, num, std::move(startup_hasher), true, always_use_real_rng);
  663|      0|    }
  664|   112k|}
random.cpp:_ZN12_GLOBAL__N_18SeedFastER7CSHA512:
  545|   112k|{
  546|   112k|    unsigned char buffer[32];
  547|       |
  548|       |    // Stack pointer to indirectly commit to thread/callstack
  549|   112k|    const unsigned char* ptr = buffer;
  550|   112k|    hasher.Write((const unsigned char*)&ptr, sizeof(ptr));
  551|       |
  552|       |    // Hardware randomness is very fast when available; use it always.
  553|   112k|    SeedHardwareFast(hasher);
  554|       |
  555|       |    // High-precision timestamp
  556|   112k|    SeedTimestamp(hasher);
  557|   112k|}
random.cpp:_ZN12_GLOBAL__N_116SeedHardwareFastER7CSHA512:
  259|   112k|void SeedHardwareFast(CSHA512& hasher) noexcept {
  260|   112k|#if defined(__x86_64__) || defined(__amd64__) || defined(__i386__)
  261|   112k|    if (g_rdrand_supported) {
  ------------------
  |  Branch (261:9): [True: 112k, False: 0]
  ------------------
  262|   112k|        uint64_t out = GetRdRand();
  263|   112k|        hasher.Write((const unsigned char*)&out, sizeof(out));
  264|   112k|        return;
  265|   112k|    }
  266|       |#elif defined(__aarch64__) && defined(HWCAP2_RNG)
  267|       |    if (g_rndr_supported) {
  268|       |        uint64_t out = GetRNDR();
  269|       |        hasher.Write((const unsigned char*)&out, sizeof(out));
  270|       |        return;
  271|       |    }
  272|       |#endif
  273|   112k|}
random.cpp:_ZN12_GLOBAL__N_19GetRdRandEv:
  126|   112k|{
  127|       |    // RdRand may very rarely fail. Invoke it up to 10 times in a loop to reduce this risk.
  128|       |#ifdef __i386__
  129|       |    uint8_t ok = 0;
  130|       |    // Initialize to 0 to silence a compiler warning that r1 or r2 may be used
  131|       |    // uninitialized. Even if rdrand fails (!ok) it will set the output to 0,
  132|       |    // but there is no way that the compiler could know that.
  133|       |    uint32_t r1 = 0, r2 = 0;
  134|       |    for (int i = 0; i < 10; ++i) {
  135|       |        __asm__ volatile (".byte 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r1), "=q"(ok) :: "cc"); // rdrand %eax
  136|       |        if (ok) break;
  137|       |    }
  138|       |    for (int i = 0; i < 10; ++i) {
  139|       |        __asm__ volatile (".byte 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r2), "=q"(ok) :: "cc"); // rdrand %eax
  140|       |        if (ok) break;
  141|       |    }
  142|       |    return (((uint64_t)r2) << 32) | r1;
  143|       |#elif defined(__x86_64__) || defined(__amd64__)
  144|       |    uint8_t ok = 0;
  145|   112k|    uint64_t r1 = 0; // See above why we initialize to 0.
  146|   112k|    for (int i = 0; i < 10; ++i) {
  ------------------
  |  Branch (146:21): [True: 112k, False: 0]
  ------------------
  147|   112k|        __asm__ volatile (".byte 0x48, 0x0f, 0xc7, 0xf0; setc %1" : "=a"(r1), "=q"(ok) :: "cc"); // rdrand %rax
  148|   112k|        if (ok) break;
  ------------------
  |  Branch (148:13): [True: 112k, False: 0]
  ------------------
  149|   112k|    }
  150|   112k|    return r1;
  151|       |#else
  152|       |#error "RdRand is only supported on x86 and x86_64"
  153|       |#endif
  154|   112k|}
random.cpp:_ZN12_GLOBAL__N_113SeedTimestampER7CSHA512:
  539|   112k|{
  540|   112k|    int64_t perfcounter = GetPerformanceCounter();
  541|   112k|    hasher.Write((const unsigned char*)&perfcounter, sizeof(perfcounter));
  542|   112k|}
random.cpp:_ZN12_GLOBAL__N_121GetPerformanceCounterEv:
   65|   112k|{
   66|       |    // Read the hardware time stamp counter when available.
   67|       |    // See https://en.wikipedia.org/wiki/Time_Stamp_Counter for more information.
   68|       |#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
   69|       |    return __rdtsc();
   70|       |#elif !defined(_MSC_VER) && defined(__i386__)
   71|       |    uint64_t r = 0;
   72|       |    __asm__ volatile ("rdtsc" : "=A"(r)); // Constrain the r variable to the eax:edx pair.
   73|       |    return r;
   74|       |#elif !defined(_MSC_VER) && (defined(__x86_64__) || defined(__amd64__))
   75|       |    uint64_t r1 = 0, r2 = 0;
   76|   112k|    __asm__ volatile ("rdtsc" : "=a"(r1), "=d"(r2)); // Constrain r1 to rax and r2 to rdx.
   77|   112k|    return (r2 << 32) | r1;
   78|       |#else
   79|       |    // Fall back to using standard library clock (usually microsecond or nanosecond precision)
   80|       |    return std::chrono::high_resolution_clock::now().time_since_epoch().count();
   81|       |#endif
   82|   112k|}
random.cpp:_ZN12_GLOBAL__N_18RNGState10MixExtractEPhmO7CSHA512bb:
  488|   112k|    {
  489|   112k|        assert(num <= 32);
  490|   112k|        unsigned char buf[64];
  491|   112k|        static_assert(sizeof(buf) == CSHA512::OUTPUT_SIZE, "Buffer needs to have hasher's output size");
  492|   112k|        bool ret;
  493|   112k|        {
  494|   112k|            LOCK(m_mutex);
  ------------------
  |  |  257|   112k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|   112k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|   112k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|   112k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|   112k|            ret = (m_strongly_seeded |= strong_seed);
  496|       |            // Write the current state of the RNG into the hasher
  497|   112k|            hasher.Write(m_state, 32);
  498|       |            // Write a new counter number into the state
  499|   112k|            hasher.Write((const unsigned char*)&m_counter, sizeof(m_counter));
  500|   112k|            ++m_counter;
  501|       |            // Finalize the hasher
  502|   112k|            hasher.Finalize(buf);
  503|       |            // Store the last 32 bytes of the hash output as new RNG state.
  504|   112k|            memcpy(m_state, buf + 32, 32);
  505|       |            // Handle requests for deterministic randomness.
  506|   112k|            if (!always_use_real_rng && m_deterministic_prng.has_value()) [[unlikely]] {
  ------------------
  |  Branch (506:17): [True: 112k, False: 0]
  |  Branch (506:41): [True: 112k, False: 0]
  ------------------
  507|       |                // Overwrite the beginning of buf, which will be used for output.
  508|   112k|                m_deterministic_prng->Keystream(AsWritableBytes(Span{buf, num}));
  509|       |                // Do not require strong seeding for deterministic output.
  510|   112k|                ret = true;
  511|   112k|            }
  512|   112k|        }
  513|       |        // If desired, copy (up to) the first 32 bytes of the hash output as output.
  514|   112k|        if (num) {
  ------------------
  |  Branch (514:13): [True: 112k, False: 0]
  ------------------
  515|   112k|            assert(out != nullptr);
  516|   112k|            memcpy(out, buf, num);
  517|   112k|        }
  518|       |        // Best effort cleanup of internal state
  519|   112k|        hasher.Reset();
  520|   112k|        memory_cleanse(buf, 64);
  521|   112k|        return ret;
  522|   112k|    }

_ZN11RandomMixinI17FastRandomContextE4ImplEv:
  185|  81.7k|    RandomNumberGenerator auto& Impl() noexcept { return static_cast<T&>(*this); }
_ZN11RandomMixinI17FastRandomContextE8randbitsEi:
  205|  35.0k|    {
  206|  35.0k|        Assume(bits <= 64);
  ------------------
  |  |   97|  35.0k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  207|       |        // Requests for the full 64 bits are passed through.
  208|  35.0k|        if (bits == 64) return Impl().rand64();
  ------------------
  |  Branch (208:13): [True: 0, False: 35.0k]
  ------------------
  209|  35.0k|        uint64_t ret;
  210|  35.0k|        if (bits <= bitbuf_size) {
  ------------------
  |  Branch (210:13): [True: 11.6k, False: 23.3k]
  ------------------
  211|       |            // If there is enough entropy left in bitbuf, return its bottom bits bits.
  212|  11.6k|            ret = bitbuf;
  213|  11.6k|            bitbuf >>= bits;
  214|  11.6k|            bitbuf_size -= bits;
  215|  23.3k|        } 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|  23.3k|            uint64_t gen = Impl().rand64();
  220|  23.3k|            ret = (gen << bitbuf_size) | bitbuf;
  221|  23.3k|            bitbuf = gen >> (bits - bitbuf_size);
  222|  23.3k|            bitbuf_size = 64 + bitbuf_size - bits;
  223|  23.3k|        }
  224|       |        // Return the bottom bits bits of ret.
  225|  35.0k|        return ret & ((uint64_t{1} << bits) - 1);
  226|  35.0k|    }
_ZN17FastRandomContext6rand64Ev:
  396|   124k|    {
  397|   124k|        if (requires_seed) RandomSeed();
  ------------------
  |  Branch (397:13): [True: 112k, False: 11.6k]
  ------------------
  398|   124k|        std::array<std::byte, 8> buf;
  399|   124k|        rng.Keystream(buf);
  400|   124k|        return ReadLE64(buf.data());
  401|   124k|    }
_Z11GetRandHashv:
  455|   112k|{
  456|   112k|    uint256 hash;
  457|   112k|    GetRandBytes(hash);
  458|   112k|    return hash;
  459|   112k|}
_ZN11RandomMixinI17FastRandomContextEC2Ev:
  195|   112k|    constexpr RandomMixin() noexcept = default;
_ZN11RandomMixinI17FastRandomContextE18rand_uniform_delayINSt3__16chrono10time_pointI9NodeClockNS4_8durationIxNS3_5ratioILl1ELl1000000EEEEEEEEET_RKSC_NSC_8durationE:
  321|  11.6k|    {
  322|  11.6k|        return time + Impl().template rand_uniform_duration<Tp>(range);
  323|  11.6k|    }
_ZN11RandomMixinI17FastRandomContextE21rand_uniform_durationINSt3__16chrono10time_pointI9NodeClockNS4_8durationIxNS3_5ratioILl1ELl1000000EEEEEEEQ17StdChronoDurationINTL0__8durationEEEENT_8durationESF_:
  328|  11.6k|    {
  329|  11.6k|        using Dur = typename Chrono::duration;
  330|  11.6k|        return range.count() > 0 ? /* interval [0..range) */ Dur{Impl().randrange(range.count())} :
  ------------------
  |  Branch (330:16): [True: 11.6k, False: 0]
  ------------------
  331|  11.6k|               range.count() < 0 ? /* interval (range..0] */ -Dur{Impl().randrange(-range.count())} :
  ------------------
  |  Branch (331:16): [True: 0, False: 0]
  ------------------
  332|      0|                                   /* interval [0..0] */ Dur{0};
  333|  11.6k|    };
_ZN11RandomMixinI17FastRandomContextE9randrangeITkNSt3__18integralExEET_S4_:
  255|  11.6k|    {
  256|  11.6k|        static_assert(std::numeric_limits<I>::max() <= std::numeric_limits<uint64_t>::max());
  257|  11.6k|        Assume(range > 0);
  ------------------
  |  |   97|  11.6k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  258|  11.6k|        uint64_t maxval = range - 1U;
  259|  11.6k|        int bits = std::bit_width(maxval);
  260|  35.0k|        while (true) {
  ------------------
  |  Branch (260:16): [Folded - Ignored]
  ------------------
  261|  35.0k|            uint64_t ret = Impl().randbits(bits);
  262|  35.0k|            if (ret <= maxval) return ret;
  ------------------
  |  Branch (262:17): [True: 11.6k, False: 23.3k]
  ------------------
  263|  35.0k|        }
  264|  11.6k|    }

_ZN10CSchedulerD2Ev:
   17|      2|{
   18|      2|    assert(nThreadsServicingQueue == 0);
   19|      2|    if (stopWhenEmpty) assert(taskQueue.empty());
  ------------------
  |  Branch (19:9): [True: 0, False: 2]
  ------------------
   20|      2|}
_ZN10CScheduler12serviceQueueEv:
   24|      0|{
   25|      0|    WAIT_LOCK(newTaskMutex, lock);
  ------------------
  |  |  262|      0|#define WAIT_LOCK(cs, name) UniqueLock name(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  ------------------
   26|      0|    ++nThreadsServicingQueue;
   27|       |
   28|       |    // newTaskMutex is locked throughout this loop EXCEPT
   29|       |    // when the thread is waiting or when the user's function
   30|       |    // is called.
   31|      2|    while (!shouldStop()) {
  ------------------
  |  Branch (31:12): [True: 0, False: 2]
  ------------------
   32|      0|        try {
   33|      0|            while (!shouldStop() && taskQueue.empty()) {
  ------------------
  |  Branch (33:20): [True: 0, False: 0]
  |  Branch (33:37): [True: 0, False: 0]
  ------------------
   34|       |                // Wait until there is something to do.
   35|      0|                newTaskScheduled.wait(lock);
   36|      0|            }
   37|       |
   38|       |            // Wait until either there is a new task, or until
   39|       |            // the time of the first item on the queue:
   40|       |
   41|      0|            while (!shouldStop() && !taskQueue.empty()) {
  ------------------
  |  Branch (41:20): [True: 0, False: 0]
  |  Branch (41:37): [True: 0, False: 0]
  ------------------
   42|      0|                std::chrono::steady_clock::time_point timeToWaitFor = taskQueue.begin()->first;
   43|      0|                if (newTaskScheduled.wait_until(lock, timeToWaitFor) == std::cv_status::timeout) {
  ------------------
  |  Branch (43:21): [True: 0, False: 0]
  ------------------
   44|      0|                    break; // Exit loop after timeout, it means we reached the time of the event
   45|      0|                }
   46|      0|            }
   47|       |
   48|       |            // If there are multiple threads, the queue can empty while we're waiting (another
   49|       |            // thread may service the task we were waiting on).
   50|      0|            if (shouldStop() || taskQueue.empty())
  ------------------
  |  Branch (50:17): [True: 0, False: 0]
  |  Branch (50:33): [True: 0, False: 0]
  ------------------
   51|      2|                continue;
   52|       |
   53|  18.4E|            Function f = taskQueue.begin()->second;
   54|  18.4E|            taskQueue.erase(taskQueue.begin());
   55|       |
   56|  18.4E|            {
   57|       |                // Unlock before calling f, so it can reschedule itself or another task
   58|       |                // without deadlocking:
   59|  18.4E|                REVERSE_LOCK(lock);
  ------------------
  |  |  243|  18.4E|#define REVERSE_LOCK(g) typename std::decay<decltype(g)>::type::reverse_lock UNIQUE_NAME(revlock)(g, #g, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  18.4E|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  18.4E|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  18.4E|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   60|  18.4E|                f();
   61|  18.4E|            }
   62|  18.4E|        } catch (...) {
   63|      0|            --nThreadsServicingQueue;
   64|      0|            throw;
   65|      0|        }
   66|      0|    }
   67|      2|    --nThreadsServicingQueue;
   68|      2|    newTaskScheduled.notify_one();
   69|      2|}
_ZNK10CScheduler24AreThreadsServicingQueueEv:
  126|      2|{
  127|      2|    LOCK(newTaskMutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|      2|    return nThreadsServicingQueue;
  129|      2|}
_ZN16SerialTaskRunner12ProcessQueueEv:
  146|      2|{
  147|      2|    std::function<void()> callback;
  148|      2|    {
  149|      2|        LOCK(m_callbacks_mutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|      2|        if (m_are_callbacks_running) return;
  ------------------
  |  Branch (150:13): [True: 0, False: 2]
  ------------------
  151|      2|        if (m_callbacks_pending.empty()) return;
  ------------------
  |  Branch (151:13): [True: 2, False: 0]
  ------------------
  152|      0|        m_are_callbacks_running = true;
  153|       |
  154|      0|        callback = std::move(m_callbacks_pending.front());
  155|      0|        m_callbacks_pending.pop_front();
  156|      0|    }
  157|       |
  158|       |    // RAII the setting of fCallbacksRunning and calling MaybeScheduleProcessQueue
  159|       |    // to ensure both happen safely even if callback() throws.
  160|      0|    struct RAIICallbacksRunning {
  161|      0|        SerialTaskRunner* instance;
  162|      0|        explicit RAIICallbacksRunning(SerialTaskRunner* _instance) : instance(_instance) {}
  163|      0|        ~RAIICallbacksRunning()
  164|      0|        {
  165|      0|            {
  166|      0|                LOCK(instance->m_callbacks_mutex);
  167|      0|                instance->m_are_callbacks_running = false;
  168|      0|            }
  169|      0|            instance->MaybeScheduleProcessQueue();
  170|      0|        }
  171|      0|    } raiicallbacksrunning(this);
  172|       |
  173|      0|    callback();
  174|      0|}
_ZN16SerialTaskRunner5flushEv:
  186|      2|{
  187|      2|    assert(!m_scheduler.AreThreadsServicingQueue());
  188|      2|    bool should_continue = true;
  189|      4|    while (should_continue) {
  ------------------
  |  Branch (189:12): [True: 2, False: 2]
  ------------------
  190|      2|        ProcessQueue();
  191|      2|        LOCK(m_callbacks_mutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|      2|        should_continue = !m_callbacks_pending.empty();
  193|      2|    }
  194|      2|}

_ZN10CScheduler4stopEv:
   80|      2|    {
   81|      2|        WITH_LOCK(newTaskMutex, stopRequested = true);
  ------------------
  |  |  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
   82|      2|        newTaskScheduled.notify_all();
   83|      2|        if (m_service_thread.joinable()) m_service_thread.join();
  ------------------
  |  Branch (83:13): [True: 2, False: 0]
  ------------------
   84|      2|    }
_ZNK10CScheduler10shouldStopEv:
  111|      8|    bool shouldStop() const EXCLUSIVE_LOCKS_REQUIRED(newTaskMutex) { return stopRequested || (stopWhenEmpty && taskQueue.empty()); }
  ------------------
  |  Branch (111:77): [True: 8, False: 0]
  |  Branch (111:95): [True: 0, False: 0]
  |  Branch (111:112): [True: 0, False: 0]
  ------------------

_Z13CheckChecksumR4SpanIKcEbRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPS9_:
 2325|  13.3k|{
 2326|  13.3k|    auto check_split = Split(sp, '#');
 2327|  13.3k|    if (check_split.size() > 2) {
  ------------------
  |  Branch (2327:9): [True: 22, False: 13.3k]
  ------------------
 2328|     22|        error = "Multiple '#' symbols";
 2329|     22|        return false;
 2330|     22|    }
 2331|  13.3k|    if (check_split.size() == 1 && require_checksum){
  ------------------
  |  Branch (2331:9): [True: 13.3k, False: 12]
  |  Branch (2331:36): [True: 0, False: 13.3k]
  ------------------
 2332|      0|        error = "Missing checksum";
 2333|      0|        return false;
 2334|      0|    }
 2335|  13.3k|    if (check_split.size() == 2) {
  ------------------
  |  Branch (2335:9): [True: 12, False: 13.3k]
  ------------------
 2336|     12|        if (check_split[1].size() != 8) {
  ------------------
  |  Branch (2336:13): [True: 6, False: 6]
  ------------------
 2337|      6|            error = strprintf("Expected 8 character checksum, not %u characters", check_split[1].size());
  ------------------
  |  | 1172|      6|#define strprintf tfm::format
  ------------------
 2338|      6|            return false;
 2339|      6|        }
 2340|     12|    }
 2341|  13.3k|    auto checksum = DescriptorChecksum(check_split[0]);
 2342|  13.3k|    if (checksum.empty()) {
  ------------------
  |  Branch (2342:9): [True: 152, False: 13.1k]
  ------------------
 2343|    152|        error = "Invalid characters in payload";
 2344|    152|        return false;
 2345|    152|    }
 2346|  13.1k|    if (check_split.size() == 2) {
  ------------------
  |  Branch (2346:9): [True: 6, False: 13.1k]
  ------------------
 2347|      6|        if (!std::equal(checksum.begin(), checksum.end(), check_split[1].begin())) {
  ------------------
  |  Branch (2347:13): [True: 5, False: 1]
  ------------------
 2348|      5|            error = strprintf("Provided checksum '%s' does not match computed checksum '%s'", std::string(check_split[1].begin(), check_split[1].end()), checksum);
  ------------------
  |  | 1172|      5|#define strprintf tfm::format
  ------------------
 2349|      5|            return false;
 2350|      5|        }
 2351|      6|    }
 2352|  13.1k|    if (out_checksum) *out_checksum = std::move(checksum);
  ------------------
  |  Branch (2352:9): [True: 0, False: 13.1k]
  ------------------
 2353|  13.1k|    sp = check_split[0];
 2354|  13.1k|    return true;
 2355|  13.1k|}
_Z5ParseRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEER19FlatSigningProviderRS5_b:
 2358|  13.3k|{
 2359|  13.3k|    Span<const char> sp{descriptor};
 2360|  13.3k|    if (!CheckChecksum(sp, require_checksum, error)) return {};
  ------------------
  |  Branch (2360:9): [True: 185, False: 13.1k]
  ------------------
 2361|  13.1k|    uint32_t key_exp_index = 0;
 2362|  13.1k|    auto ret = ParseScript(key_exp_index, sp, ParseScriptContext::TOP, out, error);
 2363|  13.1k|    if (sp.size() == 0 && !ret.empty()) {
  ------------------
  |  Branch (2363:9): [True: 12.4k, False: 711]
  |  Branch (2363:27): [True: 10.0k, False: 2.36k]
  ------------------
 2364|  10.0k|        std::vector<std::unique_ptr<Descriptor>> descs;
 2365|  10.0k|        descs.reserve(ret.size());
 2366|  10.5k|        for (auto& r : ret) {
  ------------------
  |  Branch (2366:22): [True: 10.5k, False: 10.0k]
  ------------------
 2367|  10.5k|            descs.emplace_back(std::unique_ptr<Descriptor>(std::move(r)));
 2368|  10.5k|        }
 2369|  10.0k|        return descs;
 2370|  10.0k|    }
 2371|  3.07k|    return {};
 2372|  13.1k|}
_Z12DescriptorIDRK10Descriptor:
 2389|  10.0k|{
 2390|  10.0k|    std::string desc_str = desc.ToString(/*compat_format=*/true);
 2391|  10.0k|    uint256 id;
 2392|  10.0k|    CSHA256().Write((unsigned char*)desc_str.data(), desc_str.size()).Finalize(id.begin());
 2393|  10.0k|    return id;
 2394|  10.0k|}
_ZN15DescriptorCache20CacheParentExtPubKeyEjRK10CExtPubKey:
 2397|   142k|{
 2398|   142k|    m_parent_xpubs[key_exp_pos] = xpub;
 2399|   142k|}
_ZN15DescriptorCache21CacheDerivedExtPubKeyEjjRK10CExtPubKey:
 2402|  65.2k|{
 2403|  65.2k|    auto& xpubs = m_derived_xpubs[key_exp_pos];
 2404|  65.2k|    xpubs[der_index] = xpub;
 2405|  65.2k|}
_ZN15DescriptorCache26CacheLastHardenedExtPubKeyEjRK10CExtPubKey:
 2408|  5.30k|{
 2409|  5.30k|    m_last_hardened_xpubs[key_exp_pos] = xpub;
 2410|  5.30k|}
_ZNK15DescriptorCache24GetCachedParentExtPubKeyEjR10CExtPubKey:
 2413|   241k|{
 2414|   241k|    const auto& it = m_parent_xpubs.find(key_exp_pos);
 2415|   241k|    if (it == m_parent_xpubs.end()) return false;
  ------------------
  |  Branch (2415:9): [True: 26.7k, False: 214k]
  ------------------
 2416|   214k|    xpub = it->second;
 2417|   214k|    return true;
 2418|   241k|}
_ZNK15DescriptorCache25GetCachedDerivedExtPubKeyEjjR10CExtPubKey:
 2421|   200k|{
 2422|   200k|    const auto& key_exp_it = m_derived_xpubs.find(key_exp_pos);
 2423|   200k|    if (key_exp_it == m_derived_xpubs.end()) return false;
  ------------------
  |  Branch (2423:9): [True: 151k, False: 49.5k]
  ------------------
 2424|  49.5k|    const auto& der_it = key_exp_it->second.find(der_index);
 2425|  49.5k|    if (der_it == key_exp_it->second.end()) return false;
  ------------------
  |  Branch (2425:9): [True: 23.7k, False: 25.8k]
  ------------------
 2426|  25.8k|    xpub = der_it->second;
 2427|  25.8k|    return true;
 2428|  49.5k|}
_ZNK15DescriptorCache30GetCachedLastHardenedExtPubKeyEjR10CExtPubKey:
 2431|  5.79k|{
 2432|  5.79k|    const auto& it = m_last_hardened_xpubs.find(key_exp_pos);
 2433|  5.79k|    if (it == m_last_hardened_xpubs.end()) return false;
  ------------------
  |  Branch (2433:9): [True: 2.77k, False: 3.01k]
  ------------------
 2434|  3.01k|    xpub = it->second;
 2435|  3.01k|    return true;
 2436|  5.79k|}
_ZN15DescriptorCache12MergeAndDiffERKS_:
 2439|  18.3k|{
 2440|  18.3k|    DescriptorCache diff;
 2441|  95.2k|    for (const auto& parent_xpub_pair : other.GetCachedParentExtPubKeys()) {
  ------------------
  |  Branch (2441:39): [True: 95.2k, False: 18.3k]
  ------------------
 2442|  95.2k|        CExtPubKey xpub;
 2443|  95.2k|        if (GetCachedParentExtPubKey(parent_xpub_pair.first, xpub)) {
  ------------------
  |  Branch (2443:13): [True: 73.7k, False: 21.5k]
  ------------------
 2444|  73.7k|            if (xpub != parent_xpub_pair.second) {
  ------------------
  |  Branch (2444:17): [True: 0, False: 73.7k]
  ------------------
 2445|      0|                throw std::runtime_error(std::string(__func__) + ": New cached parent xpub does not match already cached parent xpub");
 2446|      0|            }
 2447|  73.7k|            continue;
 2448|  73.7k|        }
 2449|  21.5k|        CacheParentExtPubKey(parent_xpub_pair.first, parent_xpub_pair.second);
 2450|  21.5k|        diff.CacheParentExtPubKey(parent_xpub_pair.first, parent_xpub_pair.second);
 2451|  21.5k|    }
 2452|  21.5k|    for (const auto& derived_xpub_map_pair : other.GetCachedDerivedExtPubKeys()) {
  ------------------
  |  Branch (2452:44): [True: 21.5k, False: 18.3k]
  ------------------
 2453|  21.5k|        for (const auto& derived_xpub_pair : derived_xpub_map_pair.second) {
  ------------------
  |  Branch (2453:44): [True: 21.5k, False: 21.5k]
  ------------------
 2454|  21.5k|            CExtPubKey xpub;
 2455|  21.5k|            if (GetCachedDerivedExtPubKey(derived_xpub_map_pair.first, derived_xpub_pair.first, xpub)) {
  ------------------
  |  Branch (2455:17): [True: 0, False: 21.5k]
  ------------------
 2456|      0|                if (xpub != derived_xpub_pair.second) {
  ------------------
  |  Branch (2456:21): [True: 0, False: 0]
  ------------------
 2457|      0|                    throw std::runtime_error(std::string(__func__) + ": New cached derived xpub does not match already cached derived xpub");
 2458|      0|                }
 2459|      0|                continue;
 2460|      0|            }
 2461|  21.5k|            CacheDerivedExtPubKey(derived_xpub_map_pair.first, derived_xpub_pair.first, derived_xpub_pair.second);
 2462|  21.5k|            diff.CacheDerivedExtPubKey(derived_xpub_map_pair.first, derived_xpub_pair.first, derived_xpub_pair.second);
 2463|  21.5k|        }
 2464|  21.5k|    }
 2465|  18.3k|    for (const auto& lh_xpub_pair : other.GetCachedLastHardenedExtPubKeys()) {
  ------------------
  |  Branch (2465:35): [True: 3.38k, False: 18.3k]
  ------------------
 2466|  3.38k|        CExtPubKey xpub;
 2467|  3.38k|        if (GetCachedLastHardenedExtPubKey(lh_xpub_pair.first, xpub)) {
  ------------------
  |  Branch (2467:13): [True: 2.49k, False: 895]
  ------------------
 2468|  2.49k|            if (xpub != lh_xpub_pair.second) {
  ------------------
  |  Branch (2468:17): [True: 0, False: 2.49k]
  ------------------
 2469|      0|                throw std::runtime_error(std::string(__func__) + ": New cached last hardened xpub does not match already cached last hardened xpub");
 2470|      0|            }
 2471|  2.49k|            continue;
 2472|  2.49k|        }
 2473|    895|        CacheLastHardenedExtPubKey(lh_xpub_pair.first, lh_xpub_pair.second);
 2474|    895|        diff.CacheLastHardenedExtPubKey(lh_xpub_pair.first, lh_xpub_pair.second);
 2475|    895|    }
 2476|  18.3k|    return diff;
 2477|  18.3k|}
_ZNK15DescriptorCache25GetCachedParentExtPubKeysEv:
 2480|  36.6k|{
 2481|  36.6k|    return m_parent_xpubs;
 2482|  36.6k|}
_ZNK15DescriptorCache26GetCachedDerivedExtPubKeysEv:
 2485|  36.6k|{
 2486|  36.6k|    return m_derived_xpubs;
 2487|  36.6k|}
_ZNK15DescriptorCache31GetCachedLastHardenedExtPubKeysEv:
 2490|  36.6k|{
 2491|  36.6k|    return m_last_hardened_xpubs;
 2492|  36.6k|}
descriptor.cpp:_ZN12_GLOBAL__N_118DescriptorChecksumERK4SpanIKcE:
  106|  66.0k|{
  107|       |    /** A character set designed such that:
  108|       |     *  - The most common 'unprotected' descriptor characters (hex, keypaths) are in the first group of 32.
  109|       |     *  - Case errors cause an offset that's a multiple of 32.
  110|       |     *  - As many alphabetic characters are in the same group (while following the above restrictions).
  111|       |     *
  112|       |     * If p(x) gives the position of a character c in this character set, every group of 3 characters
  113|       |     * (a,b,c) is encoded as the 4 symbols (p(a) & 31, p(b) & 31, p(c) & 31, (p(a) / 32) + 3 * (p(b) / 32) + 9 * (p(c) / 32).
  114|       |     * This means that changes that only affect the lower 5 bits of the position, or only the higher 2 bits, will just
  115|       |     * affect a single symbol.
  116|       |     *
  117|       |     * As a result, within-group-of-32 errors count as 1 symbol, as do cross-group errors that don't affect
  118|       |     * the position within the groups.
  119|       |     */
  120|  66.0k|    static const std::string INPUT_CHARSET =
  121|  66.0k|        "0123456789()[],'/*abcdefgh@:$%{}"
  122|  66.0k|        "IJKLMNOPQRSTUVWXYZ&+-.;<=>?!^_|~"
  123|  66.0k|        "ijklmnopqrstuvwxyzABCDEFGH`#\"\\ ";
  124|       |
  125|       |    /** The character set for the checksum itself (same as bech32). */
  126|  66.0k|    static const std::string CHECKSUM_CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
  127|       |
  128|  66.0k|    uint64_t c = 1;
  129|  66.0k|    int cls = 0;
  130|  66.0k|    int clscount = 0;
  131|   201M|    for (auto ch : span) {
  ------------------
  |  Branch (131:18): [True: 201M, False: 65.9k]
  ------------------
  132|   201M|        auto pos = INPUT_CHARSET.find(ch);
  133|   201M|        if (pos == std::string::npos) return "";
  ------------------
  |  Branch (133:13): [True: 152, False: 201M]
  ------------------
  134|   201M|        c = PolyMod(c, pos & 31); // Emit a symbol for the position inside the group, for every character.
  135|   201M|        cls = cls * 3 + (pos >> 5); // Accumulate the group numbers
  136|   201M|        if (++clscount == 3) {
  ------------------
  |  Branch (136:13): [True: 67.2M, False: 134M]
  ------------------
  137|       |            // Emit an extra symbol representing the group numbers, for every 3 characters.
  138|  67.2M|            c = PolyMod(c, cls);
  139|  67.2M|            cls = 0;
  140|  67.2M|            clscount = 0;
  141|  67.2M|        }
  142|   201M|    }
  143|  65.9k|    if (clscount > 0) c = PolyMod(c, cls);
  ------------------
  |  Branch (143:9): [True: 46.5k, False: 19.3k]
  ------------------
  144|   593k|    for (int j = 0; j < 8; ++j) c = PolyMod(c, 0); // Shift further to determine the checksum.
  ------------------
  |  Branch (144:21): [True: 527k, False: 65.9k]
  ------------------
  145|  65.9k|    c ^= 1; // Prevent appending zeroes from not affecting the checksum.
  146|       |
  147|  65.9k|    std::string ret(8, ' ');
  148|   593k|    for (int j = 0; j < 8; ++j) ret[j] = CHECKSUM_CHARSET[(c >> (5 * (7 - j))) & 31];
  ------------------
  |  Branch (148:21): [True: 527k, False: 65.9k]
  ------------------
  149|  65.9k|    return ret;
  150|  66.0k|}
descriptor.cpp:_ZN12_GLOBAL__N_17PolyModEmi:
   94|   269M|{
   95|   269M|    uint8_t c0 = c >> 35;
   96|   269M|    c = ((c & 0x7ffffffff) << 5) ^ val;
   97|   269M|    if (c0 & 1) c ^= 0xf5dee51989;
  ------------------
  |  Branch (97:9): [True: 134M, False: 135M]
  ------------------
   98|   269M|    if (c0 & 2) c ^= 0xa9fdca3312;
  ------------------
  |  Branch (98:9): [True: 134M, False: 135M]
  ------------------
   99|   269M|    if (c0 & 4) c ^= 0x1bab10e32d;
  ------------------
  |  Branch (99:9): [True: 134M, False: 135M]
  ------------------
  100|   269M|    if (c0 & 8) c ^= 0x3706b1677a;
  ------------------
  |  Branch (100:9): [True: 134M, False: 135M]
  ------------------
  101|   269M|    if (c0 & 16) c ^= 0x644d626ffd;
  ------------------
  |  Branch (101:9): [True: 134M, False: 135M]
  ------------------
  102|   269M|    return c;
  103|   269M|}
descriptor.cpp:_ZN12_GLOBAL__N_111ParseScriptERjR4SpanIKcENS_18ParseScriptContextER19FlatSigningProviderRNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE:
 1755|  16.6k|{
 1756|  16.6k|    using namespace script;
 1757|  16.6k|    Assume(ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH || ctx == ParseScriptContext::P2TR);
  ------------------
  |  |   97|  58.2k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  |  |  ------------------
  |  |  |  Branch (97:51): [True: 13.1k, False: 3.52k]
  |  |  |  Branch (97:51): [True: 650, False: 2.87k]
  |  |  |  Branch (97:51): [True: 1.05k, False: 1.82k]
  |  |  |  Branch (97:51): [True: 1.82k, False: 0]
  |  |  ------------------
  ------------------
 1758|  16.6k|    std::vector<std::unique_ptr<DescriptorImpl>> ret;
 1759|  16.6k|    auto expr = Expr(sp);
 1760|  16.6k|    if (Func("pk", expr)) {
  ------------------
  |  Branch (1760:9): [True: 4.67k, False: 12.0k]
  ------------------
 1761|  4.67k|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 1762|  4.67k|        if (pubkeys.empty()) {
  ------------------
  |  Branch (1762:13): [True: 71, False: 4.60k]
  ------------------
 1763|     71|            error = strprintf("pk(): %s", error);
  ------------------
  |  | 1172|     71|#define strprintf tfm::format
  ------------------
 1764|     71|            return {};
 1765|     71|        }
 1766|  4.60k|        ++key_exp_index;
 1767|  4.72k|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (1767:27): [True: 4.72k, False: 4.60k]
  ------------------
 1768|  4.72k|            ret.emplace_back(std::make_unique<PKDescriptor>(std::move(pubkey), ctx == ParseScriptContext::P2TR));
 1769|  4.72k|        }
 1770|  4.60k|        return ret;
 1771|  4.67k|    }
 1772|  12.0k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH) && Func("pkh", expr)) {
  ------------------
  |  Branch (1772:9): [True: 1.36k, False: 10.6k]
  |  Branch (1772:10): [True: 8.89k, False: 3.11k]
  |  Branch (1772:44): [True: 617, False: 2.49k]
  |  Branch (1772:79): [True: 1.01k, False: 1.48k]
  |  Branch (1772:116): [True: 1.36k, False: 9.15k]
  ------------------
 1773|  1.36k|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 1774|  1.36k|        if (pubkeys.empty()) {
  ------------------
  |  Branch (1774:13): [True: 51, False: 1.31k]
  ------------------
 1775|     51|            error = strprintf("pkh(): %s", error);
  ------------------
  |  | 1172|     51|#define strprintf tfm::format
  ------------------
 1776|     51|            return {};
 1777|     51|        }
 1778|  1.31k|        ++key_exp_index;
 1779|  1.45k|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (1779:27): [True: 1.45k, False: 1.31k]
  ------------------
 1780|  1.45k|            ret.emplace_back(std::make_unique<PKHDescriptor>(std::move(pubkey)));
 1781|  1.45k|        }
 1782|  1.31k|        return ret;
 1783|  1.36k|    }
 1784|  10.6k|    if (ctx == ParseScriptContext::TOP && Func("combo", expr)) {
  ------------------
  |  Branch (1784:9): [True: 7.59k, False: 3.04k]
  |  Branch (1784:9): [True: 863, False: 9.77k]
  |  Branch (1784:43): [True: 863, False: 6.73k]
  ------------------
 1785|    863|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 1786|    863|        if (pubkeys.empty()) {
  ------------------
  |  Branch (1786:13): [True: 14, False: 849]
  ------------------
 1787|     14|            error = strprintf("combo(): %s", error);
  ------------------
  |  | 1172|     14|#define strprintf tfm::format
  ------------------
 1788|     14|            return {};
 1789|     14|        }
 1790|    849|        ++key_exp_index;
 1791|    961|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (1791:27): [True: 961, False: 849]
  ------------------
 1792|    961|            ret.emplace_back(std::make_unique<ComboDescriptor>(std::move(pubkey)));
 1793|    961|        }
 1794|    849|        return ret;
 1795|  9.77k|    } else if (Func("combo", expr)) {
  ------------------
  |  Branch (1795:16): [True: 1, False: 9.77k]
  ------------------
 1796|      1|        error = "Can only have combo() at top level";
 1797|      1|        return {};
 1798|      1|    }
 1799|  9.77k|    const bool multi = Func("multi", expr);
 1800|  9.77k|    const bool sortedmulti = !multi && Func("sortedmulti", expr);
  ------------------
  |  Branch (1800:30): [True: 9.30k, False: 469]
  |  Branch (1800:40): [True: 651, False: 8.65k]
  ------------------
 1801|  9.77k|    const bool multi_a = !(multi || sortedmulti) && Func("multi_a", expr);
  ------------------
  |  Branch (1801:28): [True: 469, False: 9.30k]
  |  Branch (1801:37): [True: 651, False: 8.65k]
  |  Branch (1801:53): [True: 278, False: 8.37k]
  ------------------
 1802|  9.77k|    const bool sortedmulti_a = !(multi || sortedmulti || multi_a) && Func("sortedmulti_a", expr);
  ------------------
  |  Branch (1802:34): [True: 469, False: 9.30k]
  |  Branch (1802:43): [True: 651, False: 8.65k]
  |  Branch (1802:58): [True: 278, False: 8.37k]
  |  Branch (1802:70): [True: 5, False: 8.37k]
  ------------------
 1803|  9.77k|    if (((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH) && (multi || sortedmulti)) ||
  ------------------
  |  Branch (1803:11): [True: 6.73k, False: 3.04k]
  |  Branch (1803:45): [True: 580, False: 2.46k]
  |  Branch (1803:80): [True: 983, False: 1.48k]
  |  Branch (1803:118): [True: 468, False: 7.82k]
  |  Branch (1803:127): [True: 650, False: 7.17k]
  ------------------
 1804|  9.77k|        (ctx == ParseScriptContext::P2TR && (multi_a || sortedmulti_a))) {
  ------------------
  |  Branch (1804:10): [True: 1.48k, False: 7.17k]
  |  Branch (1804:46): [True: 277, False: 1.20k]
  |  Branch (1804:57): [True: 4, False: 1.20k]
  ------------------
 1805|  1.39k|        auto threshold = Expr(expr);
 1806|  1.39k|        uint32_t thres;
 1807|  1.39k|        std::vector<std::vector<std::unique_ptr<PubkeyProvider>>> providers; // List of multipath expanded pubkeys
 1808|  1.39k|        if (!ParseUInt32(std::string(threshold.begin(), threshold.end()), &thres)) {
  ------------------
  |  Branch (1808:13): [True: 31, False: 1.36k]
  ------------------
 1809|     31|            error = strprintf("Multi threshold '%s' is not valid", std::string(threshold.begin(), threshold.end()));
  ------------------
  |  | 1172|     31|#define strprintf tfm::format
  ------------------
 1810|     31|            return {};
 1811|     31|        }
 1812|  1.36k|        size_t script_size = 0;
 1813|  1.36k|        size_t max_providers_len = 0;
 1814|  72.1k|        while (expr.size()) {
  ------------------
  |  Branch (1814:16): [True: 70.8k, False: 1.32k]
  ------------------
 1815|  70.8k|            if (!Const(",", expr)) {
  ------------------
  |  Branch (1815:17): [True: 1, False: 70.8k]
  ------------------
 1816|      1|                error = strprintf("Multi: expected ',', got '%c'", expr[0]);
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 1817|      1|                return {};
 1818|      1|            }
 1819|  70.8k|            auto arg = Expr(expr);
 1820|  70.8k|            auto pks = ParsePubkey(key_exp_index, arg, ctx, out, error);
 1821|  70.8k|            if (pks.empty()) {
  ------------------
  |  Branch (1821:17): [True: 40, False: 70.7k]
  ------------------
 1822|     40|                error = strprintf("Multi: %s", error);
  ------------------
  |  | 1172|     40|#define strprintf tfm::format
  ------------------
 1823|     40|                return {};
 1824|     40|            }
 1825|  70.7k|            script_size += pks.at(0)->GetSize() + 1;
 1826|  70.7k|            max_providers_len = std::max(max_providers_len, pks.size());
 1827|  70.7k|            providers.emplace_back(std::move(pks));
 1828|  70.7k|            key_exp_index++;
 1829|  70.7k|        }
 1830|  1.32k|        if ((multi || sortedmulti) && (providers.empty() || providers.size() > MAX_PUBKEYS_PER_MULTISIG)) {
  ------------------
  |  Branch (1830:14): [True: 420, False: 907]
  |  Branch (1830:23): [True: 635, False: 272]
  |  Branch (1830:40): [True: 3, False: 1.05k]
  |  Branch (1830:61): [True: 8, False: 1.04k]
  ------------------
 1831|     11|            error = strprintf("Cannot have %u keys in multisig; must have between 1 and %d keys, inclusive", providers.size(), MAX_PUBKEYS_PER_MULTISIG);
  ------------------
  |  | 1172|     11|#define strprintf tfm::format
  ------------------
 1832|     11|            return {};
 1833|  1.31k|        } else if ((multi_a || sortedmulti_a) && (providers.empty() || providers.size() > MAX_PUBKEYS_PER_MULTI_A)) {
  ------------------
  |  Branch (1833:21): [True: 269, False: 1.04k]
  |  Branch (1833:32): [True: 3, False: 1.04k]
  |  Branch (1833:51): [True: 1, False: 271]
  |  Branch (1833:72): [True: 2, False: 269]
  ------------------
 1834|      3|            error = strprintf("Cannot have %u keys in multi_a; must have between 1 and %d keys, inclusive", providers.size(), MAX_PUBKEYS_PER_MULTI_A);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 1835|      3|            return {};
 1836|  1.31k|        } else if (thres < 1) {
  ------------------
  |  Branch (1836:20): [True: 3, False: 1.31k]
  ------------------
 1837|      3|            error = strprintf("Multisig threshold cannot be %d, must be at least 1", thres);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 1838|      3|            return {};
 1839|  1.31k|        } else if (thres > providers.size()) {
  ------------------
  |  Branch (1839:20): [True: 8, False: 1.30k]
  ------------------
 1840|      8|            error = strprintf("Multisig threshold cannot be larger than the number of keys; threshold is %d but only %u keys specified", thres, providers.size());
  ------------------
  |  | 1172|      8|#define strprintf tfm::format
  ------------------
 1841|      8|            return {};
 1842|      8|        }
 1843|  1.30k|        if (ctx == ParseScriptContext::TOP) {
  ------------------
  |  Branch (1843:13): [True: 481, False: 821]
  ------------------
 1844|    481|            if (providers.size() > 3) {
  ------------------
  |  Branch (1844:17): [True: 11, False: 470]
  ------------------
 1845|     11|                error = strprintf("Cannot have %u pubkeys in bare multisig; only at most 3 pubkeys", providers.size());
  ------------------
  |  | 1172|     11|#define strprintf tfm::format
  ------------------
 1846|     11|                return {};
 1847|     11|            }
 1848|    481|        }
 1849|  1.29k|        if (ctx == ParseScriptContext::P2SH) {
  ------------------
  |  Branch (1849:13): [True: 505, False: 786]
  ------------------
 1850|       |            // This limits the maximum number of compressed pubkeys to 15.
 1851|    505|            if (script_size + 3 > MAX_SCRIPT_ELEMENT_SIZE) {
  ------------------
  |  Branch (1851:17): [True: 3, False: 502]
  ------------------
 1852|      3|                error = strprintf("P2SH script is too large, %d bytes is larger than %d bytes", script_size + 3, MAX_SCRIPT_ELEMENT_SIZE);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 1853|      3|                return {};
 1854|      3|            }
 1855|    505|        }
 1856|       |
 1857|       |        // Make sure all vecs are of the same length, or exactly length 1
 1858|       |        // For length 1 vectors, clone key providers until vector is the same length
 1859|  65.4k|        for (auto& vec : providers) {
  ------------------
  |  Branch (1859:24): [True: 65.4k, False: 1.28k]
  ------------------
 1860|  65.4k|            if (vec.size() == 1) {
  ------------------
  |  Branch (1860:17): [True: 65.4k, False: 50]
  ------------------
 1861|  69.2k|                for (size_t i = 1; i < max_providers_len; ++i) {
  ------------------
  |  Branch (1861:36): [True: 3.81k, False: 65.4k]
  ------------------
 1862|  3.81k|                    vec.emplace_back(vec.at(0)->Clone());
 1863|  3.81k|                }
 1864|  65.4k|            } else if (vec.size() != max_providers_len) {
  ------------------
  |  Branch (1864:24): [True: 1, False: 49]
  ------------------
 1865|      1|                error = strprintf("multi(): Multipath derivation paths have mismatched lengths");
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 1866|      1|                return {};
 1867|      1|            }
 1868|  65.4k|        }
 1869|       |
 1870|       |        // Build the final descriptors vector
 1871|  2.82k|        for (size_t i = 0; i < max_providers_len; ++i) {
  ------------------
  |  Branch (1871:28): [True: 1.53k, False: 1.28k]
  ------------------
 1872|       |            // Build final pubkeys vectors by retrieving the i'th subscript for each vector in subscripts
 1873|  1.53k|            std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 1874|  1.53k|            pubs.reserve(providers.size());
 1875|  69.5k|            for (auto& pub : providers) {
  ------------------
  |  Branch (1875:28): [True: 69.5k, False: 1.53k]
  ------------------
 1876|  69.5k|                pubs.emplace_back(std::move(pub.at(i)));
 1877|  69.5k|            }
 1878|  1.53k|            if (multi || sortedmulti) {
  ------------------
  |  Branch (1878:17): [True: 572, False: 962]
  |  Branch (1878:26): [True: 649, False: 313]
  ------------------
 1879|  1.22k|                ret.emplace_back(std::make_unique<MultisigDescriptor>(thres, std::move(pubs), sortedmulti));
 1880|  1.22k|            } else {
 1881|    313|                ret.emplace_back(std::make_unique<MultiADescriptor>(thres, std::move(pubs), sortedmulti_a));
 1882|    313|            }
 1883|  1.53k|        }
 1884|  1.28k|        return ret;
 1885|  8.37k|    } else if (multi || sortedmulti) {
  ------------------
  |  Branch (1885:16): [True: 1, False: 8.37k]
  |  Branch (1885:25): [True: 1, False: 8.37k]
  ------------------
 1886|      2|        error = "Can only have multi/sortedmulti at top level, in sh(), or in wsh()";
 1887|      2|        return {};
 1888|  8.37k|    } else if (multi_a || sortedmulti_a) {
  ------------------
  |  Branch (1888:16): [True: 1, False: 8.37k]
  |  Branch (1888:27): [True: 1, False: 8.37k]
  ------------------
 1889|      2|        error = "Can only have multi_a/sortedmulti_a inside tr()";
 1890|      2|        return {};
 1891|      2|    }
 1892|  8.37k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wpkh", expr)) {
  ------------------
  |  Branch (1892:9): [True: 60, False: 8.31k]
  |  Branch (1892:10): [True: 6.19k, False: 2.18k]
  |  Branch (1892:44): [True: 53, False: 2.13k]
  |  Branch (1892:80): [True: 60, False: 6.18k]
  ------------------
 1893|     60|        auto pubkeys = ParsePubkey(key_exp_index, expr, ParseScriptContext::P2WPKH, out, error);
 1894|     60|        if (pubkeys.empty()) {
  ------------------
  |  Branch (1894:13): [True: 6, False: 54]
  ------------------
 1895|      6|            error = strprintf("wpkh(): %s", error);
  ------------------
  |  | 1172|      6|#define strprintf tfm::format
  ------------------
 1896|      6|            return {};
 1897|      6|        }
 1898|     54|        key_exp_index++;
 1899|    122|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (1899:27): [True: 122, False: 54]
  ------------------
 1900|    122|            ret.emplace_back(std::make_unique<WPKHDescriptor>(std::move(pubkey)));
 1901|    122|        }
 1902|     54|        return ret;
 1903|  8.31k|    } else if (Func("wpkh", expr)) {
  ------------------
  |  Branch (1903:16): [True: 1, False: 8.31k]
  ------------------
 1904|      1|        error = "Can only have wpkh() at top level or inside sh()";
 1905|      1|        return {};
 1906|      1|    }
 1907|  8.31k|    if (ctx == ParseScriptContext::TOP && Func("sh", expr)) {
  ------------------
  |  Branch (1907:9): [True: 6.13k, False: 2.18k]
  |  Branch (1907:9): [True: 650, False: 7.66k]
  |  Branch (1907:43): [True: 650, False: 5.48k]
  ------------------
 1908|    650|        auto descs = ParseScript(key_exp_index, expr, ParseScriptContext::P2SH, out, error);
 1909|    650|        if (descs.empty() || expr.size()) return {};
  ------------------
  |  Branch (1909:13): [True: 42, False: 608]
  |  Branch (1909:30): [True: 3, False: 605]
  ------------------
 1910|    605|        std::vector<std::unique_ptr<DescriptorImpl>> ret;
 1911|    605|        ret.reserve(descs.size());
 1912|    641|        for (auto& desc : descs) {
  ------------------
  |  Branch (1912:25): [True: 641, False: 605]
  ------------------
 1913|    641|            ret.push_back(std::make_unique<SHDescriptor>(std::move(desc)));
 1914|    641|        }
 1915|    605|        return ret;
 1916|  7.66k|    } else if (Func("sh", expr)) {
  ------------------
  |  Branch (1916:16): [True: 1, False: 7.66k]
  ------------------
 1917|      1|        error = "Can only have sh() at top level";
 1918|      1|        return {};
 1919|      1|    }
 1920|  7.66k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wsh", expr)) {
  ------------------
  |  Branch (1920:9): [True: 1.05k, False: 6.61k]
  |  Branch (1920:10): [True: 5.48k, False: 2.18k]
  |  Branch (1920:44): [True: 51, False: 2.13k]
  |  Branch (1920:80): [True: 1.05k, False: 4.48k]
  ------------------
 1921|  1.05k|        auto descs = ParseScript(key_exp_index, expr, ParseScriptContext::P2WSH, out, error);
 1922|  1.05k|        if (descs.empty() || expr.size()) return {};
  ------------------
  |  Branch (1922:13): [True: 471, False: 579]
  |  Branch (1922:30): [True: 21, False: 558]
  ------------------
 1923|    669|        for (auto& desc : descs) {
  ------------------
  |  Branch (1923:25): [True: 669, False: 558]
  ------------------
 1924|    669|            ret.emplace_back(std::make_unique<WSHDescriptor>(std::move(desc)));
 1925|    669|        }
 1926|    558|        return ret;
 1927|  6.61k|    } else if (Func("wsh", expr)) {
  ------------------
  |  Branch (1927:16): [True: 1, False: 6.61k]
  ------------------
 1928|      1|        error = "Can only have wsh() at top level or inside sh()";
 1929|      1|        return {};
 1930|      1|    }
 1931|  6.61k|    if (ctx == ParseScriptContext::TOP && Func("addr", expr)) {
  ------------------
  |  Branch (1931:9): [True: 4.47k, False: 2.13k]
  |  Branch (1931:9): [True: 253, False: 6.35k]
  |  Branch (1931:43): [True: 253, False: 4.22k]
  ------------------
 1932|    253|        CTxDestination dest = DecodeDestination(std::string(expr.begin(), expr.end()));
 1933|    253|        if (!IsValidDestination(dest)) {
  ------------------
  |  Branch (1933:13): [True: 227, False: 26]
  ------------------
 1934|    227|            error = "Address is not valid";
 1935|    227|            return {};
 1936|    227|        }
 1937|     26|        ret.emplace_back(std::make_unique<AddressDescriptor>(std::move(dest)));
 1938|     26|        return ret;
 1939|  6.35k|    } else if (Func("addr", expr)) {
  ------------------
  |  Branch (1939:16): [True: 1, False: 6.35k]
  ------------------
 1940|      1|        error = "Can only have addr() at top level";
 1941|      1|        return {};
 1942|      1|    }
 1943|  6.35k|    if (ctx == ParseScriptContext::TOP && Func("tr", expr)) {
  ------------------
  |  Branch (1943:9): [True: 4.22k, False: 2.13k]
  |  Branch (1943:9): [True: 1.20k, False: 5.14k]
  |  Branch (1943:43): [True: 1.20k, False: 3.01k]
  ------------------
 1944|  1.20k|        auto arg = Expr(expr);
 1945|  1.20k|        auto internal_keys = ParsePubkey(key_exp_index, arg, ParseScriptContext::P2TR, out, error);
 1946|  1.20k|        if (internal_keys.empty()) {
  ------------------
  |  Branch (1946:13): [True: 46, False: 1.16k]
  ------------------
 1947|     46|            error = strprintf("tr(): %s", error);
  ------------------
  |  | 1172|     46|#define strprintf tfm::format
  ------------------
 1948|     46|            return {};
 1949|     46|        }
 1950|  1.16k|        size_t max_providers_len = internal_keys.size();
 1951|  1.16k|        ++key_exp_index;
 1952|  1.16k|        std::vector<std::vector<std::unique_ptr<DescriptorImpl>>> subscripts; //!< list of multipath expanded script subexpressions
 1953|  1.16k|        std::vector<int> depths; //!< depth in the tree of each subexpression (same length subscripts)
 1954|  1.16k|        if (expr.size()) {
  ------------------
  |  Branch (1954:13): [True: 631, False: 532]
  ------------------
 1955|    631|            if (!Const(",", expr)) {
  ------------------
  |  Branch (1955:17): [True: 6, False: 625]
  ------------------
 1956|      6|                error = strprintf("tr: expected ',', got '%c'", expr[0]);
  ------------------
  |  | 1172|      6|#define strprintf tfm::format
  ------------------
 1957|      6|                return {};
 1958|      6|            }
 1959|       |            /** The path from the top of the tree to what we're currently processing.
 1960|       |             * branches[i] == false: left branch in the i'th step from the top; true: right branch.
 1961|       |             */
 1962|    625|            std::vector<bool> branches;
 1963|       |            // Loop over all provided scripts. In every iteration exactly one script will be processed.
 1964|       |            // Use a do-loop because inside this if-branch we expect at least one script.
 1965|  1.82k|            do {
 1966|       |                // First process all open braces.
 1967|  5.05k|                while (Const("{", expr)) {
  ------------------
  |  Branch (1967:24): [True: 3.23k, False: 1.82k]
  ------------------
 1968|  3.23k|                    branches.push_back(false); // new left branch
 1969|  3.23k|                    if (branches.size() > TAPROOT_CONTROL_MAX_NODE_COUNT) {
  ------------------
  |  Branch (1969:25): [True: 4, False: 3.22k]
  ------------------
 1970|      4|                        error = strprintf("tr() supports at most %i nesting levels", TAPROOT_CONTROL_MAX_NODE_COUNT);
  ------------------
  |  | 1172|      4|#define strprintf tfm::format
  ------------------
 1971|      4|                        return {};
 1972|      4|                    }
 1973|  3.23k|                }
 1974|       |                // Process the actual script expression.
 1975|  1.82k|                auto sarg = Expr(expr);
 1976|  1.82k|                subscripts.emplace_back(ParseScript(key_exp_index, sarg, ParseScriptContext::P2TR, out, error));
 1977|  1.82k|                if (subscripts.back().empty()) return {};
  ------------------
  |  Branch (1977:21): [True: 147, False: 1.67k]
  ------------------
 1978|  1.67k|                max_providers_len = std::max(max_providers_len, subscripts.back().size());
 1979|  1.67k|                depths.push_back(branches.size());
 1980|       |                // Process closing braces; one is expected for every right branch we were in.
 1981|  1.93k|                while (branches.size() && branches.back()) {
  ------------------
  |  Branch (1981:24): [True: 1.47k, False: 461]
  |  Branch (1981:24): [True: 267, False: 1.67k]
  |  Branch (1981:43): [True: 267, False: 1.20k]
  ------------------
 1982|    267|                    if (!Const("}", expr)) {
  ------------------
  |  Branch (1982:25): [True: 6, False: 261]
  ------------------
 1983|      6|                        error = strprintf("tr(): expected '}' after script expression");
  ------------------
  |  | 1172|      6|#define strprintf tfm::format
  ------------------
 1984|      6|                        return {};
 1985|      6|                    }
 1986|    261|                    branches.pop_back(); // move up one level after encountering '}'
 1987|    261|                }
 1988|       |                // If after that, we're at the end of a left branch, expect a comma.
 1989|  1.67k|                if (branches.size() && !branches.back()) {
  ------------------
  |  Branch (1989:21): [True: 1.20k, False: 461]
  |  Branch (1989:21): [True: 1.20k, False: 461]
  |  Branch (1989:40): [True: 1.20k, False: 0]
  ------------------
 1990|  1.20k|                    if (!Const(",", expr)) {
  ------------------
  |  Branch (1990:25): [True: 7, False: 1.20k]
  ------------------
 1991|      7|                        error = strprintf("tr(): expected ',' after script expression");
  ------------------
  |  | 1172|      7|#define strprintf tfm::format
  ------------------
 1992|      7|                        return {};
 1993|      7|                    }
 1994|  1.20k|                    branches.back() = true; // And now we're in a right branch.
 1995|  1.20k|                }
 1996|  1.67k|            } while (branches.size());
  ------------------
  |  Branch (1996:22): [True: 1.20k, False: 461]
  ------------------
 1997|       |            // After we've explored a whole tree, we must be at the end of the expression.
 1998|    461|            if (expr.size()) {
  ------------------
  |  Branch (1998:17): [True: 12, False: 449]
  ------------------
 1999|     12|                error = strprintf("tr(): expected ')' after script expression");
  ------------------
  |  | 1172|     12|#define strprintf tfm::format
  ------------------
 2000|     12|                return {};
 2001|     12|            }
 2002|    461|        }
 2003|    981|        assert(TaprootBuilder::ValidDepths(depths));
 2004|       |
 2005|       |        // Make sure all vecs are of the same length, or exactly length 1
 2006|       |        // For length 1 vectors, clone subdescs until vector is the same length
 2007|    981|        for (auto& vec : subscripts) {
  ------------------
  |  Branch (2007:24): [True: 551, False: 981]
  ------------------
 2008|    551|            if (vec.size() == 1) {
  ------------------
  |  Branch (2008:17): [True: 544, False: 7]
  ------------------
 2009|    544|                for (size_t i = 1; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2009:36): [True: 0, False: 544]
  ------------------
 2010|      0|                    vec.emplace_back(vec.at(0)->Clone());
 2011|      0|                }
 2012|    544|            } else if (vec.size() != max_providers_len) {
  ------------------
  |  Branch (2012:24): [True: 0, False: 7]
  ------------------
 2013|      0|                error = strprintf("tr(): Multipath subscripts have mismatched lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2014|      0|                return {};
 2015|      0|            }
 2016|    551|        }
 2017|       |
 2018|    981|        if (internal_keys.size() > 1 && internal_keys.size() != max_providers_len) {
  ------------------
  |  Branch (2018:13): [True: 36, False: 945]
  |  Branch (2018:41): [True: 0, False: 36]
  ------------------
 2019|      0|            error = strprintf("tr(): Multipath internal key mismatches multipath subscripts lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2020|      0|            return {};
 2021|      0|        }
 2022|       |
 2023|  1.00k|        while (internal_keys.size() < max_providers_len) {
  ------------------
  |  Branch (2023:16): [True: 23, False: 981]
  ------------------
 2024|     23|            internal_keys.emplace_back(internal_keys.at(0)->Clone());
 2025|     23|        }
 2026|       |
 2027|       |        // Build the final descriptors vector
 2028|  2.13k|        for (size_t i = 0; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2028:28): [True: 1.15k, False: 981]
  ------------------
 2029|       |            // Build final subscripts vectors by retrieving the i'th subscript for each vector in subscripts
 2030|  1.15k|            std::vector<std::unique_ptr<DescriptorImpl>> this_subs;
 2031|  1.15k|            this_subs.reserve(subscripts.size());
 2032|  1.15k|            for (auto& subs : subscripts) {
  ------------------
  |  Branch (2032:29): [True: 574, False: 1.15k]
  ------------------
 2033|    574|                this_subs.emplace_back(std::move(subs.at(i)));
 2034|    574|            }
 2035|  1.15k|            ret.emplace_back(std::make_unique<TRDescriptor>(std::move(internal_keys.at(i)), std::move(this_subs), depths));
 2036|  1.15k|        }
 2037|    981|        return ret;
 2038|       |
 2039|       |
 2040|  5.14k|    } else if (Func("tr", expr)) {
  ------------------
  |  Branch (2040:16): [True: 1, False: 5.14k]
  ------------------
 2041|      1|        error = "Can only have tr at top level";
 2042|      1|        return {};
 2043|      1|    }
 2044|  5.14k|    if (ctx == ParseScriptContext::TOP && Func("rawtr", expr)) {
  ------------------
  |  Branch (2044:9): [True: 3.01k, False: 2.13k]
  |  Branch (2044:9): [True: 53, False: 5.09k]
  |  Branch (2044:43): [True: 53, False: 2.96k]
  ------------------
 2045|     53|        auto arg = Expr(expr);
 2046|     53|        if (expr.size()) {
  ------------------
  |  Branch (2046:13): [True: 1, False: 52]
  ------------------
 2047|      1|            error = strprintf("rawtr(): only one key expected.");
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2048|      1|            return {};
 2049|      1|        }
 2050|     52|        auto output_keys = ParsePubkey(key_exp_index, arg, ParseScriptContext::P2TR, out, error);
 2051|     52|        if (output_keys.empty()) {
  ------------------
  |  Branch (2051:13): [True: 3, False: 49]
  ------------------
 2052|      3|            error = strprintf("rawtr(): %s", error);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 2053|      3|            return {};
 2054|      3|        }
 2055|     49|        ++key_exp_index;
 2056|    134|        for (auto& pubkey : output_keys) {
  ------------------
  |  Branch (2056:27): [True: 134, False: 49]
  ------------------
 2057|    134|            ret.emplace_back(std::make_unique<RawTRDescriptor>(std::move(pubkey)));
 2058|    134|        }
 2059|     49|        return ret;
 2060|  5.09k|    } else if (Func("rawtr", expr)) {
  ------------------
  |  Branch (2060:16): [True: 1, False: 5.09k]
  ------------------
 2061|      1|        error = "Can only have rawtr at top level";
 2062|      1|        return {};
 2063|      1|    }
 2064|  5.09k|    if (ctx == ParseScriptContext::TOP && Func("raw", expr)) {
  ------------------
  |  Branch (2064:9): [True: 2.96k, False: 2.13k]
  |  Branch (2064:9): [True: 1.13k, False: 3.95k]
  |  Branch (2064:43): [True: 1.13k, False: 1.82k]
  ------------------
 2065|  1.13k|        std::string str(expr.begin(), expr.end());
 2066|  1.13k|        if (!IsHex(str)) {
  ------------------
  |  Branch (2066:13): [True: 12, False: 1.12k]
  ------------------
 2067|     12|            error = "Raw script is not hex";
 2068|     12|            return {};
 2069|     12|        }
 2070|  1.12k|        auto bytes = ParseHex(str);
 2071|  1.12k|        ret.emplace_back(std::make_unique<RawDescriptor>(CScript(bytes.begin(), bytes.end())));
 2072|  1.12k|        return ret;
 2073|  3.95k|    } else if (Func("raw", expr)) {
  ------------------
  |  Branch (2073:16): [True: 2, False: 3.95k]
  ------------------
 2074|      2|        error = "Can only have raw() at top level";
 2075|      2|        return {};
 2076|      2|    }
 2077|       |    // Process miniscript expressions.
 2078|  3.95k|    {
 2079|  3.95k|        const auto script_ctx{ctx == ParseScriptContext::P2WSH ? miniscript::MiniscriptContext::P2WSH : miniscript::MiniscriptContext::TAPSCRIPT};
  ------------------
  |  Branch (2079:31): [True: 928, False: 3.02k]
  ------------------
 2080|  3.95k|        KeyParser parser(/*out = */&out, /* in = */nullptr, /* ctx = */script_ctx, key_exp_index);
 2081|  3.95k|        auto node = miniscript::FromString(std::string(expr.begin(), expr.end()), parser);
 2082|  3.95k|        if (parser.m_key_parsing_error != "") {
  ------------------
  |  Branch (2082:13): [True: 116, False: 3.83k]
  ------------------
 2083|    116|            error = std::move(parser.m_key_parsing_error);
 2084|    116|            return {};
 2085|    116|        }
 2086|  3.83k|        if (node) {
  ------------------
  |  Branch (2086:13): [True: 2.11k, False: 1.72k]
  ------------------
 2087|  2.11k|            if (ctx != ParseScriptContext::P2WSH && ctx != ParseScriptContext::P2TR) {
  ------------------
  |  Branch (2087:17): [True: 1.38k, False: 734]
  |  Branch (2087:53): [True: 253, False: 1.13k]
  ------------------
 2088|    253|                error = "Miniscript expressions can only be used in wsh or tr.";
 2089|    253|                return {};
 2090|    253|            }
 2091|  1.86k|            if (!node->IsSane() || node->IsNotSatisfiable()) {
  ------------------
  |  Branch (2091:17): [True: 301, False: 1.56k]
  |  Branch (2091:36): [True: 14, False: 1.54k]
  ------------------
 2092|       |                // Try to find the first insane sub for better error reporting.
 2093|    315|                auto insane_node = node.get();
 2094|    315|                if (const auto sub = node->FindInsaneSub()) insane_node = sub;
  ------------------
  |  Branch (2094:32): [True: 283, False: 32]
  ------------------
 2095|    315|                if (const auto str = insane_node->ToString(parser)) error = *str;
  ------------------
  |  Branch (2095:32): [True: 315, False: 0]
  ------------------
 2096|    315|                if (!insane_node->IsValid()) {
  ------------------
  |  Branch (2096:21): [True: 196, False: 119]
  ------------------
 2097|    196|                    error += " is invalid";
 2098|    196|                } else if (!node->IsSane()) {
  ------------------
  |  Branch (2098:28): [True: 105, False: 14]
  ------------------
 2099|    105|                    error += " is not sane";
 2100|    105|                    if (!insane_node->IsNonMalleable()) {
  ------------------
  |  Branch (2100:25): [True: 19, False: 86]
  ------------------
 2101|     19|                        error += ": malleable witnesses exist";
 2102|     86|                    } else if (insane_node == node.get() && !insane_node->NeedsSignature()) {
  ------------------
  |  Branch (2102:32): [True: 23, False: 63]
  |  Branch (2102:61): [True: 6, False: 17]
  ------------------
 2103|      6|                        error += ": witnesses without signature exist";
 2104|     80|                    } else if (!insane_node->CheckTimeLocksMix()) {
  ------------------
  |  Branch (2104:32): [True: 8, False: 72]
  ------------------
 2105|      8|                        error += ": contains mixes of timelocks expressed in blocks and seconds";
 2106|     72|                    } else if (!insane_node->CheckDuplicateKey()) {
  ------------------
  |  Branch (2106:32): [True: 50, False: 22]
  ------------------
 2107|     50|                        error += ": contains duplicate public keys";
 2108|     50|                    } else if (!insane_node->ValidSatisfactions()) {
  ------------------
  |  Branch (2108:32): [True: 10, False: 12]
  ------------------
 2109|     10|                        error += ": needs witnesses that may exceed resource limits";
 2110|     10|                    }
 2111|    105|                } else {
 2112|     14|                    error += " is not satisfiable";
 2113|     14|                }
 2114|    315|                return {};
 2115|    315|            }
 2116|       |            // A signature check is required for a miniscript to be sane. Therefore no sane miniscript
 2117|       |            // may have an empty list of public keys.
 2118|  1.54k|            CHECK_NONFATAL(!parser.m_keys.empty());
  ------------------
  |  |   82|  1.54k|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
 2119|  1.54k|            key_exp_index += parser.m_keys.size();
 2120|       |            // Make sure all vecs are of the same length, or exactly length 1
 2121|       |            // For length 1 vectors, clone subdescs until vector is the same length
 2122|  1.54k|            size_t num_multipath = std::max_element(parser.m_keys.begin(), parser.m_keys.end(),
 2123|  1.54k|                    [](const std::vector<std::unique_ptr<PubkeyProvider>>& a, const std::vector<std::unique_ptr<PubkeyProvider>>& b) {
 2124|  1.54k|                        return a.size() < b.size();
 2125|  1.54k|                    })->size();
 2126|       |
 2127|  2.52k|            for (auto& vec : parser.m_keys) {
  ------------------
  |  Branch (2127:28): [True: 2.52k, False: 1.54k]
  ------------------
 2128|  2.52k|                if (vec.size() == 1) {
  ------------------
  |  Branch (2128:21): [True: 2.49k, False: 26]
  ------------------
 2129|  2.93k|                    for (size_t i = 1; i < num_multipath; ++i) {
  ------------------
  |  Branch (2129:40): [True: 444, False: 2.49k]
  ------------------
 2130|    444|                        vec.emplace_back(vec.at(0)->Clone());
 2131|    444|                    }
 2132|  2.49k|                } else if (vec.size() != num_multipath) {
  ------------------
  |  Branch (2132:28): [True: 1, False: 25]
  ------------------
 2133|      1|                    error = strprintf("Miniscript: Multipath derivation paths have mismatched lengths");
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2134|      1|                    return {};
 2135|      1|                }
 2136|  2.52k|            }
 2137|       |
 2138|       |            // Build the final descriptors vector
 2139|  3.20k|            for (size_t i = 0; i < num_multipath; ++i) {
  ------------------
  |  Branch (2139:32): [True: 1.65k, False: 1.54k]
  ------------------
 2140|       |                // Build final pubkeys vectors by retrieving the i'th subscript for each vector in subscripts
 2141|  1.65k|                std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 2142|  1.65k|                pubs.reserve(parser.m_keys.size());
 2143|  3.04k|                for (auto& pub : parser.m_keys) {
  ------------------
  |  Branch (2143:32): [True: 3.04k, False: 1.65k]
  ------------------
 2144|  3.04k|                    pubs.emplace_back(std::move(pub.at(i)));
 2145|  3.04k|                }
 2146|  1.65k|                ret.emplace_back(std::make_unique<MiniscriptDescriptor>(std::move(pubs), node->Clone()));
 2147|  1.65k|            }
 2148|  1.54k|            return ret;
 2149|  1.54k|        }
 2150|  3.83k|    }
 2151|  1.72k|    if (ctx == ParseScriptContext::P2SH) {
  ------------------
  |  Branch (2151:9): [True: 3, False: 1.71k]
  ------------------
 2152|      3|        error = "A function is needed within P2SH";
 2153|      3|        return {};
 2154|  1.71k|    } else if (ctx == ParseScriptContext::P2WSH) {
  ------------------
  |  Branch (2154:16): [True: 162, False: 1.55k]
  ------------------
 2155|    162|        error = "A function is needed within P2WSH";
 2156|    162|        return {};
 2157|    162|    }
 2158|  1.55k|    error = strprintf("'%s' is not a valid descriptor function", std::string(expr.begin(), expr.end()));
  ------------------
  |  | 1172|  1.55k|#define strprintf tfm::format
  ------------------
 2159|  1.55k|    return {};
 2160|  1.72k|}
descriptor.cpp:_ZN12_GLOBAL__N_111ParsePubkeyEjRK4SpanIKcENS_18ParseScriptContextER19FlatSigningProviderRNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE:
 1582|   102k|{
 1583|   102k|    std::vector<std::unique_ptr<PubkeyProvider>> ret;
 1584|   102k|    auto origin_split = Split(sp, ']');
 1585|   102k|    if (origin_split.size() > 2) {
  ------------------
  |  Branch (1585:9): [True: 1, False: 102k]
  ------------------
 1586|      1|        error = "Multiple ']' characters found for a single pubkey";
 1587|      1|        return {};
 1588|      1|    }
 1589|       |    // This is set if either the origin or path suffix contains a hardened derivation.
 1590|   102k|    bool apostrophe = false;
 1591|   102k|    if (origin_split.size() == 1) {
  ------------------
  |  Branch (1591:9): [True: 101k, False: 665]
  ------------------
 1592|   101k|        return ParsePubkeyInner(key_exp_index, origin_split[0], ctx, out, apostrophe, error);
 1593|   101k|    }
 1594|    665|    if (origin_split[0].empty() || origin_split[0][0] != '[') {
  ------------------
  |  Branch (1594:9): [True: 1, False: 664]
  |  Branch (1594:36): [True: 6, False: 658]
  ------------------
 1595|      7|        error = strprintf("Key origin start '[ character expected but not found, got '%c' instead",
  ------------------
  |  | 1172|      7|#define strprintf tfm::format
  ------------------
 1596|      7|                          origin_split[0].empty() ? /** empty, implies split char */ ']' : origin_split[0][0]);
  ------------------
  |  Branch (1596:27): [True: 1, False: 6]
  ------------------
 1597|      7|        return {};
 1598|      7|    }
 1599|    658|    auto slash_split = Split(origin_split[0].subspan(1), '/');
 1600|    658|    if (slash_split[0].size() != 8) {
  ------------------
  |  Branch (1600:9): [True: 2, False: 656]
  ------------------
 1601|      2|        error = strprintf("Fingerprint is not 4 bytes (%u characters instead of 8 characters)", slash_split[0].size());
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 1602|      2|        return {};
 1603|      2|    }
 1604|    656|    std::string fpr_hex = std::string(slash_split[0].begin(), slash_split[0].end());
 1605|    656|    if (!IsHex(fpr_hex)) {
  ------------------
  |  Branch (1605:9): [True: 2, False: 654]
  ------------------
 1606|      2|        error = strprintf("Fingerprint '%s' is not hex", fpr_hex);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 1607|      2|        return {};
 1608|      2|    }
 1609|    654|    auto fpr_bytes = ParseHex(fpr_hex);
 1610|    654|    KeyOriginInfo info;
 1611|    654|    static_assert(sizeof(info.fingerprint) == 4, "Fingerprint must be 4 bytes");
 1612|    654|    assert(fpr_bytes.size() == 4);
 1613|    654|    std::copy(fpr_bytes.begin(), fpr_bytes.end(), info.fingerprint);
 1614|    654|    std::vector<KeyPath> path;
 1615|    654|    if (!ParseKeyPath(slash_split, path, apostrophe, error, /*allow_multipath=*/false)) return {};
  ------------------
  |  Branch (1615:9): [True: 4, False: 650]
  ------------------
 1616|    650|    info.path = path.at(0);
 1617|    650|    auto providers = ParsePubkeyInner(key_exp_index, origin_split[1], ctx, out, apostrophe, error);
 1618|    650|    if (providers.empty()) return {};
  ------------------
  |  Branch (1618:9): [True: 11, False: 639]
  ------------------
 1619|    639|    ret.reserve(providers.size());
 1620|    763|    for (auto& prov : providers) {
  ------------------
  |  Branch (1620:21): [True: 763, False: 639]
  ------------------
 1621|    763|        ret.emplace_back(std::make_unique<OriginPubkeyProvider>(key_exp_index, info, std::move(prov), apostrophe));
 1622|    763|    }
 1623|    639|    return ret;
 1624|    650|}
descriptor.cpp:_ZN12_GLOBAL__N_116ParsePubkeyInnerEjRK4SpanIKcENS_18ParseScriptContextER19FlatSigningProviderRbRNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEE:
 1503|   101k|{
 1504|   101k|    std::vector<std::unique_ptr<PubkeyProvider>> ret;
 1505|   101k|    bool permit_uncompressed = ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH;
  ------------------
  |  Branch (1505:32): [True: 9.41k, False: 92.5k]
  |  Branch (1505:66): [True: 4.04k, False: 88.5k]
  ------------------
 1506|   101k|    auto split = Split(sp, '/');
 1507|   101k|    std::string str(split[0].begin(), split[0].end());
 1508|   101k|    if (str.size() == 0) {
  ------------------
  |  Branch (1508:9): [True: 5, False: 101k]
  ------------------
 1509|      5|        error = "No key provided";
 1510|      5|        return {};
 1511|      5|    }
 1512|   101k|    if (split.size() == 1) {
  ------------------
  |  Branch (1512:9): [True: 74.9k, False: 27.0k]
  ------------------
 1513|  74.9k|        if (IsHex(str)) {
  ------------------
  |  Branch (1513:13): [True: 6.43k, False: 68.4k]
  ------------------
 1514|  6.43k|            std::vector<unsigned char> data = ParseHex(str);
 1515|  6.43k|            CPubKey pubkey(data);
 1516|  6.43k|            if (pubkey.IsValid() && !pubkey.IsValidNonHybrid()) {
  ------------------
  |  Branch (1516:17): [True: 5.12k, False: 1.31k]
  |  Branch (1516:37): [True: 1, False: 5.12k]
  ------------------
 1517|      1|                error = "Hybrid public keys are not allowed";
 1518|      1|                return {};
 1519|      1|            }
 1520|  6.43k|            if (pubkey.IsFullyValid()) {
  ------------------
  |  Branch (1520:17): [True: 5.09k, False: 1.34k]
  ------------------
 1521|  5.09k|                if (permit_uncompressed || pubkey.IsCompressed()) {
  ------------------
  |  Branch (1521:21): [True: 2.94k, False: 2.15k]
  |  Branch (1521:44): [True: 2.14k, False: 9]
  ------------------
 1522|  5.08k|                    ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, false));
 1523|  5.08k|                    return ret;
 1524|  5.08k|                } else {
 1525|      9|                    error = "Uncompressed keys are not allowed";
 1526|      9|                    return {};
 1527|      9|                }
 1528|  5.09k|            } else if (data.size() == 32 && ctx == ParseScriptContext::P2TR) {
  ------------------
  |  Branch (1528:24): [True: 1.29k, False: 49]
  |  Branch (1528:45): [True: 1.28k, False: 3]
  ------------------
 1529|  1.28k|                unsigned char fullkey[33] = {0x02};
 1530|  1.28k|                std::copy(data.begin(), data.end(), fullkey + 1);
 1531|  1.28k|                pubkey.Set(std::begin(fullkey), std::end(fullkey));
 1532|  1.28k|                if (pubkey.IsFullyValid()) {
  ------------------
  |  Branch (1532:21): [True: 1.28k, False: 5]
  ------------------
 1533|  1.28k|                    ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, true));
 1534|  1.28k|                    return ret;
 1535|  1.28k|                }
 1536|  1.28k|            }
 1537|     57|            error = strprintf("Pubkey '%s' is invalid", str);
  ------------------
  |  | 1172|     57|#define strprintf tfm::format
  ------------------
 1538|     57|            return {};
 1539|  6.43k|        }
 1540|  68.4k|        CKey key = DecodeSecret(str);
 1541|  68.4k|        if (key.IsValid()) {
  ------------------
  |  Branch (1541:13): [True: 45.3k, False: 23.1k]
  ------------------
 1542|  45.3k|            if (permit_uncompressed || key.IsCompressed()) {
  ------------------
  |  Branch (1542:17): [True: 1.22k, False: 44.1k]
  |  Branch (1542:40): [True: 44.1k, False: 0]
  ------------------
 1543|  45.3k|                CPubKey pubkey = key.GetPubKey();
 1544|  45.3k|                out.keys.emplace(pubkey.GetID(), key);
 1545|  45.3k|                ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, ctx == ParseScriptContext::P2TR));
 1546|  45.3k|                return ret;
 1547|  45.3k|            } else {
 1548|      0|                error = "Uncompressed keys are not allowed";
 1549|      0|                return {};
 1550|      0|            }
 1551|  45.3k|        }
 1552|  68.4k|    }
 1553|  50.1k|    CExtKey extkey = DecodeExtKey(str);
 1554|  50.1k|    CExtPubKey extpubkey = DecodeExtPubKey(str);
 1555|  50.1k|    if (!extkey.key.IsValid() && !extpubkey.pubkey.IsValid()) {
  ------------------
  |  Branch (1555:9): [True: 5.09k, False: 45.0k]
  |  Branch (1555:34): [True: 138, False: 4.96k]
  ------------------
 1556|    138|        error = strprintf("key '%s' is not valid", str);
  ------------------
  |  | 1172|    138|#define strprintf tfm::format
  ------------------
 1557|    138|        return {};
 1558|    138|    }
 1559|  50.0k|    std::vector<KeyPath> paths;
 1560|  50.0k|    DeriveType type = DeriveType::NO;
 1561|  50.0k|    if (std::ranges::equal(split.back(), Span{"*"}.first(1))) {
  ------------------
  |  Branch (1561:9): [True: 7.01k, False: 43.0k]
  ------------------
 1562|  7.01k|        split.pop_back();
 1563|  7.01k|        type = DeriveType::UNHARDENED;
 1564|  43.0k|    } else if (std::ranges::equal(split.back(), Span{"*'"}.first(2)) || std::ranges::equal(split.back(), Span{"*h"}.first(2))) {
  ------------------
  |  Branch (1564:16): [True: 1.43k, False: 41.5k]
  |  Branch (1564:16): [True: 4.27k, False: 38.7k]
  |  Branch (1564:73): [True: 2.83k, False: 38.7k]
  ------------------
 1565|  4.27k|        apostrophe = std::ranges::equal(split.back(), Span{"*'"}.first(2));
 1566|  4.27k|        split.pop_back();
 1567|  4.27k|        type = DeriveType::HARDENED;
 1568|  4.27k|    }
 1569|  50.0k|    if (!ParseKeyPath(split, paths, apostrophe, error, /*allow_multipath=*/true)) return {};
  ------------------
  |  Branch (1569:9): [True: 121, False: 49.9k]
  ------------------
 1570|  49.9k|    if (extkey.key.IsValid()) {
  ------------------
  |  Branch (1570:9): [True: 44.9k, False: 4.94k]
  ------------------
 1571|  44.9k|        extpubkey = extkey.Neuter();
 1572|  44.9k|        out.keys.emplace(extpubkey.pubkey.GetID(), extkey.key);
 1573|  44.9k|    }
 1574|  52.7k|    for (auto& path : paths) {
  ------------------
  |  Branch (1574:21): [True: 52.7k, False: 49.9k]
  ------------------
 1575|  52.7k|        ret.emplace_back(std::make_unique<BIP32PubkeyProvider>(key_exp_index, extpubkey, std::move(path), type, apostrophe));
 1576|  52.7k|    }
 1577|  49.9k|    return ret;
 1578|  50.0k|}
descriptor.cpp:_ZN12_GLOBAL__N_119ConstPubkeyProviderC2EjRK7CPubKeyb:
  300|  54.2k|    ConstPubkeyProvider(uint32_t exp_index, const CPubKey& pubkey, bool xonly) : PubkeyProvider(exp_index), m_pubkey(pubkey), m_xonly(xonly) {}
descriptor.cpp:_ZN12_GLOBAL__N_114PubkeyProviderC2Ej:
  169|   109k|    explicit PubkeyProvider(uint32_t exp_index) : m_expr_index(exp_index) {}
descriptor.cpp:_ZN12_GLOBAL__N_114PubkeyProviderD2Ev:
  171|   109k|    virtual ~PubkeyProvider() = default;
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider9GetPubKeyEiRK15SigningProviderR7CPubKeyR13KeyOriginInfoPK15DescriptorCachePS8_:
  302|   453k|    {
  303|   453k|        key = m_pubkey;
  304|   453k|        info.path.clear();
  305|   453k|        CKeyID keyid = m_pubkey.GetID();
  306|   453k|        std::copy(keyid.begin(), keyid.begin() + sizeof(info.fingerprint), info.fingerprint);
  307|   453k|        return true;
  308|   453k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider7IsRangeEv:
  309|  63.8k|    bool IsRange() const override { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider7GetSizeEv:
  310|  44.7k|    size_t GetSize() const override { return m_pubkey.size(); }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  311|   432k|    std::string ToString(StringType type) const override { return m_xonly ? HexStr(m_pubkey).substr(2) : HexStr(m_pubkey); }
  ------------------
  |  Branch (311:67): [True: 403k, False: 28.5k]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  313|  2.50k|    {
  314|  2.50k|        CKey key;
  315|  2.50k|        if (!GetPrivKey(/*pos=*/0, arg, key)) return false;
  ------------------
  |  Branch (315:13): [True: 286, False: 2.22k]
  ------------------
  316|  2.22k|        ret = EncodeSecret(key);
  317|  2.22k|        return true;
  318|  2.50k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider18ToNormalizedStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPK15DescriptorCache:
  320|  25.3k|    {
  321|  25.3k|        ret = ToString(StringType::PUBLIC);
  322|  25.3k|        return true;
  323|  25.3k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider10GetPrivKeyEiRK15SigningProviderR4CKey:
  325|  2.58k|    {
  326|  2.58k|        return m_xonly ? arg.GetKeyByXOnly(XOnlyPubKey(m_pubkey), key) :
  ------------------
  |  Branch (326:16): [True: 2.08k, False: 503]
  ------------------
  327|  2.58k|                         arg.GetKey(m_pubkey.GetID(), key);
  328|  2.58k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider5CloneEv:
  338|  2.47k|    {
  339|  2.47k|        return std::make_unique<ConstPubkeyProvider>(m_expr_index, m_pubkey, m_xonly);
  340|  2.47k|    }
descriptor.cpp:_ZN12_GLOBAL__N_119BIP32PubkeyProviderC2EjRK10CExtPubKeyNSt3__16vectorIjNS4_9allocatorIjEEEENS_10DeriveTypeEb:
  394|  54.5k|    BIP32PubkeyProvider(uint32_t exp_index, const CExtPubKey& extkey, KeyPath path, DeriveType derive, bool apostrophe) : PubkeyProvider(exp_index), m_root_extkey(extkey), m_path(std::move(path)), m_derive(derive), m_apostrophe(apostrophe) {}
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider9GetPubKeyEiRK15SigningProviderR7CPubKeyR13KeyOriginInfoPK15DescriptorCachePS8_:
  398|   316k|    {
  399|       |        // Info of parent of the to be derived pubkey
  400|   316k|        KeyOriginInfo parent_info;
  401|   316k|        CKeyID keyid = m_root_extkey.pubkey.GetID();
  402|   316k|        std::copy(keyid.begin(), keyid.begin() + sizeof(parent_info.fingerprint), parent_info.fingerprint);
  403|   316k|        parent_info.path = m_path;
  404|       |
  405|       |        // Info of the derived key itself which is copied out upon successful completion
  406|   316k|        KeyOriginInfo final_info_out_tmp = parent_info;
  407|   316k|        if (m_derive == DeriveType::UNHARDENED) final_info_out_tmp.path.push_back((uint32_t)pos);
  ------------------
  |  Branch (407:13): [True: 27.2k, False: 289k]
  ------------------
  408|   316k|        if (m_derive == DeriveType::HARDENED) final_info_out_tmp.path.push_back(((uint32_t)pos) | 0x80000000L);
  ------------------
  |  Branch (408:13): [True: 56.2k, False: 260k]
  ------------------
  409|       |
  410|       |        // Derive keys or fetch them from cache
  411|   316k|        CExtPubKey final_extkey = m_root_extkey;
  412|   316k|        CExtPubKey parent_extkey = m_root_extkey;
  413|   316k|        CExtPubKey last_hardened_extkey;
  414|   316k|        bool der = true;
  415|   316k|        if (read_cache) {
  ------------------
  |  Branch (415:13): [True: 179k, False: 137k]
  ------------------
  416|   179k|            if (!read_cache->GetCachedDerivedExtPubKey(m_expr_index, pos, final_extkey)) {
  ------------------
  |  Branch (416:17): [True: 153k, False: 25.8k]
  ------------------
  417|   153k|                if (m_derive == DeriveType::HARDENED) return false;
  ------------------
  |  Branch (417:21): [True: 7.05k, False: 146k]
  ------------------
  418|       |                // Try to get the derivation parent
  419|   146k|                if (!read_cache->GetCachedParentExtPubKey(m_expr_index, parent_extkey)) return false;
  ------------------
  |  Branch (419:21): [True: 5.18k, False: 141k]
  ------------------
  420|   141k|                final_extkey = parent_extkey;
  421|   141k|                if (m_derive == DeriveType::UNHARDENED) der = parent_extkey.Derive(final_extkey, pos);
  ------------------
  |  Branch (421:21): [True: 21.5k, False: 119k]
  ------------------
  422|   141k|            }
  423|   179k|        } else if (IsHardened()) {
  ------------------
  |  Branch (423:20): [True: 29.6k, False: 107k]
  ------------------
  424|  29.6k|            CExtKey xprv;
  425|  29.6k|            CExtKey lh_xprv;
  426|  29.6k|            if (!GetDerivedExtKey(arg, xprv, lh_xprv)) return false;
  ------------------
  |  Branch (426:17): [True: 3.96k, False: 25.6k]
  ------------------
  427|  25.6k|            parent_extkey = xprv.Neuter();
  428|  25.6k|            if (m_derive == DeriveType::UNHARDENED) der = xprv.Derive(xprv, pos);
  ------------------
  |  Branch (428:17): [True: 203, False: 25.4k]
  ------------------
  429|  25.6k|            if (m_derive == DeriveType::HARDENED) der = xprv.Derive(xprv, pos | 0x80000000UL);
  ------------------
  |  Branch (429:17): [True: 22.1k, False: 3.51k]
  ------------------
  430|  25.6k|            final_extkey = xprv.Neuter();
  431|  25.6k|            if (lh_xprv.key.IsValid()) {
  ------------------
  |  Branch (431:17): [True: 3.74k, False: 21.9k]
  ------------------
  432|  3.74k|                last_hardened_extkey = lh_xprv.Neuter();
  433|  3.74k|            }
  434|   107k|        } else {
  435|   107k|            for (auto entry : m_path) {
  ------------------
  |  Branch (435:29): [True: 17.3k, False: 107k]
  ------------------
  436|  17.3k|                if (!parent_extkey.Derive(parent_extkey, entry)) return false;
  ------------------
  |  Branch (436:21): [True: 0, False: 17.3k]
  ------------------
  437|  17.3k|            }
  438|   107k|            final_extkey = parent_extkey;
  439|   107k|            if (m_derive == DeriveType::UNHARDENED) der = parent_extkey.Derive(final_extkey, pos);
  ------------------
  |  Branch (439:17): [True: 4.20k, False: 103k]
  ------------------
  440|   107k|            assert(m_derive != DeriveType::HARDENED);
  441|   107k|        }
  442|   300k|        if (!der) return false;
  ------------------
  |  Branch (442:13): [True: 0, False: 300k]
  ------------------
  443|       |
  444|   300k|        final_info_out = final_info_out_tmp;
  445|   300k|        key_out = final_extkey.pubkey;
  446|       |
  447|   300k|        if (write_cache) {
  ------------------
  |  Branch (447:13): [True: 121k, False: 179k]
  ------------------
  448|       |            // Only cache parent if there is any unhardened derivation
  449|   121k|            if (m_derive != DeriveType::HARDENED) {
  ------------------
  |  Branch (449:17): [True: 99.0k, False: 22.1k]
  ------------------
  450|  99.0k|                write_cache->CacheParentExtPubKey(m_expr_index, parent_extkey);
  451|       |                // Cache last hardened xpub if we have it
  452|  99.0k|                if (last_hardened_extkey.pubkey.IsValid()) {
  ------------------
  |  Branch (452:21): [True: 3.51k, False: 95.4k]
  ------------------
  453|  3.51k|                    write_cache->CacheLastHardenedExtPubKey(m_expr_index, last_hardened_extkey);
  454|  3.51k|                }
  455|  99.0k|            } else if (final_info_out.path.size() > 0) {
  ------------------
  |  Branch (455:24): [True: 22.1k, False: 0]
  ------------------
  456|  22.1k|                write_cache->CacheDerivedExtPubKey(m_expr_index, pos, final_extkey);
  457|  22.1k|            }
  458|   121k|        }
  459|       |
  460|   300k|        return true;
  461|   300k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider10IsHardenedEv:
  385|   137k|    {
  386|   137k|        if (m_derive == DeriveType::HARDENED) return true;
  ------------------
  |  Branch (386:13): [True: 23.4k, False: 114k]
  ------------------
  387|   114k|        for (auto entry : m_path) {
  ------------------
  |  Branch (387:25): [True: 24.4k, False: 107k]
  ------------------
  388|  24.4k|            if (entry >> 31) return true;
  ------------------
  |  Branch (388:17): [True: 6.18k, False: 18.2k]
  ------------------
  389|  24.4k|        }
  390|   107k|        return false;
  391|   114k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider16GetDerivedExtKeyERK15SigningProviderR7CExtKeyS5_:
  373|  46.1k|    {
  374|  46.1k|        if (!GetExtKey(arg, xprv)) return false;
  ------------------
  |  Branch (374:13): [True: 5.79k, False: 40.3k]
  ------------------
  375|  40.3k|        for (auto entry : m_path) {
  ------------------
  |  Branch (375:25): [True: 26.1k, False: 40.3k]
  ------------------
  376|  26.1k|            if (!xprv.Derive(xprv, entry)) return false;
  ------------------
  |  Branch (376:17): [True: 0, False: 26.1k]
  ------------------
  377|  26.1k|            if (entry >> 31) {
  ------------------
  |  Branch (377:17): [True: 4.00k, False: 22.1k]
  ------------------
  378|  4.00k|                last_hardened = xprv;
  379|  4.00k|            }
  380|  26.1k|        }
  381|  40.3k|        return true;
  382|  40.3k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider9GetExtKeyERK15SigningProviderR7CExtKey:
  360|  48.1k|    {
  361|  48.1k|        CKey key;
  362|  48.1k|        if (!arg.GetKey(m_root_extkey.pubkey.GetID(), key)) return false;
  ------------------
  |  Branch (362:13): [True: 6.02k, False: 42.0k]
  ------------------
  363|  42.0k|        ret.nDepth = m_root_extkey.nDepth;
  364|  42.0k|        std::copy(m_root_extkey.vchFingerprint, m_root_extkey.vchFingerprint + sizeof(ret.vchFingerprint), ret.vchFingerprint);
  365|  42.0k|        ret.nChild = m_root_extkey.nChild;
  366|  42.0k|        ret.chaincode = m_root_extkey.chaincode;
  367|  42.0k|        ret.key = key;
  368|  42.0k|        return true;
  369|  48.1k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider7IsRangeEv:
  395|   365k|    bool IsRange() const override { return m_derive != DeriveType::NO; }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider7GetSizeEv:
  396|  26.0k|    size_t GetSize() const override { return 33; }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  474|   285k|    {
  475|   285k|        return ToString(type, /*normalized=*/false);
  476|   285k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeEb:
  463|   287k|    {
  464|       |        // If StringType==COMPAT, always use the apostrophe to stay compatible with previous versions
  465|   287k|        const bool use_apostrophe = (!normalized && m_apostrophe) || type == StringType::COMPAT;
  ------------------
  |  Branch (465:38): [True: 285k, False: 2.54k]
  |  Branch (465:53): [True: 17.7k, False: 267k]
  |  Branch (465:70): [True: 26.4k, False: 243k]
  ------------------
  466|   287k|        std::string ret = EncodeExtPubKey(m_root_extkey) + FormatHDKeypath(m_path, /*apostrophe=*/use_apostrophe);
  467|   287k|        if (IsRange()) {
  ------------------
  |  Branch (467:13): [True: 69.9k, False: 217k]
  ------------------
  468|  69.9k|            ret += "/*";
  469|  69.9k|            if (m_derive == DeriveType::HARDENED) ret += use_apostrophe ? '\'' : 'h';
  ------------------
  |  Branch (469:17): [True: 46.2k, False: 23.6k]
  |  Branch (469:58): [True: 14.7k, False: 31.5k]
  ------------------
  470|  69.9k|        }
  471|   287k|        return ret;
  472|   287k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  478|  1.99k|    {
  479|  1.99k|        CExtKey key;
  480|  1.99k|        if (!GetExtKey(arg, key)) return false;
  ------------------
  |  Branch (480:13): [True: 226, False: 1.76k]
  ------------------
  481|  1.76k|        out = EncodeExtKey(key) + FormatHDKeypath(m_path, /*apostrophe=*/m_apostrophe);
  482|  1.76k|        if (IsRange()) {
  ------------------
  |  Branch (482:13): [True: 546, False: 1.22k]
  ------------------
  483|    546|            out += "/*";
  484|    546|            if (m_derive == DeriveType::HARDENED) out += m_apostrophe ? '\'' : 'h';
  ------------------
  |  Branch (484:17): [True: 368, False: 178]
  |  Branch (484:58): [True: 179, False: 189]
  ------------------
  485|    546|        }
  486|  1.76k|        return true;
  487|  1.99k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider18ToNormalizedStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPK15DescriptorCache:
  489|  17.7k|    {
  490|  17.7k|        if (m_derive == DeriveType::HARDENED) {
  ------------------
  |  Branch (490:13): [True: 2.54k, False: 15.2k]
  ------------------
  491|  2.54k|            out = ToString(StringType::PUBLIC, /*normalized=*/true);
  492|       |
  493|  2.54k|            return true;
  494|  2.54k|        }
  495|       |        // Step backwards to find the last hardened step in the path
  496|  15.2k|        int i = (int)m_path.size() - 1;
  497|  17.5k|        for (; i >= 0; --i) {
  ------------------
  |  Branch (497:16): [True: 4.72k, False: 12.7k]
  ------------------
  498|  4.72k|            if (m_path.at(i) >> 31) {
  ------------------
  |  Branch (498:17): [True: 2.41k, False: 2.31k]
  ------------------
  499|  2.41k|                break;
  500|  2.41k|            }
  501|  4.72k|        }
  502|       |        // Either no derivation or all unhardened derivation
  503|  15.2k|        if (i == -1) {
  ------------------
  |  Branch (503:13): [True: 12.7k, False: 2.41k]
  ------------------
  504|  12.7k|            out = ToString();
  505|  12.7k|            return true;
  506|  12.7k|        }
  507|       |        // Get the path to the last hardened stup
  508|  2.41k|        KeyOriginInfo origin;
  509|  2.41k|        int k = 0;
  510|  4.95k|        for (; k <= i; ++k) {
  ------------------
  |  Branch (510:16): [True: 2.54k, False: 2.41k]
  ------------------
  511|       |            // Add to the path
  512|  2.54k|            origin.path.push_back(m_path.at(k));
  513|  2.54k|        }
  514|       |        // Build the remaining path
  515|  2.41k|        KeyPath end_path;
  516|  2.47k|        for (; k < (int)m_path.size(); ++k) {
  ------------------
  |  Branch (516:16): [True: 67, False: 2.41k]
  ------------------
  517|     67|            end_path.push_back(m_path.at(k));
  518|     67|        }
  519|       |        // Get the fingerprint
  520|  2.41k|        CKeyID id = m_root_extkey.pubkey.GetID();
  521|  2.41k|        std::copy(id.begin(), id.begin() + 4, origin.fingerprint);
  522|       |
  523|  2.41k|        CExtPubKey xpub;
  524|  2.41k|        CExtKey lh_xprv;
  525|       |        // If we have the cache, just get the parent xpub
  526|  2.41k|        if (cache != nullptr) {
  ------------------
  |  Branch (526:13): [True: 2.41k, False: 0]
  ------------------
  527|  2.41k|            cache->GetCachedLastHardenedExtPubKey(m_expr_index, xpub);
  528|  2.41k|        }
  529|  2.41k|        if (!xpub.pubkey.IsValid()) {
  ------------------
  |  Branch (529:13): [True: 1.88k, False: 527]
  ------------------
  530|       |            // Cache miss, or nor cache, or need privkey
  531|  1.88k|            CExtKey xprv;
  532|  1.88k|            if (!GetDerivedExtKey(arg, xprv, lh_xprv)) return false;
  ------------------
  |  Branch (532:17): [True: 1.82k, False: 54]
  ------------------
  533|     54|            xpub = lh_xprv.Neuter();
  534|     54|        }
  535|    581|        assert(xpub.pubkey.IsValid());
  536|       |
  537|       |        // Build the string
  538|    581|        std::string origin_str = HexStr(origin.fingerprint) + FormatHDKeypath(origin.path);
  539|    581|        out = "[" + origin_str + "]" + EncodeExtPubKey(xpub) + FormatHDKeypath(end_path);
  540|    581|        if (IsRange()) {
  ------------------
  |  Branch (540:13): [True: 57, False: 524]
  ------------------
  541|     57|            out += "/*";
  542|     57|            assert(m_derive == DeriveType::UNHARDENED);
  543|     57|        }
  544|    581|        return true;
  545|    581|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider10GetPrivKeyEiRK15SigningProviderR4CKey:
  547|  14.6k|    {
  548|  14.6k|        CExtKey extkey;
  549|  14.6k|        CExtKey dummy;
  550|  14.6k|        if (!GetDerivedExtKey(arg, extkey, dummy)) return false;
  ------------------
  |  Branch (550:13): [True: 0, False: 14.6k]
  ------------------
  551|  14.6k|        if (m_derive == DeriveType::UNHARDENED && !extkey.Derive(extkey, pos)) return false;
  ------------------
  |  Branch (551:13): [True: 7.87k, False: 6.74k]
  |  Branch (551:51): [True: 0, False: 7.87k]
  ------------------
  552|  14.6k|        if (m_derive == DeriveType::HARDENED && !extkey.Derive(extkey, pos | 0x80000000UL)) return false;
  ------------------
  |  Branch (552:13): [True: 6.59k, False: 8.03k]
  |  Branch (552:49): [True: 0, False: 6.59k]
  ------------------
  553|  14.6k|        key = extkey.key;
  554|  14.6k|        return true;
  555|  14.6k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119BIP32PubkeyProvider5CloneEv:
  565|  1.81k|    {
  566|  1.81k|        return std::make_unique<BIP32PubkeyProvider>(m_expr_index, m_root_extkey, m_path, m_derive, m_apostrophe);
  567|  1.81k|    }
descriptor.cpp:_ZN12_GLOBAL__N_112ParseKeyPathERKNSt3__16vectorI4SpanIKcENS0_9allocatorIS4_EEEERNS1_INS1_IjNS5_IjEEEENS5_ISB_EEEERbRNS0_12basic_stringIcNS0_11char_traitsIcEENS5_IcEEEEb:
 1441|  50.6k|{
 1442|  50.6k|    KeyPath path;
 1443|  50.6k|    std::optional<size_t> multipath_segment_index;
 1444|  50.6k|    std::vector<uint32_t> multipath_values;
 1445|  50.6k|    std::unordered_set<uint32_t> seen_multipath;
 1446|       |
 1447|  82.5k|    for (size_t i = 1; i < split.size(); ++i) {
  ------------------
  |  Branch (1447:24): [True: 31.9k, False: 50.5k]
  ------------------
 1448|  31.9k|        const Span<const char>& elem = split[i];
 1449|       |
 1450|       |        // Check if element contain multipath specifier
 1451|  31.9k|        if (!elem.empty() && elem.front() == '<' && elem.back() == '>') {
  ------------------
  |  Branch (1451:13): [True: 31.9k, False: 4]
  |  Branch (1451:30): [True: 855, False: 31.0k]
  |  Branch (1451:53): [True: 849, False: 6]
  ------------------
 1452|    849|            if (!allow_multipath) {
  ------------------
  |  Branch (1452:17): [True: 0, False: 849]
  ------------------
 1453|      0|                error = strprintf("Key path value '%s' specifies multipath in a section where multipath is not allowed", std::string(elem.begin(), elem.end()));
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 1454|      0|                return false;
 1455|      0|            }
 1456|    849|            if (multipath_segment_index) {
  ------------------
  |  Branch (1456:17): [True: 3, False: 846]
  ------------------
 1457|      3|                error = "Multiple multipath key path specifiers found";
 1458|      3|                return false;
 1459|      3|            }
 1460|       |
 1461|       |            // Parse each possible value
 1462|    846|            std::vector<Span<const char>> nums = Split(Span(elem.begin()+1, elem.end()-1), ";");
 1463|    846|            if (nums.size() < 2) {
  ------------------
  |  Branch (1463:17): [True: 2, False: 844]
  ------------------
 1464|      2|                error = "Multipath key path specifiers must have at least two items";
 1465|      2|                return false;
 1466|      2|            }
 1467|       |
 1468|  3.78k|            for (const auto& num : nums) {
  ------------------
  |  Branch (1468:34): [True: 3.78k, False: 823]
  ------------------
 1469|  3.78k|                const auto& op_num = ParseKeyPathNum(num, apostrophe, error);
 1470|  3.78k|                if (!op_num) return false;
  ------------------
  |  Branch (1470:21): [True: 19, False: 3.76k]
  ------------------
 1471|  3.76k|                auto [_, inserted] = seen_multipath.insert(*op_num);
 1472|  3.76k|                if (!inserted) {
  ------------------
  |  Branch (1472:21): [True: 2, False: 3.76k]
  ------------------
 1473|      2|                    error = strprintf("Duplicated key path value %u in multipath specifier", *op_num);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 1474|      2|                    return false;
 1475|      2|                }
 1476|  3.76k|                multipath_values.emplace_back(*op_num);
 1477|  3.76k|            }
 1478|       |
 1479|    823|            path.emplace_back(); // Placeholder for multipath segment
 1480|    823|            multipath_segment_index = path.size()-1;
 1481|  31.0k|        } else {
 1482|  31.0k|            const auto& op_num = ParseKeyPathNum(elem, apostrophe, error);
 1483|  31.0k|            if (!op_num) return false;
  ------------------
  |  Branch (1483:17): [True: 99, False: 30.9k]
  ------------------
 1484|  30.9k|            path.emplace_back(*op_num);
 1485|  30.9k|        }
 1486|  31.9k|    }
 1487|       |
 1488|  50.5k|    if (!multipath_segment_index) {
  ------------------
  |  Branch (1488:9): [True: 49.7k, False: 820]
  ------------------
 1489|  49.7k|        out.emplace_back(std::move(path));
 1490|  49.7k|    } else {
 1491|       |        // Replace the multipath placeholder with each value while generating paths
 1492|  4.50k|        for (size_t i = 0; i < multipath_values.size(); i++) {
  ------------------
  |  Branch (1492:28): [True: 3.68k, False: 820]
  ------------------
 1493|  3.68k|            KeyPath branch_path = path;
 1494|  3.68k|            branch_path[*multipath_segment_index] = multipath_values[i];
 1495|  3.68k|            out.emplace_back(std::move(branch_path));
 1496|  3.68k|        }
 1497|    820|    }
 1498|  50.5k|    return true;
 1499|  50.6k|}
descriptor.cpp:_ZN12_GLOBAL__N_115ParseKeyPathNumE4SpanIKcERbRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
 1408|  34.8k|{
 1409|  34.8k|    bool hardened = false;
 1410|  34.8k|    if (elem.size() > 0) {
  ------------------
  |  Branch (1410:9): [True: 34.8k, False: 7]
  ------------------
 1411|  34.8k|        const char last = elem[elem.size() - 1];
 1412|  34.8k|        if (last == '\'' || last == 'h') {
  ------------------
  |  Branch (1412:13): [True: 666, False: 34.2k]
  |  Branch (1412:29): [True: 2.70k, False: 31.5k]
  ------------------
 1413|  3.36k|            elem = elem.first(elem.size() - 1);
 1414|  3.36k|            hardened = true;
 1415|  3.36k|            apostrophe = last == '\'';
 1416|  3.36k|        }
 1417|  34.8k|    }
 1418|  34.8k|    uint32_t p;
 1419|  34.8k|    if (!ParseUInt32(std::string(elem.begin(), elem.end()), &p)) {
  ------------------
  |  Branch (1419:9): [True: 110, False: 34.7k]
  ------------------
 1420|    110|        error = strprintf("Key path value '%s' is not a valid uint32", std::string(elem.begin(), elem.end()));
  ------------------
  |  | 1172|    110|#define strprintf tfm::format
  ------------------
 1421|    110|        return std::nullopt;
 1422|  34.7k|    } else if (p > 0x7FFFFFFFUL) {
  ------------------
  |  Branch (1422:16): [True: 8, False: 34.7k]
  ------------------
 1423|      8|        error = strprintf("Key path value %u is out of range", p);
  ------------------
  |  | 1172|      8|#define strprintf tfm::format
  ------------------
 1424|      8|        return std::nullopt;
 1425|      8|    }
 1426|       |
 1427|  34.7k|    return std::make_optional<uint32_t>(p | (((uint32_t)hardened) << 31));
 1428|  34.8k|}
descriptor.cpp:_ZN12_GLOBAL__N_120OriginPubkeyProviderC2Ej13KeyOriginInfoNSt3__110unique_ptrINS_14PubkeyProviderENS2_14default_deleteIS4_EEEEb:
  242|    848|    OriginPubkeyProvider(uint32_t exp_index, KeyOriginInfo info, std::unique_ptr<PubkeyProvider> provider, bool apostrophe) : PubkeyProvider(exp_index), m_origin(std::move(info)), m_provider(std::move(provider)), m_apostrophe(apostrophe) {}
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider9GetPubKeyEiRK15SigningProviderR7CPubKeyR13KeyOriginInfoPK15DescriptorCachePS8_:
  244|  2.74k|    {
  245|  2.74k|        if (!m_provider->GetPubKey(pos, arg, key, info, read_cache, write_cache)) return false;
  ------------------
  |  Branch (245:13): [True: 365, False: 2.38k]
  ------------------
  246|  2.38k|        std::copy(std::begin(m_origin.fingerprint), std::end(m_origin.fingerprint), info.fingerprint);
  247|  2.38k|        info.path.insert(info.path.begin(), m_origin.path.begin(), m_origin.path.end());
  248|  2.38k|        return true;
  249|  2.74k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider7IsRangeEv:
  250|    933|    bool IsRange() const override { return m_provider->IsRange(); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider7GetSizeEv:
  251|    239|    size_t GetSize() const override { return m_provider->GetSize(); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  252|    931|    std::string ToString(StringType type) const override { return "[" + OriginString(type) + "]" + m_provider->ToString(type); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider12OriginStringENS_14PubkeyProvider10StringTypeEb:
  235|  1.05k|    {
  236|       |        // If StringType==COMPAT, always use the apostrophe to stay compatible with previous versions
  237|  1.05k|        bool use_apostrophe = (!normalized && m_apostrophe) || type == StringType::COMPAT;
  ------------------
  |  Branch (237:32): [True: 942, False: 111]
  |  Branch (237:47): [True: 288, False: 654]
  |  Branch (237:64): [True: 91, False: 674]
  ------------------
  238|  1.05k|        return HexStr(m_origin.fingerprint) + FormatHDKeypath(m_origin.path, use_apostrophe);
  239|  1.05k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  254|     17|    {
  255|     17|        std::string sub;
  256|     17|        if (!m_provider->ToPrivateString(arg, sub)) return false;
  ------------------
  |  Branch (256:13): [True: 6, False: 11]
  ------------------
  257|     11|        ret = "[" + OriginString(StringType::PUBLIC) + "]" + std::move(sub);
  258|     11|        return true;
  259|     17|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider18ToNormalizedStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPK15DescriptorCache:
  261|    112|    {
  262|    112|        std::string sub;
  263|    112|        if (!m_provider->ToNormalizedString(arg, sub, cache)) return false;
  ------------------
  |  Branch (263:13): [True: 1, False: 111]
  ------------------
  264|       |        // If m_provider is a BIP32PubkeyProvider, we may get a string formatted like a OriginPubkeyProvider
  265|       |        // In that case, we need to strip out the leading square bracket and fingerprint from the substring,
  266|       |        // and append that to our own origin string.
  267|    111|        if (sub[0] == '[') {
  ------------------
  |  Branch (267:13): [True: 5, False: 106]
  ------------------
  268|      5|            sub = sub.substr(9);
  269|      5|            ret = "[" + OriginString(StringType::PUBLIC, /*normalized=*/true) + std::move(sub);
  270|    106|        } else {
  271|    106|            ret = "[" + OriginString(StringType::PUBLIC, /*normalized=*/true) + "]" + std::move(sub);
  272|    106|        }
  273|    111|        return true;
  274|    112|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider10GetPrivKeyEiRK15SigningProviderR4CKey:
  276|    161|    {
  277|    161|        return m_provider->GetPrivKey(pos, arg, key);
  278|    161|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider5CloneEv:
  288|     85|    {
  289|     85|        return std::make_unique<OriginPubkeyProvider>(m_expr_index, m_origin, m_provider->Clone(), m_apostrophe);
  290|     85|    }
descriptor.cpp:_ZN12_GLOBAL__N_112PKDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEEb:
  856|  4.72k|    PKDescriptor(std::unique_ptr<PubkeyProvider> prov, bool xonly = false) : DescriptorImpl(Vector(std::move(prov)), "pk"), m_xonly(xonly) {}
descriptor.cpp:_ZN12_GLOBAL__N_114DescriptorImplC2ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS8_IcEEEE:
  601|  11.7k|    DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_args() {}
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl7IsRangeEv:
  624|  68.1k|    {
  625|   139k|        for (const auto& pubkey : m_pubkey_args) {
  ------------------
  |  Branch (625:33): [True: 139k, False: 32.1k]
  ------------------
  626|   139k|            if (pubkey->IsRange()) return true;
  ------------------
  |  Branch (626:17): [True: 36.0k, False: 103k]
  ------------------
  627|   139k|        }
  628|  32.1k|        for (const auto& arg : m_subdescriptor_args) {
  ------------------
  |  Branch (628:30): [True: 20.0k, False: 14.1k]
  ------------------
  629|  20.0k|            if (arg->IsRange()) return true;
  ------------------
  |  Branch (629:17): [True: 18.0k, False: 1.97k]
  ------------------
  630|  20.0k|        }
  631|  14.1k|        return false;
  632|  32.1k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl8ToStringEb:
  680|  44.8k|    {
  681|  44.8k|        std::string ret;
  682|  44.8k|        ToStringHelper(nullptr, ret, compat_format ? StringType::COMPAT : StringType::PUBLIC);
  ------------------
  |  Branch (682:38): [True: 10.0k, False: 34.8k]
  ------------------
  683|  44.8k|        return AddChecksum(ret);
  684|  44.8k|    }
descriptor.cpp:_ZN12_GLOBAL__N_111AddChecksumERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  152|  52.7k|std::string AddChecksum(const std::string& str) { return str + "#" + DescriptorChecksum(str); }
descriptor.cpp:_ZNK12_GLOBAL__N_112PKDescriptor12IsSingleTypeEv:
  857|    456|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  687|    833|    {
  688|    833|        bool ret = ToStringHelper(&arg, out, StringType::PRIVATE);
  689|    833|        out = AddChecksum(out);
  690|    833|        return ret;
  691|    833|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl18ToNormalizedStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPK15DescriptorCache:
  694|  7.02k|    {
  695|  7.02k|        bool ret = ToStringHelper(&arg, out, StringType::NORMALIZED, cache);
  696|  7.02k|        out = AddChecksum(out);
  697|  7.02k|        return ret;
  698|  7.02k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl6ExpandEiRK15SigningProviderRNSt3__16vectorI7CScriptNS4_9allocatorIS6_EEEER19FlatSigningProviderP15DescriptorCache:
  733|  12.0k|    {
  734|  12.0k|        return ExpandHelper(pos, provider, nullptr, output_scripts, out, write_cache);
  735|  12.0k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl12ExpandHelperEiRK15SigningProviderPK15DescriptorCacheRNSt3__16vectorI7CScriptNS7_9allocatorIS9_EEEER19FlatSigningProviderPS4_:
  702|  71.7k|    {
  703|  71.7k|        std::vector<std::pair<CPubKey, KeyOriginInfo>> entries;
  704|  71.7k|        entries.reserve(m_pubkey_args.size());
  705|       |
  706|       |        // Construct temporary data in `entries`, `subscripts`, and `subprovider` to avoid producing output in case of failure.
  707|   744k|        for (const auto& p : m_pubkey_args) {
  ------------------
  |  Branch (707:28): [True: 744k, False: 57.3k]
  ------------------
  708|   744k|            entries.emplace_back();
  709|   744k|            if (!p->GetPubKey(pos, arg, entries.back().first, entries.back().second, read_cache, write_cache)) return false;
  ------------------
  |  Branch (709:17): [True: 14.4k, False: 730k]
  ------------------
  710|   744k|        }
  711|  57.3k|        std::vector<CScript> subscripts;
  712|  57.3k|        FlatSigningProvider subprovider;
  713|  57.3k|        for (const auto& subarg : m_subdescriptor_args) {
  ------------------
  |  Branch (713:33): [True: 20.3k, False: 52.4k]
  ------------------
  714|  20.3k|            std::vector<CScript> outscripts;
  715|  20.3k|            if (!subarg->ExpandHelper(pos, arg, read_cache, outscripts, subprovider, write_cache)) return false;
  ------------------
  |  Branch (715:17): [True: 4.84k, False: 15.5k]
  ------------------
  716|  15.5k|            assert(outscripts.size() == 1);
  717|  15.5k|            subscripts.emplace_back(std::move(outscripts[0]));
  718|  15.5k|        }
  719|  52.4k|        out.Merge(std::move(subprovider));
  720|       |
  721|  52.4k|        std::vector<CPubKey> pubkeys;
  722|  52.4k|        pubkeys.reserve(entries.size());
  723|   694k|        for (auto& entry : entries) {
  ------------------
  |  Branch (723:26): [True: 694k, False: 52.4k]
  ------------------
  724|   694k|            pubkeys.push_back(entry.first);
  725|   694k|            out.origins.emplace(entry.first.GetID(), std::make_pair<CPubKey, KeyOriginInfo>(CPubKey(entry.first), std::move(entry.second)));
  726|   694k|        }
  727|       |
  728|  52.4k|        output_scripts = MakeScripts(pubkeys, Span{subscripts}, out);
  729|  52.4k|        return true;
  730|  57.3k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl15ExpandFromCacheEiRK15DescriptorCacheRNSt3__16vectorI7CScriptNS4_9allocatorIS6_EEEER19FlatSigningProvider:
  738|  39.3k|    {
  739|  39.3k|        return ExpandHelper(pos, DUMMY_SIGNING_PROVIDER, &read_cache, output_scripts, out, nullptr);
  740|  39.3k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl13ExpandPrivateEiRK15SigningProviderR19FlatSigningProvider:
  744|  14.7k|    {
  745|  14.7k|        for (const auto& p : m_pubkey_args) {
  ------------------
  |  Branch (745:28): [True: 14.7k, False: 14.7k]
  ------------------
  746|  14.7k|            CKey key;
  747|  14.7k|            if (!p->GetPrivKey(pos, provider, key)) continue;
  ------------------
  |  Branch (747:17): [True: 0, False: 14.7k]
  ------------------
  748|  14.7k|            out.keys.emplace(key.GetPubKey().GetID(), key);
  749|  14.7k|        }
  750|  14.7k|        for (const auto& arg : m_subdescriptor_args) {
  ------------------
  |  Branch (750:30): [True: 0, False: 14.7k]
  ------------------
  751|      0|            arg->ExpandPrivate(pos, provider, out);
  752|      0|        }
  753|  14.7k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl13GetOutputTypeEv:
  755|  6.68k|    std::optional<OutputType> GetOutputType() const override { return std::nullopt; }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl13ToStringExtraEv:
  586|  47.7k|    virtual std::string ToStringExtra() const { return ""; }
descriptor.cpp:_ZNK12_GLOBAL__N_112PKDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  847|  2.57k|    {
  848|  2.57k|        if (m_xonly) {
  ------------------
  |  Branch (848:13): [True: 552, False: 2.02k]
  ------------------
  849|    552|            CScript script = CScript() << ToByteVector(XOnlyPubKey(keys[0])) << OP_CHECKSIG;
  850|    552|            return Vector(std::move(script));
  851|  2.02k|        } else {
  852|  2.02k|            return Vector(GetScriptForRawPubKey(keys[0]));
  853|  2.02k|        }
  854|  2.57k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl23ToStringSubScriptHelperEPK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_10StringTypeEPK15DescriptorCache:
  636|  56.6k|    {
  637|  56.6k|        size_t pos = 0;
  638|  56.6k|        for (const auto& scriptarg : m_subdescriptor_args) {
  ------------------
  |  Branch (638:36): [True: 12.6k, False: 56.5k]
  ------------------
  639|  12.6k|            if (pos++) ret += ",";
  ------------------
  |  Branch (639:17): [True: 0, False: 12.6k]
  ------------------
  640|  12.6k|            std::string tmp;
  641|  12.6k|            if (!scriptarg->ToStringHelper(arg, tmp, type, cache)) return false;
  ------------------
  |  Branch (641:17): [True: 110, False: 12.5k]
  ------------------
  642|  12.5k|            ret += tmp;
  643|  12.5k|        }
  644|  56.5k|        return true;
  645|  56.6k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl14ToStringHelperEPK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_10StringTypeEPK15DescriptorCache:
  649|  64.9k|    {
  650|  64.9k|        std::string extra = ToStringExtra();
  651|  64.9k|        size_t pos = extra.size() > 0 ? 1 : 0;
  ------------------
  |  Branch (651:22): [True: 17.2k, False: 47.7k]
  ------------------
  652|  64.9k|        std::string ret = m_name + "(" + extra;
  653|   706k|        for (const auto& pubkey : m_pubkey_args) {
  ------------------
  |  Branch (653:33): [True: 706k, False: 62.6k]
  ------------------
  654|   706k|            if (pos++) ret += ",";
  ------------------
  |  Branch (654:17): [True: 671k, False: 35.0k]
  ------------------
  655|   706k|            std::string tmp;
  656|   706k|            switch (type) {
  ------------------
  |  Branch (656:21): [True: 0, False: 706k]
  ------------------
  657|  43.0k|                case StringType::NORMALIZED:
  ------------------
  |  Branch (657:17): [True: 43.0k, False: 663k]
  ------------------
  658|  43.0k|                    if (!pubkey->ToNormalizedString(*arg, tmp, cache)) return false;
  ------------------
  |  Branch (658:25): [True: 1.82k, False: 41.2k]
  ------------------
  659|  41.2k|                    break;
  660|  41.2k|                case StringType::PRIVATE:
  ------------------
  |  Branch (660:17): [True: 4.34k, False: 702k]
  ------------------
  661|  4.34k|                    if (!pubkey->ToPrivateString(*arg, tmp)) return false;
  ------------------
  |  Branch (661:25): [True: 465, False: 3.88k]
  ------------------
  662|  3.88k|                    break;
  663|   587k|                case StringType::PUBLIC:
  ------------------
  |  Branch (663:17): [True: 587k, False: 119k]
  ------------------
  664|   587k|                    tmp = pubkey->ToString();
  665|   587k|                    break;
  666|  72.3k|                case StringType::COMPAT:
  ------------------
  |  Branch (666:17): [True: 72.3k, False: 634k]
  ------------------
  667|  72.3k|                    tmp = pubkey->ToString(PubkeyProvider::StringType::COMPAT);
  668|  72.3k|                    break;
  669|   706k|            }
  670|   704k|            ret += tmp;
  671|   704k|        }
  672|  62.6k|        std::string subscript;
  673|  62.6k|        if (!ToStringSubScriptHelper(arg, subscript, type, cache)) return false;
  ------------------
  |  Branch (673:13): [True: 150, False: 62.4k]
  ------------------
  674|  62.4k|        if (pos && subscript.size()) ret += ',';
  ------------------
  |  Branch (674:13): [True: 49.9k, False: 12.5k]
  |  Branch (674:20): [True: 4.08k, False: 45.8k]
  ------------------
  675|  62.4k|        out = std::move(ret) + std::move(subscript) + ")";
  676|  62.4k|        return true;
  677|  62.6k|    }
descriptor.cpp:_ZN12_GLOBAL__N_113PKHDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
  891|  1.45k|    PKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "pkh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_113PKHDescriptor12IsSingleTypeEv:
  893|  12.0k|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_113PKHDescriptor13GetOutputTypeEv:
  892|  8.16k|    std::optional<OutputType> GetOutputType() const override { return OutputType::LEGACY; }
descriptor.cpp:_ZNK12_GLOBAL__N_113PKHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  885|  14.1k|    {
  886|  14.1k|        CKeyID id = keys[0].GetID();
  887|  14.1k|        out.pubkeys.emplace(id, keys[0]);
  888|  14.1k|        return Vector(GetScriptForDestination(PKHash(id)));
  889|  14.1k|    }
descriptor.cpp:_ZN12_GLOBAL__N_115ComboDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
  968|    961|    ComboDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "combo") {}
descriptor.cpp:_ZNK12_GLOBAL__N_115ComboDescriptor12IsSingleTypeEv:
  969|    252|    bool IsSingleType() const final { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_115ComboDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  953|  2.40k|    {
  954|  2.40k|        std::vector<CScript> ret;
  955|  2.40k|        CKeyID id = keys[0].GetID();
  956|  2.40k|        out.pubkeys.emplace(id, keys[0]);
  957|  2.40k|        ret.emplace_back(GetScriptForRawPubKey(keys[0])); // P2PK
  958|  2.40k|        ret.emplace_back(GetScriptForDestination(PKHash(id))); // P2PKH
  959|  2.40k|        if (keys[0].IsCompressed()) {
  ------------------
  |  Branch (959:13): [True: 2.38k, False: 22]
  ------------------
  960|  2.38k|            CScript p2wpkh = GetScriptForDestination(WitnessV0KeyHash(id));
  961|  2.38k|            out.scripts.emplace(CScriptID(p2wpkh), p2wpkh);
  962|  2.38k|            ret.emplace_back(p2wpkh);
  963|  2.38k|            ret.emplace_back(GetScriptForDestination(ScriptHash(p2wpkh))); // P2SH-P2WPKH
  964|  2.38k|        }
  965|  2.40k|        return ret;
  966|  2.40k|    }
descriptor.cpp:_ZN12_GLOBAL__N_118MultisigDescriptorC2EiNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEb:
  992|  1.22k|    MultisigDescriptor(int threshold, std::vector<std::unique_ptr<PubkeyProvider>> providers, bool sorted = false) : DescriptorImpl(std::move(providers), sorted ? "sortedmulti" : "multi"), m_threshold(threshold), m_sorted(sorted) {}
  ------------------
  |  Branch (992:155): [True: 649, False: 572]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_118MultisigDescriptor12IsSingleTypeEv:
  993|    441|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_118MultisigDescriptor13ToStringExtraEv:
  982|  10.1k|    std::string ToStringExtra() const override { return strprintf("%i", m_threshold); }
  ------------------
  |  | 1172|  10.1k|#define strprintf tfm::format
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_118MultisigDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  983|  8.55k|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override {
  984|  8.55k|        if (m_sorted) {
  ------------------
  |  Branch (984:13): [True: 5.80k, False: 2.75k]
  ------------------
  985|  5.80k|            std::vector<CPubKey> sorted_keys(keys);
  986|  5.80k|            std::sort(sorted_keys.begin(), sorted_keys.end());
  987|  5.80k|            return Vector(GetScriptForMultisig(m_threshold, sorted_keys));
  988|  5.80k|        }
  989|  2.75k|        return Vector(GetScriptForMultisig(m_threshold, keys));
  990|  8.55k|    }
descriptor.cpp:_ZN12_GLOBAL__N_116MultiADescriptorC2EiNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEb:
 1043|    313|    MultiADescriptor(int threshold, std::vector<std::unique_ptr<PubkeyProvider>> providers, bool sorted = false) : DescriptorImpl(std::move(providers), sorted ? "sortedmulti_a" : "multi_a"), m_threshold(threshold), m_sorted(sorted) {}
  ------------------
  |  Branch (1043:153): [True: 2, False: 311]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_116MultiADescriptor13ToStringExtraEv:
 1028|  2.66k|    std::string ToStringExtra() const override { return strprintf("%i", m_threshold); }
  ------------------
  |  | 1172|  2.66k|#define strprintf tfm::format
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_116MultiADescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1029|  2.55k|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override {
 1030|  2.55k|        CScript ret;
 1031|  2.55k|        std::vector<XOnlyPubKey> xkeys;
 1032|  2.55k|        xkeys.reserve(keys.size());
 1033|   597k|        for (const auto& key : keys) xkeys.emplace_back(key);
  ------------------
  |  Branch (1033:30): [True: 597k, False: 2.55k]
  ------------------
 1034|  2.55k|        if (m_sorted) std::sort(xkeys.begin(), xkeys.end());
  ------------------
  |  Branch (1034:13): [True: 0, False: 2.55k]
  ------------------
 1035|  2.55k|        ret << ToByteVector(xkeys[0]) << OP_CHECKSIG;
 1036|   597k|        for (size_t i = 1; i < keys.size(); ++i) {
  ------------------
  |  Branch (1036:28): [True: 594k, False: 2.55k]
  ------------------
 1037|   594k|            ret << ToByteVector(xkeys[i]) << OP_CHECKSIGADD;
 1038|   594k|        }
 1039|  2.55k|        ret << m_threshold << OP_NUMEQUAL;
 1040|  2.55k|        return Vector(std::move(ret));
 1041|  2.55k|    }
descriptor.cpp:_ZN12_GLOBAL__N_114WPKHDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
  925|    122|    WPKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "wpkh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_114WPKHDescriptor12IsSingleTypeEv:
  927|    431|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_114WPKHDescriptor13GetOutputTypeEv:
  926|    300|    std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32; }
descriptor.cpp:_ZNK12_GLOBAL__N_114WPKHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  919|    453|    {
  920|    453|        CKeyID id = keys[0].GetID();
  921|    453|        out.pubkeys.emplace(id, keys[0]);
  922|    453|        return Vector(GetScriptForDestination(WitnessV0KeyHash(id)));
  923|    453|    }
descriptor.cpp:_ZN12_GLOBAL__N_112SHDescriptorC2ENSt3__110unique_ptrINS_14DescriptorImplENS1_14default_deleteIS3_EEEE:
 1082|    641|    SHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "sh") {}
descriptor.cpp:_ZN12_GLOBAL__N_114DescriptorImplC2ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEENS3_IS0_NS5_IS0_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS8_IcEEEE:
  602|  1.31k|    DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::unique_ptr<DescriptorImpl> script, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_args(Vector(std::move(script))) {}
descriptor.cpp:_ZNK12_GLOBAL__N_112SHDescriptor12IsSingleTypeEv:
 1090|  9.06k|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_112SHDescriptor13GetOutputTypeEv:
 1085|  6.00k|    {
 1086|  6.00k|        assert(m_subdescriptor_args.size() == 1);
 1087|  6.00k|        if (IsSegwit()) return OutputType::P2SH_SEGWIT;
  ------------------
  |  Branch (1087:13): [True: 67, False: 5.93k]
  ------------------
 1088|  5.93k|        return OutputType::LEGACY;
 1089|  6.00k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_112SHDescriptor8IsSegwitEv:
 1079|  6.00k|    bool IsSegwit() const { return m_subdescriptor_args[0]->GetOutputType() == OutputType::BECH32; }
descriptor.cpp:_ZNK12_GLOBAL__N_112SHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1073|  8.06k|    {
 1074|  8.06k|        auto ret = Vector(GetScriptForDestination(ScriptHash(scripts[0])));
 1075|  8.06k|        if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
  ------------------
  |  Branch (1075:13): [True: 8.06k, False: 0]
  ------------------
 1076|  8.06k|        return ret;
 1077|  8.06k|    }
descriptor.cpp:_ZN12_GLOBAL__N_113WSHDescriptorC2ENSt3__110unique_ptrINS_14DescriptorImplENS1_14default_deleteIS3_EEEE:
 1129|    669|    WSHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "wsh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_113WSHDescriptor12IsSingleTypeEv:
 1131|  4.00k|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_113WSHDescriptor13GetOutputTypeEv:
 1130|  2.69k|    std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32; }
descriptor.cpp:_ZNK12_GLOBAL__N_113WSHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1123|  3.58k|    {
 1124|  3.58k|        auto ret = Vector(GetScriptForDestination(WitnessV0ScriptHash(scripts[0])));
 1125|  3.58k|        if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
  ------------------
  |  Branch (1125:13): [True: 3.58k, False: 0]
  ------------------
 1126|  3.58k|        return ret;
 1127|  3.58k|    }
descriptor.cpp:_ZN12_GLOBAL__N_117AddressDescriptorC2ENSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  795|     26|    AddressDescriptor(CTxDestination destination) : DescriptorImpl({}, "addr"), m_destination(std::move(destination)) {}
descriptor.cpp:_ZNK12_GLOBAL__N_117AddressDescriptor12IsSingleTypeEv:
  802|     68|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_117AddressDescriptor15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  803|      1|    bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_117AddressDescriptor13GetOutputTypeEv:
  799|     34|    {
  800|     34|        return OutputTypeFromDestination(m_destination);
  801|     34|    }
descriptor.cpp:_ZNK12_GLOBAL__N_117AddressDescriptor13ToStringExtraEv:
  792|    115|    std::string ToStringExtra() const override { return EncodeDestination(m_destination); }
descriptor.cpp:_ZNK12_GLOBAL__N_117AddressDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  793|     31|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript>, FlatSigningProvider&) const override { return Vector(GetScriptForDestination(m_destination)); }
descriptor.cpp:_ZN12_GLOBAL__N_112TRDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEENS1_6vectorINS2_INS_14DescriptorImplENS4_IS8_EEEENS1_9allocatorISA_EEEENS7_IiNSB_IiEEEE:
 1204|  1.15k|        DescriptorImpl(Vector(std::move(internal_key)), std::move(descs), "tr"), m_depths(std::move(depths))
 1205|  1.15k|    {
 1206|  1.15k|        assert(m_subdescriptor_args.size() == m_depths.size());
 1207|  1.15k|    }
descriptor.cpp:_ZN12_GLOBAL__N_114DescriptorImplC2ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEENS2_INS3_IS0_NS5_IS0_EEEENS8_ISC_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS8_IcEEEE:
  603|  1.15k|    DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::vector<std::unique_ptr<DescriptorImpl>> scripts, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_args(std::move(scripts)) {}
descriptor.cpp:_ZNK12_GLOBAL__N_112TRDescriptor12IsSingleTypeEv:
 1209|  4.85k|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_112TRDescriptor13GetOutputTypeEv:
 1208|  3.19k|    std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32M; }
descriptor.cpp:_ZNK12_GLOBAL__N_112TRDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1165|  4.84k|    {
 1166|  4.84k|        TaprootBuilder builder;
 1167|  4.84k|        assert(m_depths.size() == scripts.size());
 1168|  8.69k|        for (size_t pos = 0; pos < m_depths.size(); ++pos) {
  ------------------
  |  Branch (1168:30): [True: 3.84k, False: 4.84k]
  ------------------
 1169|  3.84k|            builder.Add(m_depths[pos], scripts[pos], TAPROOT_LEAF_TAPSCRIPT);
 1170|  3.84k|        }
 1171|  4.84k|        if (!builder.IsComplete()) return {};
  ------------------
  |  Branch (1171:13): [True: 0, False: 4.84k]
  ------------------
 1172|  4.84k|        assert(keys.size() == 1);
 1173|  4.84k|        XOnlyPubKey xpk(keys[0]);
 1174|  4.84k|        if (!xpk.IsFullyValid()) return {};
  ------------------
  |  Branch (1174:13): [True: 0, False: 4.84k]
  ------------------
 1175|  4.84k|        builder.Finalize(xpk);
 1176|  4.84k|        WitnessV1Taproot output = builder.GetOutput();
 1177|  4.84k|        out.tr_trees[output] = builder;
 1178|  4.84k|        out.pubkeys.emplace(keys[0].GetID(), keys[0]);
 1179|  4.84k|        return Vector(GetScriptForDestination(output));
 1180|  4.84k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_112TRDescriptor23ToStringSubScriptHelperEPK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS_14DescriptorImpl10StringTypeEPK15DescriptorCache:
 1182|  5.94k|    {
 1183|  5.94k|        if (m_depths.empty()) return true;
  ------------------
  |  Branch (1183:13): [True: 1.81k, False: 4.12k]
  ------------------
 1184|  4.12k|        std::vector<bool> path;
 1185|  8.67k|        for (size_t pos = 0; pos < m_depths.size(); ++pos) {
  ------------------
  |  Branch (1185:30): [True: 4.59k, False: 4.08k]
  ------------------
 1186|  4.59k|            if (pos) ret += ',';
  ------------------
  |  Branch (1186:17): [True: 468, False: 4.12k]
  ------------------
 1187|  9.18k|            while ((int)path.size() <= m_depths[pos]) {
  ------------------
  |  Branch (1187:20): [True: 4.59k, False: 4.59k]
  ------------------
 1188|  4.59k|                if (path.size()) ret += '{';
  ------------------
  |  Branch (1188:21): [True: 472, False: 4.12k]
  ------------------
 1189|  4.59k|                path.push_back(false);
 1190|  4.59k|            }
 1191|  4.59k|            std::string tmp;
 1192|  4.59k|            if (!m_subdescriptor_args[pos]->ToStringHelper(arg, tmp, type, cache)) return false;
  ------------------
  |  Branch (1192:17): [True: 40, False: 4.55k]
  ------------------
 1193|  4.55k|            ret += tmp;
 1194|  5.01k|            while (!path.empty() && path.back()) {
  ------------------
  |  Branch (1194:20): [True: 5.01k, False: 0]
  |  Branch (1194:20): [True: 468, False: 4.55k]
  |  Branch (1194:37): [True: 468, False: 4.55k]
  ------------------
 1195|    468|                if (path.size() > 1) ret += '}';
  ------------------
  |  Branch (1195:21): [True: 468, False: 0]
  ------------------
 1196|    468|                path.pop_back();
 1197|    468|            }
 1198|  4.55k|            if (!path.empty()) path.back() = true;
  ------------------
  |  Branch (1198:17): [True: 4.55k, False: 0]
  ------------------
 1199|  4.55k|        }
 1200|  4.08k|        return true;
 1201|  4.12k|    }
descriptor.cpp:_ZN12_GLOBAL__N_115RawTRDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1373|    134|    RawTRDescriptor(std::unique_ptr<PubkeyProvider> output_key) : DescriptorImpl(Vector(std::move(output_key)), "rawtr") {}
descriptor.cpp:_ZNK12_GLOBAL__N_115RawTRDescriptor12IsSingleTypeEv:
 1375|    281|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_115RawTRDescriptor13GetOutputTypeEv:
 1374|    179|    std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32M; }
descriptor.cpp:_ZNK12_GLOBAL__N_115RawTRDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1365|    261|    {
 1366|    261|        assert(keys.size() == 1);
 1367|    261|        XOnlyPubKey xpk(keys[0]);
 1368|    261|        if (!xpk.IsFullyValid()) return {};
  ------------------
  |  Branch (1368:13): [True: 0, False: 261]
  ------------------
 1369|    261|        WitnessV1Taproot output{xpk};
 1370|    261|        return Vector(GetScriptForDestination(output));
 1371|    261|    }
descriptor.cpp:_ZN12_GLOBAL__N_113RawDescriptorC2E7CScript:
  820|  1.12k|    RawDescriptor(CScript script) : DescriptorImpl({}, "raw"), m_script(std::move(script)) {}
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor12IsSingleTypeEv:
  829|  3.03k|    bool IsSingleType() const final { return true; }
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor15ToPrivateStringERK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  830|    167|    bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor13GetOutputTypeEv:
  824|  2.24k|    {
  825|  2.24k|        CTxDestination dest;
  826|  2.24k|        ExtractDestination(m_script, dest);
  827|  2.24k|        return OutputTypeFromDestination(dest);
  828|  2.24k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor13ToStringExtraEv:
  817|  4.31k|    std::string ToStringExtra() const override { return HexStr(m_script); }
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
  818|  1.20k|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript>, FlatSigningProvider&) const override { return Vector(m_script); }
descriptor.cpp:_ZN12_GLOBAL__N_19KeyParserC2EP19FlatSigningProviderPK15SigningProviderN10miniscript17MiniscriptContextEj:
 1676|  3.95k|        : m_out(out), m_in(in), m_script_ctx(ctx), m_offset(offset) {}
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser9MsContextEv:
 1747|  15.4M|    miniscript::MiniscriptContext MsContext() const {
 1748|  15.4M|        return m_script_ctx;
 1749|  15.4M|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser10FromStringIPKcEENSt3__18optionalIjEET_S7_:
 1691|  22.9k|    {
 1692|  22.9k|        assert(m_out);
 1693|  22.9k|        Key key = m_keys.size();
 1694|  22.9k|        auto pk = ParsePubkey(m_offset + key, {&*begin, &*end}, ParseContext(), *m_out, m_key_parsing_error);
 1695|  22.9k|        if (pk.empty()) return {};
  ------------------
  |  Branch (1695:13): [True: 116, False: 22.8k]
  ------------------
 1696|  22.8k|        m_keys.emplace_back(std::move(pk));
 1697|  22.8k|        return key;
 1698|  22.9k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser12ParseContextEv:
 1682|  22.9k|    ParseScriptContext ParseContext() const {
 1683|  22.9k|        switch (m_script_ctx) {
  ------------------
  |  Branch (1683:17): [True: 0, False: 22.9k]
  ------------------
 1684|  17.6k|            case miniscript::MiniscriptContext::P2WSH: return ParseScriptContext::P2WSH;
  ------------------
  |  Branch (1684:13): [True: 17.6k, False: 5.30k]
  ------------------
 1685|  5.30k|            case miniscript::MiniscriptContext::TAPSCRIPT: return ParseScriptContext::P2TR;
  ------------------
  |  Branch (1685:13): [True: 5.30k, False: 17.6k]
  ------------------
 1686|  22.9k|        }
 1687|      0|        assert(false);
 1688|      0|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser10KeyCompareERKjS2_:
 1678|  12.5k|    bool KeyCompare(const Key& a, const Key& b) const {
 1679|  12.5k|        return *m_keys.at(a).at(0) < *m_keys.at(b).at(0);
 1680|  12.5k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114PubkeyProviderltERS0_:
  176|  12.5k|    bool operator<(PubkeyProvider& other) const {
  177|  12.5k|        CPubKey a, b;
  178|  12.5k|        SigningProvider dummy;
  179|  12.5k|        KeyOriginInfo dummy_info;
  180|       |
  181|  12.5k|        GetPubKey(0, dummy, a, dummy_info);
  182|  12.5k|        other.GetPubKey(0, dummy, b, dummy_info);
  183|       |
  184|  12.5k|        return a < b;
  185|  12.5k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser8ToStringERKj:
 1701|  1.51k|    {
 1702|  1.51k|        return m_keys.at(key).at(0)->ToString();
 1703|  1.51k|    }
descriptor.cpp:_ZZN12_GLOBAL__N_111ParseScriptERjR4SpanIKcENS_18ParseScriptContextER19FlatSigningProviderRNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEEENK3$_0clERKNS8_6vectorINS8_10unique_ptrINS_14PubkeyProviderENS8_14default_deleteISJ_EEEENSC_ISM_EEEESQ_:
 2123|    992|                    [](const std::vector<std::unique_ptr<PubkeyProvider>>& a, const std::vector<std::unique_ptr<PubkeyProvider>>& b) {
 2124|    992|                        return a.size() < b.size();
 2125|    992|                    })->size();
descriptor.cpp:_ZN12_GLOBAL__N_120MiniscriptDescriptorC2ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEENS3_IKN10miniscript4NodeIjEENS5_ISE_EEEE:
 1323|  1.65k|        : DescriptorImpl(std::move(providers), "?"), m_node(std::move(node)) {}
descriptor.cpp:_ZNK12_GLOBAL__N_120MiniscriptDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEE4SpanIK7CScriptER19FlatSigningProvider:
 1309|  3.76k|    {
 1310|  3.76k|        const auto script_ctx{m_node->GetMsCtx()};
 1311|  12.9k|        for (const auto& key : keys) {
  ------------------
  |  Branch (1311:30): [True: 12.9k, False: 3.76k]
  ------------------
 1312|  12.9k|            if (miniscript::IsTapscript(script_ctx)) {
  ------------------
  |  Branch (1312:17): [True: 802, False: 12.1k]
  ------------------
 1313|    802|                provider.pubkeys.emplace(Hash160(XOnlyPubKey{key}), key);
 1314|  12.1k|            } else {
 1315|  12.1k|                provider.pubkeys.emplace(key.GetID(), key);
 1316|  12.1k|            }
 1317|  12.9k|        }
 1318|  3.76k|        return Vector(m_node->ToScript(ScriptMaker(keys, script_ctx)));
 1319|  3.76k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker9ToPKBytesEj:
 1259|  11.7k|    std::vector<unsigned char> ToPKBytes(uint32_t key) const {
 1260|       |        // In Tapscript keys always serialize as x-only, whether an x-only key was used in the descriptor or not.
 1261|  11.7k|        if (!miniscript::IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1261:13): [True: 11.4k, False: 252]
  ------------------
 1262|  11.4k|            return {m_keys[key].begin(), m_keys[key].end()};
 1263|  11.4k|        }
 1264|    252|        const XOnlyPubKey xonly_pubkey{m_keys[key]};
 1265|    252|        return {xonly_pubkey.begin(), xonly_pubkey.end()};
 1266|  11.7k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker10ToPKHBytesEj:
 1268|  1.26k|    std::vector<unsigned char> ToPKHBytes(uint32_t key) const {
 1269|  1.26k|        auto id = GetHash160(key);
 1270|  1.26k|        return {id.begin(), id.end()};
 1271|  1.26k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker10GetHash160Ej:
 1249|  1.26k|    uint160 GetHash160(uint32_t key) const {
 1250|  1.26k|        if (miniscript::IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1250:13): [True: 550, False: 714]
  ------------------
 1251|    550|            return Hash160(XOnlyPubKey{m_keys[key]});
 1252|    550|        }
 1253|    714|        return m_keys[key].GetID();
 1254|  1.26k|    }
descriptor.cpp:_ZN12_GLOBAL__N_111ScriptMakerC2ERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEEN10miniscript17MiniscriptContextE:
 1257|  3.76k|    ScriptMaker(const std::vector<CPubKey>& keys LIFETIMEBOUND, const miniscript::MiniscriptContext script_ctx) : m_keys(keys), m_script_ctx{script_ctx} {}
descriptor.cpp:_ZNK12_GLOBAL__N_120MiniscriptDescriptor14ToStringHelperEPK15SigningProviderRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS_14DescriptorImpl10StringTypeEPK15DescriptorCache:
 1327|  5.08k|    {
 1328|  5.08k|        if (const auto res = m_node->ToString(StringMaker(arg, m_pubkey_args, type == StringType::PRIVATE))) {
  ------------------
  |  Branch (1328:24): [True: 5.03k, False: 47]
  ------------------
 1329|  5.03k|            out = *res;
 1330|  5.03k|            return true;
 1331|  5.03k|        }
 1332|     47|        return false;
 1333|  5.08k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111StringMaker8ToStringEj:
 1290|  18.4k|    {
 1291|  18.4k|        std::string ret;
 1292|  18.4k|        if (m_private) {
  ------------------
  |  Branch (1292:13): [True: 155, False: 18.3k]
  ------------------
 1293|    155|            if (!m_pubkeys[key]->ToPrivateString(*m_arg, ret)) return {};
  ------------------
  |  Branch (1293:17): [True: 47, False: 108]
  ------------------
 1294|  18.3k|        } else {
 1295|  18.3k|            ret = m_pubkeys[key]->ToString();
 1296|  18.3k|        }
 1297|  18.4k|        return ret;
 1298|  18.4k|    }
descriptor.cpp:_ZN12_GLOBAL__N_111StringMakerC2EPK15SigningProviderRKNSt3__16vectorINS4_10unique_ptrINS_14PubkeyProviderENS4_14default_deleteIS7_EEEENS4_9allocatorISA_EEEEb:
 1287|  5.08k|        : m_arg(arg), m_pubkeys(pubkeys), m_private(priv) {}

_ZN10DescriptorD2Ev:
   99|  14.2k|    virtual ~Descriptor() = default;

_Z10CastToBoolRKNSt3__16vectorIhNS_9allocatorIhEEEE:
   36|   143k|{
   37|   154k|    for (unsigned int i = 0; i < vch.size(); i++)
  ------------------
  |  Branch (37:30): [True: 145k, False: 9.78k]
  ------------------
   38|   145k|    {
   39|   145k|        if (vch[i] != 0)
  ------------------
  |  Branch (39:13): [True: 133k, False: 11.7k]
  ------------------
   40|   133k|        {
   41|       |            // Can be negative zero
   42|   133k|            if (i == vch.size()-1 && vch[i] == 0x80)
  ------------------
  |  Branch (42:17): [True: 122k, False: 10.8k]
  |  Branch (42:38): [True: 880, False: 121k]
  ------------------
   43|    880|                return false;
   44|   132k|            return true;
   45|   133k|        }
   46|   145k|    }
   47|  9.78k|    return false;
   48|   143k|}
_Z22CheckSignatureEncodingRKNSt3__16vectorIhNS_9allocatorIhEEEEjP13ScriptError_t:
  200|  6.27k|bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror) {
  201|       |    // Empty signature. Not strictly DER encoded, but allowed to provide a
  202|       |    // compact way to provide an invalid signature for use with CHECK(MULTI)SIG
  203|  6.27k|    if (vchSig.size() == 0) {
  ------------------
  |  Branch (203:9): [True: 4.11k, False: 2.15k]
  ------------------
  204|  4.11k|        return true;
  205|  4.11k|    }
  206|  2.15k|    if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsValidSignatureEncoding(vchSig)) {
  ------------------
  |  Branch (206:9): [True: 2.15k, False: 0]
  |  Branch (206:98): [True: 2.15k, False: 0]
  ------------------
  207|  2.15k|        return set_error(serror, SCRIPT_ERR_SIG_DER);
  208|  2.15k|    } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig, serror)) {
  ------------------
  |  Branch (208:16): [True: 0, False: 0]
  |  Branch (208:54): [True: 0, False: 0]
  ------------------
  209|       |        // serror is set
  210|      0|        return false;
  211|      0|    } else if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsDefinedHashtypeSignature(vchSig)) {
  ------------------
  |  Branch (211:16): [True: 0, False: 0]
  |  Branch (211:58): [True: 0, False: 0]
  ------------------
  212|      0|        return set_error(serror, SCRIPT_ERR_SIG_HASHTYPE);
  213|      0|    }
  214|      0|    return true;
  215|  2.15k|}
_Z13FindAndDeleteR7CScriptRKS_:
  229|  24.1k|{
  230|  24.1k|    int nFound = 0;
  231|  24.1k|    if (b.empty())
  ------------------
  |  Branch (231:9): [True: 0, False: 24.1k]
  ------------------
  232|      0|        return nFound;
  233|  24.1k|    CScript result;
  234|  24.1k|    CScript::const_iterator pc = script.begin(), pc2 = script.begin(), end = script.end();
  235|  24.1k|    opcodetype opcode;
  236|  24.1k|    do
  237|  2.29M|    {
  238|  2.29M|        result.insert(result.end(), pc2, pc);
  239|  2.32M|        while (static_cast<size_t>(end - pc) >= b.size() && std::equal(b.begin(), b.end(), pc))
  ------------------
  |  Branch (239:16): [True: 2.27M, False: 50.3k]
  |  Branch (239:61): [True: 28.3k, False: 2.24M]
  ------------------
  240|  28.3k|        {
  241|  28.3k|            pc = pc + b.size();
  242|  28.3k|            ++nFound;
  243|  28.3k|        }
  244|  2.29M|        pc2 = pc;
  245|  2.29M|    }
  246|  2.29M|    while (script.GetOp(pc, opcode));
  ------------------
  |  Branch (246:12): [True: 2.27M, False: 24.1k]
  ------------------
  247|       |
  248|  24.1k|    if (nFound > 0) {
  ------------------
  |  Branch (248:9): [True: 2.35k, False: 21.7k]
  ------------------
  249|  2.35k|        result.insert(result.end(), pc2, end);
  250|  2.35k|        script = std::move(result);
  251|  2.35k|    }
  252|       |
  253|  24.1k|    return nFound;
  254|  24.1k|}
_Z10EvalScriptRNSt3__16vectorINS0_IhNS_9allocatorIhEEEENS1_IS3_EEEERK7CScriptjRK20BaseSignatureChecker10SigVersionR19ScriptExecutionDataP13ScriptError_t:
  407|   259k|{
  408|   259k|    static const CScriptNum bnZero(0);
  409|   259k|    static const CScriptNum bnOne(1);
  410|       |    // static const CScriptNum bnFalse(0);
  411|       |    // static const CScriptNum bnTrue(1);
  412|   259k|    static const valtype vchFalse(0);
  413|       |    // static const valtype vchZero(0);
  414|   259k|    static const valtype vchTrue(1, 1);
  415|       |
  416|       |    // sigversion cannot be TAPROOT here, as it admits no script execution.
  417|   259k|    assert(sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0 || sigversion == SigVersion::TAPSCRIPT);
  418|       |
  419|   259k|    CScript::const_iterator pc = script.begin();
  420|   259k|    CScript::const_iterator pend = script.end();
  421|   259k|    CScript::const_iterator pbegincodehash = script.begin();
  422|   259k|    opcodetype opcode;
  423|   259k|    valtype vchPushValue;
  424|   259k|    ConditionStack vfExec;
  425|   259k|    std::vector<valtype> altstack;
  426|   259k|    set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
  427|   259k|    if ((sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) && script.size() > MAX_SCRIPT_SIZE) {
  ------------------
  |  Branch (427:10): [True: 259k, False: 49]
  |  Branch (427:44): [True: 49, False: 0]
  |  Branch (427:85): [True: 0, False: 259k]
  ------------------
  428|      0|        return set_error(serror, SCRIPT_ERR_SCRIPT_SIZE);
  429|      0|    }
  430|   259k|    int nOpCount = 0;
  431|   259k|    bool fRequireMinimal = (flags & SCRIPT_VERIFY_MINIMALDATA) != 0;
  432|   259k|    uint32_t opcode_pos = 0;
  433|   259k|    execdata.m_codeseparator_pos = 0xFFFFFFFFUL;
  434|   259k|    execdata.m_codeseparator_pos_init = true;
  435|       |
  436|   259k|    try
  437|   259k|    {
  438|  5.97M|        for (; pc < pend; ++opcode_pos) {
  ------------------
  |  Branch (438:16): [True: 5.81M, False: 160k]
  ------------------
  439|  5.81M|            bool fExec = vfExec.all_true();
  440|       |
  441|       |            //
  442|       |            // Read instruction
  443|       |            //
  444|  5.81M|            if (!script.GetOp(pc, opcode, vchPushValue))
  ------------------
  |  Branch (444:17): [True: 16.9k, False: 5.80M]
  ------------------
  445|  16.9k|                return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
  446|  5.80M|            if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
  ------------------
  |  Branch (446:17): [True: 577, False: 5.80M]
  ------------------
  447|    577|                return set_error(serror, SCRIPT_ERR_PUSH_SIZE);
  448|       |
  449|  5.80M|            if (sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) {
  ------------------
  |  Branch (449:17): [True: 5.80M, False: 0]
  |  Branch (449:51): [True: 0, False: 0]
  ------------------
  450|       |                // Note how OP_RESERVED does not count towards the opcode limit.
  451|  5.80M|                if (opcode > OP_16 && ++nOpCount > MAX_OPS_PER_SCRIPT) {
  ------------------
  |  Branch (451:21): [True: 3.54M, False: 2.25M]
  |  Branch (451:39): [True: 823, False: 3.54M]
  ------------------
  452|    823|                    return set_error(serror, SCRIPT_ERR_OP_COUNT);
  453|    823|                }
  454|  5.80M|            }
  455|       |
  456|  5.80M|            if (opcode == OP_CAT ||
  ------------------
  |  Branch (456:17): [True: 381, False: 5.80M]
  ------------------
  457|  5.80M|                opcode == OP_SUBSTR ||
  ------------------
  |  Branch (457:17): [True: 428, False: 5.80M]
  ------------------
  458|  5.80M|                opcode == OP_LEFT ||
  ------------------
  |  Branch (458:17): [True: 398, False: 5.79M]
  ------------------
  459|  5.80M|                opcode == OP_RIGHT ||
  ------------------
  |  Branch (459:17): [True: 433, False: 5.79M]
  ------------------
  460|  5.80M|                opcode == OP_INVERT ||
  ------------------
  |  Branch (460:17): [True: 324, False: 5.79M]
  ------------------
  461|  5.80M|                opcode == OP_AND ||
  ------------------
  |  Branch (461:17): [True: 311, False: 5.79M]
  ------------------
  462|  5.80M|                opcode == OP_OR ||
  ------------------
  |  Branch (462:17): [True: 605, False: 5.79M]
  ------------------
  463|  5.80M|                opcode == OP_XOR ||
  ------------------
  |  Branch (463:17): [True: 366, False: 5.79M]
  ------------------
  464|  5.80M|                opcode == OP_2MUL ||
  ------------------
  |  Branch (464:17): [True: 651, False: 5.79M]
  ------------------
  465|  5.80M|                opcode == OP_2DIV ||
  ------------------
  |  Branch (465:17): [True: 314, False: 5.79M]
  ------------------
  466|  5.80M|                opcode == OP_MUL ||
  ------------------
  |  Branch (466:17): [True: 372, False: 5.79M]
  ------------------
  467|  5.80M|                opcode == OP_DIV ||
  ------------------
  |  Branch (467:17): [True: 293, False: 5.79M]
  ------------------
  468|  5.80M|                opcode == OP_MOD ||
  ------------------
  |  Branch (468:17): [True: 410, False: 5.79M]
  ------------------
  469|  5.80M|                opcode == OP_LSHIFT ||
  ------------------
  |  Branch (469:17): [True: 579, False: 5.79M]
  ------------------
  470|  5.80M|                opcode == OP_RSHIFT)
  ------------------
  |  Branch (470:17): [True: 343, False: 5.79M]
  ------------------
  471|  6.20k|                return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); // Disabled opcodes (CVE-2010-5137).
  472|       |
  473|       |            // With SCRIPT_VERIFY_CONST_SCRIPTCODE, OP_CODESEPARATOR in non-segwit script is rejected even in an unexecuted branch
  474|  5.79M|            if (opcode == OP_CODESEPARATOR && sigversion == SigVersion::BASE && (flags & SCRIPT_VERIFY_CONST_SCRIPTCODE))
  ------------------
  |  Branch (474:17): [True: 757, False: 5.79M]
  |  Branch (474:47): [True: 757, False: 0]
  |  Branch (474:81): [True: 467, False: 290]
  ------------------
  475|    467|                return set_error(serror, SCRIPT_ERR_OP_CODESEPARATOR);
  476|       |
  477|  5.79M|            if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) {
  ------------------
  |  Branch (477:17): [True: 5.58M, False: 205k]
  |  Branch (477:26): [True: 5.58M, False: 0]
  |  Branch (477:41): [True: 1.13M, False: 4.45M]
  ------------------
  478|  1.13M|                if (fRequireMinimal && !CheckMinimalPush(vchPushValue, opcode)) {
  ------------------
  |  Branch (478:21): [True: 1.10M, False: 29.7k]
  |  Branch (478:40): [True: 1.70k, False: 1.09M]
  ------------------
  479|  1.70k|                    return set_error(serror, SCRIPT_ERR_MINIMALDATA);
  480|  1.70k|                }
  481|  1.12M|                stack.push_back(vchPushValue);
  482|  4.66M|            } else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
  ------------------
  |  Branch (482:24): [True: 4.45M, False: 205k]
  |  Branch (482:34): [True: 50.1k, False: 155k]
  |  Branch (482:53): [True: 32.7k, False: 17.3k]
  ------------------
  483|  4.49M|            switch (opcode)
  484|  4.49M|            {
  485|       |                //
  486|       |                // Push value
  487|       |                //
  488|  2.03k|                case OP_1NEGATE:
  ------------------
  |  Branch (488:17): [True: 2.03k, False: 4.48M]
  ------------------
  489|   516k|                case OP_1:
  ------------------
  |  Branch (489:17): [True: 514k, False: 3.97M]
  ------------------
  490|   531k|                case OP_2:
  ------------------
  |  Branch (490:17): [True: 14.9k, False: 4.47M]
  ------------------
  491|   537k|                case OP_3:
  ------------------
  |  Branch (491:17): [True: 6.34k, False: 4.48M]
  ------------------
  492|   541k|                case OP_4:
  ------------------
  |  Branch (492:17): [True: 4.13k, False: 4.48M]
  ------------------
  493|   542k|                case OP_5:
  ------------------
  |  Branch (493:17): [True: 958, False: 4.48M]
  ------------------
  494|   573k|                case OP_6:
  ------------------
  |  Branch (494:17): [True: 30.6k, False: 4.46M]
  ------------------
  495|   590k|                case OP_7:
  ------------------
  |  Branch (495:17): [True: 17.4k, False: 4.47M]
  ------------------
  496|   599k|                case OP_8:
  ------------------
  |  Branch (496:17): [True: 9.23k, False: 4.48M]
  ------------------
  497|   602k|                case OP_9:
  ------------------
  |  Branch (497:17): [True: 2.98k, False: 4.48M]
  ------------------
  498|   726k|                case OP_10:
  ------------------
  |  Branch (498:17): [True: 123k, False: 4.36M]
  ------------------
  499|   746k|                case OP_11:
  ------------------
  |  Branch (499:17): [True: 19.7k, False: 4.47M]
  ------------------
  500|   746k|                case OP_12:
  ------------------
  |  Branch (500:17): [True: 661, False: 4.49M]
  ------------------
  501|   747k|                case OP_13:
  ------------------
  |  Branch (501:17): [True: 1.05k, False: 4.48M]
  ------------------
  502|   876k|                case OP_14:
  ------------------
  |  Branch (502:17): [True: 128k, False: 4.36M]
  ------------------
  503|   891k|                case OP_15:
  ------------------
  |  Branch (503:17): [True: 15.2k, False: 4.47M]
  ------------------
  504|   979k|                case OP_16:
  ------------------
  |  Branch (504:17): [True: 87.9k, False: 4.40M]
  ------------------
  505|   979k|                {
  506|       |                    // ( -- value)
  507|   979k|                    CScriptNum bn((int)opcode - (int)(OP_1 - 1));
  508|   979k|                    stack.push_back(bn.getvch());
  509|       |                    // The result of these opcodes should always be the minimal way to push the data
  510|       |                    // they push, so no need for a CheckMinimalPush here.
  511|   979k|                }
  512|   979k|                break;
  513|       |
  514|       |
  515|       |                //
  516|       |                // Control
  517|       |                //
  518|  2.21M|                case OP_NOP:
  ------------------
  |  Branch (518:17): [True: 2.21M, False: 2.27M]
  ------------------
  519|  2.21M|                    break;
  520|       |
  521|  9.62k|                case OP_CHECKLOCKTIMEVERIFY:
  ------------------
  |  Branch (521:17): [True: 9.62k, False: 4.48M]
  ------------------
  522|  9.62k|                {
  523|  9.62k|                    if (!(flags & SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)) {
  ------------------
  |  Branch (523:25): [True: 547, False: 9.07k]
  ------------------
  524|       |                        // not enabled; treat as a NOP2
  525|    547|                        break;
  526|    547|                    }
  527|       |
  528|  9.07k|                    if (stack.size() < 1)
  ------------------
  |  Branch (528:25): [True: 719, False: 8.35k]
  ------------------
  529|    719|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  530|       |
  531|       |                    // Note that elsewhere numeric opcodes are limited to
  532|       |                    // operands in the range -2**31+1 to 2**31-1, however it is
  533|       |                    // legal for opcodes to produce results exceeding that
  534|       |                    // range. This limitation is implemented by CScriptNum's
  535|       |                    // default 4-byte limit.
  536|       |                    //
  537|       |                    // If we kept to that limit we'd have a year 2038 problem,
  538|       |                    // even though the nLockTime field in transactions
  539|       |                    // themselves is uint32 which only becomes meaningless
  540|       |                    // after the year 2106.
  541|       |                    //
  542|       |                    // Thus as a special case we tell CScriptNum to accept up
  543|       |                    // to 5-byte bignums, which are good until 2**39-1, well
  544|       |                    // beyond the 2**32-1 limit of the nLockTime field itself.
  545|  8.35k|                    const CScriptNum nLockTime(stacktop(-1), fRequireMinimal, 5);
  ------------------
  |  |   54|  8.35k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  546|       |
  547|       |                    // In the rare event that the argument may be < 0 due to
  548|       |                    // some arithmetic being done first, you can always use
  549|       |                    // 0 MAX CHECKLOCKTIMEVERIFY.
  550|  8.35k|                    if (nLockTime < 0)
  ------------------
  |  Branch (550:25): [True: 550, False: 7.80k]
  ------------------
  551|    550|                        return set_error(serror, SCRIPT_ERR_NEGATIVE_LOCKTIME);
  552|       |
  553|       |                    // Actually compare the specified lock time with the transaction.
  554|  7.80k|                    if (!checker.CheckLockTime(nLockTime))
  ------------------
  |  Branch (554:25): [True: 2.45k, False: 5.35k]
  ------------------
  555|  2.45k|                        return set_error(serror, SCRIPT_ERR_UNSATISFIED_LOCKTIME);
  556|       |
  557|  5.35k|                    break;
  558|  7.80k|                }
  559|       |
  560|  12.8k|                case OP_CHECKSEQUENCEVERIFY:
  ------------------
  |  Branch (560:17): [True: 12.8k, False: 4.47M]
  ------------------
  561|  12.8k|                {
  562|  12.8k|                    if (!(flags & SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)) {
  ------------------
  |  Branch (562:25): [True: 300, False: 12.5k]
  ------------------
  563|       |                        // not enabled; treat as a NOP3
  564|    300|                        break;
  565|    300|                    }
  566|       |
  567|  12.5k|                    if (stack.size() < 1)
  ------------------
  |  Branch (567:25): [True: 454, False: 12.0k]
  ------------------
  568|    454|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  569|       |
  570|       |                    // nSequence, like nLockTime, is a 32-bit unsigned integer
  571|       |                    // field. See the comment in CHECKLOCKTIMEVERIFY regarding
  572|       |                    // 5-byte numeric operands.
  573|  12.0k|                    const CScriptNum nSequence(stacktop(-1), fRequireMinimal, 5);
  ------------------
  |  |   54|  12.0k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  574|       |
  575|       |                    // In the rare event that the argument may be < 0 due to
  576|       |                    // some arithmetic being done first, you can always use
  577|       |                    // 0 MAX CHECKSEQUENCEVERIFY.
  578|  12.0k|                    if (nSequence < 0)
  ------------------
  |  Branch (578:25): [True: 439, False: 11.6k]
  ------------------
  579|    439|                        return set_error(serror, SCRIPT_ERR_NEGATIVE_LOCKTIME);
  580|       |
  581|       |                    // To provide for future soft-fork extensibility, if the
  582|       |                    // operand has the disabled lock-time flag set,
  583|       |                    // CHECKSEQUENCEVERIFY behaves as a NOP.
  584|  11.6k|                    if ((nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0)
  ------------------
  |  Branch (584:25): [True: 0, False: 11.6k]
  ------------------
  585|      0|                        break;
  586|       |
  587|       |                    // Compare the specified sequence number with the input.
  588|  11.6k|                    if (!checker.CheckSequence(nSequence))
  ------------------
  |  Branch (588:25): [True: 2.37k, False: 9.27k]
  ------------------
  589|  2.37k|                        return set_error(serror, SCRIPT_ERR_UNSATISFIED_LOCKTIME);
  590|       |
  591|  9.27k|                    break;
  592|  11.6k|                }
  593|       |
  594|  9.27k|                case OP_NOP1: case OP_NOP4: case OP_NOP5:
  ------------------
  |  Branch (594:17): [True: 418, False: 4.49M]
  |  Branch (594:31): [True: 597, False: 4.49M]
  |  Branch (594:45): [True: 476, False: 4.49M]
  ------------------
  595|  4.05k|                case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10:
  ------------------
  |  Branch (595:17): [True: 746, False: 4.49M]
  |  Branch (595:31): [True: 410, False: 4.49M]
  |  Branch (595:45): [True: 477, False: 4.49M]
  |  Branch (595:59): [True: 484, False: 4.49M]
  |  Branch (595:73): [True: 445, False: 4.49M]
  ------------------
  596|  4.05k|                {
  597|  4.05k|                    if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)
  ------------------
  |  Branch (597:25): [True: 2.19k, False: 1.85k]
  ------------------
  598|  2.19k|                        return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS);
  599|  4.05k|                }
  600|  1.85k|                break;
  601|       |
  602|   143k|                case OP_IF:
  ------------------
  |  Branch (602:17): [True: 143k, False: 4.34M]
  ------------------
  603|   151k|                case OP_NOTIF:
  ------------------
  |  Branch (603:17): [True: 7.98k, False: 4.48M]
  ------------------
  604|   151k|                {
  605|       |                    // <expression> if [statements] [else [statements]] endif
  606|   151k|                    bool fValue = false;
  607|   151k|                    if (fExec)
  ------------------
  |  Branch (607:25): [True: 120k, False: 30.9k]
  ------------------
  608|   120k|                    {
  609|   120k|                        if (stack.size() < 1)
  ------------------
  |  Branch (609:29): [True: 1.04k, False: 119k]
  ------------------
  610|  1.04k|                            return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
  611|   119k|                        valtype& vch = stacktop(-1);
  ------------------
  |  |   54|   119k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  612|       |                        // Tapscript requires minimal IF/NOTIF inputs as a consensus rule.
  613|   119k|                        if (sigversion == SigVersion::TAPSCRIPT) {
  ------------------
  |  Branch (613:29): [True: 0, False: 119k]
  ------------------
  614|       |                            // The input argument to the OP_IF and OP_NOTIF opcodes must be either
  615|       |                            // exactly 0 (the empty vector) or exactly 1 (the one-byte vector with value 1).
  616|      0|                            if (vch.size() > 1 || (vch.size() == 1 && vch[0] != 1)) {
  ------------------
  |  Branch (616:33): [True: 0, False: 0]
  |  Branch (616:52): [True: 0, False: 0]
  |  Branch (616:71): [True: 0, False: 0]
  ------------------
  617|      0|                                return set_error(serror, SCRIPT_ERR_TAPSCRIPT_MINIMALIF);
  618|      0|                            }
  619|      0|                        }
  620|       |                        // Under witness v0 rules it is only a policy rule, enabled through SCRIPT_VERIFY_MINIMALIF.
  621|   119k|                        if (sigversion == SigVersion::WITNESS_V0 && (flags & SCRIPT_VERIFY_MINIMALIF)) {
  ------------------
  |  Branch (621:29): [True: 0, False: 119k]
  |  Branch (621:69): [True: 0, False: 0]
  ------------------
  622|      0|                            if (vch.size() > 1)
  ------------------
  |  Branch (622:33): [True: 0, False: 0]
  ------------------
  623|      0|                                return set_error(serror, SCRIPT_ERR_MINIMALIF);
  624|      0|                            if (vch.size() == 1 && vch[0] != 1)
  ------------------
  |  Branch (624:33): [True: 0, False: 0]
  |  Branch (624:52): [True: 0, False: 0]
  ------------------
  625|      0|                                return set_error(serror, SCRIPT_ERR_MINIMALIF);
  626|      0|                        }
  627|   119k|                        fValue = CastToBool(vch);
  628|   119k|                        if (opcode == OP_NOTIF)
  ------------------
  |  Branch (628:29): [True: 4.84k, False: 114k]
  ------------------
  629|  4.84k|                            fValue = !fValue;
  630|   119k|                        popstack(stack);
  631|   119k|                    }
  632|   150k|                    vfExec.push_back(fValue);
  633|   150k|                }
  634|      0|                break;
  635|       |
  636|  2.40k|                case OP_ELSE:
  ------------------
  |  Branch (636:17): [True: 2.40k, False: 4.48M]
  ------------------
  637|  2.40k|                {
  638|  2.40k|                    if (vfExec.empty())
  ------------------
  |  Branch (638:25): [True: 689, False: 1.71k]
  ------------------
  639|    689|                        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
  640|  1.71k|                    vfExec.toggle_top();
  641|  1.71k|                }
  642|      0|                break;
  643|       |
  644|  1.83k|                case OP_ENDIF:
  ------------------
  |  Branch (644:17): [True: 1.83k, False: 4.48M]
  ------------------
  645|  1.83k|                {
  646|  1.83k|                    if (vfExec.empty())
  ------------------
  |  Branch (646:25): [True: 968, False: 866]
  ------------------
  647|    968|                        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
  648|    866|                    vfExec.pop_back();
  649|    866|                }
  650|      0|                break;
  651|       |
  652|  2.09k|                case OP_VERIFY:
  ------------------
  |  Branch (652:17): [True: 2.09k, False: 4.48M]
  ------------------
  653|  2.09k|                {
  654|       |                    // (true -- ) or
  655|       |                    // (false -- false) and return
  656|  2.09k|                    if (stack.size() < 1)
  ------------------
  |  Branch (656:25): [True: 879, False: 1.21k]
  ------------------
  657|    879|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  658|  1.21k|                    bool fValue = CastToBool(stacktop(-1));
  ------------------
  |  |   54|  1.21k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  659|  1.21k|                    if (fValue)
  ------------------
  |  Branch (659:25): [True: 612, False: 602]
  ------------------
  660|    612|                        popstack(stack);
  661|    602|                    else
  662|    602|                        return set_error(serror, SCRIPT_ERR_VERIFY);
  663|  1.21k|                }
  664|    612|                break;
  665|       |
  666|  1.72k|                case OP_RETURN:
  ------------------
  |  Branch (666:17): [True: 1.72k, False: 4.48M]
  ------------------
  667|  1.72k|                {
  668|  1.72k|                    return set_error(serror, SCRIPT_ERR_OP_RETURN);
  669|  1.21k|                }
  670|      0|                break;
  671|       |
  672|       |
  673|       |                //
  674|       |                // Stack ops
  675|       |                //
  676|  9.83k|                case OP_TOALTSTACK:
  ------------------
  |  Branch (676:17): [True: 9.83k, False: 4.48M]
  ------------------
  677|  9.83k|                {
  678|  9.83k|                    if (stack.size() < 1)
  ------------------
  |  Branch (678:25): [True: 720, False: 9.11k]
  ------------------
  679|    720|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  680|  9.11k|                    altstack.push_back(stacktop(-1));
  ------------------
  |  |   54|  9.11k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  681|  9.11k|                    popstack(stack);
  682|  9.11k|                }
  683|      0|                break;
  684|       |
  685|  1.40k|                case OP_FROMALTSTACK:
  ------------------
  |  Branch (685:17): [True: 1.40k, False: 4.48M]
  ------------------
  686|  1.40k|                {
  687|  1.40k|                    if (altstack.size() < 1)
  ------------------
  |  Branch (687:25): [True: 652, False: 755]
  ------------------
  688|    652|                        return set_error(serror, SCRIPT_ERR_INVALID_ALTSTACK_OPERATION);
  689|    755|                    stack.push_back(altstacktop(-1));
  ------------------
  |  |   55|    755|#define altstacktop(i) (altstack.at(size_t(int64_t(altstack.size()) + int64_t{i})))
  ------------------
  690|    755|                    popstack(altstack);
  691|    755|                }
  692|      0|                break;
  693|       |
  694|  14.5k|                case OP_2DROP:
  ------------------
  |  Branch (694:17): [True: 14.5k, False: 4.47M]
  ------------------
  695|  14.5k|                {
  696|       |                    // (x1 x2 -- )
  697|  14.5k|                    if (stack.size() < 2)
  ------------------
  |  Branch (697:25): [True: 668, False: 13.8k]
  ------------------
  698|    668|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  699|  13.8k|                    popstack(stack);
  700|  13.8k|                    popstack(stack);
  701|  13.8k|                }
  702|      0|                break;
  703|       |
  704|  7.99k|                case OP_2DUP:
  ------------------
  |  Branch (704:17): [True: 7.99k, False: 4.48M]
  ------------------
  705|  7.99k|                {
  706|       |                    // (x1 x2 -- x1 x2 x1 x2)
  707|  7.99k|                    if (stack.size() < 2)
  ------------------
  |  Branch (707:25): [True: 506, False: 7.49k]
  ------------------
  708|    506|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  709|  7.49k|                    valtype vch1 = stacktop(-2);
  ------------------
  |  |   54|  7.49k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  710|  7.49k|                    valtype vch2 = stacktop(-1);
  ------------------
  |  |   54|  7.49k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  711|  7.49k|                    stack.push_back(vch1);
  712|  7.49k|                    stack.push_back(vch2);
  713|  7.49k|                }
  714|      0|                break;
  715|       |
  716|  19.1k|                case OP_3DUP:
  ------------------
  |  Branch (716:17): [True: 19.1k, False: 4.47M]
  ------------------
  717|  19.1k|                {
  718|       |                    // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3)
  719|  19.1k|                    if (stack.size() < 3)
  ------------------
  |  Branch (719:25): [True: 769, False: 18.3k]
  ------------------
  720|    769|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  721|  18.3k|                    valtype vch1 = stacktop(-3);
  ------------------
  |  |   54|  18.3k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  722|  18.3k|                    valtype vch2 = stacktop(-2);
  ------------------
  |  |   54|  18.3k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  723|  18.3k|                    valtype vch3 = stacktop(-1);
  ------------------
  |  |   54|  18.3k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  724|  18.3k|                    stack.push_back(vch1);
  725|  18.3k|                    stack.push_back(vch2);
  726|  18.3k|                    stack.push_back(vch3);
  727|  18.3k|                }
  728|      0|                break;
  729|       |
  730|  1.60k|                case OP_2OVER:
  ------------------
  |  Branch (730:17): [True: 1.60k, False: 4.48M]
  ------------------
  731|  1.60k|                {
  732|       |                    // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2)
  733|  1.60k|                    if (stack.size() < 4)
  ------------------
  |  Branch (733:25): [True: 544, False: 1.05k]
  ------------------
  734|    544|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  735|  1.05k|                    valtype vch1 = stacktop(-4);
  ------------------
  |  |   54|  1.05k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  736|  1.05k|                    valtype vch2 = stacktop(-3);
  ------------------
  |  |   54|  1.05k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  737|  1.05k|                    stack.push_back(vch1);
  738|  1.05k|                    stack.push_back(vch2);
  739|  1.05k|                }
  740|      0|                break;
  741|       |
  742|   685k|                case OP_2ROT:
  ------------------
  |  Branch (742:17): [True: 685k, False: 3.80M]
  ------------------
  743|   685k|                {
  744|       |                    // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2)
  745|   685k|                    if (stack.size() < 6)
  ------------------
  |  Branch (745:25): [True: 918, False: 684k]
  ------------------
  746|    918|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  747|   684k|                    valtype vch1 = stacktop(-6);
  ------------------
  |  |   54|   684k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  748|   684k|                    valtype vch2 = stacktop(-5);
  ------------------
  |  |   54|   684k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  749|   684k|                    stack.erase(stack.end()-6, stack.end()-4);
  750|   684k|                    stack.push_back(vch1);
  751|   684k|                    stack.push_back(vch2);
  752|   684k|                }
  753|      0|                break;
  754|       |
  755|  1.51k|                case OP_2SWAP:
  ------------------
  |  Branch (755:17): [True: 1.51k, False: 4.48M]
  ------------------
  756|  1.51k|                {
  757|       |                    // (x1 x2 x3 x4 -- x3 x4 x1 x2)
  758|  1.51k|                    if (stack.size() < 4)
  ------------------
  |  Branch (758:25): [True: 769, False: 746]
  ------------------
  759|    769|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  760|    746|                    swap(stacktop(-4), stacktop(-2));
  ------------------
  |  |   54|    746|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
                                  swap(stacktop(-4), stacktop(-2));
  ------------------
  |  |   54|    746|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  761|    746|                    swap(stacktop(-3), stacktop(-1));
  ------------------
  |  |   54|    746|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
                                  swap(stacktop(-3), stacktop(-1));
  ------------------
  |  |   54|    746|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  762|    746|                }
  763|      0|                break;
  764|       |
  765|  4.35k|                case OP_IFDUP:
  ------------------
  |  Branch (765:17): [True: 4.35k, False: 4.48M]
  ------------------
  766|  4.35k|                {
  767|       |                    // (x - 0 | x x)
  768|  4.35k|                    if (stack.size() < 1)
  ------------------
  |  Branch (768:25): [True: 995, False: 3.36k]
  ------------------
  769|    995|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  770|  3.36k|                    valtype vch = stacktop(-1);
  ------------------
  |  |   54|  3.36k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  771|  3.36k|                    if (CastToBool(vch))
  ------------------
  |  Branch (771:25): [True: 2.16k, False: 1.19k]
  ------------------
  772|  2.16k|                        stack.push_back(vch);
  773|  3.36k|                }
  774|      0|                break;
  775|       |
  776|  73.6k|                case OP_DEPTH:
  ------------------
  |  Branch (776:17): [True: 73.6k, False: 4.41M]
  ------------------
  777|  73.6k|                {
  778|       |                    // -- stacksize
  779|  73.6k|                    CScriptNum bn(stack.size());
  780|  73.6k|                    stack.push_back(bn.getvch());
  781|  73.6k|                }
  782|  73.6k|                break;
  783|       |
  784|  10.7k|                case OP_DROP:
  ------------------
  |  Branch (784:17): [True: 10.7k, False: 4.48M]
  ------------------
  785|  10.7k|                {
  786|       |                    // (x -- )
  787|  10.7k|                    if (stack.size() < 1)
  ------------------
  |  Branch (787:25): [True: 663, False: 10.0k]
  ------------------
  788|    663|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  789|  10.0k|                    popstack(stack);
  790|  10.0k|                }
  791|      0|                break;
  792|       |
  793|  2.97k|                case OP_DUP:
  ------------------
  |  Branch (793:17): [True: 2.97k, False: 4.48M]
  ------------------
  794|  2.97k|                {
  795|       |                    // (x -- x x)
  796|  2.97k|                    if (stack.size() < 1)
  ------------------
  |  Branch (796:25): [True: 1.64k, False: 1.33k]
  ------------------
  797|  1.64k|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  798|  1.33k|                    valtype vch = stacktop(-1);
  ------------------
  |  |   54|  1.33k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  799|  1.33k|                    stack.push_back(vch);
  800|  1.33k|                }
  801|      0|                break;
  802|       |
  803|  8.28k|                case OP_NIP:
  ------------------
  |  Branch (803:17): [True: 8.28k, False: 4.48M]
  ------------------
  804|  8.28k|                {
  805|       |                    // (x1 x2 -- x2)
  806|  8.28k|                    if (stack.size() < 2)
  ------------------
  |  Branch (806:25): [True: 501, False: 7.78k]
  ------------------
  807|    501|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  808|  7.78k|                    stack.erase(stack.end() - 2);
  809|  7.78k|                }
  810|      0|                break;
  811|       |
  812|  2.68k|                case OP_OVER:
  ------------------
  |  Branch (812:17): [True: 2.68k, False: 4.48M]
  ------------------
  813|  2.68k|                {
  814|       |                    // (x1 x2 -- x1 x2 x1)
  815|  2.68k|                    if (stack.size() < 2)
  ------------------
  |  Branch (815:25): [True: 587, False: 2.09k]
  ------------------
  816|    587|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  817|  2.09k|                    valtype vch = stacktop(-2);
  ------------------
  |  |   54|  2.09k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  818|  2.09k|                    stack.push_back(vch);
  819|  2.09k|                }
  820|      0|                break;
  821|       |
  822|  1.28k|                case OP_PICK:
  ------------------
  |  Branch (822:17): [True: 1.28k, False: 4.48M]
  ------------------
  823|  4.83k|                case OP_ROLL:
  ------------------
  |  Branch (823:17): [True: 3.54k, False: 4.48M]
  ------------------
  824|  4.83k|                {
  825|       |                    // (xn ... x2 x1 x0 n - xn ... x2 x1 x0 xn)
  826|       |                    // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
  827|  4.83k|                    if (stack.size() < 2)
  ------------------
  |  Branch (827:25): [True: 1.65k, False: 3.17k]
  ------------------
  828|  1.65k|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  829|  3.17k|                    int n = CScriptNum(stacktop(-1), fRequireMinimal).getint();
  ------------------
  |  |   54|  3.17k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  830|  3.17k|                    popstack(stack);
  831|  3.17k|                    if (n < 0 || n >= (int)stack.size())
  ------------------
  |  Branch (831:25): [True: 528, False: 2.64k]
  |  Branch (831:34): [True: 625, False: 2.02k]
  ------------------
  832|    790|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  833|  2.38k|                    valtype vch = stacktop(-n-1);
  ------------------
  |  |   54|  2.38k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  834|  2.38k|                    if (opcode == OP_ROLL)
  ------------------
  |  Branch (834:25): [True: 1.75k, False: 629]
  ------------------
  835|  1.75k|                        stack.erase(stack.end()-n-1);
  836|  2.38k|                    stack.push_back(vch);
  837|  2.38k|                }
  838|      0|                break;
  839|       |
  840|  2.80k|                case OP_ROT:
  ------------------
  |  Branch (840:17): [True: 2.80k, False: 4.48M]
  ------------------
  841|  2.80k|                {
  842|       |                    // (x1 x2 x3 -- x2 x3 x1)
  843|       |                    //  x2 x1 x3  after first swap
  844|       |                    //  x2 x3 x1  after second swap
  845|  2.80k|                    if (stack.size() < 3)
  ------------------
  |  Branch (845:25): [True: 852, False: 1.95k]
  ------------------
  846|    852|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  847|  1.95k|                    swap(stacktop(-3), stacktop(-2));
  ------------------
  |  |   54|  1.95k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
                                  swap(stacktop(-3), stacktop(-2));
  ------------------
  |  |   54|  1.95k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  848|  1.95k|                    swap(stacktop(-2), stacktop(-1));
  ------------------
  |  |   54|  1.95k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
                                  swap(stacktop(-2), stacktop(-1));
  ------------------
  |  |   54|  1.95k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  849|  1.95k|                }
  850|      0|                break;
  851|       |
  852|  5.58k|                case OP_SWAP:
  ------------------
  |  Branch (852:17): [True: 5.58k, False: 4.48M]
  ------------------
  853|  5.58k|                {
  854|       |                    // (x1 x2 -- x2 x1)
  855|  5.58k|                    if (stack.size() < 2)
  ------------------
  |  Branch (855:25): [True: 617, False: 4.96k]
  ------------------
  856|    617|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  857|  4.96k|                    swap(stacktop(-2), stacktop(-1));
  ------------------
  |  |   54|  4.96k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
                                  swap(stacktop(-2), stacktop(-1));
  ------------------
  |  |   54|  4.96k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  858|  4.96k|                }
  859|      0|                break;
  860|       |
  861|  57.7k|                case OP_TUCK:
  ------------------
  |  Branch (861:17): [True: 57.7k, False: 4.43M]
  ------------------
  862|  57.7k|                {
  863|       |                    // (x1 x2 -- x2 x1 x2)
  864|  57.7k|                    if (stack.size() < 2)
  ------------------
  |  Branch (864:25): [True: 649, False: 57.1k]
  ------------------
  865|    649|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  866|  57.1k|                    valtype vch = stacktop(-1);
  ------------------
  |  |   54|  57.1k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  867|  57.1k|                    stack.insert(stack.end()-2, vch);
  868|  57.1k|                }
  869|      0|                break;
  870|       |
  871|       |
  872|  2.34k|                case OP_SIZE:
  ------------------
  |  Branch (872:17): [True: 2.34k, False: 4.48M]
  ------------------
  873|  2.34k|                {
  874|       |                    // (in -- in size)
  875|  2.34k|                    if (stack.size() < 1)
  ------------------
  |  Branch (875:25): [True: 448, False: 1.89k]
  ------------------
  876|    448|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  877|  1.89k|                    CScriptNum bn(stacktop(-1).size());
  ------------------
  |  |   54|  1.89k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  878|  1.89k|                    stack.push_back(bn.getvch());
  879|  1.89k|                }
  880|      0|                break;
  881|       |
  882|       |
  883|       |                //
  884|       |                // Bitwise logic
  885|       |                //
  886|  5.41k|                case OP_EQUAL:
  ------------------
  |  Branch (886:17): [True: 5.41k, False: 4.48M]
  ------------------
  887|  6.97k|                case OP_EQUALVERIFY:
  ------------------
  |  Branch (887:17): [True: 1.55k, False: 4.48M]
  ------------------
  888|       |                //case OP_NOTEQUAL: // use OP_NUMNOTEQUAL
  889|  6.97k|                {
  890|       |                    // (x1 x2 - bool)
  891|  6.97k|                    if (stack.size() < 2)
  ------------------
  |  Branch (891:25): [True: 670, False: 6.30k]
  ------------------
  892|    670|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  893|  6.30k|                    valtype& vch1 = stacktop(-2);
  ------------------
  |  |   54|  6.30k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  894|  6.30k|                    valtype& vch2 = stacktop(-1);
  ------------------
  |  |   54|  6.30k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  895|  6.30k|                    bool fEqual = (vch1 == vch2);
  896|       |                    // OP_NOTEQUAL is disabled because it would be too easy to say
  897|       |                    // something like n != 1 and have some wiseguy pass in 1 with extra
  898|       |                    // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001)
  899|       |                    //if (opcode == OP_NOTEQUAL)
  900|       |                    //    fEqual = !fEqual;
  901|  6.30k|                    popstack(stack);
  902|  6.30k|                    popstack(stack);
  903|  6.30k|                    stack.push_back(fEqual ? vchTrue : vchFalse);
  ------------------
  |  Branch (903:37): [True: 3.45k, False: 2.85k]
  ------------------
  904|  6.30k|                    if (opcode == OP_EQUALVERIFY)
  ------------------
  |  Branch (904:25): [True: 1.49k, False: 4.81k]
  ------------------
  905|  1.49k|                    {
  906|  1.49k|                        if (fEqual)
  ------------------
  |  Branch (906:29): [True: 771, False: 724]
  ------------------
  907|    771|                            popstack(stack);
  908|    724|                        else
  909|    724|                            return set_error(serror, SCRIPT_ERR_EQUALVERIFY);
  910|  1.49k|                    }
  911|  6.30k|                }
  912|  5.58k|                break;
  913|       |
  914|       |
  915|       |                //
  916|       |                // Numeric
  917|       |                //
  918|  5.58k|                case OP_1ADD:
  ------------------
  |  Branch (918:17): [True: 3.94k, False: 4.48M]
  ------------------
  919|  7.02k|                case OP_1SUB:
  ------------------
  |  Branch (919:17): [True: 3.08k, False: 4.48M]
  ------------------
  920|  19.9k|                case OP_NEGATE:
  ------------------
  |  Branch (920:17): [True: 12.8k, False: 4.47M]
  ------------------
  921|  22.9k|                case OP_ABS:
  ------------------
  |  Branch (921:17): [True: 3.05k, False: 4.48M]
  ------------------
  922|  26.7k|                case OP_NOT:
  ------------------
  |  Branch (922:17): [True: 3.81k, False: 4.48M]
  ------------------
  923|  27.5k|                case OP_0NOTEQUAL:
  ------------------
  |  Branch (923:17): [True: 798, False: 4.49M]
  ------------------
  924|  27.5k|                {
  925|       |                    // (in -- out)
  926|  27.5k|                    if (stack.size() < 1)
  ------------------
  |  Branch (926:25): [True: 668, False: 26.9k]
  ------------------
  927|    668|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  928|  26.9k|                    CScriptNum bn(stacktop(-1), fRequireMinimal);
  ------------------
  |  |   54|  26.9k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  929|  26.9k|                    switch (opcode)
  930|  26.9k|                    {
  931|  3.60k|                    case OP_1ADD:       bn += bnOne; break;
  ------------------
  |  Branch (931:21): [True: 3.60k, False: 23.3k]
  ------------------
  932|  3.07k|                    case OP_1SUB:       bn -= bnOne; break;
  ------------------
  |  Branch (932:21): [True: 3.07k, False: 23.8k]
  ------------------
  933|  12.5k|                    case OP_NEGATE:     bn = -bn; break;
  ------------------
  |  Branch (933:21): [True: 12.5k, False: 14.3k]
  ------------------
  934|  3.01k|                    case OP_ABS:        if (bn < bnZero) bn = -bn; break;
  ------------------
  |  Branch (934:21): [True: 3.01k, False: 23.8k]
  |  Branch (934:45): [True: 74, False: 2.94k]
  ------------------
  935|  3.61k|                    case OP_NOT:        bn = (bn == bnZero); break;
  ------------------
  |  Branch (935:21): [True: 3.61k, False: 23.3k]
  ------------------
  936|    792|                    case OP_0NOTEQUAL:  bn = (bn != bnZero); break;
  ------------------
  |  Branch (936:21): [True: 792, False: 26.1k]
  ------------------
  937|      0|                    default:            assert(!"invalid opcode"); break;
  ------------------
  |  Branch (937:21): [True: 0, False: 26.9k]
  ------------------
  938|  26.9k|                    }
  939|  26.6k|                    popstack(stack);
  940|  26.6k|                    stack.push_back(bn.getvch());
  941|  26.6k|                }
  942|      0|                break;
  943|       |
  944|    454|                case OP_ADD:
  ------------------
  |  Branch (944:17): [True: 454, False: 4.49M]
  ------------------
  945|  2.86k|                case OP_SUB:
  ------------------
  |  Branch (945:17): [True: 2.40k, False: 4.48M]
  ------------------
  946|  4.91k|                case OP_BOOLAND:
  ------------------
  |  Branch (946:17): [True: 2.05k, False: 4.48M]
  ------------------
  947|  6.88k|                case OP_BOOLOR:
  ------------------
  |  Branch (947:17): [True: 1.97k, False: 4.48M]
  ------------------
  948|  7.60k|                case OP_NUMEQUAL:
  ------------------
  |  Branch (948:17): [True: 720, False: 4.49M]
  ------------------
  949|  13.6k|                case OP_NUMEQUALVERIFY:
  ------------------
  |  Branch (949:17): [True: 6.00k, False: 4.48M]
  ------------------
  950|  25.9k|                case OP_NUMNOTEQUAL:
  ------------------
  |  Branch (950:17): [True: 12.3k, False: 4.47M]
  ------------------
  951|  26.8k|                case OP_LESSTHAN:
  ------------------
  |  Branch (951:17): [True: 861, False: 4.48M]
  ------------------
  952|  29.1k|                case OP_GREATERTHAN:
  ------------------
  |  Branch (952:17): [True: 2.35k, False: 4.48M]
  ------------------
  953|  31.6k|                case OP_LESSTHANOREQUAL:
  ------------------
  |  Branch (953:17): [True: 2.44k, False: 4.48M]
  ------------------
  954|  32.6k|                case OP_GREATERTHANOREQUAL:
  ------------------
  |  Branch (954:17): [True: 1.03k, False: 4.48M]
  ------------------
  955|  39.5k|                case OP_MIN:
  ------------------
  |  Branch (955:17): [True: 6.82k, False: 4.48M]
  ------------------
  956|  42.4k|                case OP_MAX:
  ------------------
  |  Branch (956:17): [True: 2.96k, False: 4.48M]
  ------------------
  957|  42.4k|                {
  958|       |                    // (x1 x2 -- out)
  959|  42.4k|                    if (stack.size() < 2)
  ------------------
  |  Branch (959:25): [True: 1.37k, False: 41.1k]
  ------------------
  960|  1.37k|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  961|  41.1k|                    CScriptNum bn1(stacktop(-2), fRequireMinimal);
  ------------------
  |  |   54|  41.1k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  962|  41.1k|                    CScriptNum bn2(stacktop(-1), fRequireMinimal);
  ------------------
  |  |   54|  41.1k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  963|  41.1k|                    CScriptNum bn(0);
  964|  41.1k|                    switch (opcode)
  965|  41.1k|                    {
  966|    412|                    case OP_ADD:
  ------------------
  |  Branch (966:21): [True: 412, False: 40.6k]
  ------------------
  967|    412|                        bn = bn1 + bn2;
  968|    412|                        break;
  969|       |
  970|  2.27k|                    case OP_SUB:
  ------------------
  |  Branch (970:21): [True: 2.27k, False: 38.8k]
  ------------------
  971|  2.27k|                        bn = bn1 - bn2;
  972|  2.27k|                        break;
  973|       |
  974|  1.68k|                    case OP_BOOLAND:             bn = (bn1 != bnZero && bn2 != bnZero); break;
  ------------------
  |  Branch (974:21): [True: 1.68k, False: 39.4k]
  |  Branch (974:56): [True: 425, False: 1.25k]
  |  Branch (974:73): [True: 171, False: 254]
  ------------------
  975|  1.82k|                    case OP_BOOLOR:              bn = (bn1 != bnZero || bn2 != bnZero); break;
  ------------------
  |  Branch (975:21): [True: 1.82k, False: 39.2k]
  |  Branch (975:56): [True: 1.35k, False: 470]
  |  Branch (975:73): [True: 61, False: 409]
  ------------------
  976|    686|                    case OP_NUMEQUAL:            bn = (bn1 == bn2); break;
  ------------------
  |  Branch (976:21): [True: 686, False: 40.4k]
  ------------------
  977|  5.98k|                    case OP_NUMEQUALVERIFY:      bn = (bn1 == bn2); break;
  ------------------
  |  Branch (977:21): [True: 5.98k, False: 35.1k]
  ------------------
  978|  11.6k|                    case OP_NUMNOTEQUAL:         bn = (bn1 != bn2); break;
  ------------------
  |  Branch (978:21): [True: 11.6k, False: 29.4k]
  ------------------
  979|    786|                    case OP_LESSTHAN:            bn = (bn1 < bn2); break;
  ------------------
  |  Branch (979:21): [True: 786, False: 40.3k]
  ------------------
  980|  2.28k|                    case OP_GREATERTHAN:         bn = (bn1 > bn2); break;
  ------------------
  |  Branch (980:21): [True: 2.28k, False: 38.8k]
  ------------------
  981|  2.10k|                    case OP_LESSTHANOREQUAL:     bn = (bn1 <= bn2); break;
  ------------------
  |  Branch (981:21): [True: 2.10k, False: 38.9k]
  ------------------
  982|    878|                    case OP_GREATERTHANOREQUAL:  bn = (bn1 >= bn2); break;
  ------------------
  |  Branch (982:21): [True: 878, False: 40.2k]
  ------------------
  983|  6.50k|                    case OP_MIN:                 bn = (bn1 < bn2 ? bn1 : bn2); break;
  ------------------
  |  Branch (983:21): [True: 6.50k, False: 34.5k]
  |  Branch (983:56): [True: 599, False: 5.90k]
  ------------------
  984|  2.88k|                    case OP_MAX:                 bn = (bn1 > bn2 ? bn1 : bn2); break;
  ------------------
  |  Branch (984:21): [True: 2.88k, False: 38.2k]
  |  Branch (984:56): [True: 475, False: 2.41k]
  ------------------
  985|      0|                    default:                     assert(!"invalid opcode"); break;
  ------------------
  |  Branch (985:21): [True: 0, False: 41.1k]
  ------------------
  986|  41.1k|                    }
  987|  39.9k|                    popstack(stack);
  988|  39.9k|                    popstack(stack);
  989|  39.9k|                    stack.push_back(bn.getvch());
  990|       |
  991|  39.9k|                    if (opcode == OP_NUMEQUALVERIFY)
  ------------------
  |  Branch (991:25): [True: 5.98k, False: 33.9k]
  ------------------
  992|  5.98k|                    {
  993|  5.98k|                        if (CastToBool(stacktop(-1)))
  ------------------
  |  |   54|  5.98k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  |  Branch (993:29): [True: 4.66k, False: 1.32k]
  ------------------
  994|  4.66k|                            popstack(stack);
  995|  1.32k|                        else
  996|  1.32k|                            return set_error(serror, SCRIPT_ERR_NUMEQUALVERIFY);
  997|  5.98k|                    }
  998|  39.9k|                }
  999|  38.6k|                break;
 1000|       |
 1001|  38.6k|                case OP_WITHIN:
  ------------------
  |  Branch (1001:17): [True: 12.2k, False: 4.47M]
  ------------------
 1002|  12.2k|                {
 1003|       |                    // (x min max -- out)
 1004|  12.2k|                    if (stack.size() < 3)
  ------------------
  |  Branch (1004:25): [True: 814, False: 11.4k]
  ------------------
 1005|    814|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1006|  11.4k|                    CScriptNum bn1(stacktop(-3), fRequireMinimal);
  ------------------
  |  |   54|  11.4k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1007|  11.4k|                    CScriptNum bn2(stacktop(-2), fRequireMinimal);
  ------------------
  |  |   54|  11.4k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1008|  11.4k|                    CScriptNum bn3(stacktop(-1), fRequireMinimal);
  ------------------
  |  |   54|  11.4k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1009|  11.4k|                    bool fValue = (bn2 <= bn1 && bn1 < bn3);
  ------------------
  |  Branch (1009:36): [True: 10.0k, False: 1.34k]
  |  Branch (1009:50): [True: 5.54k, False: 4.52k]
  ------------------
 1010|  11.4k|                    popstack(stack);
 1011|  11.4k|                    popstack(stack);
 1012|  11.4k|                    popstack(stack);
 1013|  11.4k|                    stack.push_back(fValue ? vchTrue : vchFalse);
  ------------------
  |  Branch (1013:37): [True: 5.54k, False: 5.86k]
  ------------------
 1014|  11.4k|                }
 1015|      0|                break;
 1016|       |
 1017|       |
 1018|       |                //
 1019|       |                // Crypto
 1020|       |                //
 1021|  32.2k|                case OP_RIPEMD160:
  ------------------
  |  Branch (1021:17): [True: 32.2k, False: 4.45M]
  ------------------
 1022|  47.8k|                case OP_SHA1:
  ------------------
  |  Branch (1022:17): [True: 15.6k, False: 4.47M]
  ------------------
 1023|  52.3k|                case OP_SHA256:
  ------------------
  |  Branch (1023:17): [True: 4.52k, False: 4.48M]
  ------------------
 1024|  65.1k|                case OP_HASH160:
  ------------------
  |  Branch (1024:17): [True: 12.7k, False: 4.47M]
  ------------------
 1025|  66.6k|                case OP_HASH256:
  ------------------
  |  Branch (1025:17): [True: 1.55k, False: 4.48M]
  ------------------
 1026|  66.6k|                {
 1027|       |                    // (in -- hash)
 1028|  66.6k|                    if (stack.size() < 1)
  ------------------
  |  Branch (1028:25): [True: 8.16k, False: 58.5k]
  ------------------
 1029|  8.16k|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1030|  58.5k|                    valtype& vch = stacktop(-1);
  ------------------
  |  |   54|  58.5k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1031|  58.5k|                    valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
  ------------------
  |  Branch (1031:38): [True: 32.1k, False: 26.3k]
  |  Branch (1031:64): [True: 15.6k, False: 10.7k]
  |  Branch (1031:85): [True: 4.69k, False: 6.05k]
  ------------------
 1032|  58.5k|                    if (opcode == OP_RIPEMD160)
  ------------------
  |  Branch (1032:25): [True: 32.1k, False: 26.3k]
  ------------------
 1033|  32.1k|                        CRIPEMD160().Write(vch.data(), vch.size()).Finalize(vchHash.data());
 1034|  26.3k|                    else if (opcode == OP_SHA1)
  ------------------
  |  Branch (1034:30): [True: 15.6k, False: 10.7k]
  ------------------
 1035|  15.6k|                        CSHA1().Write(vch.data(), vch.size()).Finalize(vchHash.data());
 1036|  10.7k|                    else if (opcode == OP_SHA256)
  ------------------
  |  Branch (1036:30): [True: 4.51k, False: 6.23k]
  ------------------
 1037|  4.51k|                        CSHA256().Write(vch.data(), vch.size()).Finalize(vchHash.data());
 1038|  6.23k|                    else if (opcode == OP_HASH160)
  ------------------
  |  Branch (1038:30): [True: 4.69k, False: 1.53k]
  ------------------
 1039|  4.69k|                        CHash160().Write(vch).Finalize(vchHash);
 1040|  1.53k|                    else if (opcode == OP_HASH256)
  ------------------
  |  Branch (1040:30): [True: 1.53k, False: 0]
  ------------------
 1041|  1.53k|                        CHash256().Write(vch).Finalize(vchHash);
 1042|  58.5k|                    popstack(stack);
 1043|  58.5k|                    stack.push_back(vchHash);
 1044|  58.5k|                }
 1045|      0|                break;
 1046|       |
 1047|    290|                case OP_CODESEPARATOR:
  ------------------
  |  Branch (1047:17): [True: 290, False: 4.49M]
  ------------------
 1048|    290|                {
 1049|       |                    // If SCRIPT_VERIFY_CONST_SCRIPTCODE flag is set, use of OP_CODESEPARATOR is rejected in pre-segwit
 1050|       |                    // script, even in an unexecuted branch (this is checked above the opcode case statement).
 1051|       |
 1052|       |                    // Hash starts after the code separator
 1053|    290|                    pbegincodehash = pc;
 1054|    290|                    execdata.m_codeseparator_pos = opcode_pos;
 1055|    290|                }
 1056|    290|                break;
 1057|       |
 1058|  6.33k|                case OP_CHECKSIG:
  ------------------
  |  Branch (1058:17): [True: 6.33k, False: 4.48M]
  ------------------
 1059|  10.7k|                case OP_CHECKSIGVERIFY:
  ------------------
  |  Branch (1059:17): [True: 4.36k, False: 4.48M]
  ------------------
 1060|  10.7k|                {
 1061|       |                    // (sig pubkey -- bool)
 1062|  10.7k|                    if (stack.size() < 2)
  ------------------
  |  Branch (1062:25): [True: 4.86k, False: 5.84k]
  ------------------
 1063|  4.86k|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1064|       |
 1065|  5.84k|                    valtype& vchSig    = stacktop(-2);
  ------------------
  |  |   54|  5.84k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1066|  5.84k|                    valtype& vchPubKey = stacktop(-1);
  ------------------
  |  |   54|  5.84k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1067|       |
 1068|  5.84k|                    bool fSuccess = true;
 1069|  5.84k|                    if (!EvalChecksig(vchSig, vchPubKey, pbegincodehash, pend, execdata, flags, checker, sigversion, serror, fSuccess)) return false;
  ------------------
  |  Branch (1069:25): [True: 4.65k, False: 1.18k]
  ------------------
 1070|  1.18k|                    popstack(stack);
 1071|  1.18k|                    popstack(stack);
 1072|  1.18k|                    stack.push_back(fSuccess ? vchTrue : vchFalse);
  ------------------
  |  Branch (1072:37): [True: 0, False: 1.18k]
  ------------------
 1073|  1.18k|                    if (opcode == OP_CHECKSIGVERIFY)
  ------------------
  |  Branch (1073:25): [True: 772, False: 411]
  ------------------
 1074|    772|                    {
 1075|    772|                        if (fSuccess)
  ------------------
  |  Branch (1075:29): [True: 0, False: 772]
  ------------------
 1076|      0|                            popstack(stack);
 1077|    772|                        else
 1078|    772|                            return set_error(serror, SCRIPT_ERR_CHECKSIGVERIFY);
 1079|    772|                    }
 1080|  1.18k|                }
 1081|    411|                break;
 1082|       |
 1083|  1.16k|                case OP_CHECKSIGADD:
  ------------------
  |  Branch (1083:17): [True: 1.16k, False: 4.48M]
  ------------------
 1084|  1.16k|                {
 1085|       |                    // OP_CHECKSIGADD is only available in Tapscript
 1086|  1.16k|                    if (sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
  ------------------
  |  Branch (1086:25): [True: 1.16k, False: 0]
  |  Branch (1086:59): [True: 0, False: 0]
  ------------------
 1087|       |
 1088|       |                    // (sig num pubkey -- num)
 1089|      0|                    if (stack.size() < 3) return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  ------------------
  |  Branch (1089:25): [True: 0, False: 0]
  ------------------
 1090|       |
 1091|      0|                    const valtype& sig = stacktop(-3);
  ------------------
  |  |   54|      0|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1092|      0|                    const CScriptNum num(stacktop(-2), fRequireMinimal);
  ------------------
  |  |   54|      0|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1093|      0|                    const valtype& pubkey = stacktop(-1);
  ------------------
  |  |   54|      0|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1094|       |
 1095|      0|                    bool success = true;
 1096|      0|                    if (!EvalChecksig(sig, pubkey, pbegincodehash, pend, execdata, flags, checker, sigversion, serror, success)) return false;
  ------------------
  |  Branch (1096:25): [True: 0, False: 0]
  ------------------
 1097|      0|                    popstack(stack);
 1098|      0|                    popstack(stack);
 1099|      0|                    popstack(stack);
 1100|      0|                    stack.push_back((num + (success ? 1 : 0)).getvch());
  ------------------
  |  Branch (1100:45): [True: 0, False: 0]
  ------------------
 1101|      0|                }
 1102|      0|                break;
 1103|       |
 1104|  10.6k|                case OP_CHECKMULTISIG:
  ------------------
  |  Branch (1104:17): [True: 10.6k, False: 4.48M]
  ------------------
 1105|  20.1k|                case OP_CHECKMULTISIGVERIFY:
  ------------------
  |  Branch (1105:17): [True: 9.54k, False: 4.48M]
  ------------------
 1106|  20.1k|                {
 1107|  20.1k|                    if (sigversion == SigVersion::TAPSCRIPT) return set_error(serror, SCRIPT_ERR_TAPSCRIPT_CHECKMULTISIG);
  ------------------
  |  Branch (1107:25): [True: 0, False: 20.1k]
  ------------------
 1108|       |
 1109|       |                    // ([sig ...] num_of_signatures [pubkey ...] num_of_pubkeys -- bool)
 1110|       |
 1111|  20.1k|                    int i = 1;
 1112|  20.1k|                    if ((int)stack.size() < i)
  ------------------
  |  Branch (1112:25): [True: 762, False: 19.3k]
  ------------------
 1113|    762|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1114|       |
 1115|  19.3k|                    int nKeysCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
  ------------------
  |  |   54|  19.3k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1116|  19.3k|                    if (nKeysCount < 0 || nKeysCount > MAX_PUBKEYS_PER_MULTISIG)
  ------------------
  |  Branch (1116:25): [True: 1.20k, False: 18.1k]
  |  Branch (1116:43): [True: 507, False: 17.6k]
  ------------------
 1117|  1.12k|                        return set_error(serror, SCRIPT_ERR_PUBKEY_COUNT);
 1118|  18.2k|                    nOpCount += nKeysCount;
 1119|  18.2k|                    if (nOpCount > MAX_OPS_PER_SCRIPT)
  ------------------
  |  Branch (1119:25): [True: 948, False: 17.3k]
  ------------------
 1120|    948|                        return set_error(serror, SCRIPT_ERR_OP_COUNT);
 1121|  17.3k|                    int ikey = ++i;
 1122|       |                    // ikey2 is the position of last non-signature item in the stack. Top stack item = 1.
 1123|       |                    // With SCRIPT_VERIFY_NULLFAIL, this is used for cleanup if operation fails.
 1124|  17.3k|                    int ikey2 = nKeysCount + 2;
 1125|  17.3k|                    i += nKeysCount;
 1126|  17.3k|                    if ((int)stack.size() < i)
  ------------------
  |  Branch (1126:25): [True: 595, False: 16.7k]
  ------------------
 1127|    595|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1128|       |
 1129|  16.7k|                    int nSigsCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
  ------------------
  |  |   54|  16.7k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1130|  16.7k|                    if (nSigsCount < 0 || nSigsCount > nKeysCount)
  ------------------
  |  Branch (1130:25): [True: 1.54k, False: 15.1k]
  |  Branch (1130:43): [True: 856, False: 14.3k]
  ------------------
 1131|  1.19k|                        return set_error(serror, SCRIPT_ERR_SIG_COUNT);
 1132|  15.5k|                    int isig = ++i;
 1133|  15.5k|                    i += nSigsCount;
 1134|  15.5k|                    if ((int)stack.size() < i)
  ------------------
  |  Branch (1134:25): [True: 655, False: 14.8k]
  ------------------
 1135|    655|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1136|       |
 1137|       |                    // Subset of script starting at the most recent codeseparator
 1138|  14.8k|                    CScript scriptCode(pbegincodehash, pend);
 1139|       |
 1140|       |                    // Drop the signature in pre-segwit scripts but not segwit scripts
 1141|  32.2k|                    for (int k = 0; k < nSigsCount; k++)
  ------------------
  |  Branch (1141:37): [True: 18.2k, False: 13.9k]
  ------------------
 1142|  18.2k|                    {
 1143|  18.2k|                        valtype& vchSig = stacktop(-isig-k);
  ------------------
  |  |   54|  18.2k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1144|  18.2k|                        if (sigversion == SigVersion::BASE) {
  ------------------
  |  Branch (1144:29): [True: 18.2k, False: 0]
  ------------------
 1145|  18.2k|                            int found = FindAndDelete(scriptCode, CScript() << vchSig);
 1146|  18.2k|                            if (found > 0 && (flags & SCRIPT_VERIFY_CONST_SCRIPTCODE))
  ------------------
  |  Branch (1146:33): [True: 964, False: 17.3k]
  |  Branch (1146:46): [True: 939, False: 25]
  ------------------
 1147|    939|                                return set_error(serror, SCRIPT_ERR_SIG_FINDANDDELETE);
 1148|  18.2k|                        }
 1149|  18.2k|                    }
 1150|       |
 1151|  13.9k|                    bool fSuccess = true;
 1152|  13.9k|                    while (fSuccess && nSigsCount > 0)
  ------------------
  |  Branch (1152:28): [True: 12.7k, False: 1.20k]
  |  Branch (1152:40): [True: 1.79k, False: 10.9k]
  ------------------
 1153|  1.79k|                    {
 1154|  1.79k|                        valtype& vchSig    = stacktop(-isig);
  ------------------
  |  |   54|  1.79k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1155|  1.79k|                        valtype& vchPubKey = stacktop(-ikey);
  ------------------
  |  |   54|  1.79k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
 1156|       |
 1157|       |                        // Note how this makes the exact order of pubkey/signature evaluation
 1158|       |                        // distinguishable by CHECKMULTISIG NOT if the STRICTENC flag is set.
 1159|       |                        // See the script_(in)valid tests for details.
 1160|  1.79k|                        if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, sigversion, serror)) {
  ------------------
  |  Branch (1160:29): [True: 998, False: 793]
  |  Branch (1160:79): [True: 792, False: 1]
  ------------------
 1161|       |                            // serror is set
 1162|  1.79k|                            return false;
 1163|  1.79k|                        }
 1164|       |
 1165|       |                        // Check signature
 1166|      1|                        bool fOk = checker.CheckECDSASignature(vchSig, vchPubKey, scriptCode, sigversion);
 1167|       |
 1168|      1|                        if (fOk) {
  ------------------
  |  Branch (1168:29): [True: 0, False: 1]
  ------------------
 1169|      0|                            isig++;
 1170|      0|                            nSigsCount--;
 1171|      0|                        }
 1172|      1|                        ikey++;
 1173|      1|                        nKeysCount--;
 1174|       |
 1175|       |                        // If there are more signatures left than keys left,
 1176|       |                        // then too many signatures have failed. Exit early,
 1177|       |                        // without checking any further signatures.
 1178|      1|                        if (nSigsCount > nKeysCount)
  ------------------
  |  Branch (1178:29): [True: 1, False: 0]
  ------------------
 1179|      1|                            fSuccess = false;
 1180|      1|                    }
 1181|       |
 1182|       |                    // Clean up stack of actual arguments
 1183|  39.5k|                    while (i-- > 1) {
  ------------------
  |  Branch (1183:28): [True: 27.4k, False: 12.1k]
  ------------------
 1184|       |                        // If the operation failed, we require that all signatures must be empty vector
 1185|  27.4k|                        if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL) && !ikey2 && stacktop(-1).size())
  ------------------
  |  |   54|      0|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  |  Branch (1185:29): [True: 4, False: 27.4k]
  |  Branch (1185:42): [True: 0, False: 4]
  |  Branch (1185:78): [True: 0, False: 0]
  |  Branch (1185:88): [True: 0, False: 0]
  ------------------
 1186|      0|                            return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL);
 1187|  27.4k|                        if (ikey2 > 0)
  ------------------
  |  Branch (1187:29): [True: 27.4k, False: 1]
  ------------------
 1188|  27.4k|                            ikey2--;
 1189|  27.4k|                        popstack(stack);
 1190|  27.4k|                    }
 1191|       |
 1192|       |                    // A bug causes CHECKMULTISIG to consume one extra argument
 1193|       |                    // whose contents were not checked in any way.
 1194|       |                    //
 1195|       |                    // Unfortunately this is a potential source of mutability,
 1196|       |                    // so optionally verify it is exactly equal to zero prior
 1197|       |                    // to removing it from the stack.
 1198|  12.1k|                    if (stack.size() < 1)
  ------------------
  |  Branch (1198:25): [True: 0, False: 12.1k]
  ------------------
 1199|      0|                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 1200|  12.1k|                    if ((flags & SCRIPT_VERIFY_NULLDUMMY) && stacktop(-1).size())
  ------------------
  |  |   54|  10.5k|#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
  ------------------
  |  Branch (1200:25): [True: 10.5k, False: 1.56k]
  |  Branch (1200:62): [True: 623, False: 9.96k]
  ------------------
 1201|    623|                        return set_error(serror, SCRIPT_ERR_SIG_NULLDUMMY);
 1202|  11.5k|                    popstack(stack);
 1203|       |
 1204|  11.5k|                    stack.push_back(fSuccess ? vchTrue : vchFalse);
  ------------------
  |  Branch (1204:37): [True: 10.3k, False: 1.20k]
  ------------------
 1205|       |
 1206|  11.5k|                    if (opcode == OP_CHECKMULTISIGVERIFY)
  ------------------
  |  Branch (1206:25): [True: 5.40k, False: 6.12k]
  ------------------
 1207|  5.40k|                    {
 1208|  5.40k|                        if (fSuccess)
  ------------------
  |  Branch (1208:29): [True: 5.40k, False: 1]
  ------------------
 1209|  5.40k|                            popstack(stack);
 1210|      1|                        else
 1211|      1|                            return set_error(serror, SCRIPT_ERR_CHECKMULTISIGVERIFY);
 1212|  5.40k|                    }
 1213|  11.5k|                }
 1214|  11.5k|                break;
 1215|       |
 1216|  11.5k|                default:
  ------------------
  |  Branch (1216:17): [True: 2.84k, False: 4.48M]
  ------------------
 1217|  2.84k|                    return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
 1218|  4.49M|            }
 1219|       |
 1220|       |            // Size limits
 1221|  5.72M|            if (stack.size() + altstack.size() > MAX_STACK_SIZE)
  ------------------
  |  Branch (1221:17): [True: 437, False: 5.72M]
  ------------------
 1222|    437|                return set_error(serror, SCRIPT_ERR_STACK_SIZE);
 1223|  5.72M|        }
 1224|   259k|    }
 1225|   259k|    catch (...)
 1226|   259k|    {
 1227|  4.92k|        return set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
 1228|  4.92k|    }
 1229|       |
 1230|   160k|    if (!vfExec.empty())
  ------------------
  |  Branch (1230:9): [True: 918, False: 159k]
  ------------------
 1231|    918|        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
 1232|       |
 1233|   159k|    return set_success(serror);
 1234|   160k|}
_Z10EvalScriptRNSt3__16vectorINS0_IhNS_9allocatorIhEEEENS1_IS3_EEEERK7CScriptjRK20BaseSignatureChecker10SigVersionP13ScriptError_t:
 1237|   259k|{
 1238|   259k|    ScriptExecutionData execdata;
 1239|   259k|    return EvalScript(stack, script, flags, checker, sigversion, execdata, serror);
 1240|   259k|}
_ZN26PrecomputedTransactionData4InitI12CTransactionEEvRKT_ONSt3__16vectorI6CTxOutNS5_9allocatorIS7_EEEEb:
 1399|  2.78k|{
 1400|  2.78k|    assert(!m_spent_outputs_ready);
 1401|       |
 1402|  2.78k|    m_spent_outputs = std::move(spent_outputs);
 1403|  2.78k|    if (!m_spent_outputs.empty()) {
  ------------------
  |  Branch (1403:9): [True: 341, False: 2.44k]
  ------------------
 1404|    341|        assert(m_spent_outputs.size() == txTo.vin.size());
 1405|    341|        m_spent_outputs_ready = true;
 1406|    341|    }
 1407|       |
 1408|       |    // Determine which precomputation-impacting features this transaction uses.
 1409|  2.78k|    bool uses_bip143_segwit = force;
 1410|  2.78k|    bool uses_bip341_taproot = force;
 1411|  2.78k|    for (size_t inpos = 0; inpos < txTo.vin.size() && !(uses_bip143_segwit && uses_bip341_taproot); ++inpos) {
  ------------------
  |  Branch (1411:28): [True: 2.32k, False: 460]
  |  Branch (1411:57): [True: 2.32k, False: 0]
  |  Branch (1411:79): [True: 2.32k, False: 0]
  ------------------
 1412|      0|        if (!txTo.vin[inpos].scriptWitness.IsNull()) {
  ------------------
  |  Branch (1412:13): [True: 0, False: 0]
  ------------------
 1413|      0|            if (m_spent_outputs_ready && m_spent_outputs[inpos].scriptPubKey.size() == 2 + WITNESS_V1_TAPROOT_SIZE &&
  ------------------
  |  Branch (1413:17): [True: 0, False: 0]
  |  Branch (1413:42): [True: 0, False: 0]
  ------------------
 1414|      0|                m_spent_outputs[inpos].scriptPubKey[0] == OP_1) {
  ------------------
  |  Branch (1414:17): [True: 0, False: 0]
  ------------------
 1415|       |                // Treat every witness-bearing spend with 34-byte scriptPubKey that starts with OP_1 as a Taproot
 1416|       |                // spend. This only works if spent_outputs was provided as well, but if it wasn't, actual validation
 1417|       |                // will fail anyway. Note that this branch may trigger for scriptPubKeys that aren't actually segwit
 1418|       |                // but in that case validation will fail as SCRIPT_ERR_WITNESS_UNEXPECTED anyway.
 1419|      0|                uses_bip341_taproot = true;
 1420|      0|            } else {
 1421|       |                // Treat every spend that's not known to native witness v1 as a Witness v0 spend. This branch may
 1422|       |                // also be taken for unknown witness versions, but it is harmless, and being precise would require
 1423|       |                // P2SH evaluation to find the redeemScript.
 1424|      0|                uses_bip143_segwit = true;
 1425|      0|            }
 1426|      0|        }
 1427|      0|        if (uses_bip341_taproot && uses_bip143_segwit) break; // No need to scan further if we already need all.
  ------------------
  |  Branch (1427:13): [True: 0, False: 0]
  |  Branch (1427:36): [True: 0, False: 0]
  ------------------
 1428|      0|    }
 1429|       |
 1430|  2.78k|    if (uses_bip143_segwit || uses_bip341_taproot) {
  ------------------
  |  Branch (1430:9): [True: 2.78k, False: 0]
  |  Branch (1430:31): [True: 0, False: 0]
  ------------------
 1431|       |        // Computations shared between both sighash schemes.
 1432|  2.78k|        m_prevouts_single_hash = GetPrevoutsSHA256(txTo);
 1433|  2.78k|        m_sequences_single_hash = GetSequencesSHA256(txTo);
 1434|  2.78k|        m_outputs_single_hash = GetOutputsSHA256(txTo);
 1435|  2.78k|    }
 1436|  2.78k|    if (uses_bip143_segwit) {
  ------------------
  |  Branch (1436:9): [True: 2.78k, False: 0]
  ------------------
 1437|  2.78k|        hashPrevouts = SHA256Uint256(m_prevouts_single_hash);
 1438|  2.78k|        hashSequence = SHA256Uint256(m_sequences_single_hash);
 1439|  2.78k|        hashOutputs = SHA256Uint256(m_outputs_single_hash);
 1440|  2.78k|        m_bip143_segwit_ready = true;
 1441|  2.78k|    }
 1442|  2.78k|    if (uses_bip341_taproot && m_spent_outputs_ready) {
  ------------------
  |  Branch (1442:9): [True: 2.78k, False: 0]
  |  Branch (1442:32): [True: 341, False: 2.44k]
  ------------------
 1443|    341|        m_spent_amounts_single_hash = GetSpentAmountsSHA256(m_spent_outputs);
 1444|    341|        m_spent_scripts_single_hash = GetSpentScriptsSHA256(m_spent_outputs);
 1445|    341|        m_bip341_taproot_ready = true;
 1446|    341|    }
 1447|  2.78k|}
_ZN26PrecomputedTransactionData4InitI19CMutableTransactionEEvRKT_ONSt3__16vectorI6CTxOutNS5_9allocatorIS7_EEEEb:
 1399|  3.15k|{
 1400|  3.15k|    assert(!m_spent_outputs_ready);
 1401|       |
 1402|  3.15k|    m_spent_outputs = std::move(spent_outputs);
 1403|  3.15k|    if (!m_spent_outputs.empty()) {
  ------------------
  |  Branch (1403:9): [True: 903, False: 2.25k]
  ------------------
 1404|    903|        assert(m_spent_outputs.size() == txTo.vin.size());
 1405|    903|        m_spent_outputs_ready = true;
 1406|    903|    }
 1407|       |
 1408|       |    // Determine which precomputation-impacting features this transaction uses.
 1409|  3.15k|    bool uses_bip143_segwit = force;
 1410|  3.15k|    bool uses_bip341_taproot = force;
 1411|  3.15k|    for (size_t inpos = 0; inpos < txTo.vin.size() && !(uses_bip143_segwit && uses_bip341_taproot); ++inpos) {
  ------------------
  |  Branch (1411:28): [True: 2.28k, False: 875]
  |  Branch (1411:57): [True: 2.28k, False: 0]
  |  Branch (1411:79): [True: 2.28k, False: 0]
  ------------------
 1412|      0|        if (!txTo.vin[inpos].scriptWitness.IsNull()) {
  ------------------
  |  Branch (1412:13): [True: 0, False: 0]
  ------------------
 1413|      0|            if (m_spent_outputs_ready && m_spent_outputs[inpos].scriptPubKey.size() == 2 + WITNESS_V1_TAPROOT_SIZE &&
  ------------------
  |  Branch (1413:17): [True: 0, False: 0]
  |  Branch (1413:42): [True: 0, False: 0]
  ------------------
 1414|      0|                m_spent_outputs[inpos].scriptPubKey[0] == OP_1) {
  ------------------
  |  Branch (1414:17): [True: 0, False: 0]
  ------------------
 1415|       |                // Treat every witness-bearing spend with 34-byte scriptPubKey that starts with OP_1 as a Taproot
 1416|       |                // spend. This only works if spent_outputs was provided as well, but if it wasn't, actual validation
 1417|       |                // will fail anyway. Note that this branch may trigger for scriptPubKeys that aren't actually segwit
 1418|       |                // but in that case validation will fail as SCRIPT_ERR_WITNESS_UNEXPECTED anyway.
 1419|      0|                uses_bip341_taproot = true;
 1420|      0|            } else {
 1421|       |                // Treat every spend that's not known to native witness v1 as a Witness v0 spend. This branch may
 1422|       |                // also be taken for unknown witness versions, but it is harmless, and being precise would require
 1423|       |                // P2SH evaluation to find the redeemScript.
 1424|      0|                uses_bip143_segwit = true;
 1425|      0|            }
 1426|      0|        }
 1427|      0|        if (uses_bip341_taproot && uses_bip143_segwit) break; // No need to scan further if we already need all.
  ------------------
  |  Branch (1427:13): [True: 0, False: 0]
  |  Branch (1427:36): [True: 0, False: 0]
  ------------------
 1428|      0|    }
 1429|       |
 1430|  3.15k|    if (uses_bip143_segwit || uses_bip341_taproot) {
  ------------------
  |  Branch (1430:9): [True: 3.15k, False: 0]
  |  Branch (1430:31): [True: 0, False: 0]
  ------------------
 1431|       |        // Computations shared between both sighash schemes.
 1432|  3.15k|        m_prevouts_single_hash = GetPrevoutsSHA256(txTo);
 1433|  3.15k|        m_sequences_single_hash = GetSequencesSHA256(txTo);
 1434|  3.15k|        m_outputs_single_hash = GetOutputsSHA256(txTo);
 1435|  3.15k|    }
 1436|  3.15k|    if (uses_bip143_segwit) {
  ------------------
  |  Branch (1436:9): [True: 3.15k, False: 0]
  ------------------
 1437|  3.15k|        hashPrevouts = SHA256Uint256(m_prevouts_single_hash);
 1438|  3.15k|        hashSequence = SHA256Uint256(m_sequences_single_hash);
 1439|  3.15k|        hashOutputs = SHA256Uint256(m_outputs_single_hash);
 1440|  3.15k|        m_bip143_segwit_ready = true;
 1441|  3.15k|    }
 1442|  3.15k|    if (uses_bip341_taproot && m_spent_outputs_ready) {
  ------------------
  |  Branch (1442:9): [True: 3.15k, False: 0]
  |  Branch (1442:32): [True: 903, False: 2.25k]
  ------------------
 1443|    903|        m_spent_amounts_single_hash = GetSpentAmountsSHA256(m_spent_outputs);
 1444|    903|        m_spent_scripts_single_hash = GetSpentScriptsSHA256(m_spent_outputs);
 1445|    903|        m_bip341_taproot_ready = true;
 1446|    903|    }
 1447|  3.15k|}
_ZNK34GenericTransactionSignatureCheckerI12CTransactionE19CheckECDSASignatureERKNSt3__16vectorIhNS2_9allocatorIhEEEES8_RK7CScript10SigVersion:
 1649|    550|{
 1650|    550|    CPubKey pubkey(vchPubKey);
 1651|    550|    if (!pubkey.IsValid())
  ------------------
  |  Branch (1651:9): [True: 0, False: 550]
  ------------------
 1652|      0|        return false;
 1653|       |
 1654|       |    // Hash type is one byte tacked on to the end of the signature
 1655|    550|    std::vector<unsigned char> vchSig(vchSigIn);
 1656|    550|    if (vchSig.empty())
  ------------------
  |  Branch (1656:9): [True: 550, False: 0]
  ------------------
 1657|    550|        return false;
 1658|      0|    int nHashType = vchSig.back();
 1659|      0|    vchSig.pop_back();
 1660|       |
 1661|       |    // Witness sighashes need the amount.
 1662|      0|    if (sigversion == SigVersion::WITNESS_V0 && amount < 0) return HandleMissingData(m_mdb);
  ------------------
  |  Branch (1662:9): [True: 0, False: 0]
  |  Branch (1662:49): [True: 0, False: 0]
  ------------------
 1663|       |
 1664|      0|    uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->txdata);
 1665|       |
 1666|      0|    if (!VerifyECDSASignature(vchSig, pubkey, sighash))
  ------------------
  |  Branch (1666:9): [True: 0, False: 0]
  ------------------
 1667|      0|        return false;
 1668|       |
 1669|      0|    return true;
 1670|      0|}
_ZNK34GenericTransactionSignatureCheckerI12CTransactionE13CheckLockTimeERK10CScriptNum:
 1702|  3.81k|{
 1703|       |    // There are two kinds of nLockTime: lock-by-blockheight
 1704|       |    // and lock-by-blocktime, distinguished by whether
 1705|       |    // nLockTime < LOCKTIME_THRESHOLD.
 1706|       |    //
 1707|       |    // We want to compare apples to apples, so fail the script
 1708|       |    // unless the type of nLockTime being tested is the same as
 1709|       |    // the nLockTime in the transaction.
 1710|  3.81k|    if (!(
  ------------------
  |  Branch (1710:9): [True: 727, False: 3.08k]
  ------------------
 1711|  3.81k|        (txTo->nLockTime <  LOCKTIME_THRESHOLD && nLockTime <  LOCKTIME_THRESHOLD) ||
  ------------------
  |  Branch (1711:10): [True: 2.97k, False: 833]
  |  Branch (1711:51): [True: 2.55k, False: 418]
  ------------------
 1712|  3.81k|        (txTo->nLockTime >= LOCKTIME_THRESHOLD && nLockTime >= LOCKTIME_THRESHOLD)
  ------------------
  |  Branch (1712:10): [True: 833, False: 418]
  |  Branch (1712:51): [True: 524, False: 309]
  ------------------
 1713|  3.81k|    ))
 1714|    727|        return false;
 1715|       |
 1716|       |    // Now that we know we're comparing apples-to-apples, the
 1717|       |    // comparison is a simple numeric one.
 1718|  3.08k|    if (nLockTime > (int64_t)txTo->nLockTime)
  ------------------
  |  Branch (1718:9): [True: 496, False: 2.58k]
  ------------------
 1719|    496|        return false;
 1720|       |
 1721|       |    // Finally the nLockTime feature can be disabled in IsFinalTx()
 1722|       |    // and thus CHECKLOCKTIMEVERIFY bypassed if every txin has
 1723|       |    // been finalized by setting nSequence to maxint. The
 1724|       |    // transaction would be allowed into the blockchain, making
 1725|       |    // the opcode ineffective.
 1726|       |    //
 1727|       |    // Testing if this vin is not final is sufficient to
 1728|       |    // prevent this condition. Alternatively we could test all
 1729|       |    // inputs, but testing just this input minimizes the data
 1730|       |    // required to prove correct CHECKLOCKTIMEVERIFY execution.
 1731|  2.58k|    if (CTxIn::SEQUENCE_FINAL == txTo->vin[nIn].nSequence)
  ------------------
  |  Branch (1731:9): [True: 5, False: 2.58k]
  ------------------
 1732|      5|        return false;
 1733|       |
 1734|  2.58k|    return true;
 1735|  2.58k|}
_ZNK34GenericTransactionSignatureCheckerI12CTransactionE13CheckSequenceERK10CScriptNum:
 1739|  5.98k|{
 1740|       |    // Relative lock times are supported by comparing the passed
 1741|       |    // in operand to the sequence number of the input.
 1742|  5.98k|    const int64_t txToSequence = (int64_t)txTo->vin[nIn].nSequence;
 1743|       |
 1744|       |    // Fail if the transaction's version number is not set high
 1745|       |    // enough to trigger BIP 68 rules.
 1746|  5.98k|    if (txTo->version < 2)
  ------------------
  |  Branch (1746:9): [True: 122, False: 5.86k]
  ------------------
 1747|    122|        return false;
 1748|       |
 1749|       |    // Sequence numbers with their most significant bit set are not
 1750|       |    // consensus constrained. Testing that the transaction's sequence
 1751|       |    // number do not have this bit set prevents using this property
 1752|       |    // to get around a CHECKSEQUENCEVERIFY check.
 1753|  5.86k|    if (txToSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG)
  ------------------
  |  Branch (1753:9): [True: 83, False: 5.77k]
  ------------------
 1754|     83|        return false;
 1755|       |
 1756|       |    // Mask off any bits that do not have consensus-enforced meaning
 1757|       |    // before doing the integer comparisons
 1758|  5.77k|    const uint32_t nLockTimeMask = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | CTxIn::SEQUENCE_LOCKTIME_MASK;
 1759|  5.77k|    const int64_t txToSequenceMasked = txToSequence & nLockTimeMask;
 1760|  5.77k|    const CScriptNum nSequenceMasked = nSequence & nLockTimeMask;
 1761|       |
 1762|       |    // There are two kinds of nSequence: lock-by-blockheight
 1763|       |    // and lock-by-blocktime, distinguished by whether
 1764|       |    // nSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG.
 1765|       |    //
 1766|       |    // We want to compare apples to apples, so fail the script
 1767|       |    // unless the type of nSequenceMasked being tested is the same as
 1768|       |    // the nSequenceMasked in the transaction.
 1769|  5.77k|    if (!(
  ------------------
  |  Branch (1769:9): [True: 695, False: 5.08k]
  ------------------
 1770|  5.77k|        (txToSequenceMasked <  CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked <  CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) ||
  ------------------
  |  Branch (1770:10): [True: 4.58k, False: 1.19k]
  |  Branch (1770:70): [True: 4.22k, False: 360]
  ------------------
 1771|  5.77k|        (txToSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)
  ------------------
  |  Branch (1771:10): [True: 1.19k, False: 360]
  |  Branch (1771:70): [True: 859, False: 335]
  ------------------
 1772|  5.77k|    )) {
 1773|    695|        return false;
 1774|    695|    }
 1775|       |
 1776|       |    // Now that we know we're comparing apples-to-apples, the
 1777|       |    // comparison is a simple numeric one.
 1778|  5.08k|    if (nSequenceMasked > txToSequenceMasked)
  ------------------
  |  Branch (1778:9): [True: 340, False: 4.74k]
  ------------------
 1779|    340|        return false;
 1780|       |
 1781|  4.74k|    return true;
 1782|  5.08k|}
_ZNK34GenericTransactionSignatureCheckerI19CMutableTransactionE19CheckECDSASignatureERKNSt3__16vectorIhNS2_9allocatorIhEEEES8_RK7CScript10SigVersion:
 1649|    633|{
 1650|    633|    CPubKey pubkey(vchPubKey);
 1651|    633|    if (!pubkey.IsValid())
  ------------------
  |  Branch (1651:9): [True: 0, False: 633]
  ------------------
 1652|      0|        return false;
 1653|       |
 1654|       |    // Hash type is one byte tacked on to the end of the signature
 1655|    633|    std::vector<unsigned char> vchSig(vchSigIn);
 1656|    633|    if (vchSig.empty())
  ------------------
  |  Branch (1656:9): [True: 633, False: 0]
  ------------------
 1657|    633|        return false;
 1658|      0|    int nHashType = vchSig.back();
 1659|      0|    vchSig.pop_back();
 1660|       |
 1661|       |    // Witness sighashes need the amount.
 1662|      0|    if (sigversion == SigVersion::WITNESS_V0 && amount < 0) return HandleMissingData(m_mdb);
  ------------------
  |  Branch (1662:9): [True: 0, False: 0]
  |  Branch (1662:49): [True: 0, False: 0]
  ------------------
 1663|       |
 1664|      0|    uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->txdata);
 1665|       |
 1666|      0|    if (!VerifyECDSASignature(vchSig, pubkey, sighash))
  ------------------
  |  Branch (1666:9): [True: 0, False: 0]
  ------------------
 1667|      0|        return false;
 1668|       |
 1669|      0|    return true;
 1670|      0|}
_ZNK34GenericTransactionSignatureCheckerI19CMutableTransactionE13CheckLockTimeERK10CScriptNum:
 1702|  3.64k|{
 1703|       |    // There are two kinds of nLockTime: lock-by-blockheight
 1704|       |    // and lock-by-blocktime, distinguished by whether
 1705|       |    // nLockTime < LOCKTIME_THRESHOLD.
 1706|       |    //
 1707|       |    // We want to compare apples to apples, so fail the script
 1708|       |    // unless the type of nLockTime being tested is the same as
 1709|       |    // the nLockTime in the transaction.
 1710|  3.64k|    if (!(
  ------------------
  |  Branch (1710:9): [True: 717, False: 2.93k]
  ------------------
 1711|  3.64k|        (txTo->nLockTime <  LOCKTIME_THRESHOLD && nLockTime <  LOCKTIME_THRESHOLD) ||
  ------------------
  |  Branch (1711:10): [True: 2.80k, False: 841]
  |  Branch (1711:51): [True: 2.38k, False: 417]
  ------------------
 1712|  3.64k|        (txTo->nLockTime >= LOCKTIME_THRESHOLD && nLockTime >= LOCKTIME_THRESHOLD)
  ------------------
  |  Branch (1712:10): [True: 841, False: 417]
  |  Branch (1712:51): [True: 541, False: 300]
  ------------------
 1713|  3.64k|    ))
 1714|    717|        return false;
 1715|       |
 1716|       |    // Now that we know we're comparing apples-to-apples, the
 1717|       |    // comparison is a simple numeric one.
 1718|  2.93k|    if (nLockTime > (int64_t)txTo->nLockTime)
  ------------------
  |  Branch (1718:9): [True: 504, False: 2.42k]
  ------------------
 1719|    504|        return false;
 1720|       |
 1721|       |    // Finally the nLockTime feature can be disabled in IsFinalTx()
 1722|       |    // and thus CHECKLOCKTIMEVERIFY bypassed if every txin has
 1723|       |    // been finalized by setting nSequence to maxint. The
 1724|       |    // transaction would be allowed into the blockchain, making
 1725|       |    // the opcode ineffective.
 1726|       |    //
 1727|       |    // Testing if this vin is not final is sufficient to
 1728|       |    // prevent this condition. Alternatively we could test all
 1729|       |    // inputs, but testing just this input minimizes the data
 1730|       |    // required to prove correct CHECKLOCKTIMEVERIFY execution.
 1731|  2.42k|    if (CTxIn::SEQUENCE_FINAL == txTo->vin[nIn].nSequence)
  ------------------
  |  Branch (1731:9): [True: 4, False: 2.42k]
  ------------------
 1732|      4|        return false;
 1733|       |
 1734|  2.42k|    return true;
 1735|  2.42k|}
_ZNK34GenericTransactionSignatureCheckerI19CMutableTransactionE13CheckSequenceERK10CScriptNum:
 1739|  5.05k|{
 1740|       |    // Relative lock times are supported by comparing the passed
 1741|       |    // in operand to the sequence number of the input.
 1742|  5.05k|    const int64_t txToSequence = (int64_t)txTo->vin[nIn].nSequence;
 1743|       |
 1744|       |    // Fail if the transaction's version number is not set high
 1745|       |    // enough to trigger BIP 68 rules.
 1746|  5.05k|    if (txTo->version < 2)
  ------------------
  |  Branch (1746:9): [True: 89, False: 4.96k]
  ------------------
 1747|     89|        return false;
 1748|       |
 1749|       |    // Sequence numbers with their most significant bit set are not
 1750|       |    // consensus constrained. Testing that the transaction's sequence
 1751|       |    // number do not have this bit set prevents using this property
 1752|       |    // to get around a CHECKSEQUENCEVERIFY check.
 1753|  4.96k|    if (txToSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG)
  ------------------
  |  Branch (1753:9): [True: 68, False: 4.89k]
  ------------------
 1754|     68|        return false;
 1755|       |
 1756|       |    // Mask off any bits that do not have consensus-enforced meaning
 1757|       |    // before doing the integer comparisons
 1758|  4.89k|    const uint32_t nLockTimeMask = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | CTxIn::SEQUENCE_LOCKTIME_MASK;
 1759|  4.89k|    const int64_t txToSequenceMasked = txToSequence & nLockTimeMask;
 1760|  4.89k|    const CScriptNum nSequenceMasked = nSequence & nLockTimeMask;
 1761|       |
 1762|       |    // There are two kinds of nSequence: lock-by-blockheight
 1763|       |    // and lock-by-blocktime, distinguished by whether
 1764|       |    // nSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG.
 1765|       |    //
 1766|       |    // We want to compare apples to apples, so fail the script
 1767|       |    // unless the type of nSequenceMasked being tested is the same as
 1768|       |    // the nSequenceMasked in the transaction.
 1769|  4.89k|    if (!(
  ------------------
  |  Branch (1769:9): [True: 643, False: 4.25k]
  ------------------
 1770|  4.89k|        (txToSequenceMasked <  CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked <  CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) ||
  ------------------
  |  Branch (1770:10): [True: 3.93k, False: 967]
  |  Branch (1770:70): [True: 3.59k, False: 338]
  ------------------
 1771|  4.89k|        (txToSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)
  ------------------
  |  Branch (1771:10): [True: 967, False: 338]
  |  Branch (1771:70): [True: 662, False: 305]
  ------------------
 1772|  4.89k|    )) {
 1773|    643|        return false;
 1774|    643|    }
 1775|       |
 1776|       |    // Now that we know we're comparing apples-to-apples, the
 1777|       |    // comparison is a simple numeric one.
 1778|  4.25k|    if (nSequenceMasked > txToSequenceMasked)
  ------------------
  |  Branch (1778:9): [True: 336, False: 3.91k]
  ------------------
 1779|    336|        return false;
 1780|       |
 1781|  3.91k|    return true;
 1782|  4.25k|}
_Z18ComputeTapleafHashh4SpanIKhE:
 1829|  8.27k|{
 1830|  8.27k|    return (HashWriter{HASHER_TAPLEAF} << leaf_version << CompactSizeWriter(script.size()) << script).GetSHA256();
 1831|  8.27k|}
_Z20ComputeTapbranchHash4SpanIKhES1_:
 1834|  4.02k|{
 1835|  4.02k|    HashWriter ss_branch{HASHER_TAPBRANCH};
 1836|  4.02k|    if (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())) {
  ------------------
  |  Branch (1836:9): [True: 1.90k, False: 2.12k]
  ------------------
 1837|  1.90k|        ss_branch << a << b;
 1838|  2.12k|    } else {
 1839|  2.12k|        ss_branch << b << a;
 1840|  2.12k|    }
 1841|  4.02k|    return ss_branch.GetSHA256();
 1842|  4.02k|}
_Z12VerifyScriptRK7CScriptS1_PK14CScriptWitnessjRK20BaseSignatureCheckerP13ScriptError_t:
 1959|   106k|{
 1960|   106k|    static const CScriptWitness emptyWitness;
 1961|   106k|    if (witness == nullptr) {
  ------------------
  |  Branch (1961:9): [True: 0, False: 106k]
  ------------------
 1962|      0|        witness = &emptyWitness;
 1963|      0|    }
 1964|   106k|    bool hadWitness = false;
 1965|       |
 1966|   106k|    set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
 1967|       |
 1968|   106k|    if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) != 0 && !scriptSig.IsPushOnly()) {
  ------------------
  |  Branch (1968:9): [True: 0, False: 106k]
  |  Branch (1968:53): [True: 0, False: 0]
  ------------------
 1969|      0|        return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
 1970|      0|    }
 1971|       |
 1972|       |    // scriptSig and scriptPubKey must be evaluated sequentially on the same stack
 1973|       |    // rather than being simply concatenated (see CVE-2010-5141)
 1974|   106k|    std::vector<std::vector<unsigned char> > stack, stackCopy;
 1975|   106k|    if (!EvalScript(stack, scriptSig, flags, checker, SigVersion::BASE, serror))
  ------------------
  |  Branch (1975:9): [True: 8.80k, False: 97.3k]
  ------------------
 1976|       |        // serror is set
 1977|  8.80k|        return false;
 1978|  97.3k|    if (flags & SCRIPT_VERIFY_P2SH)
  ------------------
  |  Branch (1978:9): [True: 97.3k, False: 0]
  ------------------
 1979|  97.3k|        stackCopy = stack;
 1980|  97.3k|    if (!EvalScript(stack, scriptPubKey, flags, checker, SigVersion::BASE, serror))
  ------------------
  |  Branch (1980:9): [True: 82.1k, False: 15.1k]
  ------------------
 1981|       |        // serror is set
 1982|  82.1k|        return false;
 1983|  15.1k|    if (stack.empty())
  ------------------
  |  Branch (1983:9): [True: 1.58k, False: 13.5k]
  ------------------
 1984|  1.58k|        return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 1985|  13.5k|    if (CastToBool(stack.back()) == false)
  ------------------
  |  Branch (1985:9): [True: 3.32k, False: 10.2k]
  ------------------
 1986|  3.32k|        return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 1987|       |
 1988|       |    // Bare witness programs
 1989|  10.2k|    int witnessversion;
 1990|  10.2k|    std::vector<unsigned char> witnessprogram;
 1991|  10.2k|    if (flags & SCRIPT_VERIFY_WITNESS) {
  ------------------
  |  Branch (1991:9): [True: 10.2k, False: 0]
  ------------------
 1992|  10.2k|        if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
  ------------------
  |  Branch (1992:13): [True: 4.91k, False: 5.34k]
  ------------------
 1993|  4.91k|            hadWitness = true;
 1994|  4.91k|            if (scriptSig.size() != 0) {
  ------------------
  |  Branch (1994:17): [True: 520, False: 4.39k]
  ------------------
 1995|       |                // The scriptSig must be _exactly_ CScript(), otherwise we reintroduce malleability.
 1996|    520|                return set_error(serror, SCRIPT_ERR_WITNESS_MALLEATED);
 1997|    520|            }
 1998|  4.39k|            if (!VerifyWitnessProgram(*witness, witnessversion, witnessprogram, flags, checker, serror, /*is_p2sh=*/false)) {
  ------------------
  |  Branch (1998:17): [True: 4.39k, False: 0]
  ------------------
 1999|  4.39k|                return false;
 2000|  4.39k|            }
 2001|       |            // Bypass the cleanstack check at the end. The actual stack is obviously not clean
 2002|       |            // for witness programs.
 2003|      0|            stack.resize(1);
 2004|      0|        }
 2005|  10.2k|    }
 2006|       |
 2007|       |    // Additional validation for spend-to-script-hash transactions:
 2008|  5.34k|    if ((flags & SCRIPT_VERIFY_P2SH) && scriptPubKey.IsPayToScriptHash())
  ------------------
  |  Branch (2008:9): [True: 5.34k, False: 0]
  |  Branch (2008:41): [True: 2.44k, False: 2.90k]
  ------------------
 2009|  2.44k|    {
 2010|       |        // scriptSig must be literals-only or validation fails
 2011|  2.44k|        if (!scriptSig.IsPushOnly())
  ------------------
  |  Branch (2011:13): [True: 139, False: 2.30k]
  ------------------
 2012|    139|            return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
 2013|       |
 2014|       |        // Restore stack.
 2015|  2.30k|        swap(stack, stackCopy);
 2016|       |
 2017|       |        // stack cannot be empty here, because if it was the
 2018|       |        // P2SH  HASH <> EQUAL  scriptPubKey would be evaluated with
 2019|       |        // an empty stack and the EvalScript above would return false.
 2020|  2.30k|        assert(!stack.empty());
 2021|       |
 2022|  2.30k|        const valtype& pubKeySerialized = stack.back();
 2023|  2.30k|        CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
 2024|  2.30k|        popstack(stack);
 2025|       |
 2026|  2.30k|        if (!EvalScript(stack, pubKey2, flags, checker, SigVersion::BASE, serror))
  ------------------
  |  Branch (2026:13): [True: 51, False: 2.25k]
  ------------------
 2027|       |            // serror is set
 2028|     51|            return false;
 2029|  2.25k|        if (stack.empty())
  ------------------
  |  Branch (2029:13): [True: 2.21k, False: 40]
  ------------------
 2030|  2.21k|            return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 2031|     40|        if (!CastToBool(stack.back()))
  ------------------
  |  Branch (2031:13): [True: 39, False: 1]
  ------------------
 2032|     39|            return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 2033|       |
 2034|       |        // P2SH witness program
 2035|      1|        if (flags & SCRIPT_VERIFY_WITNESS) {
  ------------------
  |  Branch (2035:13): [True: 1, False: 0]
  ------------------
 2036|      1|            if (pubKey2.IsWitnessProgram(witnessversion, witnessprogram)) {
  ------------------
  |  Branch (2036:17): [True: 0, False: 1]
  ------------------
 2037|      0|                hadWitness = true;
 2038|      0|                if (scriptSig != CScript() << std::vector<unsigned char>(pubKey2.begin(), pubKey2.end())) {
  ------------------
  |  Branch (2038:21): [True: 0, False: 0]
  ------------------
 2039|       |                    // The scriptSig must be _exactly_ a single push of the redeemScript. Otherwise we
 2040|       |                    // reintroduce malleability.
 2041|      0|                    return set_error(serror, SCRIPT_ERR_WITNESS_MALLEATED_P2SH);
 2042|      0|                }
 2043|      0|                if (!VerifyWitnessProgram(*witness, witnessversion, witnessprogram, flags, checker, serror, /*is_p2sh=*/true)) {
  ------------------
  |  Branch (2043:21): [True: 0, False: 0]
  ------------------
 2044|      0|                    return false;
 2045|      0|                }
 2046|       |                // Bypass the cleanstack check at the end. The actual stack is obviously not clean
 2047|       |                // for witness programs.
 2048|      0|                stack.resize(1);
 2049|      0|            }
 2050|      1|        }
 2051|      1|    }
 2052|       |
 2053|       |    // The CLEANSTACK check is only performed after potential P2SH evaluation,
 2054|       |    // as the non-P2SH evaluation of a P2SH script will obviously not result in
 2055|       |    // a clean stack (the P2SH inputs remain). The same holds for witness evaluation.
 2056|  2.91k|    if ((flags & SCRIPT_VERIFY_CLEANSTACK) != 0) {
  ------------------
  |  Branch (2056:9): [True: 2.91k, False: 0]
  ------------------
 2057|       |        // Disallow CLEANSTACK without P2SH, as otherwise a switch CLEANSTACK->P2SH+CLEANSTACK
 2058|       |        // would be possible, which is not a softfork (and P2SH should be one).
 2059|  2.91k|        assert((flags & SCRIPT_VERIFY_P2SH) != 0);
 2060|  2.91k|        assert((flags & SCRIPT_VERIFY_WITNESS) != 0);
 2061|  2.91k|        if (stack.size() != 1) {
  ------------------
  |  Branch (2061:13): [True: 1.22k, False: 1.68k]
  ------------------
 2062|  1.22k|            return set_error(serror, SCRIPT_ERR_CLEANSTACK);
 2063|  1.22k|        }
 2064|  2.91k|    }
 2065|       |
 2066|  1.68k|    if (flags & SCRIPT_VERIFY_WITNESS) {
  ------------------
  |  Branch (2066:9): [True: 1.68k, False: 0]
  ------------------
 2067|       |        // We can't check for correct unexpected witness data if P2SH was off, so require
 2068|       |        // that WITNESS implies P2SH. Otherwise, going from WITNESS->P2SH+WITNESS would be
 2069|       |        // possible, which is not a softfork.
 2070|  1.68k|        assert((flags & SCRIPT_VERIFY_P2SH) != 0);
 2071|  1.68k|        if (!hadWitness && !witness->IsNull()) {
  ------------------
  |  Branch (2071:13): [True: 1.68k, False: 0]
  |  Branch (2071:28): [True: 11, False: 1.67k]
  ------------------
 2072|     11|            return set_error(serror, SCRIPT_ERR_WITNESS_UNEXPECTED);
 2073|     11|        }
 2074|  1.68k|    }
 2075|       |
 2076|  1.67k|    return set_success(serror);
 2077|  1.68k|}
interpreter.cpp:_ZL24IsValidSignatureEncodingRKNSt3__16vectorIhNS_9allocatorIhEEEE:
  107|  2.15k|bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
  108|       |    // Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash]
  109|       |    // * total-length: 1-byte length descriptor of everything that follows,
  110|       |    //   excluding the sighash byte.
  111|       |    // * R-length: 1-byte length descriptor of the R value that follows.
  112|       |    // * R: arbitrary-length big-endian encoded R value. It must use the shortest
  113|       |    //   possible encoding for a positive integer (which means no null bytes at
  114|       |    //   the start, except a single one when the next byte has its highest bit set).
  115|       |    // * S-length: 1-byte length descriptor of the S value that follows.
  116|       |    // * S: arbitrary-length big-endian encoded S value. The same rules apply.
  117|       |    // * sighash: 1-byte value indicating what data is hashed (not part of the DER
  118|       |    //   signature)
  119|       |
  120|       |    // Minimum and maximum size constraints.
  121|  2.15k|    if (sig.size() < 9) return false;
  ------------------
  |  Branch (121:9): [True: 1.61k, False: 540]
  ------------------
  122|    540|    if (sig.size() > 73) return false;
  ------------------
  |  Branch (122:9): [True: 12, False: 528]
  ------------------
  123|       |
  124|       |    // A signature is of type 0x30 (compound).
  125|    528|    if (sig[0] != 0x30) return false;
  ------------------
  |  Branch (125:9): [True: 434, False: 94]
  ------------------
  126|       |
  127|       |    // Make sure the length covers the entire signature.
  128|     94|    if (sig[1] != sig.size() - 3) return false;
  ------------------
  |  Branch (128:9): [True: 94, False: 0]
  ------------------
  129|       |
  130|       |    // Extract the length of the R element.
  131|      0|    unsigned int lenR = sig[3];
  132|       |
  133|       |    // Make sure the length of the S element is still inside the signature.
  134|      0|    if (5 + lenR >= sig.size()) return false;
  ------------------
  |  Branch (134:9): [True: 0, False: 0]
  ------------------
  135|       |
  136|       |    // Extract the length of the S element.
  137|      0|    unsigned int lenS = sig[5 + lenR];
  138|       |
  139|       |    // Verify that the length of the signature matches the sum of the length
  140|       |    // of the elements.
  141|      0|    if ((size_t)(lenR + lenS + 7) != sig.size()) return false;
  ------------------
  |  Branch (141:9): [True: 0, False: 0]
  ------------------
  142|       |
  143|       |    // Check whether the R element is an integer.
  144|      0|    if (sig[2] != 0x02) return false;
  ------------------
  |  Branch (144:9): [True: 0, False: 0]
  ------------------
  145|       |
  146|       |    // Zero-length integers are not allowed for R.
  147|      0|    if (lenR == 0) return false;
  ------------------
  |  Branch (147:9): [True: 0, False: 0]
  ------------------
  148|       |
  149|       |    // Negative numbers are not allowed for R.
  150|      0|    if (sig[4] & 0x80) return false;
  ------------------
  |  Branch (150:9): [True: 0, False: 0]
  ------------------
  151|       |
  152|       |    // Null bytes at the start of R are not allowed, unless R would
  153|       |    // otherwise be interpreted as a negative number.
  154|      0|    if (lenR > 1 && (sig[4] == 0x00) && !(sig[5] & 0x80)) return false;
  ------------------
  |  Branch (154:9): [True: 0, False: 0]
  |  Branch (154:21): [True: 0, False: 0]
  |  Branch (154:41): [True: 0, False: 0]
  ------------------
  155|       |
  156|       |    // Check whether the S element is an integer.
  157|      0|    if (sig[lenR + 4] != 0x02) return false;
  ------------------
  |  Branch (157:9): [True: 0, False: 0]
  ------------------
  158|       |
  159|       |    // Zero-length integers are not allowed for S.
  160|      0|    if (lenS == 0) return false;
  ------------------
  |  Branch (160:9): [True: 0, False: 0]
  ------------------
  161|       |
  162|       |    // Negative numbers are not allowed for S.
  163|      0|    if (sig[lenR + 6] & 0x80) return false;
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|       |
  165|       |    // Null bytes at the start of S are not allowed, unless S would otherwise be
  166|       |    // interpreted as a negative number.
  167|      0|    if (lenS > 1 && (sig[lenR + 6] == 0x00) && !(sig[lenR + 7] & 0x80)) return false;
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  |  Branch (167:21): [True: 0, False: 0]
  |  Branch (167:48): [True: 0, False: 0]
  ------------------
  168|       |
  169|      0|    return true;
  170|      0|}
interpreter.cpp:_ZN12_GLOBAL__N_19set_errorEP13ScriptError_tS0_:
   27|   478k|{
   28|   478k|    if (ret)
  ------------------
  |  Branch (28:9): [True: 210k, False: 268k]
  ------------------
   29|   210k|        *ret = serror;
   30|   478k|    return false;
   31|   478k|}
interpreter.cpp:_ZNK12_GLOBAL__N_114ConditionStack8all_trueEv:
  284|  5.81M|    bool all_true() const { return m_first_false_pos == NO_FALSE; }
interpreter.cpp:_ZL8popstackRNSt3__16vectorINS0_IhNS_9allocatorIhEEEENS1_IS3_EEEE:
   57|   432k|{
   58|   432k|    if (stack.empty())
  ------------------
  |  Branch (58:9): [True: 0, False: 432k]
  ------------------
   59|      0|        throw std::runtime_error("popstack(): stack empty");
   60|   432k|    stack.pop_back();
   61|   432k|}
interpreter.cpp:_ZN12_GLOBAL__N_114ConditionStack9push_backEb:
  286|   150k|    {
  287|   150k|        if (m_first_false_pos == NO_FALSE && !f) {
  ------------------
  |  Branch (287:13): [True: 119k, False: 30.9k]
  |  Branch (287:46): [True: 1.85k, False: 117k]
  ------------------
  288|       |            // The stack consists of all true values, and a false is added.
  289|       |            // The first false value will appear at the current size.
  290|  1.85k|            m_first_false_pos = m_stack_size;
  291|  1.85k|        }
  292|   150k|        ++m_stack_size;
  293|   150k|    }
interpreter.cpp:_ZNK12_GLOBAL__N_114ConditionStack5emptyEv:
  283|   164k|    bool empty() const { return m_stack_size == 0; }
interpreter.cpp:_ZN12_GLOBAL__N_114ConditionStack10toggle_topEv:
  304|  1.71k|    {
  305|  1.71k|        assert(m_stack_size > 0);
  306|  1.71k|        if (m_first_false_pos == NO_FALSE) {
  ------------------
  |  Branch (306:13): [True: 775, False: 943]
  ------------------
  307|       |            // The current stack is all true values; the first false will be the top.
  308|    775|            m_first_false_pos = m_stack_size - 1;
  309|    943|        } else if (m_first_false_pos == m_stack_size - 1) {
  ------------------
  |  Branch (309:20): [True: 626, False: 317]
  ------------------
  310|       |            // The top is the first false value; toggling it will make everything true.
  311|    626|            m_first_false_pos = NO_FALSE;
  312|    626|        } else {
  313|       |            // There is a false value, but not on top. No action is needed as toggling
  314|       |            // anything but the first false value is unobservable.
  315|    317|        }
  316|  1.71k|    }
interpreter.cpp:_ZN12_GLOBAL__N_114ConditionStack8pop_backEv:
  295|    866|    {
  296|    866|        assert(m_stack_size > 0);
  297|    866|        --m_stack_size;
  298|    866|        if (m_first_false_pos == m_stack_size) {
  ------------------
  |  Branch (298:13): [True: 446, False: 420]
  ------------------
  299|       |            // When popping off the first false value, everything becomes true.
  300|    446|            m_first_false_pos = NO_FALSE;
  301|    446|        }
  302|    866|    }
interpreter.cpp:_ZL12EvalChecksigRKNSt3__16vectorIhNS_9allocatorIhEEEES5_N9prevectorILj28EhjiE14const_iteratorES8_R19ScriptExecutionDatajRK20BaseSignatureChecker10SigVersionP13ScriptError_tRb:
  392|  5.84k|{
  393|  5.84k|    switch (sigversion) {
  ------------------
  |  Branch (393:13): [True: 0, False: 5.84k]
  ------------------
  394|  5.84k|    case SigVersion::BASE:
  ------------------
  |  Branch (394:5): [True: 5.84k, False: 0]
  ------------------
  395|  5.84k|    case SigVersion::WITNESS_V0:
  ------------------
  |  Branch (395:5): [True: 0, False: 5.84k]
  ------------------
  396|  5.84k|        return EvalChecksigPreTapscript(sig, pubkey, pbegincodehash, pend, flags, checker, sigversion, serror, success);
  397|      0|    case SigVersion::TAPSCRIPT:
  ------------------
  |  Branch (397:5): [True: 0, False: 5.84k]
  ------------------
  398|      0|        return EvalChecksigTapscript(sig, pubkey, execdata, flags, checker, sigversion, serror, success);
  399|      0|    case SigVersion::TAPROOT:
  ------------------
  |  Branch (399:5): [True: 0, False: 5.84k]
  ------------------
  400|       |        // Key path spending in Taproot has no script, so this is unreachable.
  401|      0|        break;
  402|  5.84k|    }
  403|      0|    assert(false);
  404|      0|}
interpreter.cpp:_ZL24EvalChecksigPreTapscriptRKNSt3__16vectorIhNS_9allocatorIhEEEES5_N9prevectorILj28EhjiE14const_iteratorES8_jRK20BaseSignatureChecker10SigVersionP13ScriptError_tRb:
  321|  5.84k|{
  322|  5.84k|    assert(sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0);
  323|       |
  324|       |    // Subset of script starting at the most recent codeseparator
  325|  5.84k|    CScript scriptCode(pbegincodehash, pend);
  326|       |
  327|       |    // Drop the signature in pre-segwit scripts but not segwit scripts
  328|  5.84k|    if (sigversion == SigVersion::BASE) {
  ------------------
  |  Branch (328:9): [True: 5.84k, False: 0]
  ------------------
  329|  5.84k|        int found = FindAndDelete(scriptCode, CScript() << vchSig);
  330|  5.84k|        if (found > 0 && (flags & SCRIPT_VERIFY_CONST_SCRIPTCODE))
  ------------------
  |  Branch (330:13): [True: 1.39k, False: 4.45k]
  |  Branch (330:26): [True: 1.36k, False: 31]
  ------------------
  331|  1.36k|            return set_error(serror, SCRIPT_ERR_SIG_FINDANDDELETE);
  332|  5.84k|    }
  333|       |
  334|  4.48k|    if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, sigversion, serror)) {
  ------------------
  |  Branch (334:9): [True: 1.16k, False: 3.32k]
  |  Branch (334:59): [True: 2.13k, False: 1.18k]
  ------------------
  335|       |        //serror is set
  336|  3.29k|        return false;
  337|  3.29k|    }
  338|  1.18k|    fSuccess = checker.CheckECDSASignature(vchSig, vchPubKey, scriptCode, sigversion);
  339|       |
  340|  1.18k|    if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL) && vchSig.size())
  ------------------
  |  Branch (340:9): [True: 1.18k, False: 0]
  |  Branch (340:22): [True: 1.18k, False: 0]
  |  Branch (340:58): [True: 0, False: 1.18k]
  ------------------
  341|      0|        return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL);
  342|       |
  343|  1.18k|    return true;
  344|  1.18k|}
interpreter.cpp:_ZL19CheckPubKeyEncodingRKNSt3__16vectorIhNS_9allocatorIhEEEEjRK10SigVersionP13ScriptError_t:
  217|  4.11k|bool static CheckPubKeyEncoding(const valtype &vchPubKey, unsigned int flags, const SigVersion &sigversion, ScriptError* serror) {
  218|  4.11k|    if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchPubKey)) {
  ------------------
  |  Branch (218:9): [True: 4.11k, False: 0]
  |  Branch (218:51): [True: 2.92k, False: 1.18k]
  ------------------
  219|  2.92k|        return set_error(serror, SCRIPT_ERR_PUBKEYTYPE);
  220|  2.92k|    }
  221|       |    // Only compressed keys are accepted in segwit
  222|  1.18k|    if ((flags & SCRIPT_VERIFY_WITNESS_PUBKEYTYPE) != 0 && sigversion == SigVersion::WITNESS_V0 && !IsCompressedPubKey(vchPubKey)) {
  ------------------
  |  Branch (222:9): [True: 1.18k, False: 1]
  |  Branch (222:60): [True: 0, False: 1.18k]
  |  Branch (222:100): [True: 0, False: 0]
  ------------------
  223|      0|        return set_error(serror, SCRIPT_ERR_WITNESS_PUBKEYTYPE);
  224|      0|    }
  225|  1.18k|    return true;
  226|  1.18k|}
interpreter.cpp:_ZL32IsCompressedOrUncompressedPubKeyRKNSt3__16vectorIhNS_9allocatorIhEEEE:
   63|  4.11k|bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
   64|  4.11k|    if (vchPubKey.size() < CPubKey::COMPRESSED_SIZE) {
  ------------------
  |  Branch (64:9): [True: 1.92k, False: 2.19k]
  ------------------
   65|       |        //  Non-canonical public key: too short
   66|  1.92k|        return false;
   67|  1.92k|    }
   68|  2.19k|    if (vchPubKey[0] == 0x04) {
  ------------------
  |  Branch (68:9): [True: 1.38k, False: 809]
  ------------------
   69|  1.38k|        if (vchPubKey.size() != CPubKey::SIZE) {
  ------------------
  |  Branch (69:13): [True: 277, False: 1.10k]
  ------------------
   70|       |            //  Non-canonical public key: invalid length for uncompressed key
   71|    277|            return false;
   72|    277|        }
   73|  1.38k|    } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) {
  ------------------
  |  Branch (73:16): [True: 340, False: 469]
  |  Branch (73:40): [True: 36, False: 433]
  ------------------
   74|    376|        if (vchPubKey.size() != CPubKey::COMPRESSED_SIZE) {
  ------------------
  |  Branch (74:13): [True: 297, False: 79]
  ------------------
   75|       |            //  Non-canonical public key: invalid length for compressed key
   76|    297|            return false;
   77|    297|        }
   78|    433|    } else {
   79|       |        //  Non-canonical public key: neither compressed nor uncompressed
   80|    433|        return false;
   81|    433|    }
   82|  1.18k|    return true;
   83|  2.19k|}
interpreter.cpp:_ZN12_GLOBAL__N_111set_successEP13ScriptError_t:
   20|   161k|{
   21|   161k|    if (ret)
  ------------------
  |  Branch (21:9): [True: 63.0k, False: 97.9k]
  ------------------
   22|  63.0k|        *ret = SCRIPT_ERR_OK;
   23|   161k|    return true;
   24|   161k|}
interpreter.cpp:_ZN12_GLOBAL__N_121GetSpentAmountsSHA256ERKNSt3__16vectorI6CTxOutNS0_9allocatorIS2_EEEE:
 1376|  1.24k|{
 1377|  1.24k|    HashWriter ss{};
 1378|  1.71k|    for (const auto& txout : outputs_spent) {
  ------------------
  |  Branch (1378:28): [True: 1.71k, False: 1.24k]
  ------------------
 1379|  1.71k|        ss << txout.nValue;
 1380|  1.71k|    }
 1381|  1.24k|    return ss.GetSHA256();
 1382|  1.24k|}
interpreter.cpp:_ZN12_GLOBAL__N_121GetSpentScriptsSHA256ERKNSt3__16vectorI6CTxOutNS0_9allocatorIS2_EEEE:
 1386|  1.24k|{
 1387|  1.24k|    HashWriter ss{};
 1388|  1.71k|    for (const auto& txout : outputs_spent) {
  ------------------
  |  Branch (1388:28): [True: 1.71k, False: 1.24k]
  ------------------
 1389|  1.71k|        ss << txout.scriptPubKey;
 1390|  1.71k|    }
 1391|  1.24k|    return ss.GetSHA256();
 1392|  1.24k|}
interpreter.cpp:_ZL20VerifyWitnessProgramRK14CScriptWitnessiRKNSt3__16vectorIhNS2_9allocatorIhEEEEjRK20BaseSignatureCheckerP13ScriptError_tb:
 1874|  4.39k|{
 1875|  4.39k|    CScript exec_script; //!< Actually executed script (last stack item in P2WSH; implied P2PKH script in P2WPKH; leaf script in P2TR)
 1876|  4.39k|    Span stack{witness.stack};
 1877|  4.39k|    ScriptExecutionData execdata;
 1878|       |
 1879|  4.39k|    if (witversion == 0) {
  ------------------
  |  Branch (1879:9): [True: 1.31k, False: 3.07k]
  ------------------
 1880|  1.31k|        if (program.size() == WITNESS_V0_SCRIPTHASH_SIZE) {
  ------------------
  |  Branch (1880:13): [True: 692, False: 621]
  ------------------
 1881|       |            // BIP141 P2WSH: 32-byte witness v0 program (which encodes SHA256(script))
 1882|    692|            if (stack.size() == 0) {
  ------------------
  |  Branch (1882:17): [True: 637, False: 55]
  ------------------
 1883|    637|                return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY);
 1884|    637|            }
 1885|     55|            const valtype& script_bytes = SpanPopBack(stack);
 1886|     55|            exec_script = CScript(script_bytes.begin(), script_bytes.end());
 1887|     55|            uint256 hash_exec_script;
 1888|     55|            CSHA256().Write(exec_script.data(), exec_script.size()).Finalize(hash_exec_script.begin());
 1889|     55|            if (memcmp(hash_exec_script.begin(), program.data(), 32)) {
  ------------------
  |  Branch (1889:17): [True: 6, False: 49]
  ------------------
 1890|      6|                return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH);
 1891|      6|            }
 1892|     49|            return ExecuteWitnessScript(stack, exec_script, flags, SigVersion::WITNESS_V0, checker, execdata, serror);
 1893|    621|        } else if (program.size() == WITNESS_V0_KEYHASH_SIZE) {
  ------------------
  |  Branch (1893:20): [True: 0, False: 621]
  ------------------
 1894|       |            // BIP141 P2WPKH: 20-byte witness v0 program (which encodes Hash160(pubkey))
 1895|      0|            if (stack.size() != 2) {
  ------------------
  |  Branch (1895:17): [True: 0, False: 0]
  ------------------
 1896|      0|                return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH); // 2 items in witness
 1897|      0|            }
 1898|      0|            exec_script << OP_DUP << OP_HASH160 << program << OP_EQUALVERIFY << OP_CHECKSIG;
 1899|      0|            return ExecuteWitnessScript(stack, exec_script, flags, SigVersion::WITNESS_V0, checker, execdata, serror);
 1900|    621|        } else {
 1901|    621|            return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH);
 1902|    621|        }
 1903|  3.07k|    } else if (witversion == 1 && program.size() == WITNESS_V1_TAPROOT_SIZE && !is_p2sh) {
  ------------------
  |  Branch (1903:16): [True: 1.81k, False: 1.26k]
  |  Branch (1903:35): [True: 657, False: 1.15k]
  |  Branch (1903:80): [True: 657, False: 0]
  ------------------
 1904|       |        // BIP341 Taproot: 32-byte non-P2SH witness v1 program (which encodes a P2C-tweaked pubkey)
 1905|    657|        if (!(flags & SCRIPT_VERIFY_TAPROOT)) return set_success(serror);
  ------------------
  |  Branch (1905:13): [True: 0, False: 657]
  ------------------
 1906|    657|        if (stack.size() == 0) return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY);
  ------------------
  |  Branch (1906:13): [True: 657, False: 0]
  ------------------
 1907|      0|        if (stack.size() >= 2 && !stack.back().empty() && stack.back()[0] == ANNEX_TAG) {
  ------------------
  |  Branch (1907:13): [True: 0, False: 0]
  |  Branch (1907:34): [True: 0, False: 0]
  |  Branch (1907:59): [True: 0, False: 0]
  ------------------
 1908|       |            // Drop annex (this is non-standard; see IsWitnessStandard)
 1909|      0|            const valtype& annex = SpanPopBack(stack);
 1910|      0|            execdata.m_annex_hash = (HashWriter{} << annex).GetSHA256();
 1911|      0|            execdata.m_annex_present = true;
 1912|      0|        } else {
 1913|      0|            execdata.m_annex_present = false;
 1914|      0|        }
 1915|      0|        execdata.m_annex_init = true;
 1916|      0|        if (stack.size() == 1) {
  ------------------
  |  Branch (1916:13): [True: 0, False: 0]
  ------------------
 1917|       |            // Key path spending (stack size is 1 after removing optional annex)
 1918|      0|            if (!checker.CheckSchnorrSignature(stack.front(), program, SigVersion::TAPROOT, execdata, serror)) {
  ------------------
  |  Branch (1918:17): [True: 0, False: 0]
  ------------------
 1919|      0|                return false; // serror is set
 1920|      0|            }
 1921|      0|            return set_success(serror);
 1922|      0|        } else {
 1923|       |            // Script path spending (stack size is >1 after removing optional annex)
 1924|      0|            const valtype& control = SpanPopBack(stack);
 1925|      0|            const valtype& script = SpanPopBack(stack);
 1926|      0|            if (control.size() < TAPROOT_CONTROL_BASE_SIZE || control.size() > TAPROOT_CONTROL_MAX_SIZE || ((control.size() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE) != 0) {
  ------------------
  |  Branch (1926:17): [True: 0, False: 0]
  |  Branch (1926:63): [True: 0, False: 0]
  |  Branch (1926:108): [True: 0, False: 0]
  ------------------
 1927|      0|                return set_error(serror, SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE);
 1928|      0|            }
 1929|      0|            execdata.m_tapleaf_hash = ComputeTapleafHash(control[0] & TAPROOT_LEAF_MASK, script);
 1930|      0|            if (!VerifyTaprootCommitment(control, program, execdata.m_tapleaf_hash)) {
  ------------------
  |  Branch (1930:17): [True: 0, False: 0]
  ------------------
 1931|      0|                return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH);
 1932|      0|            }
 1933|      0|            execdata.m_tapleaf_hash_init = true;
 1934|      0|            if ((control[0] & TAPROOT_LEAF_MASK) == TAPROOT_LEAF_TAPSCRIPT) {
  ------------------
  |  Branch (1934:17): [True: 0, False: 0]
  ------------------
 1935|       |                // Tapscript (leaf version 0xc0)
 1936|      0|                exec_script = CScript(script.begin(), script.end());
 1937|      0|                execdata.m_validation_weight_left = ::GetSerializeSize(witness.stack) + VALIDATION_WEIGHT_OFFSET;
 1938|      0|                execdata.m_validation_weight_left_init = true;
 1939|      0|                return ExecuteWitnessScript(stack, exec_script, flags, SigVersion::TAPSCRIPT, checker, execdata, serror);
 1940|      0|            }
 1941|      0|            if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION) {
  ------------------
  |  Branch (1941:17): [True: 0, False: 0]
  ------------------
 1942|      0|                return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION);
 1943|      0|            }
 1944|      0|            return set_success(serror);
 1945|      0|        }
 1946|  2.42k|    } else if (!is_p2sh && CScript::IsPayToAnchor(witversion, program)) {
  ------------------
  |  Branch (1946:16): [True: 2.42k, False: 0]
  |  Branch (1946:28): [True: 0, False: 2.42k]
  ------------------
 1947|      0|        return true;
 1948|  2.42k|    } else {
 1949|  2.42k|        if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM) {
  ------------------
  |  Branch (1949:13): [True: 2.42k, False: 0]
  ------------------
 1950|  2.42k|            return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM);
 1951|  2.42k|        }
 1952|       |        // Other version/size/p2sh combinations return true for future softfork compatibility
 1953|      0|        return true;
 1954|  2.42k|    }
 1955|       |    // There is intentionally no return statement here, to be able to use "control reaches end of non-void function" warnings to detect gaps in the logic above.
 1956|  4.39k|}
interpreter.cpp:_ZL20ExecuteWitnessScriptRK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEERK7CScriptj10SigVersionRK20BaseSignatureCheckerR19ScriptExecutionDataP13ScriptError_t:
 1789|     49|{
 1790|     49|    std::vector<valtype> stack{stack_span.begin(), stack_span.end()};
 1791|       |
 1792|     49|    if (sigversion == SigVersion::TAPSCRIPT) {
  ------------------
  |  Branch (1792:9): [True: 0, False: 49]
  ------------------
 1793|       |        // OP_SUCCESSx processing overrides everything, including stack element size limits
 1794|      0|        CScript::const_iterator pc = exec_script.begin();
 1795|      0|        while (pc < exec_script.end()) {
  ------------------
  |  Branch (1795:16): [True: 0, False: 0]
  ------------------
 1796|      0|            opcodetype opcode;
 1797|      0|            if (!exec_script.GetOp(pc, opcode)) {
  ------------------
  |  Branch (1797:17): [True: 0, False: 0]
  ------------------
 1798|       |                // Note how this condition would not be reached if an unknown OP_SUCCESSx was found
 1799|      0|                return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
 1800|      0|            }
 1801|       |            // New opcodes will be listed here. May use a different sigversion to modify existing opcodes.
 1802|      0|            if (IsOpSuccess(opcode)) {
  ------------------
  |  Branch (1802:17): [True: 0, False: 0]
  ------------------
 1803|      0|                if (flags & SCRIPT_VERIFY_DISCOURAGE_OP_SUCCESS) {
  ------------------
  |  Branch (1803:21): [True: 0, False: 0]
  ------------------
 1804|      0|                    return set_error(serror, SCRIPT_ERR_DISCOURAGE_OP_SUCCESS);
 1805|      0|                }
 1806|      0|                return set_success(serror);
 1807|      0|            }
 1808|      0|        }
 1809|       |
 1810|       |        // Tapscript enforces initial stack size limits (altstack is empty here)
 1811|      0|        if (stack.size() > MAX_STACK_SIZE) return set_error(serror, SCRIPT_ERR_STACK_SIZE);
  ------------------
  |  Branch (1811:13): [True: 0, False: 0]
  ------------------
 1812|      0|    }
 1813|       |
 1814|       |    // Disallow stack item size > MAX_SCRIPT_ELEMENT_SIZE in witness stack
 1815|     49|    for (const valtype& elem : stack) {
  ------------------
  |  Branch (1815:30): [True: 5, False: 49]
  ------------------
 1816|      5|        if (elem.size() > MAX_SCRIPT_ELEMENT_SIZE) return set_error(serror, SCRIPT_ERR_PUSH_SIZE);
  ------------------
  |  Branch (1816:13): [True: 0, False: 5]
  ------------------
 1817|      5|    }
 1818|       |
 1819|       |    // Run the script interpreter.
 1820|     49|    if (!EvalScript(stack, exec_script, flags, checker, sigversion, execdata, serror)) return false;
  ------------------
  |  Branch (1820:9): [True: 49, False: 0]
  ------------------
 1821|       |
 1822|       |    // Scripts inside witness implicitly require cleanstack behaviour
 1823|      0|    if (stack.size() != 1) return set_error(serror, SCRIPT_ERR_CLEANSTACK);
  ------------------
  |  Branch (1823:9): [True: 0, False: 0]
  ------------------
 1824|      0|    if (!CastToBool(stack.back())) return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
  ------------------
  |  Branch (1824:9): [True: 0, False: 0]
  ------------------
 1825|      0|    return true;
 1826|      0|}
interpreter.cpp:_ZN12_GLOBAL__N_117GetPrevoutsSHA256I12CTransactionEE7uint256RKT_:
 1344|  2.78k|{
 1345|  2.78k|    HashWriter ss{};
 1346|   104k|    for (const auto& txin : txTo.vin) {
  ------------------
  |  Branch (1346:27): [True: 104k, False: 2.78k]
  ------------------
 1347|   104k|        ss << txin.prevout;
 1348|   104k|    }
 1349|  2.78k|    return ss.GetSHA256();
 1350|  2.78k|}
interpreter.cpp:_ZN12_GLOBAL__N_118GetSequencesSHA256I12CTransactionEE7uint256RKT_:
 1355|  2.78k|{
 1356|  2.78k|    HashWriter ss{};
 1357|   104k|    for (const auto& txin : txTo.vin) {
  ------------------
  |  Branch (1357:27): [True: 104k, False: 2.78k]
  ------------------
 1358|   104k|        ss << txin.nSequence;
 1359|   104k|    }
 1360|  2.78k|    return ss.GetSHA256();
 1361|  2.78k|}
interpreter.cpp:_ZN12_GLOBAL__N_116GetOutputsSHA256I12CTransactionEE7uint256RKT_:
 1366|  2.78k|{
 1367|  2.78k|    HashWriter ss{};
 1368|  11.7k|    for (const auto& txout : txTo.vout) {
  ------------------
  |  Branch (1368:28): [True: 11.7k, False: 2.78k]
  ------------------
 1369|  11.7k|        ss << txout;
 1370|  11.7k|    }
 1371|  2.78k|    return ss.GetSHA256();
 1372|  2.78k|}
interpreter.cpp:_ZN12_GLOBAL__N_117GetPrevoutsSHA256I19CMutableTransactionEE7uint256RKT_:
 1344|  3.15k|{
 1345|  3.15k|    HashWriter ss{};
 1346|  3.15k|    for (const auto& txin : txTo.vin) {
  ------------------
  |  Branch (1346:27): [True: 2.28k, False: 3.15k]
  ------------------
 1347|  2.28k|        ss << txin.prevout;
 1348|  2.28k|    }
 1349|  3.15k|    return ss.GetSHA256();
 1350|  3.15k|}
interpreter.cpp:_ZN12_GLOBAL__N_118GetSequencesSHA256I19CMutableTransactionEE7uint256RKT_:
 1355|  3.15k|{
 1356|  3.15k|    HashWriter ss{};
 1357|  3.15k|    for (const auto& txin : txTo.vin) {
  ------------------
  |  Branch (1357:27): [True: 2.28k, False: 3.15k]
  ------------------
 1358|  2.28k|        ss << txin.nSequence;
 1359|  2.28k|    }
 1360|  3.15k|    return ss.GetSHA256();
 1361|  3.15k|}
interpreter.cpp:_ZN12_GLOBAL__N_116GetOutputsSHA256I19CMutableTransactionEE7uint256RKT_:
 1366|  3.15k|{
 1367|  3.15k|    HashWriter ss{};
 1368|  3.15k|    for (const auto& txout : txTo.vout) {
  ------------------
  |  Branch (1368:28): [True: 994, False: 3.15k]
  ------------------
 1369|    994|        ss << txout;
 1370|    994|    }
 1371|  3.15k|    return ss.GetSHA256();
 1372|  3.15k|}

_ZNK20BaseSignatureChecker19CheckECDSASignatureERKNSt3__16vectorIhNS0_9allocatorIhEEEES6_RK7CScript10SigVersion:
  249|      1|    {
  250|      1|        return false;
  251|      1|    }
_ZN25DeferringSignatureCheckerC2ERK20BaseSignatureChecker:
  315|  53.1k|    DeferringSignatureChecker(const BaseSignatureChecker& checker) : m_checker(checker) {}
_ZNK25DeferringSignatureChecker13CheckLockTimeERK10CScriptNum:
  328|  3.64k|    {
  329|  3.64k|        return m_checker.CheckLockTime(nLockTime);
  330|  3.64k|    }
_ZNK25DeferringSignatureChecker13CheckSequenceERK10CScriptNum:
  332|  5.05k|    {
  333|  5.05k|        return m_checker.CheckSequence(nSequence);
  334|  5.05k|    }
_ZN20BaseSignatureCheckerD2Ev:
  268|   159k|    virtual ~BaseSignatureChecker() = default;
_ZN26PrecomputedTransactionDataC2Ev:
  174|  5.94k|    PrecomputedTransactionData() = default;
_ZN34GenericTransactionSignatureCheckerI19CMutableTransactionEC2EPKS0_jRKlRK26PrecomputedTransactionData19MissingDataBehavior:
  299|  54.9k|    GenericTransactionSignatureChecker(const T* txToIn, unsigned int nInIn, const CAmount& amountIn, const PrecomputedTransactionData& txdataIn, MissingDataBehavior mdb) : txTo(txToIn), m_mdb(mdb), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {}
_ZN34GenericTransactionSignatureCheckerI12CTransactionEC2EPKS0_jRKlRK26PrecomputedTransactionData19MissingDataBehavior:
  299|  52.0k|    GenericTransactionSignatureChecker(const T* txToIn, unsigned int nInIn, const CAmount& amountIn, const PrecomputedTransactionData& txdataIn, MissingDataBehavior mdb) : txTo(txToIn), m_mdb(mdb), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {}
_ZN34GenericTransactionSignatureCheckerI19CMutableTransactionEC2EPKS0_jRKl19MissingDataBehavior:
  298|  53.1k|    GenericTransactionSignatureChecker(const T* txToIn, unsigned int nInIn, const CAmount& amountIn, MissingDataBehavior mdb) : txTo(txToIn), m_mdb(mdb), nIn(nInIn), amount(amountIn), txdata(nullptr) {}

_ZltRK13KeyOriginInfoS1_:
   22|    507|    {
   23|       |        // Compare the fingerprints lexicographically
   24|    507|        int fpr_cmp = memcmp(a.fingerprint, b.fingerprint, 4);
   25|    507|        if (fpr_cmp < 0) {
  ------------------
  |  Branch (25:13): [True: 69, False: 438]
  ------------------
   26|     69|            return true;
   27|    438|        } else if (fpr_cmp > 0) {
  ------------------
  |  Branch (27:20): [True: 30, False: 408]
  ------------------
   28|     30|            return false;
   29|     30|        }
   30|       |        // Compare the sizes of the paths, shorter is "less than"
   31|    408|        if (a.path.size() < b.path.size()) {
  ------------------
  |  Branch (31:13): [True: 4, False: 404]
  ------------------
   32|      4|            return true;
   33|    404|        } else if (a.path.size() > b.path.size()) {
  ------------------
  |  Branch (33:20): [True: 4, False: 400]
  ------------------
   34|      4|            return false;
   35|      4|        }
   36|       |        // Paths same length, compare them lexicographically
   37|    400|        return a.path < b.path;
   38|    408|    }
_ZN13KeyOriginInfo5clearEv:
   43|  23.2k|    {
   44|  23.2k|        memset(fingerprint, 0, 4);
   45|  23.2k|        path.clear();
   46|  23.2k|    }

_ZN10miniscript8internal12SanitizeTypeENS_4TypeE:
   19|  15.5M|Type SanitizeType(Type e) {
   20|  15.5M|    int num_types = (e << "K"_mst) + (e << "V"_mst) + (e << "B"_mst) + (e << "W"_mst);
   21|  15.5M|    if (num_types == 0) return ""_mst; // No valid type, don't care about the rest
  ------------------
  |  Branch (21:9): [True: 8.49M, False: 7.03M]
  ------------------
   22|  7.03M|    assert(num_types == 1); // K, V, B, W all conflict with each other
   23|  7.03M|    assert(!(e << "z"_mst) || !(e << "o"_mst)); // z conflicts with o
   24|  7.03M|    assert(!(e << "n"_mst) || !(e << "z"_mst)); // n conflicts with z
   25|  7.03M|    assert(!(e << "n"_mst) || !(e << "W"_mst)); // n conflicts with W
   26|  7.03M|    assert(!(e << "V"_mst) || !(e << "d"_mst)); // V conflicts with d
   27|  7.03M|    assert(!(e << "K"_mst) ||  (e << "u"_mst)); // K implies u
   28|  7.03M|    assert(!(e << "V"_mst) || !(e << "u"_mst)); // V conflicts with u
   29|  7.03M|    assert(!(e << "e"_mst) || !(e << "f"_mst)); // e conflicts with f
   30|  7.03M|    assert(!(e << "e"_mst) ||  (e << "d"_mst)); // e implies d
   31|  7.03M|    assert(!(e << "V"_mst) || !(e << "e"_mst)); // V conflicts with e
   32|  7.03M|    assert(!(e << "d"_mst) || !(e << "f"_mst)); // d conflicts with f
   33|  7.03M|    assert(!(e << "V"_mst) ||  (e << "f"_mst)); // V implies f
   34|  7.03M|    assert(!(e << "K"_mst) ||  (e << "s"_mst)); // K implies s
   35|  7.03M|    assert(!(e << "z"_mst) ||  (e << "m"_mst)); // z implies m
   36|  7.03M|    return e;
   37|  7.03M|}
_ZN10miniscript8internal11ComputeTypeENS_8FragmentENS_4TypeES2_S2_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEjmmmNS_17MiniscriptContextE:
   40|  15.5M|                 size_t data_size, size_t n_subs, size_t n_keys, MiniscriptContext ms_ctx) {
   41|       |    // Sanity check on data
   42|  15.5M|    if (fragment == Fragment::SHA256 || fragment == Fragment::HASH256) {
  ------------------
  |  Branch (42:9): [True: 97, False: 15.5M]
  |  Branch (42:41): [True: 43, False: 15.5M]
  ------------------
   43|    140|        assert(data_size == 32);
   44|  15.5M|    } else if (fragment == Fragment::RIPEMD160 || fragment == Fragment::HASH160) {
  ------------------
  |  Branch (44:16): [True: 230, False: 15.5M]
  |  Branch (44:51): [True: 397, False: 15.5M]
  ------------------
   45|    627|        assert(data_size == 20);
   46|  15.5M|    } else {
   47|  15.5M|        assert(data_size == 0);
   48|  15.5M|    }
   49|       |    // Sanity check on k
   50|  15.5M|    if (fragment == Fragment::OLDER || fragment == Fragment::AFTER) {
  ------------------
  |  Branch (50:9): [True: 3.38k, False: 15.5M]
  |  Branch (50:40): [True: 6.73k, False: 15.5M]
  ------------------
   51|  10.1k|        assert(k >= 1 && k < 0x80000000UL);
   52|  15.5M|    } else if (fragment == Fragment::MULTI || fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (52:16): [True: 506, False: 15.5M]
  |  Branch (52:47): [True: 58, False: 15.5M]
  ------------------
   53|    564|        assert(k >= 1 && k <= n_keys);
   54|  15.5M|    } else if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (54:16): [True: 4.35k, False: 15.5M]
  ------------------
   55|  4.35k|        assert(k >= 1 && k <= n_subs);
   56|  15.5M|    } else {
   57|  15.5M|        assert(k == 0);
   58|  15.5M|    }
   59|       |    // Sanity check on subs
   60|  15.5M|    if (fragment == Fragment::AND_V || fragment == Fragment::AND_B || fragment == Fragment::OR_B ||
  ------------------
  |  Branch (60:9): [True: 4.83M, False: 10.6M]
  |  Branch (60:40): [True: 6.12k, False: 10.6M]
  |  Branch (60:71): [True: 2.86k, False: 10.6M]
  ------------------
   61|  15.5M|        fragment == Fragment::OR_C || fragment == Fragment::OR_I || fragment == Fragment::OR_D) {
  ------------------
  |  Branch (61:9): [True: 7.71k, False: 10.6M]
  |  Branch (61:39): [True: 1.71M, False: 8.96M]
  |  Branch (61:69): [True: 2.77k, False: 8.96M]
  ------------------
   62|  6.56M|        assert(n_subs == 2);
   63|  8.96M|    } else if (fragment == Fragment::ANDOR) {
  ------------------
  |  Branch (63:16): [True: 4.36k, False: 8.95M]
  ------------------
   64|  4.36k|        assert(n_subs == 3);
   65|  8.95M|    } else if (fragment == Fragment::WRAP_A || fragment == Fragment::WRAP_S || fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (65:16): [True: 53.8k, False: 8.90M]
  |  Branch (65:48): [True: 30.5k, False: 8.87M]
  |  Branch (65:80): [True: 1.89M, False: 6.97M]
  ------------------
   66|  8.95M|               fragment == Fragment::WRAP_D || fragment == Fragment::WRAP_V || fragment == Fragment::WRAP_J ||
  ------------------
  |  Branch (66:16): [True: 44.2k, False: 6.93M]
  |  Branch (66:48): [True: 21.3k, False: 6.91M]
  |  Branch (66:80): [True: 12.5k, False: 6.89M]
  ------------------
   67|  8.95M|               fragment == Fragment::WRAP_N) {
  ------------------
  |  Branch (67:16): [True: 254k, False: 6.64M]
  ------------------
   68|  2.31M|        assert(n_subs == 1);
   69|  6.64M|    } else if (fragment != Fragment::THRESH) {
  ------------------
  |  Branch (69:16): [True: 6.63M, False: 4.35k]
  ------------------
   70|  6.63M|        assert(n_subs == 0);
   71|  6.63M|    }
   72|       |    // Sanity check on keys
   73|  15.5M|    if (fragment == Fragment::PK_K || fragment == Fragment::PK_H) {
  ------------------
  |  Branch (73:9): [True: 3.72k, False: 15.5M]
  |  Branch (73:39): [True: 1.44k, False: 15.5M]
  ------------------
   74|  5.17k|        assert(n_keys == 1);
   75|  15.5M|    } else if (fragment == Fragment::MULTI) {
  ------------------
  |  Branch (75:16): [True: 506, False: 15.5M]
  ------------------
   76|    506|        assert(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTISIG);
   77|    506|        assert(!IsTapscript(ms_ctx));
   78|  15.5M|    } else if (fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (78:16): [True: 58, False: 15.5M]
  ------------------
   79|     58|        assert(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTI_A);
   80|     58|        assert(IsTapscript(ms_ctx));
   81|  15.5M|    } else {
   82|  15.5M|        assert(n_keys == 0);
   83|  15.5M|    }
   84|       |
   85|       |    // Below is the per-fragment logic for computing the expression types.
   86|       |    // It heavily relies on Type's << operator (where "X << a_mst" means
   87|       |    // "X has all properties listed in a").
   88|  15.5M|    switch (fragment) {
  ------------------
  |  Branch (88:13): [True: 0, False: 15.5M]
  ------------------
   89|  3.72k|        case Fragment::PK_K: return "Konudemsxk"_mst;
  ------------------
  |  Branch (89:9): [True: 3.72k, False: 15.5M]
  ------------------
   90|  1.44k|        case Fragment::PK_H: return "Knudemsxk"_mst;
  ------------------
  |  Branch (90:9): [True: 1.44k, False: 15.5M]
  ------------------
   91|  3.38k|        case Fragment::OLDER: return
  ------------------
  |  Branch (91:9): [True: 3.38k, False: 15.5M]
  ------------------
   92|  3.38k|            "g"_mst.If(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) |
   93|  3.38k|            "h"_mst.If(!(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)) |
   94|  3.38k|            "Bzfmxk"_mst;
   95|  6.73k|        case Fragment::AFTER: return
  ------------------
  |  Branch (95:9): [True: 6.73k, False: 15.5M]
  ------------------
   96|  6.73k|            "i"_mst.If(k >= LOCKTIME_THRESHOLD) |
   97|  6.73k|            "j"_mst.If(k < LOCKTIME_THRESHOLD) |
   98|  6.73k|            "Bzfmxk"_mst;
   99|     97|        case Fragment::SHA256: return "Bonudmk"_mst;
  ------------------
  |  Branch (99:9): [True: 97, False: 15.5M]
  ------------------
  100|    230|        case Fragment::RIPEMD160: return "Bonudmk"_mst;
  ------------------
  |  Branch (100:9): [True: 230, False: 15.5M]
  ------------------
  101|     43|        case Fragment::HASH256: return "Bonudmk"_mst;
  ------------------
  |  Branch (101:9): [True: 43, False: 15.5M]
  ------------------
  102|    397|        case Fragment::HASH160: return "Bonudmk"_mst;
  ------------------
  |  Branch (102:9): [True: 397, False: 15.5M]
  ------------------
  103|  4.87M|        case Fragment::JUST_1: return "Bzufmxk"_mst;
  ------------------
  |  Branch (103:9): [True: 4.87M, False: 10.6M]
  ------------------
  104|  1.75M|        case Fragment::JUST_0: return "Bzudemsxk"_mst;
  ------------------
  |  Branch (104:9): [True: 1.75M, False: 13.7M]
  ------------------
  105|  53.8k|        case Fragment::WRAP_A: return
  ------------------
  |  Branch (105:9): [True: 53.8k, False: 15.4M]
  ------------------
  106|  53.8k|            "W"_mst.If(x << "B"_mst) | // W=B_x
  107|  53.8k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  108|  53.8k|            (x & "udfems"_mst) | // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  109|  53.8k|            "x"_mst; // x
  110|  30.5k|        case Fragment::WRAP_S: return
  ------------------
  |  Branch (110:9): [True: 30.5k, False: 15.5M]
  ------------------
  111|  30.5k|            "W"_mst.If(x << "Bo"_mst) | // W=B_x*o_x
  112|  30.5k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  113|  30.5k|            (x & "udfemsx"_mst); // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x, x=x_x
  114|  1.89M|        case Fragment::WRAP_C: return
  ------------------
  |  Branch (114:9): [True: 1.89M, False: 13.6M]
  ------------------
  115|  1.89M|            "B"_mst.If(x << "K"_mst) | // B=K_x
  116|  1.89M|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  117|  1.89M|            (x & "ondfem"_mst) | // o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x
  118|  1.89M|            "us"_mst; // u, s
  119|  44.2k|        case Fragment::WRAP_D: return
  ------------------
  |  Branch (119:9): [True: 44.2k, False: 15.4M]
  ------------------
  120|  44.2k|            "B"_mst.If(x << "Vz"_mst) | // B=V_x*z_x
  121|  44.2k|            "o"_mst.If(x << "z"_mst) | // o=z_x
  122|  44.2k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  123|  44.2k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  124|  44.2k|            (x & "ms"_mst) | // m=m_x, s=s_x
  125|       |            // NOTE: 'd:' is 'u' under Tapscript but not P2WSH as MINIMALIF is only a policy rule there.
  126|  44.2k|            "u"_mst.If(IsTapscript(ms_ctx)) |
  127|  44.2k|            "ndx"_mst; // n, d, x
  128|  21.3k|        case Fragment::WRAP_V: return
  ------------------
  |  Branch (128:9): [True: 21.3k, False: 15.5M]
  ------------------
  129|  21.3k|            "V"_mst.If(x << "B"_mst) | // V=B_x
  130|  21.3k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  131|  21.3k|            (x & "zonms"_mst) | // z=z_x, o=o_x, n=n_x, m=m_x, s=s_x
  132|  21.3k|            "fx"_mst; // f, x
  133|  12.5k|        case Fragment::WRAP_J: return
  ------------------
  |  Branch (133:9): [True: 12.5k, False: 15.5M]
  ------------------
  134|  12.5k|            "B"_mst.If(x << "Bn"_mst) | // B=B_x*n_x
  135|  12.5k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  136|  12.5k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  137|  12.5k|            (x & "oums"_mst) | // o=o_x, u=u_x, m=m_x, s=s_x
  138|  12.5k|            "ndx"_mst; // n, d, x
  139|   254k|        case Fragment::WRAP_N: return
  ------------------
  |  Branch (139:9): [True: 254k, False: 15.2M]
  ------------------
  140|   254k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  141|   254k|            (x & "Bzondfems"_mst) | // B=B_x, z=z_x, o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  142|   254k|            "ux"_mst; // u, x
  143|  4.83M|        case Fragment::AND_V: return
  ------------------
  |  Branch (143:9): [True: 4.83M, False: 10.6M]
  ------------------
  144|  4.83M|            (y & "KVB"_mst).If(x << "V"_mst) | // B=V_x*B_y, V=V_x*V_y, K=V_x*K_y
  145|  4.83M|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  146|  4.83M|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  147|  4.83M|            (x & y & "dmz"_mst) | // d=d_x*d_y, m=m_x*m_y, z=z_x*z_y
  148|  4.83M|            ((x | y) & "s"_mst) | // s=s_x+s_y
  149|  4.83M|            "f"_mst.If((y << "f"_mst) || (x << "s"_mst)) | // f=f_y+s_x
  ------------------
  |  Branch (149:24): [True: 4.83M, False: 1.59k]
  |  Branch (149:42): [True: 49, False: 1.54k]
  ------------------
  150|  4.83M|            (y & "ux"_mst) | // u=u_y, x=x_y
  151|  4.83M|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  152|  4.83M|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (152:24): [True: 4.60k, False: 4.83M]
  ------------------
  153|  4.83M|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (153:20): [True: 189, False: 4.41k]
  |  Branch (153:38): [True: 20, False: 169]
  ------------------
  154|  4.60k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (154:18): [True: 475, False: 4.11k]
  |  Branch (154:36): [True: 40, False: 435]
  ------------------
  155|  4.60k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (155:18): [True: 270, False: 4.27k]
  |  Branch (155:36): [True: 69, False: 201]
  ------------------
  156|  4.60k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*!(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (156:18): [True: 572, False: 3.90k]
  |  Branch (156:36): [True: 0, False: 572]
  ------------------
  157|  6.12k|        case Fragment::AND_B: return
  ------------------
  |  Branch (157:9): [True: 6.12k, False: 15.5M]
  ------------------
  158|  6.12k|            (x & "B"_mst).If(y << "W"_mst) | // B=B_x*W_y
  159|  6.12k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  160|  6.12k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  161|  6.12k|            (x & y & "e"_mst).If((x & y) << "s"_mst) | // e=e_x*e_y*s_x*s_y
  162|  6.12k|            (x & y & "dzm"_mst) | // d=d_x*d_y, z=z_x*z_y, m=m_x*m_y
  163|  6.12k|            "f"_mst.If(((x & y) << "f"_mst) || (x << "sf"_mst) || (y << "sf"_mst)) | // f=f_x*f_y + f_x*s_x + f_y*s_y
  ------------------
  |  Branch (163:24): [True: 1.01k, False: 5.11k]
  |  Branch (163:48): [True: 235, False: 4.87k]
  |  Branch (163:67): [True: 13, False: 4.86k]
  ------------------
  164|  6.12k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  165|  6.12k|            "ux"_mst | // u, x
  166|  6.12k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  167|  6.12k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (167:24): [True: 2.04k, False: 4.08k]
  ------------------
  168|  6.12k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (168:20): [True: 160, False: 1.88k]
  |  Branch (168:38): [True: 112, False: 48]
  ------------------
  169|  2.04k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (169:18): [True: 897, False: 1.03k]
  |  Branch (169:36): [True: 151, False: 746]
  ------------------
  170|  2.04k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (170:18): [True: 515, False: 1.26k]
  |  Branch (170:36): [True: 93, False: 422]
  ------------------
  171|  2.04k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*!(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (171:18): [True: 243, False: 1.44k]
  |  Branch (171:36): [True: 0, False: 243]
  ------------------
  172|  2.86k|        case Fragment::OR_B: return
  ------------------
  |  Branch (172:9): [True: 2.86k, False: 15.5M]
  ------------------
  173|  2.86k|            "B"_mst.If(x << "Bd"_mst && y << "Wd"_mst) | // B=B_x*d_x*W_x*d_y
  ------------------
  |  Branch (173:24): [True: 869, False: 1.99k]
  |  Branch (173:41): [True: 313, False: 556]
  ------------------
  174|  2.86k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  175|  2.86k|            (x & y & "m"_mst).If((x | y) << "s"_mst && (x & y) << "e"_mst) | // m=m_x*m_y*e_x*e_y*(s_x+s_y)
  ------------------
  |  Branch (175:34): [True: 1.16k, False: 1.70k]
  |  Branch (175:56): [True: 328, False: 833]
  ------------------
  176|  2.86k|            (x & y & "zse"_mst) | // z=z_x*z_y, s=s_x*s_y, e=e_x*e_y
  177|  2.86k|            "dux"_mst | // d, u, x
  178|  2.86k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  179|  2.86k|            (x & y & "k"_mst); // k=k_x*k_y
  180|  2.77k|        case Fragment::OR_D: return
  ------------------
  |  Branch (180:9): [True: 2.77k, False: 15.5M]
  ------------------
  181|  2.77k|            (y & "B"_mst).If(x << "Bdu"_mst) | // B=B_y*B_x*d_x*u_x
  182|  2.77k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  183|  2.77k|            (x & y & "m"_mst).If(x << "e"_mst && (x | y) << "s"_mst) | // m=m_x*m_y*e_x*(s_x+s_y)
  ------------------
  |  Branch (183:34): [True: 2.31k, False: 458]
  |  Branch (183:50): [True: 1.33k, False: 981]
  ------------------
  184|  2.77k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  185|  2.77k|            (y & "ufde"_mst) | // u=u_y, f=f_y, d=d_y, e=e_y
  186|  2.77k|            "x"_mst | // x
  187|  2.77k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  188|  2.77k|            (x & y & "k"_mst); // k=k_x*k_y
  189|  7.71k|        case Fragment::OR_C: return
  ------------------
  |  Branch (189:9): [True: 7.71k, False: 15.5M]
  ------------------
  190|  7.71k|            (y & "V"_mst).If(x << "Bdu"_mst) | // V=V_y*B_x*u_x*d_x
  191|  7.71k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  192|  7.71k|            (x & y & "m"_mst).If(x << "e"_mst && (x | y) << "s"_mst) | // m=m_x*m_y*e_x*(s_x+s_y)
  ------------------
  |  Branch (192:34): [True: 6.51k, False: 1.19k]
  |  Branch (192:50): [True: 5.71k, False: 802]
  ------------------
  193|  7.71k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  194|  7.71k|            "fx"_mst | // f, x
  195|  7.71k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  196|  7.71k|            (x & y & "k"_mst); // k=k_x*k_y
  197|  1.71M|        case Fragment::OR_I: return
  ------------------
  |  Branch (197:9): [True: 1.71M, False: 13.8M]
  ------------------
  198|  1.71M|            (x & y & "VBKufs"_mst) | // V=V_x*V_y, B=B_x*B_y, K=K_x*K_y, u=u_x*u_y, f=f_x*f_y, s=s_x*s_y
  199|  1.71M|            "o"_mst.If((x & y) << "z"_mst) | // o=z_x*z_y
  200|  1.71M|            ((x | y) & "e"_mst).If((x | y) << "f"_mst) | // e=e_x*f_y+f_x*e_y
  201|  1.71M|            (x & y & "m"_mst).If((x | y) << "s"_mst) | // m=m_x*m_y*(s_x+s_y)
  202|  1.71M|            ((x | y) & "d"_mst) | // d=d_x+d_y
  203|  1.71M|            "x"_mst | // x
  204|  1.71M|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  205|  1.71M|            (x & y & "k"_mst); // k=k_x*k_y
  206|  4.36k|        case Fragment::ANDOR: return
  ------------------
  |  Branch (206:9): [True: 4.36k, False: 15.5M]
  ------------------
  207|  4.36k|            (y & z & "BKV"_mst).If(x << "Bdu"_mst) | // B=B_x*d_x*u_x*B_y*B_z, K=B_x*d_x*u_x*K_y*K_z, V=B_x*d_x*u_x*V_y*V_z
  208|  4.36k|            (x & y & z & "z"_mst) | // z=z_x*z_y*z_z
  209|  4.36k|            ((x | (y & z)) & "o"_mst).If((x | (y & z)) << "z"_mst) | // o=o_x*z_y*z_z+z_x*o_y*o_z
  210|  4.36k|            (y & z & "u"_mst) | // u=u_y*u_z
  211|  4.36k|            (z & "f"_mst).If((x << "s"_mst) || (y << "f"_mst)) | // f=(s_x+f_y)*f_z
  ------------------
  |  Branch (211:30): [True: 1.52k, False: 2.84k]
  |  Branch (211:48): [True: 1.33k, False: 1.50k]
  ------------------
  212|  4.36k|            (z & "d"_mst) | // d=d_z
  213|  4.36k|            (z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_z*(s_x+f_y)
  ------------------
  |  Branch (213:30): [True: 1.52k, False: 2.84k]
  |  Branch (213:46): [True: 1.33k, False: 1.50k]
  ------------------
  214|  4.36k|            (x & y & z & "m"_mst).If(x << "e"_mst && (x | y | z) << "s"_mst) | // m=m_x*m_y*m_z*e_x*(s_x+s_y+s_z)
  ------------------
  |  Branch (214:38): [True: 2.80k, False: 1.55k]
  |  Branch (214:54): [True: 1.85k, False: 958]
  ------------------
  215|  4.36k|            (z & (x | y) & "s"_mst) | // s=s_z*(s_x+s_y)
  216|  4.36k|            "x"_mst | // x
  217|  4.36k|            ((x | y | z) & "ghij"_mst) | // g=g_x+g_y+g_z, h=h_x+h_y+h_z, i=i_x+i_y+i_z, j=j_x+j_y_j_z
  218|  4.36k|            "k"_mst.If(((x & y & z) << "k"_mst) &&
  ------------------
  |  Branch (218:24): [True: 2.59k, False: 1.76k]
  ------------------
  219|  4.36k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (219:20): [True: 113, False: 2.48k]
  |  Branch (219:38): [True: 13, False: 100]
  ------------------
  220|  2.59k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (220:18): [True: 444, False: 2.13k]
  |  Branch (220:36): [True: 29, False: 415]
  ------------------
  221|  2.59k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (221:18): [True: 566, False: 1.98k]
  |  Branch (221:36): [True: 323, False: 243]
  ------------------
  222|  2.59k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*k_z* !(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (222:18): [True: 249, False: 1.98k]
  |  Branch (222:36): [True: 0, False: 249]
  ------------------
  223|    506|        case Fragment::MULTI: {
  ------------------
  |  Branch (223:9): [True: 506, False: 15.5M]
  ------------------
  224|    506|            return "Bnudemsk"_mst;
  225|      0|        }
  226|     58|        case Fragment::MULTI_A: {
  ------------------
  |  Branch (226:9): [True: 58, False: 15.5M]
  ------------------
  227|     58|            return "Budemsk"_mst;
  228|      0|        }
  229|  4.35k|        case Fragment::THRESH: {
  ------------------
  |  Branch (229:9): [True: 4.35k, False: 15.5M]
  ------------------
  230|  4.35k|            bool all_e = true;
  231|  4.35k|            bool all_m = true;
  232|  4.35k|            uint32_t args = 0;
  233|  4.35k|            uint32_t num_s = 0;
  234|  4.35k|            Type acc_tl = "k"_mst;
  235|  11.1k|            for (size_t i = 0; i < sub_types.size(); ++i) {
  ------------------
  |  Branch (235:32): [True: 8.54k, False: 2.60k]
  ------------------
  236|  8.54k|                Type t = sub_types[i];
  237|  8.54k|                static constexpr auto WDU{"Wdu"_mst}, BDU{"Bdu"_mst};
  238|  8.54k|                if (!(t << (i ? WDU : BDU))) return ""_mst; // Require Bdu, Wdu, Wdu, ...
  ------------------
  |  Branch (238:21): [True: 1.75k, False: 6.78k]
  |  Branch (238:29): [True: 4.18k, False: 4.35k]
  ------------------
  239|  6.78k|                if (!(t << "e"_mst)) all_e = false;
  ------------------
  |  Branch (239:21): [True: 1.56k, False: 5.22k]
  ------------------
  240|  6.78k|                if (!(t << "m"_mst)) all_m = false;
  ------------------
  |  Branch (240:21): [True: 1.09k, False: 5.69k]
  ------------------
  241|  6.78k|                if (t << "s"_mst) num_s += 1;
  ------------------
  |  Branch (241:21): [True: 3.09k, False: 3.69k]
  ------------------
  242|  6.78k|                args += (t << "z"_mst) ? 0 : (t << "o"_mst) ? 1 : 2;
  ------------------
  |  Branch (242:25): [True: 1.45k, False: 5.33k]
  |  Branch (242:46): [True: 1.24k, False: 4.08k]
  ------------------
  243|  6.78k|                acc_tl = ((acc_tl | t) & "ghij"_mst) |
  244|       |                    // Thresh contains a combination of timelocks if it has threshold > 1 and
  245|       |                    // it contains two different children that have different types of timelocks
  246|       |                    // Note how if any of the children don't have "k", the parent also does not have "k"
  247|  6.78k|                    "k"_mst.If(((acc_tl & t) << "k"_mst) && ((k <= 1) ||
  ------------------
  |  Branch (247:32): [True: 5.78k, False: 1.00k]
  |  Branch (247:62): [True: 3.12k, False: 2.65k]
  ------------------
  248|  5.78k|                        ((k > 1) && !(((acc_tl << "g"_mst) && (t << "h"_mst)) ||
  ------------------
  |  Branch (248:26): [True: 2.65k, False: 0]
  |  Branch (248:40): [True: 71, False: 2.58k]
  |  Branch (248:63): [True: 24, False: 47]
  ------------------
  249|  2.65k|                        ((acc_tl << "h"_mst) && (t << "g"_mst)) ||
  ------------------
  |  Branch (249:26): [True: 61, False: 2.57k]
  |  Branch (249:49): [True: 40, False: 21]
  ------------------
  250|  2.65k|                        ((acc_tl << "i"_mst) && (t << "j"_mst)) ||
  ------------------
  |  Branch (250:26): [True: 325, False: 2.26k]
  |  Branch (250:49): [True: 292, False: 33]
  ------------------
  251|  2.65k|                        ((acc_tl << "j"_mst) && (t << "i"_mst))))));
  ------------------
  |  Branch (251:26): [True: 652, False: 1.65k]
  |  Branch (251:49): [True: 2, False: 650]
  ------------------
  252|  6.78k|            }
  253|  2.60k|            return "Bdu"_mst |
  254|  2.60k|                   "z"_mst.If(args == 0) | // z=all z
  255|  2.60k|                   "o"_mst.If(args == 1) | // o=all z except one o
  256|  2.60k|                   "e"_mst.If(all_e && num_s == n_subs) | // e=all e and all s
  ------------------
  |  Branch (256:31): [True: 1.68k, False: 918]
  |  Branch (256:40): [True: 835, False: 850]
  ------------------
  257|  2.60k|                   "m"_mst.If(all_e && all_m && num_s >= n_subs - k) | // m=all e, >=(n-k) s
  ------------------
  |  Branch (257:31): [True: 1.68k, False: 918]
  |  Branch (257:40): [True: 1.16k, False: 521]
  |  Branch (257:49): [True: 991, False: 173]
  ------------------
  258|  2.60k|                   "s"_mst.If(num_s >= n_subs - k + 1) |  // s= >=(n-k+1) s
  259|  2.60k|                   acc_tl; // timelock info
  260|  4.35k|            }
  261|  15.5M|    }
  262|      0|    assert(false);
  263|      0|}
_ZN10miniscript8internal16ComputeScriptLenENS_8FragmentENS_4TypeEmjmmNS_17MiniscriptContextE:
  266|  15.5M|                        size_t n_keys, MiniscriptContext ms_ctx) {
  267|  15.5M|    switch (fragment) {
  ------------------
  |  Branch (267:13): [True: 0, False: 15.5M]
  ------------------
  268|  4.87M|        case Fragment::JUST_1:
  ------------------
  |  Branch (268:9): [True: 4.87M, False: 10.6M]
  ------------------
  269|  6.62M|        case Fragment::JUST_0: return 1;
  ------------------
  |  Branch (269:9): [True: 1.75M, False: 13.7M]
  ------------------
  270|  3.72k|        case Fragment::PK_K: return IsTapscript(ms_ctx) ? 33 : 34;
  ------------------
  |  Branch (270:9): [True: 3.72k, False: 15.5M]
  |  Branch (270:37): [True: 2.99k, False: 739]
  ------------------
  271|  1.44k|        case Fragment::PK_H: return 3 + 21;
  ------------------
  |  Branch (271:9): [True: 1.44k, False: 15.5M]
  ------------------
  272|  3.38k|        case Fragment::OLDER:
  ------------------
  |  Branch (272:9): [True: 3.38k, False: 15.5M]
  ------------------
  273|  10.1k|        case Fragment::AFTER: return 1 + BuildScript(k).size();
  ------------------
  |  Branch (273:9): [True: 6.73k, False: 15.5M]
  ------------------
  274|     43|        case Fragment::HASH256:
  ------------------
  |  Branch (274:9): [True: 43, False: 15.5M]
  ------------------
  275|    140|        case Fragment::SHA256: return 4 + 2 + 33;
  ------------------
  |  Branch (275:9): [True: 97, False: 15.5M]
  ------------------
  276|    397|        case Fragment::HASH160:
  ------------------
  |  Branch (276:9): [True: 397, False: 15.5M]
  ------------------
  277|    627|        case Fragment::RIPEMD160: return 4 + 2 + 21;
  ------------------
  |  Branch (277:9): [True: 230, False: 15.5M]
  ------------------
  278|    506|        case Fragment::MULTI: return 1 + BuildScript(n_keys).size() + BuildScript(k).size() + 34 * n_keys;
  ------------------
  |  Branch (278:9): [True: 506, False: 15.5M]
  ------------------
  279|     58|        case Fragment::MULTI_A: return (1 + 32 + 1) * n_keys + BuildScript(k).size() + 1;
  ------------------
  |  Branch (279:9): [True: 58, False: 15.5M]
  ------------------
  280|  4.83M|        case Fragment::AND_V: return subsize;
  ------------------
  |  Branch (280:9): [True: 4.83M, False: 10.6M]
  ------------------
  281|  21.3k|        case Fragment::WRAP_V: return subsize + (sub0typ << "x"_mst);
  ------------------
  |  Branch (281:9): [True: 21.3k, False: 15.5M]
  ------------------
  282|  30.5k|        case Fragment::WRAP_S:
  ------------------
  |  Branch (282:9): [True: 30.5k, False: 15.5M]
  ------------------
  283|  1.92M|        case Fragment::WRAP_C:
  ------------------
  |  Branch (283:9): [True: 1.89M, False: 13.6M]
  ------------------
  284|  2.18M|        case Fragment::WRAP_N:
  ------------------
  |  Branch (284:9): [True: 254k, False: 15.2M]
  ------------------
  285|  2.19M|        case Fragment::AND_B:
  ------------------
  |  Branch (285:9): [True: 6.12k, False: 15.5M]
  ------------------
  286|  2.19M|        case Fragment::OR_B: return subsize + 1;
  ------------------
  |  Branch (286:9): [True: 2.86k, False: 15.5M]
  ------------------
  287|  53.8k|        case Fragment::WRAP_A:
  ------------------
  |  Branch (287:9): [True: 53.8k, False: 15.4M]
  ------------------
  288|  61.5k|        case Fragment::OR_C: return subsize + 2;
  ------------------
  |  Branch (288:9): [True: 7.71k, False: 15.5M]
  ------------------
  289|  44.2k|        case Fragment::WRAP_D:
  ------------------
  |  Branch (289:9): [True: 44.2k, False: 15.4M]
  ------------------
  290|  47.0k|        case Fragment::OR_D:
  ------------------
  |  Branch (290:9): [True: 2.77k, False: 15.5M]
  ------------------
  291|  1.75M|        case Fragment::OR_I:
  ------------------
  |  Branch (291:9): [True: 1.71M, False: 13.8M]
  ------------------
  292|  1.76M|        case Fragment::ANDOR: return subsize + 3;
  ------------------
  |  Branch (292:9): [True: 4.36k, False: 15.5M]
  ------------------
  293|  12.5k|        case Fragment::WRAP_J: return subsize + 4;
  ------------------
  |  Branch (293:9): [True: 12.5k, False: 15.5M]
  ------------------
  294|  4.35k|        case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
  ------------------
  |  Branch (294:9): [True: 4.35k, False: 15.5M]
  ------------------
  295|  15.5M|    }
  296|      0|    assert(false);
  297|      0|}
_ZN10miniscript8internal15DecomposeScriptERK7CScript:
  370|     44|{
  371|     44|    std::vector<Opcode> out;
  372|     44|    CScript::const_iterator it = script.begin(), itend = script.end();
  373|     44|    while (it != itend) {
  ------------------
  |  Branch (373:12): [True: 44, False: 0]
  ------------------
  374|     44|        std::vector<unsigned char> push_data;
  375|     44|        opcodetype opcode;
  376|     44|        if (!script.GetOp(it, opcode, push_data)) {
  ------------------
  |  Branch (376:13): [True: 44, False: 0]
  ------------------
  377|     44|            return {};
  378|     44|        } else if (opcode >= OP_1 && opcode <= OP_16) {
  ------------------
  |  Branch (378:20): [True: 0, False: 0]
  |  Branch (378:38): [True: 0, False: 0]
  ------------------
  379|       |            // Deal with OP_n (GetOp does not turn them into pushes).
  380|      0|            push_data.assign(1, CScript::DecodeOP_N(opcode));
  381|      0|        } else if (opcode == OP_CHECKSIGVERIFY) {
  ------------------
  |  Branch (381:20): [True: 0, False: 0]
  ------------------
  382|       |            // Decompose OP_CHECKSIGVERIFY into OP_CHECKSIG OP_VERIFY
  383|      0|            out.emplace_back(OP_CHECKSIG, std::vector<unsigned char>());
  384|      0|            opcode = OP_VERIFY;
  385|      0|        } else if (opcode == OP_CHECKMULTISIGVERIFY) {
  ------------------
  |  Branch (385:20): [True: 0, False: 0]
  ------------------
  386|       |            // Decompose OP_CHECKMULTISIGVERIFY into OP_CHECKMULTISIG OP_VERIFY
  387|      0|            out.emplace_back(OP_CHECKMULTISIG, std::vector<unsigned char>());
  388|      0|            opcode = OP_VERIFY;
  389|      0|        } else if (opcode == OP_EQUALVERIFY) {
  ------------------
  |  Branch (389:20): [True: 0, False: 0]
  ------------------
  390|       |            // Decompose OP_EQUALVERIFY into OP_EQUAL OP_VERIFY
  391|      0|            out.emplace_back(OP_EQUAL, std::vector<unsigned char>());
  392|      0|            opcode = OP_VERIFY;
  393|      0|        } else if (opcode == OP_NUMEQUALVERIFY) {
  ------------------
  |  Branch (393:20): [True: 0, False: 0]
  ------------------
  394|       |            // Decompose OP_NUMEQUALVERIFY into OP_NUMEQUAL OP_VERIFY
  395|      0|            out.emplace_back(OP_NUMEQUAL, std::vector<unsigned char>());
  396|      0|            opcode = OP_VERIFY;
  397|      0|        } else if (IsPushdataOp(opcode)) {
  ------------------
  |  Branch (397:20): [True: 0, False: 0]
  ------------------
  398|      0|            if (!CheckMinimalPush(push_data, opcode)) return {};
  ------------------
  |  Branch (398:17): [True: 0, False: 0]
  ------------------
  399|      0|        } else if (it != itend && (opcode == OP_CHECKSIG || opcode == OP_CHECKMULTISIG || opcode == OP_EQUAL || opcode == OP_NUMEQUAL) && (*it == OP_VERIFY)) {
  ------------------
  |  Branch (399:20): [True: 0, False: 0]
  |  Branch (399:36): [True: 0, False: 0]
  |  Branch (399:61): [True: 0, False: 0]
  |  Branch (399:91): [True: 0, False: 0]
  |  Branch (399:113): [True: 0, False: 0]
  |  Branch (399:139): [True: 0, False: 0]
  ------------------
  400|       |            // Rule out non minimal VERIFY sequences
  401|      0|            return {};
  402|      0|        }
  403|      0|        out.emplace_back(opcode, std::move(push_data));
  404|      0|    }
  405|      0|    std::reverse(out.begin(), out.end());
  406|      0|    return out;
  407|     44|}
_ZN10miniscript8internal12FindNextCharE4SpanIKcEc:
  423|  43.0k|{
  424|  33.0M|    for (int i = 0; i < (int)sp.size(); ++i) {
  ------------------
  |  Branch (424:21): [True: 33.0M, False: 146]
  ------------------
  425|  33.0M|        if (sp[i] == m) return i;
  ------------------
  |  Branch (425:13): [True: 42.5k, False: 33.0M]
  ------------------
  426|       |        // We only search within the current parentheses
  427|  33.0M|        if (sp[i] == ')') break;
  ------------------
  |  Branch (427:13): [True: 380, False: 33.0M]
  ------------------
  428|  33.0M|    }
  429|    526|    return -1;
  430|  43.0k|}

_ZNK10miniscript4TypeorES0_:
  138|  90.5M|    constexpr Type operator|(Type x) const { return Type(m_flags | x.m_flags); }
_ZN10miniscript4TypeC2Ej:
  131|   192M|    explicit constexpr Type(uint32_t flags) noexcept : m_flags(flags) {}
_ZN10miniscript11IsTapscriptENS_17MiniscriptContextE:
  246|  31.9M|{
  247|  31.9M|    switch (ms_ctx) {
  ------------------
  |  Branch (247:13): [True: 0, False: 31.9M]
  ------------------
  248|   188k|        case MiniscriptContext::P2WSH: return false;
  ------------------
  |  Branch (248:9): [True: 188k, False: 31.7M]
  ------------------
  249|  31.7M|        case MiniscriptContext::TAPSCRIPT: return true;
  ------------------
  |  Branch (249:9): [True: 31.7M, False: 188k]
  ------------------
  250|  31.9M|    }
  251|      0|    assert(false);
  252|      0|}
_ZNK10miniscript4TypelsES0_:
  144|   205M|    constexpr bool operator<<(Type x) const { return (x.m_flags & ~m_flags) == 0; }
_ZNK10miniscript4TypeanES0_:
  141|  70.4M|    constexpr Type operator&(Type x) const { return Type(m_flags & x.m_flags); }
_ZN10miniscript8internal13MaxScriptSizeENS_17MiniscriptContextE:
  271|   277k|{
  272|   277k|    if (IsTapscript(ms_ctx)) {
  ------------------
  |  Branch (272:9): [True: 255k, False: 22.0k]
  ------------------
  273|       |        // Leaf scripts under Tapscript are not explicitly limited in size. They are only implicitly
  274|       |        // bounded by the maximum standard size of a spending transaction. Let the maximum script
  275|       |        // size conservatively be small enough such that even a maximum sized witness and a reasonably
  276|       |        // sized spending transaction can spend an output paying to this script without running into
  277|       |        // the maximum standard tx size limit.
  278|   255k|        constexpr auto max_size{MAX_STANDARD_TX_WEIGHT - TX_BODY_LEEWAY_WEIGHT - MAX_TAPSCRIPT_SAT_SIZE};
  279|   255k|        return max_size - GetSizeOfCompactSize(max_size);
  280|   255k|    }
  281|  22.0k|    return MAX_STANDARD_P2WSH_SCRIPT_SIZE;
  282|   277k|}
_ZN10miniscript8internal6MaxIntIjEC2Ej:
  356|  58.7M|    MaxInt(I val) : valid(true), value(val) {}
_ZN10miniscript8internal6MaxIntIjEC2Ev:
  355|  48.7M|    MaxInt() : valid(false), value(0) {}
_ZN10miniscript8internal3OpsC2EjNS0_6MaxIntIjEES3_:
  378|  15.5M|    Ops(uint32_t in_count, MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : count(in_count), sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internalplERKNS0_6MaxIntIjEES4_:
  358|  53.7M|    friend MaxInt<I> operator+(const MaxInt<I>& a, const MaxInt<I>& b) {
  359|  53.7M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (359:13): [True: 21.9M, False: 31.8M]
  |  Branch (359:25): [True: 3.78M, False: 28.0M]
  ------------------
  360|  28.0M|        return a.value + b.value;
  361|  53.7M|    }
_ZN10miniscript8internalorERKNS0_6MaxIntIjEES4_:
  363|  23.6M|    friend MaxInt<I> operator|(const MaxInt<I>& a, const MaxInt<I>& b) {
  364|  23.6M|        if (!a.valid) return b;
  ------------------
  |  Branch (364:13): [True: 15.2M, False: 8.47M]
  ------------------
  365|  8.47M|        if (!b.valid) return a;
  ------------------
  |  Branch (365:13): [True: 1.47M, False: 6.99M]
  ------------------
  366|  6.99M|        return std::max(a.value, b.value);
  367|  8.47M|    }
_ZN10miniscript8internal7SatInfoC2Ev:
  431|  27.9M|    constexpr SatInfo() noexcept : valid(false), netdiff(0), exec(0) {}
_ZN10miniscript8internal7SatInfo4PushEv:
  461|  6.64M|    static constexpr SatInfo Push() noexcept { return {-1, 0}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoES2_:
  485|  15.1M|    constexpr StackSize(SatInfo in_sat, SatInfo in_dsat) noexcept : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internalplERKNS0_7SatInfoES3_:
  449|  37.7M|    {
  450|       |        // Concatenation with an empty set yields an empty set.
  451|  37.7M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (451:13): [True: 14.3M, False: 23.4M]
  |  Branch (451:25): [True: 2.14M, False: 21.2M]
  ------------------
  452|       |        // Otherwise, the maximum stack size difference for the combined scripts is the sum of the
  453|       |        // netdiffs, and the maximum stack size difference anywhere is either b.exec (if the
  454|       |        // maximum occurred in b) or b.netdiff+a.exec (if the maximum occurred in a).
  455|  21.2M|        return {a.netdiff + b.netdiff, std::max(b.exec, b.netdiff + a.exec)};
  456|  37.7M|    }
_ZN10miniscript8internal7SatInfo3NopEv:
  465|  10.1k|    static constexpr SatInfo Nop() noexcept { return {0, 0}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoE:
  486|  5.73k|    constexpr StackSize(SatInfo in_both) noexcept : sat(in_both), dsat(in_both) {};
_ZN10miniscript8internal7SatInfo6OP_DUPEv:
  472|  90.0k|    static constexpr SatInfo OP_DUP() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo4HashEv:
  463|  2.21k|    static constexpr SatInfo Hash() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo14OP_EQUALVERIFYEv:
  474|  2.21k|    static constexpr SatInfo OP_EQUALVERIFY() noexcept { return {2, 2}; }
_ZN10miniscript8internal7SatInfo7OP_SIZEEv:
  476|  25.8k|    static constexpr SatInfo OP_SIZE() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo8OP_EQUALEv:
  475|  9.48k|    static constexpr SatInfo OP_EQUAL() noexcept { return {1, 1}; }
_ZN10miniscript8internalorERKNS0_7SatInfoES3_:
  439|  11.8M|    {
  440|       |        // Union with an empty set is itself.
  441|  11.8M|        if (!a.valid) return b;
  ------------------
  |  Branch (441:13): [True: 7.60M, False: 4.23M]
  ------------------
  442|  4.23M|        if (!b.valid) return a;
  ------------------
  |  Branch (442:13): [True: 739k, False: 3.49M]
  ------------------
  443|       |        // Otherwise the netdiff and exec of the union is the maximum of the individual values.
  444|  3.49M|        return {std::max(a.netdiff, b.netdiff), std::max(a.exec, b.exec)};
  445|  4.23M|    }
_ZN10miniscript8internal7SatInfo2IfEv:
  467|  3.57M|    static constexpr SatInfo If() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8BinaryOpEv:
  469|  38.1k|    static constexpr SatInfo BinaryOp() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8OP_IFDUPEb:
  473|  8.31k|    static constexpr SatInfo OP_IFDUP(bool nonzero) noexcept { return {nonzero ? -1 : 0, 0}; }
  ------------------
  |  Branch (473:72): [True: 2.77k, False: 5.54k]
  ------------------
_ZN10miniscript8internal7SatInfoC2Eii:
  435|  39.0M|        valid{true}, netdiff{in_netdiff}, exec{in_exec} {}
_ZN10miniscript8internal7SatInfo11OP_CHECKSIGEv:
  477|  3.79M|    static constexpr SatInfo OP_CHECKSIG() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo9OP_VERIFYEv:
  479|  21.3k|    static constexpr SatInfo OP_VERIFY() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo12OP_0NOTEQUALEv:
  478|  25.1k|    static constexpr SatInfo OP_0NOTEQUAL() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo5EmptyEv:
  459|  8.71k|    static constexpr SatInfo Empty() noexcept { return {0, 0}; }
_ZN10miniscript8internal11WitnessSizeC2ENS0_6MaxIntIjEES3_:
  495|  13.2M|    WitnessSize(MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : sat(in_sat), dsat(in_dsat) {};
_ZNK10miniscript4TypeeqES0_:
  150|   303k|    constexpr bool operator==(Type x) const { return m_flags == x.m_flags; }
_ZNK10miniscript4Type2IfEb:
  153|  31.6M|    constexpr Type If(bool x) const { return Type(x ? m_flags : 0); }
  ------------------
  |  Branch (153:51): [True: 11.5M, False: 20.0M]
  ------------------
descriptor.cpp:_ZN10miniscript10FromStringIN12_GLOBAL__N_19KeyParserEEENSt3__110unique_ptrIKNS_4NodeINT_3KeyEEENS3_14default_deleteIS9_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKS6_:
 2640|  3.95k|inline NodeRef<typename Ctx::Key> FromString(const std::string& str, const Ctx& ctx) {
 2641|  3.95k|    return internal::Parse<typename Ctx::Key>(str, ctx);
 2642|  3.95k|}
descriptor.cpp:_ZN10miniscript8internal5ParseIjN12_GLOBAL__N_19KeyParserEEENSt3__110unique_ptrIKNS_4NodeIT_EENS4_14default_deleteIS9_EEEE4SpanIKcERKT0_:
 1794|  3.95k|{
 1795|  3.95k|    using namespace script;
 1796|       |
 1797|       |    // Account for the minimum script size for all parsed fragments so far. It "borrows" 1
 1798|       |    // script byte from all leaf nodes, counting it instead whenever a space for a recursive
 1799|       |    // expression is added (through andor, and_*, or_*, thresh). This guarantees that all fragments
 1800|       |    // increment the script_size by at least one, except for:
 1801|       |    // - "0", "1": these leafs are only a single byte, so their subtracted-from increment is 0.
 1802|       |    //   This is not an issue however, as "space" for them has to be created by combinators,
 1803|       |    //   which do increment script_size.
 1804|       |    // - "v:": the v wrapper adds nothing as in some cases it results in no opcode being added
 1805|       |    //   (instead transforming another opcode into its VERIFY form). However, the v: wrapper has
 1806|       |    //   to be interleaved with other fragments to be valid, so this is not a concern.
 1807|  3.95k|    size_t script_size{1};
 1808|  3.95k|    size_t max_size{internal::MaxScriptSize(ctx.MsContext())};
 1809|       |
 1810|       |    // The two integers are used to hold state for thresh()
 1811|  3.95k|    std::vector<std::tuple<ParseContext, int64_t, int64_t>> to_parse;
 1812|  3.95k|    std::vector<NodeRef<Key>> constructed;
 1813|       |
 1814|  3.95k|    to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 1815|       |
 1816|       |    // Parses a multi() or multi_a() from its string representation. Returns false on parsing error.
 1817|  3.95k|    const auto parse_multi_exp = [&](Span<const char>& in, const bool is_multi_a) -> bool {
 1818|  3.95k|        const auto max_keys{is_multi_a ? MAX_PUBKEYS_PER_MULTI_A : MAX_PUBKEYS_PER_MULTISIG};
 1819|  3.95k|        const auto required_ctx{is_multi_a ? MiniscriptContext::TAPSCRIPT : MiniscriptContext::P2WSH};
 1820|  3.95k|        if (ctx.MsContext() != required_ctx) return false;
 1821|       |        // Get threshold
 1822|  3.95k|        int next_comma = FindNextChar(in, ',');
 1823|  3.95k|        if (next_comma < 1) return false;
 1824|  3.95k|        const auto k_to_integral{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 1825|  3.95k|        if (!k_to_integral.has_value()) return false;
 1826|  3.95k|        const int64_t k{k_to_integral.value()};
 1827|  3.95k|        in = in.subspan(next_comma + 1);
 1828|       |        // Get keys. It is compatible for both compressed and x-only keys.
 1829|  3.95k|        std::vector<Key> keys;
 1830|  3.95k|        while (next_comma != -1) {
 1831|  3.95k|            next_comma = FindNextChar(in, ',');
 1832|  3.95k|            int key_length = (next_comma == -1) ? FindNextChar(in, ')') : next_comma;
 1833|  3.95k|            if (key_length < 1) return false;
 1834|  3.95k|            auto key = ctx.FromString(in.begin(), in.begin() + key_length);
 1835|  3.95k|            if (!key) return false;
 1836|  3.95k|            keys.push_back(std::move(*key));
 1837|  3.95k|            in = in.subspan(key_length + 1);
 1838|  3.95k|        }
 1839|  3.95k|        if (keys.size() < 1 || keys.size() > max_keys) return false;
 1840|  3.95k|        if (k < 1 || k > (int64_t)keys.size()) return false;
 1841|  3.95k|        if (is_multi_a) {
 1842|       |            // (push + xonly-key + CHECKSIG[ADD]) * n + k + OP_NUMEQUAL(VERIFY), minus one.
 1843|  3.95k|            script_size += (1 + 32 + 1) * keys.size() + BuildScript(k).size();
 1844|  3.95k|            constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), k));
 1845|  3.95k|        } else {
 1846|  3.95k|            script_size += 2 + (keys.size() > 16) + (k > 16) + 34 * keys.size();
 1847|  3.95k|            constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), k));
 1848|  3.95k|        }
 1849|  3.95k|        return true;
 1850|  3.95k|    };
 1851|       |
 1852|  9.19M|    while (!to_parse.empty()) {
  ------------------
  |  Branch (1852:12): [True: 9.19M, False: 2.21k]
  ------------------
 1853|  9.19M|        if (script_size > max_size) return {};
  ------------------
  |  Branch (1853:13): [True: 1, False: 9.19M]
  ------------------
 1854|       |
 1855|       |        // Get the current context we are decoding within
 1856|  9.19M|        auto [cur_context, n, k] = to_parse.back();
 1857|  9.19M|        to_parse.pop_back();
 1858|       |
 1859|  9.19M|        switch (cur_context) {
  ------------------
  |  Branch (1859:17): [True: 0, False: 9.19M]
  ------------------
 1860|   132k|        case ParseContext::WRAPPED_EXPR: {
  ------------------
  |  Branch (1860:9): [True: 132k, False: 9.06M]
  ------------------
 1861|   132k|            std::optional<size_t> colon_index{};
 1862|  9.28M|            for (size_t i = 1; i < in.size(); ++i) {
  ------------------
  |  Branch (1862:32): [True: 9.28M, False: 283]
  ------------------
 1863|  9.28M|                if (in[i] == ':') {
  ------------------
  |  Branch (1863:21): [True: 59.5k, False: 9.22M]
  ------------------
 1864|  59.5k|                    colon_index = i;
 1865|  59.5k|                    break;
 1866|  59.5k|                }
 1867|  9.22M|                if (in[i] < 'a' || in[i] > 'z') break;
  ------------------
  |  Branch (1867:21): [True: 72.4k, False: 9.15M]
  |  Branch (1867:36): [True: 24, False: 9.15M]
  ------------------
 1868|  9.22M|            }
 1869|       |            // If there is no colon, this loop won't execute
 1870|   132k|            bool last_was_v{false};
 1871|  9.07M|            for (size_t j = 0; colon_index && j < *colon_index; ++j) {
  ------------------
  |  Branch (1871:32): [True: 9.00M, False: 72.7k]
  |  Branch (1871:47): [True: 8.94M, False: 59.4k]
  ------------------
 1872|  8.94M|                if (script_size > max_size) return {};
  ------------------
  |  Branch (1872:21): [True: 3, False: 8.94M]
  ------------------
 1873|  8.94M|                if (in[j] == 'a') {
  ------------------
  |  Branch (1873:21): [True: 54.8k, False: 8.88M]
  ------------------
 1874|  54.8k|                    script_size += 2;
 1875|  54.8k|                    to_parse.emplace_back(ParseContext::ALT, -1, -1);
 1876|  8.88M|                } else if (in[j] == 's') {
  ------------------
  |  Branch (1876:28): [True: 64.3k, False: 8.82M]
  ------------------
 1877|  64.3k|                    script_size += 1;
 1878|  64.3k|                    to_parse.emplace_back(ParseContext::SWAP, -1, -1);
 1879|  8.82M|                } else if (in[j] == 'c') {
  ------------------
  |  Branch (1879:28): [True: 1.89M, False: 6.92M]
  ------------------
 1880|  1.89M|                    script_size += 1;
 1881|  1.89M|                    to_parse.emplace_back(ParseContext::CHECK, -1, -1);
 1882|  6.92M|                } else if (in[j] == 'd') {
  ------------------
  |  Branch (1882:28): [True: 56.0k, False: 6.87M]
  ------------------
 1883|  56.0k|                    script_size += 3;
 1884|  56.0k|                    to_parse.emplace_back(ParseContext::DUP_IF, -1, -1);
 1885|  6.87M|                } else if (in[j] == 'j') {
  ------------------
  |  Branch (1885:28): [True: 12.7k, False: 6.85M]
  ------------------
 1886|  12.7k|                    script_size += 4;
 1887|  12.7k|                    to_parse.emplace_back(ParseContext::NON_ZERO, -1, -1);
 1888|  6.85M|                } else if (in[j] == 'n') {
  ------------------
  |  Branch (1888:28): [True: 241k, False: 6.61M]
  ------------------
 1889|   241k|                    script_size += 1;
 1890|   241k|                    to_parse.emplace_back(ParseContext::ZERO_NOTEQUAL, -1, -1);
 1891|  6.61M|                } else if (in[j] == 'v') {
  ------------------
  |  Branch (1891:28): [True: 21.0k, False: 6.59M]
  ------------------
 1892|       |                    // do not permit "...vv...:"; it's not valid, and also doesn't trigger early
 1893|       |                    // failure as script_size isn't incremented.
 1894|  21.0k|                    if (last_was_v) return {};
  ------------------
  |  Branch (1894:25): [True: 1, False: 21.0k]
  ------------------
 1895|  21.0k|                    to_parse.emplace_back(ParseContext::VERIFY, -1, -1);
 1896|  6.59M|                } else if (in[j] == 'u') {
  ------------------
  |  Branch (1896:28): [True: 719k, False: 5.87M]
  ------------------
 1897|   719k|                    script_size += 4;
 1898|   719k|                    to_parse.emplace_back(ParseContext::WRAP_U, -1, -1);
 1899|  5.87M|                } else if (in[j] == 't') {
  ------------------
  |  Branch (1899:28): [True: 4.84M, False: 1.03M]
  ------------------
 1900|  4.84M|                    script_size += 1;
 1901|  4.84M|                    to_parse.emplace_back(ParseContext::WRAP_T, -1, -1);
 1902|  4.84M|                } else if (in[j] == 'l') {
  ------------------
  |  Branch (1902:28): [True: 1.03M, False: 29]
  ------------------
 1903|       |                    // The l: wrapper is equivalent to or_i(0,X)
 1904|  1.03M|                    script_size += 4;
 1905|  1.03M|                    constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0));
 1906|  1.03M|                    to_parse.emplace_back(ParseContext::OR_I, -1, -1);
 1907|  1.03M|                } else {
 1908|     29|                    return {};
 1909|     29|                }
 1910|  8.94M|                last_was_v = (in[j] == 'v');
 1911|  8.94M|            }
 1912|   132k|            to_parse.emplace_back(ParseContext::EXPR, -1, -1);
 1913|   132k|            if (colon_index) in = in.subspan(*colon_index + 1);
  ------------------
  |  Branch (1913:17): [True: 59.4k, False: 72.7k]
  ------------------
 1914|   132k|            break;
 1915|   132k|        }
 1916|   132k|        case ParseContext::EXPR: {
  ------------------
  |  Branch (1916:9): [True: 132k, False: 9.06M]
  ------------------
 1917|   132k|            if (Const("0", in)) {
  ------------------
  |  Branch (1917:17): [True: 23.2k, False: 108k]
  ------------------
 1918|  23.2k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0));
 1919|   108k|            } else if (Const("1", in)) {
  ------------------
  |  Branch (1919:24): [True: 35.7k, False: 73.2k]
  ------------------
 1920|  35.7k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1));
 1921|  73.2k|            } else if (Const("pk(", in)) {
  ------------------
  |  Branch (1921:24): [True: 2.90k, False: 70.3k]
  ------------------
 1922|  2.90k|                auto res = ParseKeyEnd<Key, Ctx>(in, ctx);
 1923|  2.90k|                if (!res) return {};
  ------------------
  |  Branch (1923:21): [True: 62, False: 2.84k]
  ------------------
 1924|  2.84k|                auto& [key, key_size] = *res;
 1925|  2.84k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(key))))));
 1926|  2.84k|                in = in.subspan(key_size + 1);
 1927|  2.84k|                script_size += IsTapscript(ctx.MsContext()) ? 33 : 34;
  ------------------
  |  Branch (1927:32): [True: 2.38k, False: 458]
  ------------------
 1928|  70.3k|            } else if (Const("pkh(", in)) {
  ------------------
  |  Branch (1928:24): [True: 740, False: 69.5k]
  ------------------
 1929|    740|                auto res = ParseKeyEnd<Key>(in, ctx);
 1930|    740|                if (!res) return {};
  ------------------
  |  Branch (1930:21): [True: 35, False: 705]
  ------------------
 1931|    705|                auto& [key, key_size] = *res;
 1932|    705|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(key))))));
 1933|    705|                in = in.subspan(key_size + 1);
 1934|    705|                script_size += 24;
 1935|  69.5k|            } else if (Const("pk_k(", in)) {
  ------------------
  |  Branch (1935:24): [True: 102, False: 69.4k]
  ------------------
 1936|    102|                auto res = ParseKeyEnd<Key>(in, ctx);
 1937|    102|                if (!res) return {};
  ------------------
  |  Branch (1937:21): [True: 8, False: 94]
  ------------------
 1938|     94|                auto& [key, key_size] = *res;
 1939|     94|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(key))));
 1940|     94|                in = in.subspan(key_size + 1);
 1941|     94|                script_size += IsTapscript(ctx.MsContext()) ? 32 : 33;
  ------------------
  |  Branch (1941:32): [True: 91, False: 3]
  ------------------
 1942|  69.4k|            } else if (Const("pk_h(", in)) {
  ------------------
  |  Branch (1942:24): [True: 77, False: 69.4k]
  ------------------
 1943|     77|                auto res = ParseKeyEnd<Key>(in, ctx);
 1944|     77|                if (!res) return {};
  ------------------
  |  Branch (1944:21): [True: 9, False: 68]
  ------------------
 1945|     68|                auto& [key, key_size] = *res;
 1946|     68|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(key))));
 1947|     68|                in = in.subspan(key_size + 1);
 1948|     68|                script_size += 23;
 1949|  69.4k|            } else if (Const("sha256(", in)) {
  ------------------
  |  Branch (1949:24): [True: 115, False: 69.2k]
  ------------------
 1950|    115|                auto res = ParseHexStrEnd(in, 32, ctx);
 1951|    115|                if (!res) return {};
  ------------------
  |  Branch (1951:21): [True: 18, False: 97]
  ------------------
 1952|     97|                auto& [hash, hash_size] = *res;
 1953|     97|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::SHA256, std::move(hash)));
 1954|     97|                in = in.subspan(hash_size + 1);
 1955|     97|                script_size += 38;
 1956|  69.2k|            } else if (Const("ripemd160(", in)) {
  ------------------
  |  Branch (1956:24): [True: 250, False: 69.0k]
  ------------------
 1957|    250|                auto res = ParseHexStrEnd(in, 20, ctx);
 1958|    250|                if (!res) return {};
  ------------------
  |  Branch (1958:21): [True: 20, False: 230]
  ------------------
 1959|    230|                auto& [hash, hash_size] = *res;
 1960|    230|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::RIPEMD160, std::move(hash)));
 1961|    230|                in = in.subspan(hash_size + 1);
 1962|    230|                script_size += 26;
 1963|  69.0k|            } else if (Const("hash256(", in)) {
  ------------------
  |  Branch (1963:24): [True: 45, False: 68.9k]
  ------------------
 1964|     45|                auto res = ParseHexStrEnd(in, 32, ctx);
 1965|     45|                if (!res) return {};
  ------------------
  |  Branch (1965:21): [True: 2, False: 43]
  ------------------
 1966|     43|                auto& [hash, hash_size] = *res;
 1967|     43|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH256, std::move(hash)));
 1968|     43|                in = in.subspan(hash_size + 1);
 1969|     43|                script_size += 38;
 1970|  68.9k|            } else if (Const("hash160(", in)) {
  ------------------
  |  Branch (1970:24): [True: 407, False: 68.5k]
  ------------------
 1971|    407|                auto res = ParseHexStrEnd(in, 20, ctx);
 1972|    407|                if (!res) return {};
  ------------------
  |  Branch (1972:21): [True: 10, False: 397]
  ------------------
 1973|    397|                auto& [hash, hash_size] = *res;
 1974|    397|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH160, std::move(hash)));
 1975|    397|                in = in.subspan(hash_size + 1);
 1976|    397|                script_size += 26;
 1977|  68.5k|            } else if (Const("after(", in)) {
  ------------------
  |  Branch (1977:24): [True: 6.81k, False: 61.7k]
  ------------------
 1978|  6.81k|                int arg_size = FindNextChar(in, ')');
 1979|  6.81k|                if (arg_size < 1) return {};
  ------------------
  |  Branch (1979:21): [True: 16, False: 6.79k]
  ------------------
 1980|  6.79k|                const auto num{ToIntegral<int64_t>(std::string_view(in.data(), arg_size))};
 1981|  6.79k|                if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {};
  ------------------
  |  Branch (1981:21): [True: 12, False: 6.78k]
  |  Branch (1981:41): [True: 38, False: 6.74k]
  |  Branch (1981:53): [True: 10, False: 6.73k]
  ------------------
 1982|  6.73k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AFTER, *num));
 1983|  6.73k|                in = in.subspan(arg_size + 1);
 1984|  6.73k|                script_size += 1 + (*num > 16) + (*num > 0x7f) + (*num > 0x7fff) + (*num > 0x7fffff);
 1985|  61.7k|            } else if (Const("older(", in)) {
  ------------------
  |  Branch (1985:24): [True: 3.48k, False: 58.2k]
  ------------------
 1986|  3.48k|                int arg_size = FindNextChar(in, ')');
 1987|  3.48k|                if (arg_size < 1) return {};
  ------------------
  |  Branch (1987:21): [True: 23, False: 3.45k]
  ------------------
 1988|  3.45k|                const auto num{ToIntegral<int64_t>(std::string_view(in.data(), arg_size))};
 1989|  3.45k|                if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {};
  ------------------
  |  Branch (1989:21): [True: 22, False: 3.43k]
  |  Branch (1989:41): [True: 50, False: 3.38k]
  |  Branch (1989:53): [True: 6, False: 3.38k]
  ------------------
 1990|  3.38k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OLDER, *num));
 1991|  3.38k|                in = in.subspan(arg_size + 1);
 1992|  3.38k|                script_size += 1 + (*num > 16) + (*num > 0x7f) + (*num > 0x7fff) + (*num > 0x7fffff);
 1993|  58.2k|            } else if (Const("multi(", in)) {
  ------------------
  |  Branch (1993:24): [True: 382, False: 57.9k]
  ------------------
 1994|    382|                if (!parse_multi_exp(in, /* is_multi_a = */false)) return {};
  ------------------
  |  Branch (1994:21): [True: 133, False: 249]
  ------------------
 1995|  57.9k|            } else if (Const("multi_a(", in)) {
  ------------------
  |  Branch (1995:24): [True: 77, False: 57.8k]
  ------------------
 1996|     77|                if (!parse_multi_exp(in, /* is_multi_a = */true)) return {};
  ------------------
  |  Branch (1996:21): [True: 37, False: 40]
  ------------------
 1997|  57.8k|            } else if (Const("thresh(", in)) {
  ------------------
  |  Branch (1997:24): [True: 8.06k, False: 49.7k]
  ------------------
 1998|  8.06k|                int next_comma = FindNextChar(in, ',');
 1999|  8.06k|                if (next_comma < 1) return {};
  ------------------
  |  Branch (1999:21): [True: 1, False: 8.05k]
  ------------------
 2000|  8.05k|                const auto k{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 2001|  8.05k|                if (!k.has_value() || *k < 1) return {};
  ------------------
  |  Branch (2001:21): [True: 20, False: 8.03k]
  |  Branch (2001:39): [True: 55, False: 7.98k]
  ------------------
 2002|  7.98k|                in = in.subspan(next_comma + 1);
 2003|       |                // n = 1 here because we read the first WRAPPED_EXPR before reaching THRESH
 2004|  7.98k|                to_parse.emplace_back(ParseContext::THRESH, 1, *k);
 2005|  7.98k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2006|  7.98k|                script_size += 2 + (*k > 16) + (*k > 0x7f) + (*k > 0x7fff) + (*k > 0x7fffff);
 2007|  49.7k|            } else if (Const("andor(", in)) {
  ------------------
  |  Branch (2007:24): [True: 3.92k, False: 45.8k]
  ------------------
 2008|  3.92k|                to_parse.emplace_back(ParseContext::ANDOR, -1, -1);
 2009|  3.92k|                to_parse.emplace_back(ParseContext::CLOSE_BRACKET, -1, -1);
 2010|  3.92k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2011|  3.92k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2012|  3.92k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2013|  3.92k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2014|  3.92k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2015|  3.92k|                script_size += 5;
 2016|  45.8k|            } else {
 2017|  45.8k|                if (Const("and_n(", in)) {
  ------------------
  |  Branch (2017:21): [True: 2.84k, False: 42.9k]
  ------------------
 2018|  2.84k|                    to_parse.emplace_back(ParseContext::AND_N, -1, -1);
 2019|  2.84k|                    script_size += 5;
 2020|  42.9k|                } else if (Const("and_b(", in)) {
  ------------------
  |  Branch (2020:28): [True: 8.09k, False: 34.8k]
  ------------------
 2021|  8.09k|                    to_parse.emplace_back(ParseContext::AND_B, -1, -1);
 2022|  8.09k|                    script_size += 2;
 2023|  34.8k|                } else if (Const("and_v(", in)) {
  ------------------
  |  Branch (2023:28): [True: 3.99k, False: 30.9k]
  ------------------
 2024|  3.99k|                    to_parse.emplace_back(ParseContext::AND_V, -1, -1);
 2025|  3.99k|                    script_size += 1;
 2026|  30.9k|                } else if (Const("or_b(", in)) {
  ------------------
  |  Branch (2026:28): [True: 12.2k, False: 18.6k]
  ------------------
 2027|  12.2k|                    to_parse.emplace_back(ParseContext::OR_B, -1, -1);
 2028|  12.2k|                    script_size += 2;
 2029|  18.6k|                } else if (Const("or_c(", in)) {
  ------------------
  |  Branch (2029:28): [True: 9.68k, False: 8.98k]
  ------------------
 2030|  9.68k|                    to_parse.emplace_back(ParseContext::OR_C, -1, -1);
 2031|  9.68k|                    script_size += 3;
 2032|  9.68k|                } else if (Const("or_d(", in)) {
  ------------------
  |  Branch (2032:28): [True: 5.66k, False: 3.31k]
  ------------------
 2033|  5.66k|                    to_parse.emplace_back(ParseContext::OR_D, -1, -1);
 2034|  5.66k|                    script_size += 4;
 2035|  5.66k|                } else if (Const("or_i(", in)) {
  ------------------
  |  Branch (2035:28): [True: 2.63k, False: 676]
  ------------------
 2036|  2.63k|                    to_parse.emplace_back(ParseContext::OR_I, -1, -1);
 2037|  2.63k|                    script_size += 4;
 2038|  2.63k|                } else {
 2039|    676|                    return {};
 2040|    676|                }
 2041|  45.1k|                to_parse.emplace_back(ParseContext::CLOSE_BRACKET, -1, -1);
 2042|  45.1k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2043|  45.1k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2044|  45.1k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2045|  45.1k|            }
 2046|   130k|            break;
 2047|   132k|        }
 2048|   130k|        case ParseContext::ALT: {
  ------------------
  |  Branch (2048:9): [True: 53.8k, False: 9.14M]
  ------------------
 2049|  53.8k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_A, Vector(std::move(constructed.back())));
 2050|  53.8k|            break;
 2051|   132k|        }
 2052|  30.5k|        case ParseContext::SWAP: {
  ------------------
  |  Branch (2052:9): [True: 30.5k, False: 9.16M]
  ------------------
 2053|  30.5k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_S, Vector(std::move(constructed.back())));
 2054|  30.5k|            break;
 2055|   132k|        }
 2056|  1.89M|        case ParseContext::CHECK: {
  ------------------
  |  Branch (2056:9): [True: 1.89M, False: 7.30M]
  ------------------
 2057|  1.89M|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(std::move(constructed.back())));
 2058|  1.89M|            break;
 2059|   132k|        }
 2060|  44.2k|        case ParseContext::DUP_IF: {
  ------------------
  |  Branch (2060:9): [True: 44.2k, False: 9.15M]
  ------------------
 2061|  44.2k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_D, Vector(std::move(constructed.back())));
 2062|  44.2k|            break;
 2063|   132k|        }
 2064|  11.5k|        case ParseContext::NON_ZERO: {
  ------------------
  |  Branch (2064:9): [True: 11.5k, False: 9.18M]
  ------------------
 2065|  11.5k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_J, Vector(std::move(constructed.back())));
 2066|  11.5k|            break;
 2067|   132k|        }
 2068|   228k|        case ParseContext::ZERO_NOTEQUAL: {
  ------------------
  |  Branch (2068:9): [True: 228k, False: 8.96M]
  ------------------
 2069|   228k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_N, Vector(std::move(constructed.back())));
 2070|   228k|            break;
 2071|   132k|        }
 2072|  20.7k|        case ParseContext::VERIFY: {
  ------------------
  |  Branch (2072:9): [True: 20.7k, False: 9.17M]
  ------------------
 2073|  20.7k|            script_size += (constructed.back()->GetType() << "x"_mst);
 2074|  20.7k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_V, Vector(std::move(constructed.back())));
 2075|  20.7k|            break;
 2076|   132k|        }
 2077|   669k|        case ParseContext::WRAP_U: {
  ------------------
  |  Branch (2077:9): [True: 669k, False: 8.52M]
  ------------------
 2078|   669k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OR_I, Vector(std::move(constructed.back()), MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0)));
 2079|   669k|            break;
 2080|   132k|        }
 2081|  4.83M|        case ParseContext::WRAP_T: {
  ------------------
  |  Branch (2081:9): [True: 4.83M, False: 4.36M]
  ------------------
 2082|  4.83M|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AND_V, Vector(std::move(constructed.back()), MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1)));
 2083|  4.83M|            break;
 2084|   132k|        }
 2085|  6.12k|        case ParseContext::AND_B: {
  ------------------
  |  Branch (2085:9): [True: 6.12k, False: 9.19M]
  ------------------
 2086|  6.12k|            BuildBack(ctx.MsContext(), Fragment::AND_B, constructed);
 2087|  6.12k|            break;
 2088|   132k|        }
 2089|  2.23k|        case ParseContext::AND_N: {
  ------------------
  |  Branch (2089:9): [True: 2.23k, False: 9.19M]
  ------------------
 2090|  2.23k|            auto mid = std::move(constructed.back());
 2091|  2.23k|            constructed.pop_back();
 2092|  2.23k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(constructed.back()), std::move(mid), MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0)));
 2093|  2.23k|            break;
 2094|   132k|        }
 2095|  2.15k|        case ParseContext::AND_V: {
  ------------------
  |  Branch (2095:9): [True: 2.15k, False: 9.19M]
  ------------------
 2096|  2.15k|            BuildBack(ctx.MsContext(), Fragment::AND_V, constructed);
 2097|  2.15k|            break;
 2098|   132k|        }
 2099|  2.86k|        case ParseContext::OR_B: {
  ------------------
  |  Branch (2099:9): [True: 2.86k, False: 9.19M]
  ------------------
 2100|  2.86k|            BuildBack(ctx.MsContext(), Fragment::OR_B, constructed);
 2101|  2.86k|            break;
 2102|   132k|        }
 2103|  7.71k|        case ParseContext::OR_C: {
  ------------------
  |  Branch (2103:9): [True: 7.71k, False: 9.19M]
  ------------------
 2104|  7.71k|            BuildBack(ctx.MsContext(), Fragment::OR_C, constructed);
 2105|  7.71k|            break;
 2106|   132k|        }
 2107|  2.71k|        case ParseContext::OR_D: {
  ------------------
  |  Branch (2107:9): [True: 2.71k, False: 9.19M]
  ------------------
 2108|  2.71k|            BuildBack(ctx.MsContext(), Fragment::OR_D, constructed);
 2109|  2.71k|            break;
 2110|   132k|        }
 2111|  1.01M|        case ParseContext::OR_I: {
  ------------------
  |  Branch (2111:9): [True: 1.01M, False: 8.18M]
  ------------------
 2112|  1.01M|            BuildBack(ctx.MsContext(), Fragment::OR_I, constructed);
 2113|  1.01M|            break;
 2114|   132k|        }
 2115|  2.12k|        case ParseContext::ANDOR: {
  ------------------
  |  Branch (2115:9): [True: 2.12k, False: 9.19M]
  ------------------
 2116|  2.12k|            auto right = std::move(constructed.back());
 2117|  2.12k|            constructed.pop_back();
 2118|  2.12k|            auto mid = std::move(constructed.back());
 2119|  2.12k|            constructed.pop_back();
 2120|  2.12k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(constructed.back()), std::move(mid), std::move(right)));
 2121|  2.12k|            break;
 2122|   132k|        }
 2123|  32.6k|        case ParseContext::THRESH: {
  ------------------
  |  Branch (2123:9): [True: 32.6k, False: 9.16M]
  ------------------
 2124|  32.6k|            if (in.size() < 1) return {};
  ------------------
  |  Branch (2124:17): [True: 66, False: 32.6k]
  ------------------
 2125|  32.6k|            if (in[0] == ',') {
  ------------------
  |  Branch (2125:17): [True: 28.2k, False: 4.38k]
  ------------------
 2126|  28.2k|                in = in.subspan(1);
 2127|  28.2k|                to_parse.emplace_back(ParseContext::THRESH, n+1, k);
 2128|  28.2k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2129|  28.2k|                script_size += 2;
 2130|  28.2k|            } else if (in[0] == ')') {
  ------------------
  |  Branch (2130:24): [True: 4.34k, False: 37]
  ------------------
 2131|  4.34k|                if (k > n) return {};
  ------------------
  |  Branch (2131:21): [True: 63, False: 4.28k]
  ------------------
 2132|  4.28k|                in = in.subspan(1);
 2133|       |                // Children are constructed in reverse order, so iterate from end to beginning
 2134|  4.28k|                std::vector<NodeRef<Key>> subs;
 2135|  28.6k|                for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (2135:33): [True: 24.3k, False: 4.28k]
  ------------------
 2136|  24.3k|                    subs.push_back(std::move(constructed.back()));
 2137|  24.3k|                    constructed.pop_back();
 2138|  24.3k|                }
 2139|  4.28k|                std::reverse(subs.begin(), subs.end());
 2140|  4.28k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::THRESH, std::move(subs), k));
 2141|  4.28k|            } else {
 2142|     37|                return {};
 2143|     37|            }
 2144|  32.5k|            break;
 2145|  32.6k|        }
 2146|  43.1k|        case ParseContext::COMMA: {
  ------------------
  |  Branch (2146:9): [True: 43.1k, False: 9.15M]
  ------------------
 2147|  43.1k|            if (in.size() < 1 || in[0] != ',') return {};
  ------------------
  |  Branch (2147:17): [True: 76, False: 43.0k]
  |  Branch (2147:34): [True: 80, False: 42.9k]
  ------------------
 2148|  42.9k|            in = in.subspan(1);
 2149|  42.9k|            break;
 2150|  43.1k|        }
 2151|  27.4k|        case ParseContext::CLOSE_BRACKET: {
  ------------------
  |  Branch (2151:9): [True: 27.4k, False: 9.17M]
  ------------------
 2152|  27.4k|            if (in.size() < 1 || in[0] != ')') return {};
  ------------------
  |  Branch (2152:17): [True: 58, False: 27.3k]
  |  Branch (2152:34): [True: 58, False: 27.3k]
  ------------------
 2153|  27.3k|            in = in.subspan(1);
 2154|  27.3k|            break;
 2155|  27.4k|        }
 2156|  9.19M|        }
 2157|  9.19M|    }
 2158|       |
 2159|       |    // Sanity checks on the produced miniscript
 2160|  2.21k|    assert(constructed.size() == 1);
 2161|  2.21k|    assert(constructed[0]->ScriptSize() == script_size);
 2162|  2.21k|    if (in.size() > 0) return {};
  ------------------
  |  Branch (2162:9): [True: 101, False: 2.11k]
  ------------------
 2163|  2.11k|    NodeRef<Key> tl_node = std::move(constructed.front());
 2164|  2.11k|    tl_node->DuplicateKeyCheck(ctx);
 2165|  2.11k|    return tl_node;
 2166|  2.21k|}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEEEENSt3__110unique_ptrIKNS_4NodeIT_EENS5_14default_deleteISA_EEEEDpOT0_:
  196|  6.59M|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEj:
 1670|  6.60M|        : fragment(nt), k(val), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZNK10miniscript4NodeIjE7CalcOpsEv:
  944|  15.5M|    internal::Ops CalcOps() const {
  945|  15.5M|        switch (fragment) {
  ------------------
  |  Branch (945:17): [True: 0, False: 15.5M]
  ------------------
  946|  4.87M|            case Fragment::JUST_1: return {0, 0, {}};
  ------------------
  |  Branch (946:13): [True: 4.87M, False: 10.6M]
  ------------------
  947|  1.75M|            case Fragment::JUST_0: return {0, {}, 0};
  ------------------
  |  Branch (947:13): [True: 1.75M, False: 13.7M]
  ------------------
  948|  3.72k|            case Fragment::PK_K: return {0, 0, 0};
  ------------------
  |  Branch (948:13): [True: 3.72k, False: 15.5M]
  ------------------
  949|  1.44k|            case Fragment::PK_H: return {3, 0, 0};
  ------------------
  |  Branch (949:13): [True: 1.44k, False: 15.5M]
  ------------------
  950|  3.38k|            case Fragment::OLDER:
  ------------------
  |  Branch (950:13): [True: 3.38k, False: 15.5M]
  ------------------
  951|  10.1k|            case Fragment::AFTER: return {1, 0, {}};
  ------------------
  |  Branch (951:13): [True: 6.73k, False: 15.5M]
  ------------------
  952|     97|            case Fragment::SHA256:
  ------------------
  |  Branch (952:13): [True: 97, False: 15.5M]
  ------------------
  953|    327|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (953:13): [True: 230, False: 15.5M]
  ------------------
  954|    370|            case Fragment::HASH256:
  ------------------
  |  Branch (954:13): [True: 43, False: 15.5M]
  ------------------
  955|    767|            case Fragment::HASH160: return {4, 0, {}};
  ------------------
  |  Branch (955:13): [True: 397, False: 15.5M]
  ------------------
  956|  4.83M|            case Fragment::AND_V: return {subs[0]->ops.count + subs[1]->ops.count, subs[0]->ops.sat + subs[1]->ops.sat, {}};
  ------------------
  |  Branch (956:13): [True: 4.83M, False: 10.6M]
  ------------------
  957|  6.12k|            case Fragment::AND_B: {
  ------------------
  |  Branch (957:13): [True: 6.12k, False: 15.5M]
  ------------------
  958|  6.12k|                const auto count{1 + subs[0]->ops.count + subs[1]->ops.count};
  959|  6.12k|                const auto sat{subs[0]->ops.sat + subs[1]->ops.sat};
  960|  6.12k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  961|  6.12k|                return {count, sat, dsat};
  962|    370|            }
  963|  2.86k|            case Fragment::OR_B: {
  ------------------
  |  Branch (963:13): [True: 2.86k, False: 15.5M]
  ------------------
  964|  2.86k|                const auto count{1 + subs[0]->ops.count + subs[1]->ops.count};
  965|  2.86k|                const auto sat{(subs[0]->ops.sat + subs[1]->ops.dsat) | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  966|  2.86k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  967|  2.86k|                return {count, sat, dsat};
  968|    370|            }
  969|  2.77k|            case Fragment::OR_D: {
  ------------------
  |  Branch (969:13): [True: 2.77k, False: 15.5M]
  ------------------
  970|  2.77k|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count};
  971|  2.77k|                const auto sat{subs[0]->ops.sat | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  972|  2.77k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  973|  2.77k|                return {count, sat, dsat};
  974|    370|            }
  975|  7.71k|            case Fragment::OR_C: {
  ------------------
  |  Branch (975:13): [True: 7.71k, False: 15.5M]
  ------------------
  976|  7.71k|                const auto count{2 + subs[0]->ops.count + subs[1]->ops.count};
  977|  7.71k|                const auto sat{subs[0]->ops.sat | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  978|  7.71k|                return {count, sat, {}};
  979|    370|            }
  980|  1.71M|            case Fragment::OR_I: {
  ------------------
  |  Branch (980:13): [True: 1.71M, False: 13.8M]
  ------------------
  981|  1.71M|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count};
  982|  1.71M|                const auto sat{subs[0]->ops.sat | subs[1]->ops.sat};
  983|  1.71M|                const auto dsat{subs[0]->ops.dsat | subs[1]->ops.dsat};
  984|  1.71M|                return {count, sat, dsat};
  985|    370|            }
  986|  4.36k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (986:13): [True: 4.36k, False: 15.5M]
  ------------------
  987|  4.36k|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count + subs[2]->ops.count};
  988|  4.36k|                const auto sat{(subs[1]->ops.sat + subs[0]->ops.sat) | (subs[0]->ops.dsat + subs[2]->ops.sat)};
  989|  4.36k|                const auto dsat{subs[0]->ops.dsat + subs[2]->ops.dsat};
  990|  4.36k|                return {count, sat, dsat};
  991|    370|            }
  992|    506|            case Fragment::MULTI: return {1, (uint32_t)keys.size(), (uint32_t)keys.size()};
  ------------------
  |  Branch (992:13): [True: 506, False: 15.5M]
  ------------------
  993|     58|            case Fragment::MULTI_A: return {(uint32_t)keys.size() + 1, 0, 0};
  ------------------
  |  Branch (993:13): [True: 58, False: 15.5M]
  ------------------
  994|  30.5k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (994:13): [True: 30.5k, False: 15.5M]
  ------------------
  995|  1.92M|            case Fragment::WRAP_C:
  ------------------
  |  Branch (995:13): [True: 1.89M, False: 13.6M]
  ------------------
  996|  2.18M|            case Fragment::WRAP_N: return {1 + subs[0]->ops.count, subs[0]->ops.sat, subs[0]->ops.dsat};
  ------------------
  |  Branch (996:13): [True: 254k, False: 15.2M]
  ------------------
  997|  53.8k|            case Fragment::WRAP_A: return {2 + subs[0]->ops.count, subs[0]->ops.sat, subs[0]->ops.dsat};
  ------------------
  |  Branch (997:13): [True: 53.8k, False: 15.4M]
  ------------------
  998|  44.2k|            case Fragment::WRAP_D: return {3 + subs[0]->ops.count, subs[0]->ops.sat, 0};
  ------------------
  |  Branch (998:13): [True: 44.2k, False: 15.4M]
  ------------------
  999|  12.5k|            case Fragment::WRAP_J: return {4 + subs[0]->ops.count, subs[0]->ops.sat, 0};
  ------------------
  |  Branch (999:13): [True: 12.5k, False: 15.5M]
  ------------------
 1000|  21.3k|            case Fragment::WRAP_V: return {subs[0]->ops.count + (subs[0]->GetType() << "x"_mst), subs[0]->ops.sat, {}};
  ------------------
  |  Branch (1000:13): [True: 21.3k, False: 15.5M]
  ------------------
 1001|  4.35k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1001:13): [True: 4.35k, False: 15.5M]
  ------------------
 1002|  4.35k|                uint32_t count = 0;
 1003|  4.35k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1004|  24.5k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1004:38): [True: 24.5k, False: 4.35k]
  ------------------
 1005|  24.5k|                    count += sub->ops.count + 1;
 1006|  24.5k|                    auto next_sats = Vector(sats[0] + sub->ops.dsat);
 1007|  8.42M|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub->ops.dsat) | (sats[j - 1] + sub->ops.sat));
  ------------------
  |  Branch (1007:40): [True: 8.40M, False: 24.5k]
  ------------------
 1008|  24.5k|                    next_sats.push_back(sats[sats.size() - 1] + sub->ops.sat);
 1009|  24.5k|                    sats = std::move(next_sats);
 1010|  24.5k|                }
 1011|  4.35k|                assert(k <= sats.size());
 1012|  4.35k|                return {count, sats[k], sats[0]};
 1013|  4.35k|            }
 1014|  15.5M|        }
 1015|      0|        assert(false);
 1016|      0|    }
_ZNK10miniscript4NodeIjE13CalcStackSizeEv:
 1018|  15.5M|    internal::StackSize CalcStackSize() const {
 1019|  15.5M|        using namespace internal;
 1020|  15.5M|        switch (fragment) {
  ------------------
  |  Branch (1020:17): [True: 0, False: 15.5M]
  ------------------
 1021|  1.75M|            case Fragment::JUST_0: return {{}, SatInfo::Push()};
  ------------------
  |  Branch (1021:13): [True: 1.75M, False: 13.7M]
  ------------------
 1022|  4.87M|            case Fragment::JUST_1: return {SatInfo::Push(), {}};
  ------------------
  |  Branch (1022:13): [True: 4.87M, False: 10.6M]
  ------------------
 1023|  3.38k|            case Fragment::OLDER:
  ------------------
  |  Branch (1023:13): [True: 3.38k, False: 15.5M]
  ------------------
 1024|  10.1k|            case Fragment::AFTER: return {SatInfo::Push() + SatInfo::Nop(), {}};
  ------------------
  |  Branch (1024:13): [True: 6.73k, False: 15.5M]
  ------------------
 1025|  3.72k|            case Fragment::PK_K: return {SatInfo::Push()};
  ------------------
  |  Branch (1025:13): [True: 3.72k, False: 15.5M]
  ------------------
 1026|  1.44k|            case Fragment::PK_H: return {SatInfo::OP_DUP() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY()};
  ------------------
  |  Branch (1026:13): [True: 1.44k, False: 15.5M]
  ------------------
 1027|     97|            case Fragment::SHA256:
  ------------------
  |  Branch (1027:13): [True: 97, False: 15.5M]
  ------------------
 1028|    327|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1028:13): [True: 230, False: 15.5M]
  ------------------
 1029|    370|            case Fragment::HASH256:
  ------------------
  |  Branch (1029:13): [True: 43, False: 15.5M]
  ------------------
 1030|    767|            case Fragment::HASH160: return {
  ------------------
  |  Branch (1030:13): [True: 397, False: 15.5M]
  ------------------
 1031|    767|                SatInfo::OP_SIZE() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1032|    767|                {}
 1033|    767|            };
 1034|  4.36k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1034:13): [True: 4.36k, False: 15.5M]
  ------------------
 1035|  4.36k|                const auto& x{subs[0]->ss};
 1036|  4.36k|                const auto& y{subs[1]->ss};
 1037|  4.36k|                const auto& z{subs[2]->ss};
 1038|  4.36k|                return {
 1039|  4.36k|                    (x.sat + SatInfo::If() + y.sat) | (x.dsat + SatInfo::If() + z.sat),
 1040|  4.36k|                    x.dsat + SatInfo::If() + z.dsat
 1041|  4.36k|                };
 1042|    370|            }
 1043|  4.83M|            case Fragment::AND_V: {
  ------------------
  |  Branch (1043:13): [True: 4.83M, False: 10.6M]
  ------------------
 1044|  4.83M|                const auto& x{subs[0]->ss};
 1045|  4.83M|                const auto& y{subs[1]->ss};
 1046|  4.83M|                return {x.sat + y.sat, {}};
 1047|    370|            }
 1048|  6.12k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1048:13): [True: 6.12k, False: 15.5M]
  ------------------
 1049|  6.12k|                const auto& x{subs[0]->ss};
 1050|  6.12k|                const auto& y{subs[1]->ss};
 1051|  6.12k|                return {x.sat + y.sat + SatInfo::BinaryOp(), x.dsat + y.dsat + SatInfo::BinaryOp()};
 1052|    370|            }
 1053|  2.86k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1053:13): [True: 2.86k, False: 15.5M]
  ------------------
 1054|  2.86k|                const auto& x{subs[0]->ss};
 1055|  2.86k|                const auto& y{subs[1]->ss};
 1056|  2.86k|                return {
 1057|  2.86k|                    ((x.sat + y.dsat) | (x.dsat + y.sat)) + SatInfo::BinaryOp(),
 1058|  2.86k|                    x.dsat + y.dsat + SatInfo::BinaryOp()
 1059|  2.86k|                };
 1060|    370|            }
 1061|  7.71k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1061:13): [True: 7.71k, False: 15.5M]
  ------------------
 1062|  7.71k|                const auto& x{subs[0]->ss};
 1063|  7.71k|                const auto& y{subs[1]->ss};
 1064|  7.71k|                return {(x.sat + SatInfo::If()) | (x.dsat + SatInfo::If() + y.sat), {}};
 1065|    370|            }
 1066|  2.77k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1066:13): [True: 2.77k, False: 15.5M]
  ------------------
 1067|  2.77k|                const auto& x{subs[0]->ss};
 1068|  2.77k|                const auto& y{subs[1]->ss};
 1069|  2.77k|                return {
 1070|  2.77k|                    (x.sat + SatInfo::OP_IFDUP(true) + SatInfo::If()) | (x.dsat + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.sat),
 1071|  2.77k|                    x.dsat + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.dsat
 1072|  2.77k|                };
 1073|    370|            }
 1074|  1.71M|            case Fragment::OR_I: {
  ------------------
  |  Branch (1074:13): [True: 1.71M, False: 13.8M]
  ------------------
 1075|  1.71M|                const auto& x{subs[0]->ss};
 1076|  1.71M|                const auto& y{subs[1]->ss};
 1077|  1.71M|                return {SatInfo::If() + (x.sat | y.sat), SatInfo::If() + (x.dsat | y.dsat)};
 1078|    370|            }
 1079|       |            // multi(k, key1, key2, ..., key_n) starts off with k+1 stack elements (a 0, plus k
 1080|       |            // signatures), then reaches n+k+3 stack elements after pushing the n keys, plus k and
 1081|       |            // n itself, and ends with 1 stack element (success or failure). Thus, it net removes
 1082|       |            // k elements (from k+1 to 1), while reaching k+n+2 more than it ends with.
 1083|    506|            case Fragment::MULTI: return {SatInfo(k, k + keys.size() + 2)};
  ------------------
  |  Branch (1083:13): [True: 506, False: 15.5M]
  ------------------
 1084|       |            // multi_a(k, key1, key2, ..., key_n) starts off with n stack elements (the
 1085|       |            // signatures), reaches 1 more (after the first key push), and ends with 1. Thus it net
 1086|       |            // removes n-1 elements (from n to 1) while reaching n more than it ends with.
 1087|     58|            case Fragment::MULTI_A: return {SatInfo(keys.size() - 1, keys.size())};
  ------------------
  |  Branch (1087:13): [True: 58, False: 15.5M]
  ------------------
 1088|  53.8k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1088:13): [True: 53.8k, False: 15.4M]
  ------------------
 1089|   308k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1089:13): [True: 254k, False: 15.2M]
  ------------------
 1090|   338k|            case Fragment::WRAP_S: return subs[0]->ss;
  ------------------
  |  Branch (1090:13): [True: 30.5k, False: 15.5M]
  ------------------
 1091|  1.89M|            case Fragment::WRAP_C: return {
  ------------------
  |  Branch (1091:13): [True: 1.89M, False: 13.6M]
  ------------------
 1092|  1.89M|                subs[0]->ss.sat + SatInfo::OP_CHECKSIG(),
 1093|  1.89M|                subs[0]->ss.dsat + SatInfo::OP_CHECKSIG()
 1094|  1.89M|            };
 1095|  44.2k|            case Fragment::WRAP_D: return {
  ------------------
  |  Branch (1095:13): [True: 44.2k, False: 15.4M]
  ------------------
 1096|  44.2k|                SatInfo::OP_DUP() + SatInfo::If() + subs[0]->ss.sat,
 1097|  44.2k|                SatInfo::OP_DUP() + SatInfo::If()
 1098|  44.2k|            };
 1099|  21.3k|            case Fragment::WRAP_V: return {subs[0]->ss.sat + SatInfo::OP_VERIFY(), {}};
  ------------------
  |  Branch (1099:13): [True: 21.3k, False: 15.5M]
  ------------------
 1100|  12.5k|            case Fragment::WRAP_J: return {
  ------------------
  |  Branch (1100:13): [True: 12.5k, False: 15.5M]
  ------------------
 1101|  12.5k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If() + subs[0]->ss.sat,
 1102|  12.5k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If()
 1103|  12.5k|            };
 1104|  4.35k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1104:13): [True: 4.35k, False: 15.5M]
  ------------------
 1105|       |                // sats[j] is the SatInfo corresponding to all traces reaching j satisfactions.
 1106|  4.35k|                auto sats = Vector(SatInfo::Empty());
 1107|  28.8k|                for (size_t i = 0; i < subs.size(); ++i) {
  ------------------
  |  Branch (1107:36): [True: 24.5k, False: 4.35k]
  ------------------
 1108|       |                    // Loop over the subexpressions, processing them one by one. After adding
 1109|       |                    // element i we need to add OP_ADD (if i>0).
 1110|  24.5k|                    auto add = i ? SatInfo::BinaryOp() : SatInfo::Empty();
  ------------------
  |  Branch (1110:32): [True: 20.1k, False: 4.35k]
  ------------------
 1111|       |                    // Construct a variable that will become the next sats, starting with index 0.
 1112|  24.5k|                    auto next_sats = Vector(sats[0] + subs[i]->ss.dsat + add);
 1113|       |                    // Then loop to construct next_sats[1..i].
 1114|  8.42M|                    for (size_t j = 1; j < sats.size(); ++j) {
  ------------------
  |  Branch (1114:40): [True: 8.40M, False: 24.5k]
  ------------------
 1115|  8.40M|                        next_sats.push_back(((sats[j] + subs[i]->ss.dsat) | (sats[j - 1] + subs[i]->ss.sat)) + add);
 1116|  8.40M|                    }
 1117|       |                    // Finally construct next_sats[i+1].
 1118|  24.5k|                    next_sats.push_back(sats[sats.size() - 1] + subs[i]->ss.sat + add);
 1119|       |                    // Switch over.
 1120|  24.5k|                    sats = std::move(next_sats);
 1121|  24.5k|                }
 1122|       |                // To satisfy thresh we need k satisfactions; to dissatisfy we need 0. In both
 1123|       |                // cases a push of k and an OP_EQUAL follow.
 1124|  4.35k|                return {
 1125|  4.35k|                    sats[k] + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1126|  4.35k|                    sats[0] + SatInfo::Push() + SatInfo::OP_EQUAL()
 1127|  4.35k|                };
 1128|   308k|            }
 1129|  15.5M|        }
 1130|      0|        assert(false);
 1131|      0|    }
_ZNK10miniscript4NodeIjE15CalcWitnessSizeEv:
 1133|  15.5M|    internal::WitnessSize CalcWitnessSize() const {
 1134|  15.5M|        const uint32_t sig_size = IsTapscript(m_script_ctx) ? 1 + 65 : 1 + 72;
  ------------------
  |  Branch (1134:35): [True: 15.4M, False: 46.2k]
  ------------------
 1135|  15.5M|        const uint32_t pubkey_size = IsTapscript(m_script_ctx) ? 1 + 32 : 1 + 33;
  ------------------
  |  Branch (1135:38): [True: 15.4M, False: 46.2k]
  ------------------
 1136|  15.5M|        switch (fragment) {
  ------------------
  |  Branch (1136:17): [True: 0, False: 15.5M]
  ------------------
 1137|  1.75M|            case Fragment::JUST_0: return {{}, 0};
  ------------------
  |  Branch (1137:13): [True: 1.75M, False: 13.7M]
  ------------------
 1138|  4.87M|            case Fragment::JUST_1:
  ------------------
  |  Branch (1138:13): [True: 4.87M, False: 10.6M]
  ------------------
 1139|  4.87M|            case Fragment::OLDER:
  ------------------
  |  Branch (1139:13): [True: 3.38k, False: 15.5M]
  ------------------
 1140|  4.88M|            case Fragment::AFTER: return {0, {}};
  ------------------
  |  Branch (1140:13): [True: 6.73k, False: 15.5M]
  ------------------
 1141|  3.72k|            case Fragment::PK_K: return {sig_size, 1};
  ------------------
  |  Branch (1141:13): [True: 3.72k, False: 15.5M]
  ------------------
 1142|  1.44k|            case Fragment::PK_H: return {sig_size + pubkey_size, 1 + pubkey_size};
  ------------------
  |  Branch (1142:13): [True: 1.44k, False: 15.5M]
  ------------------
 1143|     97|            case Fragment::SHA256:
  ------------------
  |  Branch (1143:13): [True: 97, False: 15.5M]
  ------------------
 1144|    327|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1144:13): [True: 230, False: 15.5M]
  ------------------
 1145|    370|            case Fragment::HASH256:
  ------------------
  |  Branch (1145:13): [True: 43, False: 15.5M]
  ------------------
 1146|    767|            case Fragment::HASH160: return {1 + 32, {}};
  ------------------
  |  Branch (1146:13): [True: 397, False: 15.5M]
  ------------------
 1147|  4.36k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1147:13): [True: 4.36k, False: 15.5M]
  ------------------
 1148|  4.36k|                const auto sat{(subs[0]->ws.sat + subs[1]->ws.sat) | (subs[0]->ws.dsat + subs[2]->ws.sat)};
 1149|  4.36k|                const auto dsat{subs[0]->ws.dsat + subs[2]->ws.dsat};
 1150|  4.36k|                return {sat, dsat};
 1151|    370|            }
 1152|  4.83M|            case Fragment::AND_V: return {subs[0]->ws.sat + subs[1]->ws.sat, {}};
  ------------------
  |  Branch (1152:13): [True: 4.83M, False: 10.6M]
  ------------------
 1153|  6.12k|            case Fragment::AND_B: return {subs[0]->ws.sat + subs[1]->ws.sat, subs[0]->ws.dsat + subs[1]->ws.dsat};
  ------------------
  |  Branch (1153:13): [True: 6.12k, False: 15.5M]
  ------------------
 1154|  2.86k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1154:13): [True: 2.86k, False: 15.5M]
  ------------------
 1155|  2.86k|                const auto sat{(subs[0]->ws.dsat + subs[1]->ws.sat) | (subs[0]->ws.sat + subs[1]->ws.dsat)};
 1156|  2.86k|                const auto dsat{subs[0]->ws.dsat + subs[1]->ws.dsat};
 1157|  2.86k|                return {sat, dsat};
 1158|    370|            }
 1159|  7.71k|            case Fragment::OR_C: return {subs[0]->ws.sat | (subs[0]->ws.dsat + subs[1]->ws.sat), {}};
  ------------------
  |  Branch (1159:13): [True: 7.71k, False: 15.5M]
  ------------------
 1160|  2.77k|            case Fragment::OR_D: return {subs[0]->ws.sat | (subs[0]->ws.dsat + subs[1]->ws.sat), subs[0]->ws.dsat + subs[1]->ws.dsat};
  ------------------
  |  Branch (1160:13): [True: 2.77k, False: 15.5M]
  ------------------
 1161|  1.71M|            case Fragment::OR_I: return {(subs[0]->ws.sat + 1 + 1) | (subs[1]->ws.sat + 1), (subs[0]->ws.dsat + 1 + 1) | (subs[1]->ws.dsat + 1)};
  ------------------
  |  Branch (1161:13): [True: 1.71M, False: 13.8M]
  ------------------
 1162|    506|            case Fragment::MULTI: return {k * sig_size + 1, k + 1};
  ------------------
  |  Branch (1162:13): [True: 506, False: 15.5M]
  ------------------
 1163|     58|            case Fragment::MULTI_A: return {k * sig_size + static_cast<uint32_t>(keys.size()) - k, static_cast<uint32_t>(keys.size())};
  ------------------
  |  Branch (1163:13): [True: 58, False: 15.5M]
  ------------------
 1164|  53.8k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1164:13): [True: 53.8k, False: 15.4M]
  ------------------
 1165|   308k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1165:13): [True: 254k, False: 15.2M]
  ------------------
 1166|   338k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1166:13): [True: 30.5k, False: 15.5M]
  ------------------
 1167|  2.23M|            case Fragment::WRAP_C: return subs[0]->ws;
  ------------------
  |  Branch (1167:13): [True: 1.89M, False: 13.6M]
  ------------------
 1168|  44.2k|            case Fragment::WRAP_D: return {1 + 1 + subs[0]->ws.sat, 1};
  ------------------
  |  Branch (1168:13): [True: 44.2k, False: 15.4M]
  ------------------
 1169|  21.3k|            case Fragment::WRAP_V: return {subs[0]->ws.sat, {}};
  ------------------
  |  Branch (1169:13): [True: 21.3k, False: 15.5M]
  ------------------
 1170|  12.5k|            case Fragment::WRAP_J: return {subs[0]->ws.sat, 1};
  ------------------
  |  Branch (1170:13): [True: 12.5k, False: 15.5M]
  ------------------
 1171|  4.35k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1171:13): [True: 4.35k, False: 15.5M]
  ------------------
 1172|  4.35k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1173|  24.5k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1173:38): [True: 24.5k, False: 4.35k]
  ------------------
 1174|  24.5k|                    auto next_sats = Vector(sats[0] + sub->ws.dsat);
 1175|  8.42M|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub->ws.dsat) | (sats[j - 1] + sub->ws.sat));
  ------------------
  |  Branch (1175:40): [True: 8.40M, False: 24.5k]
  ------------------
 1176|  24.5k|                    next_sats.push_back(sats[sats.size() - 1] + sub->ws.sat);
 1177|  24.5k|                    sats = std::move(next_sats);
 1178|  24.5k|                }
 1179|  4.35k|                assert(k <= sats.size());
 1180|  4.35k|                return {sats[k], sats[0]};
 1181|  4.35k|            }
 1182|  15.5M|        }
 1183|      0|        assert(false);
 1184|      0|    }
_ZNK10miniscript4NodeIjE8CalcTypeEv:
  731|  15.5M|    Type CalcType() const {
  732|  15.5M|        using namespace internal;
  733|       |
  734|       |        // THRESH has a variable number of subexpressions
  735|  15.5M|        std::vector<Type> sub_types;
  736|  15.5M|        if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (736:13): [True: 4.35k, False: 15.5M]
  ------------------
  737|  24.5k|            for (const auto& sub : subs) sub_types.push_back(sub->GetType());
  ------------------
  |  Branch (737:34): [True: 24.5k, False: 4.35k]
  ------------------
  738|  4.35k|        }
  739|       |        // All other nodes than THRESH can be computed just from the types of the 0-3 subexpressions.
  740|  15.5M|        static constexpr auto NONE_MST{""_mst};
  741|  15.5M|        Type x = subs.size() > 0 ? subs[0]->GetType() : NONE_MST;
  ------------------
  |  Branch (741:18): [True: 8.89M, False: 6.63M]
  ------------------
  742|  15.5M|        Type y = subs.size() > 1 ? subs[1]->GetType() : NONE_MST;
  ------------------
  |  Branch (742:18): [True: 6.57M, False: 8.95M]
  ------------------
  743|  15.5M|        Type z = subs.size() > 2 ? subs[2]->GetType() : NONE_MST;
  ------------------
  |  Branch (743:18): [True: 5.97k, False: 15.5M]
  ------------------
  744|       |
  745|  15.5M|        return SanitizeType(ComputeType(fragment, x, y, z, sub_types, k, data.size(), subs.size(), keys.size(), m_script_ctx));
  746|  15.5M|    }
_ZNK10miniscript4NodeIjE13CalcScriptLenEv:
  570|  15.5M|    size_t CalcScriptLen() const {
  571|  15.5M|        size_t subsize = 0;
  572|  15.5M|        for (const auto& sub : subs) {
  ------------------
  |  Branch (572:30): [True: 15.4M, False: 15.5M]
  ------------------
  573|  15.4M|            subsize += sub->ScriptSize();
  574|  15.4M|        }
  575|  15.5M|        static constexpr auto NONE_MST{""_mst};
  576|  15.5M|        Type sub0type = subs.size() > 0 ? subs[0]->GetType() : NONE_MST;
  ------------------
  |  Branch (576:25): [True: 8.89M, False: 6.63M]
  ------------------
  577|  15.5M|        return internal::ComputeScriptLen(fragment, sub0type, subsize, k, subs.size(), keys.size(), m_script_ctx);
  578|  15.5M|    }
descriptor.cpp:_ZN10miniscript8internal11ParseKeyEndIjN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS4_4pairIT_iEEEE4SpanIKcERKT0_:
 1752|  3.82k|{
 1753|  3.82k|    int key_size = FindNextChar(in, ')');
 1754|  3.82k|    if (key_size < 1) return {};
  ------------------
  |  Branch (1754:9): [True: 38, False: 3.79k]
  ------------------
 1755|  3.79k|    auto key = ctx.FromString(in.begin(), in.begin() + key_size);
 1756|  3.79k|    if (!key) return {};
  ------------------
  |  Branch (1756:9): [True: 76, False: 3.71k]
  ------------------
 1757|  3.71k|    return {{std::move(*key), key_size}};
 1758|  3.79k|}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS5_10unique_ptrIKNS_4NodeIjEENS5_14default_deleteISA_EEEENS5_9allocatorISD_EEEEEEENS7_IKNS8_IT_EENSB_ISJ_EEEEDpOT0_:
  196|  7.79M|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS6_10unique_ptrIKS1_NS6_14default_deleteIS9_EEEENS6_9allocatorISC_EEEEj:
 1668|  8.83M|        : fragment(nt), k(val), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIjNS5_9allocatorIjEEEEEEENS5_10unique_ptrIKNS_4NodeIT_EENS5_14default_deleteISE_EEEEDpOT0_:
  196|  3.71k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIjNS6_9allocatorIjEEEEj:
 1666|  4.00k|        : fragment(nt), k(val), keys(std::move(key)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
descriptor.cpp:_ZN10miniscript8internal14ParseHexStrEndIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS4_4pairINS4_6vectorIhNS4_9allocatorIhEEEEiEEEE4SpanIKcEmRKT_:
 1764|    817|{
 1765|    817|    int hash_size = FindNextChar(in, ')');
 1766|    817|    if (hash_size < 1) return {};
  ------------------
  |  Branch (1766:9): [True: 13, False: 804]
  ------------------
 1767|    804|    std::string val = std::string(in.begin(), in.begin() + hash_size);
 1768|    804|    if (!IsHex(val)) return {};
  ------------------
  |  Branch (1768:9): [True: 32, False: 772]
  ------------------
 1769|    772|    auto hash = ParseHex(val);
 1770|    772|    if (hash.size() != expected_size) return {};
  ------------------
  |  Branch (1770:9): [True: 5, False: 767]
  ------------------
 1771|    767|    return {{std::move(hash), hash_size}};
 1772|    772|}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIhNS5_9allocatorIhEEEEEEENS5_10unique_ptrIKNS_4NodeIT_EENS5_14default_deleteISE_EEEEDpOT0_:
  196|    767|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIhNS6_9allocatorIhEEEEj:
 1662|    767|        : fragment(nt), k(val), data(std::move(arg)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentERKlEEENSt3__110unique_ptrIKNS_4NodeIT_EENS7_14default_deleteISC_EEEEDpOT0_:
  196|  10.1k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
descriptor.cpp:_ZZN10miniscript8internal5ParseIjN12_GLOBAL__N_19KeyParserEEENSt3__110unique_ptrIKNS_4NodeIT_EENS4_14default_deleteIS9_EEEE4SpanIKcERKT0_ENKUlRSF_bE_clESJ_b:
 1817|    459|    const auto parse_multi_exp = [&](Span<const char>& in, const bool is_multi_a) -> bool {
 1818|    459|        const auto max_keys{is_multi_a ? MAX_PUBKEYS_PER_MULTI_A : MAX_PUBKEYS_PER_MULTISIG};
  ------------------
  |  Branch (1818:29): [True: 77, False: 382]
  ------------------
 1819|    459|        const auto required_ctx{is_multi_a ? MiniscriptContext::TAPSCRIPT : MiniscriptContext::P2WSH};
  ------------------
  |  Branch (1819:33): [True: 77, False: 382]
  ------------------
 1820|    459|        if (ctx.MsContext() != required_ctx) return false;
  ------------------
  |  Branch (1820:13): [True: 8, False: 451]
  ------------------
 1821|       |        // Get threshold
 1822|    451|        int next_comma = FindNextChar(in, ',');
 1823|    451|        if (next_comma < 1) return false;
  ------------------
  |  Branch (1823:13): [True: 1, False: 450]
  ------------------
 1824|    450|        const auto k_to_integral{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 1825|    450|        if (!k_to_integral.has_value()) return false;
  ------------------
  |  Branch (1825:13): [True: 16, False: 434]
  ------------------
 1826|    434|        const int64_t k{k_to_integral.value()};
 1827|    434|        in = in.subspan(next_comma + 1);
 1828|       |        // Get keys. It is compatible for both compressed and x-only keys.
 1829|    434|        std::vector<Key> keys;
 1830|  19.5k|        while (next_comma != -1) {
  ------------------
  |  Branch (1830:16): [True: 19.2k, False: 366]
  ------------------
 1831|  19.2k|            next_comma = FindNextChar(in, ',');
 1832|  19.2k|            int key_length = (next_comma == -1) ? FindNextChar(in, ')') : next_comma;
  ------------------
  |  Branch (1832:30): [True: 407, False: 18.8k]
  ------------------
 1833|  19.2k|            if (key_length < 1) return false;
  ------------------
  |  Branch (1833:17): [True: 28, False: 19.1k]
  ------------------
 1834|  19.1k|            auto key = ctx.FromString(in.begin(), in.begin() + key_length);
 1835|  19.1k|            if (!key) return false;
  ------------------
  |  Branch (1835:17): [True: 40, False: 19.1k]
  ------------------
 1836|  19.1k|            keys.push_back(std::move(*key));
 1837|  19.1k|            in = in.subspan(key_length + 1);
 1838|  19.1k|        }
 1839|    366|        if (keys.size() < 1 || keys.size() > max_keys) return false;
  ------------------
  |  Branch (1839:13): [True: 0, False: 366]
  |  Branch (1839:32): [True: 8, False: 358]
  ------------------
 1840|    358|        if (k < 1 || k > (int64_t)keys.size()) return false;
  ------------------
  |  Branch (1840:13): [True: 23, False: 335]
  |  Branch (1840:22): [True: 46, False: 289]
  ------------------
 1841|    289|        if (is_multi_a) {
  ------------------
  |  Branch (1841:13): [True: 40, False: 249]
  ------------------
 1842|       |            // (push + xonly-key + CHECKSIG[ADD]) * n + k + OP_NUMEQUAL(VERIFY), minus one.
 1843|     40|            script_size += (1 + 32 + 1) * keys.size() + BuildScript(k).size();
 1844|     40|            constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), k));
 1845|    249|        } else {
 1846|    249|            script_size += 2 + (keys.size() > 16) + (k > 16) + 34 * keys.size();
 1847|    249|            constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), k));
 1848|    249|        }
 1849|    289|        return true;
 1850|    358|    };
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIjNS5_9allocatorIjEEEERKlEEENS5_10unique_ptrIKNS_4NodeIT_EENS5_14default_deleteISG_EEEEDpOT0_:
  196|    289|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript4NodeIjED2Ev:
  520|  15.5M|    ~Node() {
  521|  31.0M|        while (!subs.empty()) {
  ------------------
  |  Branch (521:16): [True: 15.4M, False: 15.5M]
  ------------------
  522|  15.4M|            auto node = std::move(subs.back());
  523|  15.4M|            subs.pop_back();
  524|  30.9M|            while (!node->subs.empty()) {
  ------------------
  |  Branch (524:20): [True: 15.4M, False: 15.4M]
  ------------------
  525|  15.4M|                subs.push_back(std::move(node->subs.back()));
  526|  15.4M|                node->subs.pop_back();
  527|  15.4M|            }
  528|  15.4M|        }
  529|  15.5M|    }
_ZNK10miniscript4NodeIjE7GetTypeEv:
 1557|  25.2M|    Type GetType() const { return typ; }
_ZN10miniscript8internal9BuildBackIjEEvNS_17MiniscriptContextENS_8FragmentERNSt3__16vectorINS4_10unique_ptrIKNS_4NodeIT_EENS4_14default_deleteISA_EEEENS4_9allocatorISD_EEEEb:
 1777|  1.03M|{
 1778|  1.03M|    NodeRef<Key> child = std::move(constructed.back());
 1779|  1.03M|    constructed.pop_back();
 1780|  1.03M|    if (reverse) {
  ------------------
  |  Branch (1780:9): [True: 0, False: 1.03M]
  ------------------
 1781|      0|        constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(child), std::move(constructed.back())));
 1782|  1.03M|    } else {
 1783|  1.03M|        constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(constructed.back()), std::move(child)));
 1784|  1.03M|    }
 1785|  1.03M|}
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckERKNS_17MiniscriptContextERNS_8FragmentENSt3__16vectorINS8_10unique_ptrIKNS_4NodeIjEENS8_14default_deleteISD_EEEENS8_9allocatorISG_EEEEEEENSA_IKNSB_IT_EENSE_ISM_EEEEDpOT0_:
  196|  1.03M|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZN10miniscript11MakeNodeRefIjJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS5_10unique_ptrIKNS_4NodeIjEENS5_14default_deleteISA_EEEENS5_9allocatorISD_EEEERlEEENS7_IKNS8_IT_EENSB_ISK_EEEEDpOT0_:
  196|  4.28k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
_ZNK10miniscript4NodeIjE10ScriptSizeEv:
 1499|  15.7M|    size_t ScriptSize() const { return scriptlen; }
descriptor.cpp:_ZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_:
 1441|  2.11k|    {
 1442|       |        // We cannot use a lambda here, as lambdas are non assignable, and the set operations
 1443|       |        // below require moving the comparators around.
 1444|  2.11k|        struct Comp {
 1445|  2.11k|            const Ctx* ctx_ptr;
 1446|  2.11k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
 1447|  2.11k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
 1448|  2.11k|        };
 1449|       |
 1450|       |        // state in the recursive computation:
 1451|       |        // - std::nullopt means "this node has duplicates"
 1452|       |        // - an std::set means "this node has no duplicate keys, and they are: ...".
 1453|  2.11k|        using keyset = std::set<Key, Comp>;
 1454|  2.11k|        using state = std::optional<keyset>;
 1455|       |
 1456|  2.11k|        auto upfn = [&ctx](const Node& node, Span<state> subs) -> state {
 1457|       |            // If this node is already known to have duplicates, nothing left to do.
 1458|  2.11k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
 1459|       |
 1460|       |            // Check if one of the children is already known to have duplicates.
 1461|  2.11k|            for (auto& sub : subs) {
 1462|  2.11k|                if (!sub.has_value()) {
 1463|  2.11k|                    node.has_duplicate_keys = true;
 1464|  2.11k|                    return {};
 1465|  2.11k|                }
 1466|  2.11k|            }
 1467|       |
 1468|       |            // Start building the set of keys involved in this node and children.
 1469|       |            // Start by keys in this node directly.
 1470|  2.11k|            size_t keys_count = node.keys.size();
 1471|  2.11k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1472|  2.11k|            if (key_set.size() != keys_count) {
 1473|       |                // It already has duplicates; bail out.
 1474|  2.11k|                node.has_duplicate_keys = true;
 1475|  2.11k|                return {};
 1476|  2.11k|            }
 1477|       |
 1478|       |            // Merge the keys from the children into this set.
 1479|  2.11k|            for (auto& sub : subs) {
 1480|  2.11k|                keys_count += sub->size();
 1481|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1482|       |                // logarithmic in the size of the first.
 1483|  2.11k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
 1484|  2.11k|                key_set.merge(*sub);
 1485|  2.11k|                if (key_set.size() != keys_count) {
 1486|  2.11k|                    node.has_duplicate_keys = true;
 1487|  2.11k|                    return {};
 1488|  2.11k|                }
 1489|  2.11k|            }
 1490|       |
 1491|  2.11k|            node.has_duplicate_keys = false;
 1492|  2.11k|            return key_set;
 1493|  2.11k|        };
 1494|       |
 1495|  2.11k|        TreeEval<state>(upfn);
 1496|  2.11k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_4SpanISG_EE_EES9_T0_:
  699|  2.11k|    {
  700|  2.11k|        struct DummyState {};
  701|  2.11k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  702|  2.11k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  703|  2.11k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|  2.11k|                Result res{upfn(node, subs)};
  705|  2.11k|                return std::optional<Result>(std::move(res));
  706|  2.11k|            }
  707|  2.11k|        ));
  708|  2.11k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS1_8TreeEvalISG_ZNKS6_IS8_EEvSB_EUlRKS1_4SpanISG_EE_EES9_T0_E10DummyStateZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_mE_ZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_SL_E_EENS4_IS9_EESN_T1_T2_:
  605|  2.11k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  2.11k|        struct StackElem
  608|  2.11k|        {
  609|  2.11k|            const Node& node; //!< The node being evaluated.
  610|  2.11k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  2.11k|            State state; //!< The state for that node.
  612|       |
  613|  2.11k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  2.11k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  2.11k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  2.11k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  2.11k|        std::vector<Result> results;
  621|  2.11k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|  3.33M|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 3.32M, False: 2.11k]
  ------------------
  640|  3.32M|            const Node& node = stack.back().node;
  641|  3.32M|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 1.66M, False: 1.66M]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|  1.66M|                size_t child_index = stack.back().expanded++;
  646|  1.66M|                State child_state = downfn(stack.back().state, node, child_index);
  647|  1.66M|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|  1.66M|                continue;
  649|  1.66M|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|  1.66M|            assert(results.size() >= node.subs.size());
  652|  1.66M|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|  1.66M|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|  1.66M|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 1.66M]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|  1.66M|            results.erase(results.end() - node.subs.size(), results.end());
  658|  1.66M|            results.push_back(std::move(*result));
  659|  1.66M|            stack.pop_back();
  660|  1.66M|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  2.11k|        assert(results.size() == 1);
  663|  2.11k|        return std::move(results[0]);
  664|  2.11k|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS1_8TreeEvalISG_ZNKS6_IS8_EEvSB_EUlRKS1_4SpanISG_EE_EES9_T0_E10DummyStateZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_mE_ZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_SL_E_EENS4_IS9_EESN_T1_T2_EN9StackElemC2ESJ_mOSO_:
  614|  1.66M|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_4SpanISG_EE_EES9_T0_ENKUlZNKS2_ISG_SL_EES9_SM_E10DummyStateSI_mE_clESN_SI_m:
  702|  1.66M|            [](DummyState, const Node&, size_t) { return DummyState{}; },
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_4SpanISG_EE_EES9_T0_ENKUlZNKS2_ISG_SL_EES9_SM_E10DummyStateSI_SK_E_clESN_SI_SK_:
  703|  1.66M|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|  1.66M|                Result res{upfn(node, subs)};
  705|  1.66M|                return std::optional<Result>(std::move(res));
  706|  1.66M|            }
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_ENKUlRKS1_4SpanINSt3__18optionalINSB_3setIjZNKS2_IS4_EEvS7_E4CompNSB_9allocatorIjEEEEEEEE_clES9_SJ_:
 1456|  1.66M|        auto upfn = [&ctx](const Node& node, Span<state> subs) -> state {
 1457|       |            // If this node is already known to have duplicates, nothing left to do.
 1458|  1.66M|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
  ------------------
  |  Branch (1458:17): [True: 0, False: 1.66M]
  |  Branch (1458:56): [True: 0, False: 0]
  ------------------
 1459|       |
 1460|       |            // Check if one of the children is already known to have duplicates.
 1461|  1.66M|            for (auto& sub : subs) {
  ------------------
  |  Branch (1461:28): [True: 1.66M, False: 1.66M]
  ------------------
 1462|  1.66M|                if (!sub.has_value()) {
  ------------------
  |  Branch (1462:21): [True: 1.74k, False: 1.66M]
  ------------------
 1463|  1.74k|                    node.has_duplicate_keys = true;
 1464|  1.74k|                    return {};
 1465|  1.74k|                }
 1466|  1.66M|            }
 1467|       |
 1468|       |            // Start building the set of keys involved in this node and children.
 1469|       |            // Start by keys in this node directly.
 1470|  1.66M|            size_t keys_count = node.keys.size();
 1471|  1.66M|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1472|  1.66M|            if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1472:17): [True: 51, False: 1.66M]
  ------------------
 1473|       |                // It already has duplicates; bail out.
 1474|     51|                node.has_duplicate_keys = true;
 1475|     51|                return {};
 1476|     51|            }
 1477|       |
 1478|       |            // Merge the keys from the children into this set.
 1479|  1.66M|            for (auto& sub : subs) {
  ------------------
  |  Branch (1479:28): [True: 1.65M, False: 1.66M]
  ------------------
 1480|  1.65M|                keys_count += sub->size();
 1481|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1482|       |                // logarithmic in the size of the first.
 1483|  1.65M|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
  ------------------
  |  Branch (1483:21): [True: 134k, False: 1.52M]
  ------------------
 1484|  1.65M|                key_set.merge(*sub);
 1485|  1.65M|                if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1485:21): [True: 72, False: 1.65M]
  ------------------
 1486|     72|                    node.has_duplicate_keys = true;
 1487|     72|                    return {};
 1488|     72|                }
 1489|  1.65M|            }
 1490|       |
 1491|  1.66M|            node.has_duplicate_keys = false;
 1492|  1.66M|            return key_set;
 1493|  1.66M|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_EN4CompC2ERKS4_:
 1446|  1.66M|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_ENK4CompclERKjSA_:
 1447|  12.5k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
_ZNK10miniscript4NodeIjE6IsSaneEv:
 1641|  1.98k|    bool IsSane() const { return IsValidTopLevel() && IsSaneSubexpression() && NeedsSignature(); }
  ------------------
  |  Branch (1641:34): [True: 1.70k, False: 280]
  |  Branch (1641:55): [True: 1.58k, False: 118]
  |  Branch (1641:80): [True: 1.57k, False: 8]
  ------------------
_ZNK10miniscript4NodeIjE15IsValidTopLevelEv:
 1620|  1.98k|    bool IsValidTopLevel() const { return IsValid() && GetType() << "B"_mst; }
  ------------------
  |  Branch (1620:43): [True: 1.75k, False: 230]
  |  Branch (1620:56): [True: 1.70k, False: 50]
  ------------------
_ZNK10miniscript4NodeIjE19IsSaneSubexpressionEv:
 1638|   271k|    bool IsSaneSubexpression() const { return ValidSatisfactions() && IsNonMalleable() && CheckTimeLocksMix() && CheckDuplicateKey(); }
  ------------------
  |  Branch (1638:47): [True: 271k, False: 478]
  |  Branch (1638:71): [True: 270k, False: 244]
  |  Branch (1638:91): [True: 270k, False: 41]
  |  Branch (1638:114): [True: 270k, False: 126]
  ------------------
_ZNK10miniscript4NodeIjE16IsNotSatisfiableEv:
 1547|  1.56k|    bool IsNotSatisfiable() const { return !GetStackSize(); }
_ZNK10miniscript4NodeIjE12GetStackSizeEv:
 1523|  21.8k|    std::optional<uint32_t> GetStackSize() const {
 1524|  21.8k|        if (!ss.sat.valid) return {};
  ------------------
  |  Branch (1524:13): [True: 8.46k, False: 13.3k]
  ------------------
 1525|  13.3k|        return ss.sat.netdiff + static_cast<int32_t>(IsBKW());
 1526|  21.8k|    }
_ZNK10miniscript4NodeIjE5IsBKWEv:
 1518|  29.3k|    bool IsBKW() const {
 1519|  29.3k|        return !((GetType() & "BKW"_mst) == ""_mst);
 1520|  29.3k|    }
_ZNK10miniscript4NodeIjE13FindInsaneSubEv:
 1563|    315|    const Node* FindInsaneSub() const {
 1564|    315|        return TreeEval<const Node*>([](const Node& node, Span<const Node*> subs) -> const Node* {
 1565|    315|            for (auto& sub: subs) if (sub) return sub;
 1566|    315|            if (!node.IsSaneSubexpression()) return &node;
 1567|    315|            return nullptr;
 1568|    315|        });
 1569|    315|    }
_ZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_4SpanIS4_EE_EET_T0_:
  699|    315|    {
  700|    315|        struct DummyState {};
  701|    315|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  702|    315|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  703|    315|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|    315|                Result res{upfn(node, subs)};
  705|    315|                return std::optional<Result>(std::move(res));
  706|    315|            }
  707|    315|        ));
  708|    315|    }
_ZNK10miniscript4NodeIjE13TreeEvalMaybeIPKS1_ZNKS1_8TreeEvalIS4_ZNKS1_13FindInsaneSubEvEUlRS3_4SpanIS4_EE_EET_T0_E10DummyStateZNKS5_IS4_S9_EESA_SB_EUlSC_S6_mE_ZNKS5_IS4_S9_EESA_SB_EUlSC_S6_S8_E_EENSt3__18optionalISA_EESB_T1_T2_:
  605|    315|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|    315|        struct StackElem
  608|    315|        {
  609|    315|            const Node& node; //!< The node being evaluated.
  610|    315|            size_t expanded; //!< How many children of this node have been expanded.
  611|    315|            State state; //!< The state for that node.
  612|       |
  613|    315|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|    315|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|    315|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|    315|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|    315|        std::vector<Result> results;
  621|    315|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   650k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 650k, False: 315]
  ------------------
  640|   650k|            const Node& node = stack.back().node;
  641|   650k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 325k, False: 325k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|   325k|                size_t child_index = stack.back().expanded++;
  646|   325k|                State child_state = downfn(stack.back().state, node, child_index);
  647|   325k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|   325k|                continue;
  649|   325k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|   325k|            assert(results.size() >= node.subs.size());
  652|   325k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|   325k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|   325k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 325k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|   325k|            results.erase(results.end() - node.subs.size(), results.end());
  658|   325k|            results.push_back(std::move(*result));
  659|   325k|            stack.pop_back();
  660|   325k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|    315|        assert(results.size() == 1);
  663|    315|        return std::move(results[0]);
  664|    315|    }
_ZZNK10miniscript4NodeIjE13TreeEvalMaybeIPKS1_ZNKS1_8TreeEvalIS4_ZNKS1_13FindInsaneSubEvEUlRS3_4SpanIS4_EE_EET_T0_E10DummyStateZNKS5_IS4_S9_EESA_SB_EUlSC_S6_mE_ZNKS5_IS4_S9_EESA_SB_EUlSC_S6_S8_E_EENSt3__18optionalISA_EESB_T1_T2_EN9StackElemC2ES6_mOSC_:
  614|   325k|                node(node_), expanded(exp_), state(std::move(state_)) {}
_ZZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_4SpanIS4_EE_EET_T0_ENKUlZNKS2_IS4_S8_EES9_SA_E10DummyStateS5_mE_clESB_S5_m:
  702|   325k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
_ZZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_4SpanIS4_EE_EET_T0_ENKUlZNKS2_IS4_S8_EES9_SA_E10DummyStateS5_S7_E_clESB_S5_S7_:
  703|   325k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|   325k|                Result res{upfn(node, subs)};
  705|   325k|                return std::optional<Result>(std::move(res));
  706|   325k|            }
_ZZNK10miniscript4NodeIjE13FindInsaneSubEvENKUlRKS1_4SpanIPS2_EE_clES3_S6_:
 1564|   325k|        return TreeEval<const Node*>([](const Node& node, Span<const Node*> subs) -> const Node* {
 1565|   325k|            for (auto& sub: subs) if (sub) return sub;
  ------------------
  |  Branch (1565:27): [True: 295k, False: 270k]
  |  Branch (1565:39): [True: 55.3k, False: 239k]
  ------------------
 1566|   270k|            if (!node.IsSaneSubexpression()) return &node;
  ------------------
  |  Branch (1566:17): [True: 771, False: 269k]
  ------------------
 1567|   269k|            return nullptr;
 1568|   270k|        });
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_:
  829|    315|    std::optional<std::string> ToString(const CTx& ctx) const {
  830|       |        // To construct the std::string representation for a Miniscript object, we use
  831|       |        // the TreeEvalMaybe algorithm. The State is a boolean: whether the parent node is a
  832|       |        // wrapper. If so, non-wrapper expressions must be prefixed with a ":".
  833|    315|        auto downfn = [](bool, const Node& node, size_t) {
  834|    315|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  835|    315|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  836|    315|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  837|    315|                    node.fragment == Fragment::WRAP_C ||
  838|    315|                    (node.fragment == Fragment::AND_V && node.subs[1]->fragment == Fragment::JUST_1) ||
  839|    315|                    (node.fragment == Fragment::OR_I && node.subs[0]->fragment == Fragment::JUST_0) ||
  840|    315|                    (node.fragment == Fragment::OR_I && node.subs[1]->fragment == Fragment::JUST_0));
  841|    315|        };
  842|       |        // The upward function computes for a node, given whether its parent is a wrapper,
  843|       |        // and the string representations of its child nodes, the string representation of the node.
  844|    315|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  845|    315|        auto upfn = [&ctx, is_tapscript](bool wrapped, const Node& node, Span<std::string> subs) -> std::optional<std::string> {
  846|    315|            std::string ret = wrapped ? ":" : "";
  847|       |
  848|    315|            switch (node.fragment) {
  849|    315|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  850|    315|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  851|    315|                case Fragment::WRAP_C:
  852|    315|                    if (node.subs[0]->fragment == Fragment::PK_K) {
  853|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  854|    315|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  855|    315|                        if (!key_str) return {};
  856|    315|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  857|    315|                    }
  858|    315|                    if (node.subs[0]->fragment == Fragment::PK_H) {
  859|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  860|    315|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  861|    315|                        if (!key_str) return {};
  862|    315|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  863|    315|                    }
  864|    315|                    return "c" + std::move(subs[0]);
  865|    315|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  866|    315|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  867|    315|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  868|    315|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  869|    315|                case Fragment::AND_V:
  870|       |                    // t:X is syntactic sugar for and_v(X,1).
  871|    315|                    if (node.subs[1]->fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  872|    315|                    break;
  873|    315|                case Fragment::OR_I:
  874|    315|                    if (node.subs[0]->fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  875|    315|                    if (node.subs[1]->fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  876|    315|                    break;
  877|    315|                default: break;
  878|    315|            }
  879|    315|            switch (node.fragment) {
  880|    315|                case Fragment::PK_K: {
  881|    315|                    auto key_str = ctx.ToString(node.keys[0]);
  882|    315|                    if (!key_str) return {};
  883|    315|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  884|    315|                }
  885|    315|                case Fragment::PK_H: {
  886|    315|                    auto key_str = ctx.ToString(node.keys[0]);
  887|    315|                    if (!key_str) return {};
  888|    315|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  889|    315|                }
  890|    315|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  891|    315|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  892|    315|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  893|    315|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  894|    315|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  895|    315|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  896|    315|                case Fragment::JUST_1: return std::move(ret) + "1";
  897|    315|                case Fragment::JUST_0: return std::move(ret) + "0";
  898|    315|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  899|    315|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  900|    315|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  901|    315|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  902|    315|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  903|    315|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  904|    315|                case Fragment::ANDOR:
  905|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  906|    315|                    if (node.subs[2]->fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  907|    315|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  908|    315|                case Fragment::MULTI: {
  909|    315|                    CHECK_NONFATAL(!is_tapscript);
  910|    315|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  911|    315|                    for (const auto& key : node.keys) {
  912|    315|                        auto key_str = ctx.ToString(key);
  913|    315|                        if (!key_str) return {};
  914|    315|                        str += "," + std::move(*key_str);
  915|    315|                    }
  916|    315|                    return std::move(str) + ")";
  917|    315|                }
  918|    315|                case Fragment::MULTI_A: {
  919|    315|                    CHECK_NONFATAL(is_tapscript);
  920|    315|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  921|    315|                    for (const auto& key : node.keys) {
  922|    315|                        auto key_str = ctx.ToString(key);
  923|    315|                        if (!key_str) return {};
  924|    315|                        str += "," + std::move(*key_str);
  925|    315|                    }
  926|    315|                    return std::move(str) + ")";
  927|    315|                }
  928|    315|                case Fragment::THRESH: {
  929|    315|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  930|    315|                    for (auto& sub : subs) {
  931|    315|                        str += "," + std::move(sub);
  932|    315|                    }
  933|    315|                    return std::move(str) + ")";
  934|    315|                }
  935|    315|                default: break;
  936|    315|            }
  937|    315|            assert(false);
  938|    315|        };
  939|       |
  940|    315|        return TreeEvalMaybe<std::string>(false, downfn, upfn);
  941|    315|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_19KeyParserEEENS3_8optionalIS9_EERKT_EUlbRKS1_mE_ZNKSA_ISC_EESE_SH_EUlbSJ_4SpanIS9_EE_EENSD_ISF_EET0_T1_T2_:
  605|    315|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|    315|        struct StackElem
  608|    315|        {
  609|    315|            const Node& node; //!< The node being evaluated.
  610|    315|            size_t expanded; //!< How many children of this node have been expanded.
  611|    315|            State state; //!< The state for that node.
  612|       |
  613|    315|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|    315|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|    315|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|    315|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|    315|        std::vector<Result> results;
  621|    315|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   463k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 463k, False: 315]
  ------------------
  640|   463k|            const Node& node = stack.back().node;
  641|   463k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 231k, False: 231k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|   231k|                size_t child_index = stack.back().expanded++;
  646|   231k|                State child_state = downfn(stack.back().state, node, child_index);
  647|   231k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|   231k|                continue;
  649|   231k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|   231k|            assert(results.size() >= node.subs.size());
  652|   231k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|   231k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|   231k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 231k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|   231k|            results.erase(results.end() - node.subs.size(), results.end());
  658|   231k|            results.push_back(std::move(*result));
  659|   231k|            stack.pop_back();
  660|   231k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|    315|        assert(results.size() == 1);
  663|    315|        return std::move(results[0]);
  664|    315|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_19KeyParserEEENS3_8optionalIS9_EERKT_EUlbRKS1_mE_ZNKSA_ISC_EESE_SH_EUlbSJ_4SpanIS9_EE_EENSD_ISF_EET0_T1_T2_EN9StackElemC2ESJ_mOb:
  614|   231k|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_ENKUlbRKS1_mE_clEbSI_m:
  833|   231k|        auto downfn = [](bool, const Node& node, size_t) {
  834|   231k|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (834:21): [True: 329, False: 231k]
  |  Branch (834:58): [True: 360, False: 230k]
  ------------------
  835|   231k|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  ------------------
  |  Branch (835:21): [True: 28, False: 230k]
  |  Branch (835:58): [True: 336, False: 230k]
  ------------------
  836|   231k|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  ------------------
  |  Branch (836:21): [True: 1.23k, False: 229k]
  |  Branch (836:58): [True: 11.0k, False: 218k]
  ------------------
  837|   231k|                    node.fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (837:21): [True: 212, False: 217k]
  ------------------
  838|   231k|                    (node.fragment == Fragment::AND_V && node.subs[1]->fragment == Fragment::JUST_1) ||
  ------------------
  |  Branch (838:22): [True: 640, False: 217k]
  |  Branch (838:58): [True: 402, False: 238]
  ------------------
  839|   231k|                    (node.fragment == Fragment::OR_I && node.subs[0]->fragment == Fragment::JUST_0) ||
  ------------------
  |  Branch (839:22): [True: 214k, False: 2.66k]
  |  Branch (839:57): [True: 204k, False: 10.4k]
  ------------------
  840|   231k|                    (node.fragment == Fragment::OR_I && node.subs[1]->fragment == Fragment::JUST_0));
  ------------------
  |  Branch (840:22): [True: 10.4k, False: 2.66k]
  |  Branch (840:57): [True: 10.3k, False: 90]
  ------------------
  841|   231k|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_ENKUlbRKS1_4SpanISC_EE_clEbSI_SK_:
  845|   231k|        auto upfn = [&ctx, is_tapscript](bool wrapped, const Node& node, Span<std::string> subs) -> std::optional<std::string> {
  846|   231k|            std::string ret = wrapped ? ":" : "";
  ------------------
  |  Branch (846:31): [True: 228k, False: 3.07k]
  ------------------
  847|       |
  848|   231k|            switch (node.fragment) {
  849|    329|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  ------------------
  |  Branch (849:17): [True: 329, False: 231k]
  ------------------
  850|    360|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  ------------------
  |  Branch (850:17): [True: 360, False: 231k]
  ------------------
  851|    212|                case Fragment::WRAP_C:
  ------------------
  |  Branch (851:17): [True: 212, False: 231k]
  ------------------
  852|    212|                    if (node.subs[0]->fragment == Fragment::PK_K) {
  ------------------
  |  Branch (852:25): [True: 171, False: 41]
  ------------------
  853|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  854|    171|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  855|    171|                        if (!key_str) return {};
  ------------------
  |  Branch (855:29): [True: 0, False: 171]
  ------------------
  856|    171|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  857|    171|                    }
  858|     41|                    if (node.subs[0]->fragment == Fragment::PK_H) {
  ------------------
  |  Branch (858:25): [True: 29, False: 12]
  ------------------
  859|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  860|     29|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  861|     29|                        if (!key_str) return {};
  ------------------
  |  Branch (861:29): [True: 0, False: 29]
  ------------------
  862|     29|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  863|     29|                    }
  864|     12|                    return "c" + std::move(subs[0]);
  865|     28|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  ------------------
  |  Branch (865:17): [True: 28, False: 231k]
  ------------------
  866|    336|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  ------------------
  |  Branch (866:17): [True: 336, False: 231k]
  ------------------
  867|  1.23k|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  ------------------
  |  Branch (867:17): [True: 1.23k, False: 230k]
  ------------------
  868|  11.0k|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  ------------------
  |  Branch (868:17): [True: 11.0k, False: 220k]
  ------------------
  869|    320|                case Fragment::AND_V:
  ------------------
  |  Branch (869:17): [True: 320, False: 231k]
  ------------------
  870|       |                    // t:X is syntactic sugar for and_v(X,1).
  871|    320|                    if (node.subs[1]->fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  ------------------
  |  Branch (871:25): [True: 201, False: 119]
  ------------------
  872|    119|                    break;
  873|   107k|                case Fragment::OR_I:
  ------------------
  |  Branch (873:17): [True: 107k, False: 124k]
  ------------------
  874|   107k|                    if (node.subs[0]->fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  ------------------
  |  Branch (874:25): [True: 102k, False: 5.21k]
  ------------------
  875|  5.21k|                    if (node.subs[1]->fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  ------------------
  |  Branch (875:25): [True: 5.16k, False: 45]
  ------------------
  876|     45|                    break;
  877|   110k|                default: break;
  ------------------
  |  Branch (877:17): [True: 110k, False: 121k]
  ------------------
  878|   231k|            }
  879|   110k|            switch (node.fragment) {
  880|    171|                case Fragment::PK_K: {
  ------------------
  |  Branch (880:17): [True: 171, False: 110k]
  ------------------
  881|    171|                    auto key_str = ctx.ToString(node.keys[0]);
  882|    171|                    if (!key_str) return {};
  ------------------
  |  Branch (882:25): [True: 0, False: 171]
  ------------------
  883|    171|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  884|    171|                }
  885|     29|                case Fragment::PK_H: {
  ------------------
  |  Branch (885:17): [True: 29, False: 110k]
  ------------------
  886|     29|                    auto key_str = ctx.ToString(node.keys[0]);
  887|     29|                    if (!key_str) return {};
  ------------------
  |  Branch (887:25): [True: 0, False: 29]
  ------------------
  888|     29|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  889|     29|                }
  890|    376|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (890:17): [True: 376, False: 110k]
  ------------------
  891|     45|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (891:17): [True: 45, False: 110k]
  ------------------
  892|      0|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (892:17): [True: 0, False: 110k]
  ------------------
  893|      0|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (893:17): [True: 0, False: 110k]
  ------------------
  894|      1|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (894:17): [True: 1, False: 110k]
  ------------------
  895|      1|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (895:17): [True: 1, False: 110k]
  ------------------
  896|  1.19k|                case Fragment::JUST_1: return std::move(ret) + "1";
  ------------------
  |  Branch (896:17): [True: 1.19k, False: 109k]
  ------------------
  897|   107k|                case Fragment::JUST_0: return std::move(ret) + "0";
  ------------------
  |  Branch (897:17): [True: 107k, False: 2.61k]
  ------------------
  898|    119|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (898:17): [True: 119, False: 110k]
  ------------------
  899|     97|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (899:17): [True: 97, False: 110k]
  ------------------
  900|     12|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (900:17): [True: 12, False: 110k]
  ------------------
  901|     16|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (901:17): [True: 16, False: 110k]
  ------------------
  902|     23|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (902:17): [True: 23, False: 110k]
  ------------------
  903|     45|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (903:17): [True: 45, False: 110k]
  ------------------
  904|    153|                case Fragment::ANDOR:
  ------------------
  |  Branch (904:17): [True: 153, False: 110k]
  ------------------
  905|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  906|    153|                    if (node.subs[2]->fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (906:25): [True: 57, False: 96]
  ------------------
  907|     96|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  908|     62|                case Fragment::MULTI: {
  ------------------
  |  Branch (908:17): [True: 62, False: 110k]
  ------------------
  909|     62|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |   82|     62|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  910|     62|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  911|    506|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (911:42): [True: 506, False: 62]
  ------------------
  912|    506|                        auto key_str = ctx.ToString(key);
  913|    506|                        if (!key_str) return {};
  ------------------
  |  Branch (913:29): [True: 0, False: 506]
  ------------------
  914|    506|                        str += "," + std::move(*key_str);
  915|    506|                    }
  916|     62|                    return std::move(str) + ")";
  917|     62|                }
  918|     14|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (918:17): [True: 14, False: 110k]
  ------------------
  919|     14|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |   82|     14|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  920|     14|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  921|    607|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (921:42): [True: 607, False: 14]
  ------------------
  922|    607|                        auto key_str = ctx.ToString(key);
  923|    607|                        if (!key_str) return {};
  ------------------
  |  Branch (923:29): [True: 0, False: 607]
  ------------------
  924|    607|                        str += "," + std::move(*key_str);
  925|    607|                    }
  926|     14|                    return std::move(str) + ")";
  927|     14|                }
  928|    258|                case Fragment::THRESH: {
  ------------------
  |  Branch (928:17): [True: 258, False: 110k]
  ------------------
  929|    258|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  930|  1.67k|                    for (auto& sub : subs) {
  ------------------
  |  Branch (930:36): [True: 1.67k, False: 258]
  ------------------
  931|  1.67k|                        str += "," + std::move(sub);
  932|  1.67k|                    }
  933|    258|                    return std::move(str) + ")";
  934|     14|                }
  935|      0|                default: break;
  ------------------
  |  Branch (935:17): [True: 0, False: 110k]
  ------------------
  936|   110k|            }
  937|      0|            assert(false);
  938|      0|        };
_ZNK10miniscript4NodeIjE7IsValidEv:
 1614|   274k|    bool IsValid() const {
 1615|   274k|        if (GetType() == ""_mst) return false;
  ------------------
  |  Branch (1615:13): [True: 870, False: 273k]
  ------------------
 1616|   273k|        return ScriptSize() <= internal::MaxScriptSize(m_script_ctx);
 1617|   274k|    }
_ZNK10miniscript4NodeIjE14IsNonMalleableEv:
 1623|   271k|    bool IsNonMalleable() const { return GetType() << "m"_mst; }
_ZNK10miniscript4NodeIjE14NeedsSignatureEv:
 1626|  1.60k|    bool NeedsSignature() const { return GetType() << "s"_mst; }
_ZNK10miniscript4NodeIjE17CheckTimeLocksMixEv:
 1629|   271k|    bool CheckTimeLocksMix() const { return GetType() << "k"_mst; }
_ZNK10miniscript4NodeIjE17CheckDuplicateKeyEv:
 1632|   271k|    bool CheckDuplicateKey() const { return has_duplicate_keys && !*has_duplicate_keys; }
  ------------------
  |  Branch (1632:45): [True: 271k, False: 0]
  |  Branch (1632:67): [True: 270k, False: 176]
  ------------------
_ZNK10miniscript4NodeIjE18ValidSatisfactionsEv:
 1635|   271k|    bool ValidSatisfactions() const { return IsValid() && CheckOpsLimit() && CheckStackSize(); }
  ------------------
  |  Branch (1635:46): [True: 271k, False: 444]
  |  Branch (1635:59): [True: 271k, False: 28]
  |  Branch (1635:78): [True: 271k, False: 16]
  ------------------
_ZNK10miniscript4NodeIjE13CheckOpsLimitEv:
 1511|   271k|    bool CheckOpsLimit() const {
 1512|   271k|        if (IsTapscript(m_script_ctx)) return true;
  ------------------
  |  Branch (1512:13): [True: 250k, False: 20.3k]
  ------------------
 1513|  20.3k|        if (const auto ops = GetOps()) return *ops <= MAX_OPS_PER_SCRIPT;
  ------------------
  |  Branch (1513:24): [True: 11.8k, False: 8.45k]
  ------------------
 1514|  8.45k|        return true;
 1515|  20.3k|    }
_ZNK10miniscript4NodeIjE6GetOpsEv:
 1502|  20.3k|    std::optional<uint32_t> GetOps() const {
 1503|  20.3k|        if (!ops.sat.valid) return {};
  ------------------
  |  Branch (1503:13): [True: 8.45k, False: 11.8k]
  ------------------
 1504|  11.8k|        return ops.count + ops.sat.value;
 1505|  20.3k|    }
_ZNK10miniscript4NodeIjE14CheckStackSizeEv:
 1535|   271k|    bool CheckStackSize() const {
 1536|       |        // Since in Tapscript there is no standardness limit on the script and witness sizes, we may run
 1537|       |        // into the maximum stack size while executing the script. Make sure it doesn't happen.
 1538|   271k|        if (IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1538:13): [True: 250k, False: 20.2k]
  ------------------
 1539|   250k|            if (const auto exec_ss = GetExecStackSize()) return exec_ss <= MAX_STACK_SIZE;
  ------------------
  |  Branch (1539:28): [True: 15.9k, False: 235k]
  ------------------
 1540|   235k|            return true;
 1541|   250k|        }
 1542|  20.2k|        if (const auto ss = GetStackSize()) return *ss <= MAX_STANDARD_P2WSH_STACK_ITEMS;
  ------------------
  |  Branch (1542:24): [True: 11.8k, False: 8.45k]
  ------------------
 1543|  8.45k|        return true;
 1544|  20.2k|    }
_ZNK10miniscript4NodeIjE16GetExecStackSizeEv:
 1529|   250k|    std::optional<uint32_t> GetExecStackSize() const {
 1530|   250k|        if (!ss.sat.valid) return {};
  ------------------
  |  Branch (1530:13): [True: 235k, False: 15.9k]
  ------------------
 1531|  15.9k|        return ss.sat.exec + static_cast<int32_t>(IsBKW());
 1532|   250k|    }
_ZNK10miniscript4NodeIjE8GetMsCtxEv:
 1560|  3.76k|    MiniscriptContext GetMsCtx() const { return m_script_ctx; }
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_:
  751|  3.76k|    {
  752|       |        // To construct the CScript for a Miniscript object, we use the TreeEval algorithm.
  753|       |        // The State is a boolean: whether or not the node's script expansion is followed
  754|       |        // by an OP_VERIFY (which may need to be combined with the last script opcode).
  755|  3.76k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  756|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  757|  3.76k|            if (node.fragment == Fragment::WRAP_V) return true;
  758|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  759|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  760|  3.76k|            if (node.fragment == Fragment::WRAP_S ||
  761|  3.76k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  762|  3.76k|            return false;
  763|  3.76k|        };
  764|       |        // The upward function computes for a node, given its followed-by-OP_VERIFY status
  765|       |        // and the CScripts of its child nodes, the CScript of the node.
  766|  3.76k|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  767|  3.76k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, Span<CScript> subs) -> CScript {
  768|  3.76k|            switch (node.fragment) {
  769|  3.76k|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  770|  3.76k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  771|  3.76k|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  772|  3.76k|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  773|  3.76k|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  774|  3.76k|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  775|  3.76k|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  776|  3.76k|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  777|  3.76k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  778|  3.76k|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  779|  3.76k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  780|  3.76k|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  781|  3.76k|                case Fragment::WRAP_V: {
  782|  3.76k|                    if (node.subs[0]->GetType() << "x"_mst) {
  783|  3.76k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  784|  3.76k|                    } else {
  785|  3.76k|                        return std::move(subs[0]);
  786|  3.76k|                    }
  787|  3.76k|                }
  788|  3.76k|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  789|  3.76k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  790|  3.76k|                case Fragment::JUST_1: return BuildScript(OP_1);
  791|  3.76k|                case Fragment::JUST_0: return BuildScript(OP_0);
  792|  3.76k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  793|  3.76k|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  794|  3.76k|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  795|  3.76k|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  796|  3.76k|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  797|  3.76k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  798|  3.76k|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  799|  3.76k|                case Fragment::MULTI: {
  800|  3.76k|                    CHECK_NONFATAL(!is_tapscript);
  801|  3.76k|                    CScript script = BuildScript(node.k);
  802|  3.76k|                    for (const auto& key : node.keys) {
  803|  3.76k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  804|  3.76k|                    }
  805|  3.76k|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  806|  3.76k|                }
  807|  3.76k|                case Fragment::MULTI_A: {
  808|  3.76k|                    CHECK_NONFATAL(is_tapscript);
  809|  3.76k|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  810|  3.76k|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  811|  3.76k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  812|  3.76k|                    }
  813|  3.76k|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  814|  3.76k|                }
  815|  3.76k|                case Fragment::THRESH: {
  816|  3.76k|                    CScript script = std::move(subs[0]);
  817|  3.76k|                    for (size_t i = 1; i < subs.size(); ++i) {
  818|  3.76k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  819|  3.76k|                    }
  820|  3.76k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  821|  3.76k|                }
  822|  3.76k|            }
  823|  3.76k|            assert(false);
  824|  3.76k|        };
  825|  3.76k|        return TreeEval<CScript>(false, downfn, upfn);
  826|  3.76k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE8TreeEvalI7CScriptbRZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS4_IS6_EES3_S9_EUlbSB_4SpanIS3_EE_EES7_T0_OT1_T2_:
  683|  3.76k|    {
  684|       |        // Invoke TreeEvalMaybe with upfn wrapped to return std::optional<Result>, and then
  685|       |        // unconditionally dereference the result (it cannot be std::nullopt).
  686|  3.76k|        return std::move(*TreeEvalMaybe<Result>(std::move(root_state),
  687|  3.76k|            std::forward<DownFn>(downfn),
  688|  3.76k|            [&upfn](State&& state, const Node& node, Span<Result> subs) {
  689|  3.76k|                Result res{upfn(std::move(state), node, subs)};
  690|  3.76k|                return std::optional<Result>(std::move(res));
  691|  3.76k|            }
  692|  3.76k|        ));
  693|  3.76k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeI7CScriptbZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS1_8TreeEvalIS3_bRSC_ZNKS4_IS6_EES3_S9_EUlbSB_4SpanIS3_EE_EES7_T0_OT1_T2_EUlObSB_SG_E_EENSt3__18optionalIS7_EESI_SJ_SL_:
  605|  3.76k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  3.76k|        struct StackElem
  608|  3.76k|        {
  609|  3.76k|            const Node& node; //!< The node being evaluated.
  610|  3.76k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  3.76k|            State state; //!< The state for that node.
  612|       |
  613|  3.76k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  3.76k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  3.76k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  3.76k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  3.76k|        std::vector<Result> results;
  621|  3.76k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   113k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 109k, False: 3.76k]
  ------------------
  640|   109k|            const Node& node = stack.back().node;
  641|   109k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 53.0k, False: 56.7k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|  53.0k|                size_t child_index = stack.back().expanded++;
  646|  53.0k|                State child_state = downfn(stack.back().state, node, child_index);
  647|  53.0k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|  53.0k|                continue;
  649|  53.0k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|  56.7k|            assert(results.size() >= node.subs.size());
  652|  56.7k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|  56.7k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|  56.7k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 56.7k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|  56.7k|            results.erase(results.end() - node.subs.size(), results.end());
  658|  56.7k|            results.push_back(std::move(*result));
  659|  56.7k|            stack.pop_back();
  660|  56.7k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  3.76k|        assert(results.size() == 1);
  663|  3.76k|        return std::move(results[0]);
  664|  3.76k|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeI7CScriptbZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS1_8TreeEvalIS3_bRSC_ZNKS4_IS6_EES3_S9_EUlbSB_4SpanIS3_EE_EES7_T0_OT1_T2_EUlObSB_SG_E_EENSt3__18optionalIS7_EESI_SJ_SL_EN9StackElemC2ESB_mSM_:
  614|  56.7k|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_ENKUlbRKS1_mE_clEbSA_m:
  755|  53.0k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  756|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  757|  53.0k|            if (node.fragment == Fragment::WRAP_V) return true;
  ------------------
  |  Branch (757:17): [True: 1.62k, False: 51.3k]
  ------------------
  758|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  759|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  760|  51.3k|            if (node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (760:17): [True: 17, False: 51.3k]
  ------------------
  761|  51.3k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  ------------------
  |  Branch (761:18): [True: 3.24k, False: 48.1k]
  |  Branch (761:54): [True: 1.62k, False: 1.62k]
  ------------------
  762|  49.7k|            return false;
  763|  51.3k|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalI7CScriptbRZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS4_IS6_EES3_S9_EUlbSB_4SpanIS3_EE_EES7_T0_OT1_T2_ENKUlObSB_SF_E_clESL_SB_SF_:
  688|  56.7k|            [&upfn](State&& state, const Node& node, Span<Result> subs) {
  689|  56.7k|                Result res{upfn(std::move(state), node, subs)};
  690|  56.7k|                return std::optional<Result>(std::move(res));
  691|  56.7k|            }
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_ENKUlbRKS1_4SpanIS5_EE_clEbSA_SC_:
  767|  56.7k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, Span<CScript> subs) -> CScript {
  768|  56.7k|            switch (node.fragment) {
  ------------------
  |  Branch (768:21): [True: 0, False: 56.7k]
  ------------------
  769|  1.03k|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  ------------------
  |  Branch (769:17): [True: 1.03k, False: 55.7k]
  ------------------
  770|  1.26k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  ------------------
  |  Branch (770:17): [True: 1.26k, False: 55.5k]
  ------------------
  771|      0|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  ------------------
  |  Branch (771:17): [True: 0, False: 56.7k]
  ------------------
  772|      0|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  ------------------
  |  Branch (772:17): [True: 0, False: 56.7k]
  ------------------
  773|      0|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (773:17): [True: 0, False: 56.7k]
  |  Branch (773:110): [True: 0, False: 0]
  ------------------
  774|      0|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (774:17): [True: 0, False: 56.7k]
  |  Branch (774:116): [True: 0, False: 0]
  ------------------
  775|      0|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (775:17): [True: 0, False: 56.7k]
  |  Branch (775:112): [True: 0, False: 0]
  ------------------
  776|      0|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (776:17): [True: 0, False: 56.7k]
  |  Branch (776:112): [True: 0, False: 0]
  ------------------
  777|     37|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  ------------------
  |  Branch (777:17): [True: 37, False: 56.7k]
  ------------------
  778|     17|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  ------------------
  |  Branch (778:17): [True: 17, False: 56.7k]
  ------------------
  779|  2.29k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  ------------------
  |  Branch (779:17): [True: 2.29k, False: 54.4k]
  |  Branch (779:79): [True: 383, False: 1.91k]
  ------------------
  780|      0|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (780:17): [True: 0, False: 56.7k]
  ------------------
  781|  1.62k|                case Fragment::WRAP_V: {
  ------------------
  |  Branch (781:17): [True: 1.62k, False: 55.1k]
  ------------------
  782|  1.62k|                    if (node.subs[0]->GetType() << "x"_mst) {
  ------------------
  |  Branch (782:25): [True: 1.24k, False: 383]
  ------------------
  783|  1.24k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  784|  1.24k|                    } else {
  785|    383|                        return std::move(subs[0]);
  786|    383|                    }
  787|  1.62k|                }
  788|  1.58k|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (788:17): [True: 1.58k, False: 55.1k]
  ------------------
  789|  26.0k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  ------------------
  |  Branch (789:17): [True: 26.0k, False: 30.7k]
  ------------------
  790|  1.62k|                case Fragment::JUST_1: return BuildScript(OP_1);
  ------------------
  |  Branch (790:17): [True: 1.62k, False: 55.1k]
  ------------------
  791|  8.99k|                case Fragment::JUST_0: return BuildScript(OP_0);
  ------------------
  |  Branch (791:17): [True: 8.99k, False: 47.7k]
  ------------------
  792|  1.62k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  ------------------
  |  Branch (792:17): [True: 1.62k, False: 55.1k]
  ------------------
  793|      0|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  ------------------
  |  Branch (793:17): [True: 0, False: 56.7k]
  ------------------
  794|      0|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  ------------------
  |  Branch (794:17): [True: 0, False: 56.7k]
  ------------------
  795|     63|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (795:17): [True: 63, False: 56.7k]
  ------------------
  796|      0|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (796:17): [True: 0, False: 56.7k]
  ------------------
  797|  8.95k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (797:17): [True: 8.95k, False: 47.8k]
  ------------------
  798|      1|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (798:17): [True: 1, False: 56.7k]
  ------------------
  799|  1.54k|                case Fragment::MULTI: {
  ------------------
  |  Branch (799:17): [True: 1.54k, False: 55.2k]
  ------------------
  800|  1.54k|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |   82|  1.54k|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  801|  1.54k|                    CScript script = BuildScript(node.k);
  802|  10.6k|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (802:42): [True: 10.6k, False: 1.54k]
  ------------------
  803|  10.6k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  804|  10.6k|                    }
  805|  1.54k|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  ------------------
  |  Branch (805:77): [True: 0, False: 1.54k]
  ------------------
  806|  1.62k|                }
  807|      0|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (807:17): [True: 0, False: 56.7k]
  ------------------
  808|      0|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |   82|      0|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  809|      0|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  810|      0|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  ------------------
  |  Branch (810:59): [True: 0, False: 0]
  ------------------
  811|      0|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  812|      0|                    }
  813|      0|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  ------------------
  |  Branch (813:67): [True: 0, False: 0]
  ------------------
  814|  1.62k|                }
  815|     89|                case Fragment::THRESH: {
  ------------------
  |  Branch (815:17): [True: 89, False: 56.6k]
  ------------------
  816|     89|                    CScript script = std::move(subs[0]);
  817|    143|                    for (size_t i = 1; i < subs.size(); ++i) {
  ------------------
  |  Branch (817:40): [True: 54, False: 89]
  ------------------
  818|     54|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  819|     54|                    }
  820|     89|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (820:67): [True: 0, False: 89]
  ------------------
  821|  1.62k|                }
  822|  56.7k|            }
  823|      0|            assert(false);
  824|      0|        };
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_111StringMakerEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_:
  829|  5.08k|    std::optional<std::string> ToString(const CTx& ctx) const {
  830|       |        // To construct the std::string representation for a Miniscript object, we use
  831|       |        // the TreeEvalMaybe algorithm. The State is a boolean: whether the parent node is a
  832|       |        // wrapper. If so, non-wrapper expressions must be prefixed with a ":".
  833|  5.08k|        auto downfn = [](bool, const Node& node, size_t) {
  834|  5.08k|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  835|  5.08k|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  836|  5.08k|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  837|  5.08k|                    node.fragment == Fragment::WRAP_C ||
  838|  5.08k|                    (node.fragment == Fragment::AND_V && node.subs[1]->fragment == Fragment::JUST_1) ||
  839|  5.08k|                    (node.fragment == Fragment::OR_I && node.subs[0]->fragment == Fragment::JUST_0) ||
  840|  5.08k|                    (node.fragment == Fragment::OR_I && node.subs[1]->fragment == Fragment::JUST_0));
  841|  5.08k|        };
  842|       |        // The upward function computes for a node, given whether its parent is a wrapper,
  843|       |        // and the string representations of its child nodes, the string representation of the node.
  844|  5.08k|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  845|  5.08k|        auto upfn = [&ctx, is_tapscript](bool wrapped, const Node& node, Span<std::string> subs) -> std::optional<std::string> {
  846|  5.08k|            std::string ret = wrapped ? ":" : "";
  847|       |
  848|  5.08k|            switch (node.fragment) {
  849|  5.08k|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  850|  5.08k|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  851|  5.08k|                case Fragment::WRAP_C:
  852|  5.08k|                    if (node.subs[0]->fragment == Fragment::PK_K) {
  853|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  854|  5.08k|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  855|  5.08k|                        if (!key_str) return {};
  856|  5.08k|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  857|  5.08k|                    }
  858|  5.08k|                    if (node.subs[0]->fragment == Fragment::PK_H) {
  859|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  860|  5.08k|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  861|  5.08k|                        if (!key_str) return {};
  862|  5.08k|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  863|  5.08k|                    }
  864|  5.08k|                    return "c" + std::move(subs[0]);
  865|  5.08k|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  866|  5.08k|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  867|  5.08k|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  868|  5.08k|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  869|  5.08k|                case Fragment::AND_V:
  870|       |                    // t:X is syntactic sugar for and_v(X,1).
  871|  5.08k|                    if (node.subs[1]->fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  872|  5.08k|                    break;
  873|  5.08k|                case Fragment::OR_I:
  874|  5.08k|                    if (node.subs[0]->fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  875|  5.08k|                    if (node.subs[1]->fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  876|  5.08k|                    break;
  877|  5.08k|                default: break;
  878|  5.08k|            }
  879|  5.08k|            switch (node.fragment) {
  880|  5.08k|                case Fragment::PK_K: {
  881|  5.08k|                    auto key_str = ctx.ToString(node.keys[0]);
  882|  5.08k|                    if (!key_str) return {};
  883|  5.08k|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  884|  5.08k|                }
  885|  5.08k|                case Fragment::PK_H: {
  886|  5.08k|                    auto key_str = ctx.ToString(node.keys[0]);
  887|  5.08k|                    if (!key_str) return {};
  888|  5.08k|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  889|  5.08k|                }
  890|  5.08k|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  891|  5.08k|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  892|  5.08k|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  893|  5.08k|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  894|  5.08k|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  895|  5.08k|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  896|  5.08k|                case Fragment::JUST_1: return std::move(ret) + "1";
  897|  5.08k|                case Fragment::JUST_0: return std::move(ret) + "0";
  898|  5.08k|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  899|  5.08k|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  900|  5.08k|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  901|  5.08k|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  902|  5.08k|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  903|  5.08k|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  904|  5.08k|                case Fragment::ANDOR:
  905|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  906|  5.08k|                    if (node.subs[2]->fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  907|  5.08k|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  908|  5.08k|                case Fragment::MULTI: {
  909|  5.08k|                    CHECK_NONFATAL(!is_tapscript);
  910|  5.08k|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  911|  5.08k|                    for (const auto& key : node.keys) {
  912|  5.08k|                        auto key_str = ctx.ToString(key);
  913|  5.08k|                        if (!key_str) return {};
  914|  5.08k|                        str += "," + std::move(*key_str);
  915|  5.08k|                    }
  916|  5.08k|                    return std::move(str) + ")";
  917|  5.08k|                }
  918|  5.08k|                case Fragment::MULTI_A: {
  919|  5.08k|                    CHECK_NONFATAL(is_tapscript);
  920|  5.08k|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  921|  5.08k|                    for (const auto& key : node.keys) {
  922|  5.08k|                        auto key_str = ctx.ToString(key);
  923|  5.08k|                        if (!key_str) return {};
  924|  5.08k|                        str += "," + std::move(*key_str);
  925|  5.08k|                    }
  926|  5.08k|                    return std::move(str) + ")";
  927|  5.08k|                }
  928|  5.08k|                case Fragment::THRESH: {
  929|  5.08k|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  930|  5.08k|                    for (auto& sub : subs) {
  931|  5.08k|                        str += "," + std::move(sub);
  932|  5.08k|                    }
  933|  5.08k|                    return std::move(str) + ")";
  934|  5.08k|                }
  935|  5.08k|                default: break;
  936|  5.08k|            }
  937|  5.08k|            assert(false);
  938|  5.08k|        };
  939|       |
  940|  5.08k|        return TreeEvalMaybe<std::string>(false, downfn, upfn);
  941|  5.08k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_111StringMakerEEENS3_8optionalIS9_EERKT_EUlbRKS1_mE_ZNKSA_ISC_EESE_SH_EUlbSJ_4SpanIS9_EE_EENSD_ISF_EET0_T1_T2_:
  605|  5.08k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  5.08k|        struct StackElem
  608|  5.08k|        {
  609|  5.08k|            const Node& node; //!< The node being evaluated.
  610|  5.08k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  5.08k|            State state; //!< The state for that node.
  612|       |
  613|  5.08k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  5.08k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  5.08k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  5.08k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  5.08k|        std::vector<Result> results;
  621|  5.08k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   214k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 209k, False: 5.03k]
  ------------------
  640|   209k|            const Node& node = stack.back().node;
  641|   209k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 102k, False: 106k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|   102k|                size_t child_index = stack.back().expanded++;
  646|   102k|                State child_state = downfn(stack.back().state, node, child_index);
  647|   102k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|   102k|                continue;
  649|   102k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|   106k|            assert(results.size() >= node.subs.size());
  652|   106k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|   106k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|   106k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 47, False: 106k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|   106k|            results.erase(results.end() - node.subs.size(), results.end());
  658|   106k|            results.push_back(std::move(*result));
  659|   106k|            stack.pop_back();
  660|   106k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  5.03k|        assert(results.size() == 1);
  663|  5.03k|        return std::move(results[0]);
  664|  5.03k|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_111StringMakerEEENS3_8optionalIS9_EERKT_EUlbRKS1_mE_ZNKSA_ISC_EESE_SH_EUlbSJ_4SpanIS9_EE_EENSD_ISF_EET0_T1_T2_EN9StackElemC2ESJ_mOb:
  614|   107k|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_111StringMakerEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_ENKUlbRKS1_mE_clEbSI_m:
  833|   102k|        auto downfn = [](bool, const Node& node, size_t) {
  834|   102k|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (834:21): [True: 144, False: 102k]
  |  Branch (834:58): [True: 70, False: 102k]
  ------------------
  835|   102k|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  ------------------
  |  Branch (835:21): [True: 0, False: 102k]
  |  Branch (835:58): [True: 2.53k, False: 100k]
  ------------------
  836|   102k|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  ------------------
  |  Branch (836:21): [True: 5.09k, False: 94.9k]
  |  Branch (836:58): [True: 43.8k, False: 51.0k]
  ------------------
  837|   102k|                    node.fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (837:21): [True: 3.70k, False: 47.3k]
  ------------------
  838|   102k|                    (node.fragment == Fragment::AND_V && node.subs[1]->fragment == Fragment::JUST_1) ||
  ------------------
  |  Branch (838:22): [True: 5.05k, False: 42.3k]
  |  Branch (838:58): [True: 5.05k, False: 0]
  ------------------
  839|   102k|                    (node.fragment == Fragment::OR_I && node.subs[0]->fragment == Fragment::JUST_0) ||
  ------------------
  |  Branch (839:22): [True: 41.3k, False: 1.00k]
  |  Branch (839:57): [True: 21.1k, False: 20.1k]
  ------------------
  840|   102k|                    (node.fragment == Fragment::OR_I && node.subs[1]->fragment == Fragment::JUST_0));
  ------------------
  |  Branch (840:22): [True: 20.1k, False: 1.00k]
  |  Branch (840:57): [True: 19.9k, False: 124]
  ------------------
  841|   102k|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_111StringMakerEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_ENKUlbRKS1_4SpanISC_EE_clEbSI_SK_:
  845|   106k|        auto upfn = [&ctx, is_tapscript](bool wrapped, const Node& node, Span<std::string> subs) -> std::optional<std::string> {
  846|   106k|            std::string ret = wrapped ? ":" : "";
  ------------------
  |  Branch (846:31): [True: 100k, False: 6.15k]
  ------------------
  847|       |
  848|   106k|            switch (node.fragment) {
  849|    144|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  ------------------
  |  Branch (849:17): [True: 144, False: 106k]
  ------------------
  850|     70|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  ------------------
  |  Branch (850:17): [True: 70, False: 106k]
  ------------------
  851|  3.67k|                case Fragment::WRAP_C:
  ------------------
  |  Branch (851:17): [True: 3.67k, False: 102k]
  ------------------
  852|  3.67k|                    if (node.subs[0]->fragment == Fragment::PK_K) {
  ------------------
  |  Branch (852:25): [True: 1.85k, False: 1.82k]
  ------------------
  853|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  854|  1.85k|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  855|  1.85k|                        if (!key_str) return {};
  ------------------
  |  Branch (855:29): [True: 0, False: 1.85k]
  ------------------
  856|  1.85k|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  857|  1.85k|                    }
  858|  1.82k|                    if (node.subs[0]->fragment == Fragment::PK_H) {
  ------------------
  |  Branch (858:25): [True: 1.82k, False: 0]
  ------------------
  859|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  860|  1.82k|                        auto key_str = ctx.ToString(node.subs[0]->keys[0]);
  861|  1.82k|                        if (!key_str) return {};
  ------------------
  |  Branch (861:29): [True: 0, False: 1.82k]
  ------------------
  862|  1.82k|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  863|  1.82k|                    }
  864|      0|                    return "c" + std::move(subs[0]);
  865|      0|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  ------------------
  |  Branch (865:17): [True: 0, False: 106k]
  ------------------
  866|  2.51k|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  ------------------
  |  Branch (866:17): [True: 2.51k, False: 104k]
  ------------------
  867|  4.54k|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  ------------------
  |  Branch (867:17): [True: 4.54k, False: 102k]
  ------------------
  868|  43.7k|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  ------------------
  |  Branch (868:17): [True: 43.7k, False: 62.8k]
  ------------------
  869|  2.51k|                case Fragment::AND_V:
  ------------------
  |  Branch (869:17): [True: 2.51k, False: 104k]
  ------------------
  870|       |                    // t:X is syntactic sugar for and_v(X,1).
  871|  2.51k|                    if (node.subs[1]->fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  ------------------
  |  Branch (871:25): [True: 2.51k, False: 0]
  ------------------
  872|      0|                    break;
  873|  20.1k|                case Fragment::OR_I:
  ------------------
  |  Branch (873:17): [True: 20.1k, False: 86.4k]
  ------------------
  874|  20.1k|                    if (node.subs[0]->fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  ------------------
  |  Branch (874:25): [True: 10.0k, False: 10.0k]
  ------------------
  875|  10.0k|                    if (node.subs[1]->fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  ------------------
  |  Branch (875:25): [True: 9.98k, False: 61]
  ------------------
  876|     61|                    break;
  877|  29.2k|                default: break;
  ------------------
  |  Branch (877:17): [True: 29.2k, False: 77.3k]
  ------------------
  878|   106k|            }
  879|  29.3k|            switch (node.fragment) {
  880|  1.88k|                case Fragment::PK_K: {
  ------------------
  |  Branch (880:17): [True: 1.88k, False: 27.4k]
  ------------------
  881|  1.88k|                    auto key_str = ctx.ToString(node.keys[0]);
  882|  1.88k|                    if (!key_str) return {};
  ------------------
  |  Branch (882:25): [True: 26, False: 1.85k]
  ------------------
  883|  1.85k|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  884|  1.88k|                }
  885|  1.82k|                case Fragment::PK_H: {
  ------------------
  |  Branch (885:17): [True: 1.82k, False: 27.4k]
  ------------------
  886|  1.82k|                    auto key_str = ctx.ToString(node.keys[0]);
  887|  1.82k|                    if (!key_str) return {};
  ------------------
  |  Branch (887:25): [True: 4, False: 1.82k]
  ------------------
  888|  1.82k|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  889|  1.82k|                }
  890|      0|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (890:17): [True: 0, False: 29.3k]
  ------------------
  891|      0|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (891:17): [True: 0, False: 29.3k]
  ------------------
  892|      0|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (892:17): [True: 0, False: 29.3k]
  ------------------
  893|      0|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (893:17): [True: 0, False: 29.3k]
  ------------------
  894|      0|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (894:17): [True: 0, False: 29.3k]
  ------------------
  895|      0|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (895:17): [True: 0, False: 29.3k]
  ------------------
  896|  2.51k|                case Fragment::JUST_1: return std::move(ret) + "1";
  ------------------
  |  Branch (896:17): [True: 2.51k, False: 26.7k]
  ------------------
  897|  20.8k|                case Fragment::JUST_0: return std::move(ret) + "0";
  ------------------
  |  Branch (897:17): [True: 20.8k, False: 8.50k]
  ------------------
  898|      0|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (898:17): [True: 0, False: 29.3k]
  ------------------
  899|      0|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (899:17): [True: 0, False: 29.3k]
  ------------------
  900|      0|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (900:17): [True: 0, False: 29.3k]
  ------------------
  901|    211|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (901:17): [True: 211, False: 29.0k]
  ------------------
  902|      0|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (902:17): [True: 0, False: 29.3k]
  ------------------
  903|     61|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (903:17): [True: 61, False: 29.2k]
  ------------------
  904|      4|                case Fragment::ANDOR:
  ------------------
  |  Branch (904:17): [True: 4, False: 29.3k]
  ------------------
  905|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  906|      4|                    if (node.subs[2]->fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (906:25): [True: 4, False: 0]
  ------------------
  907|      0|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  908|  1.66k|                case Fragment::MULTI: {
  ------------------
  |  Branch (908:17): [True: 1.66k, False: 27.6k]
  ------------------
  909|  1.66k|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |   82|  1.66k|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  910|  1.66k|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  911|  11.1k|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (911:42): [True: 11.1k, False: 1.64k]
  ------------------
  912|  11.1k|                        auto key_str = ctx.ToString(key);
  913|  11.1k|                        if (!key_str) return {};
  ------------------
  |  Branch (913:29): [True: 17, False: 11.0k]
  ------------------
  914|  11.0k|                        str += "," + std::move(*key_str);
  915|  11.0k|                    }
  916|  1.64k|                    return std::move(str) + ")";
  917|  1.66k|                }
  918|      0|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (918:17): [True: 0, False: 29.3k]
  ------------------
  919|      0|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |   82|      0|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  920|      0|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  921|      0|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (921:42): [True: 0, False: 0]
  ------------------
  922|      0|                        auto key_str = ctx.ToString(key);
  923|      0|                        if (!key_str) return {};
  ------------------
  |  Branch (923:29): [True: 0, False: 0]
  ------------------
  924|      0|                        str += "," + std::move(*key_str);
  925|      0|                    }
  926|      0|                    return std::move(str) + ")";
  927|      0|                }
  928|    344|                case Fragment::THRESH: {
  ------------------
  |  Branch (928:17): [True: 344, False: 28.9k]
  ------------------
  929|    344|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  930|    558|                    for (auto& sub : subs) {
  ------------------
  |  Branch (930:36): [True: 558, False: 344]
  ------------------
  931|    558|                        str += "," + std::move(sub);
  932|    558|                    }
  933|    344|                    return std::move(str) + ")";
  934|      0|                }
  935|      0|                default: break;
  ------------------
  |  Branch (935:17): [True: 0, False: 29.3k]
  ------------------
  936|  29.3k|            }
  937|      0|            assert(false);
  938|      0|        };
_ZNK10miniscript4NodeIjE5CloneEv:
  532|  1.65k|    {
  533|       |        // Use TreeEval() to avoid a stack-overflow due to recursion
  534|  1.65k|        auto upfn = [](const Node& node, Span<NodeRef<Key>> children) {
  535|  1.65k|            std::vector<NodeRef<Key>> new_subs;
  536|  1.65k|            for (auto child = children.begin(); child != children.end(); ++child) {
  537|  1.65k|                new_subs.emplace_back(std::move(*child));
  538|  1.65k|            }
  539|       |            // std::make_unique (and therefore MakeNodeRef) doesn't work on private constructors
  540|  1.65k|            return std::unique_ptr<Node>{new Node{internal::NoDupCheck{}, node.m_script_ctx, node.fragment, std::move(new_subs), node.keys, node.data, node.k}};
  541|  1.65k|        };
  542|  1.65k|        return TreeEval<NodeRef<Key>>(upfn);
  543|  1.65k|    }
_ZNK10miniscript4NodeIjE8TreeEvalINSt3__110unique_ptrIKS1_NS3_14default_deleteIS5_EEEEZNKS1_5CloneEvEUlRS5_4SpanIS8_EE_EET_T0_:
  699|  1.65k|    {
  700|  1.65k|        struct DummyState {};
  701|  1.65k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  702|  1.65k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  703|  1.65k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|  1.65k|                Result res{upfn(node, subs)};
  705|  1.65k|                return std::optional<Result>(std::move(res));
  706|  1.65k|            }
  707|  1.65k|        ));
  708|  1.65k|    }
_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__110unique_ptrIKS1_NS3_14default_deleteIS5_EEEEZNKS1_8TreeEvalIS8_ZNKS1_5CloneEvEUlRS5_4SpanIS8_EE_EET_T0_E10DummyStateZNKS9_IS8_SD_EESE_SF_EUlSG_SA_mE_ZNKS9_IS8_SD_EESE_SF_EUlSG_SA_SC_E_EENS3_8optionalISE_EESF_T1_T2_:
  605|  1.65k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  1.65k|        struct StackElem
  608|  1.65k|        {
  609|  1.65k|            const Node& node; //!< The node being evaluated.
  610|  1.65k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  1.65k|            State state; //!< The state for that node.
  612|       |
  613|  1.65k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  1.65k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  1.65k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  1.65k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  1.65k|        std::vector<Result> results;
  621|  1.65k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   161k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 160k, False: 1.65k]
  ------------------
  640|   160k|            const Node& node = stack.back().node;
  641|   160k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 79.2k, False: 80.8k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|  79.2k|                size_t child_index = stack.back().expanded++;
  646|  79.2k|                State child_state = downfn(stack.back().state, node, child_index);
  647|  79.2k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|  79.2k|                continue;
  649|  79.2k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|  80.8k|            assert(results.size() >= node.subs.size());
  652|  80.8k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|  80.8k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|  80.8k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 80.8k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|  80.8k|            results.erase(results.end() - node.subs.size(), results.end());
  658|  80.8k|            results.push_back(std::move(*result));
  659|  80.8k|            stack.pop_back();
  660|  80.8k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  1.65k|        assert(results.size() == 1);
  663|  1.65k|        return std::move(results[0]);
  664|  1.65k|    }
_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__110unique_ptrIKS1_NS3_14default_deleteIS5_EEEEZNKS1_8TreeEvalIS8_ZNKS1_5CloneEvEUlRS5_4SpanIS8_EE_EET_T0_E10DummyStateZNKS9_IS8_SD_EESE_SF_EUlSG_SA_mE_ZNKS9_IS8_SD_EESE_SF_EUlSG_SA_SC_E_EENS3_8optionalISE_EESF_T1_T2_EN9StackElemC2ESA_mOSG_:
  614|  80.8k|                node(node_), expanded(exp_), state(std::move(state_)) {}
_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__110unique_ptrIKS1_NS3_14default_deleteIS5_EEEEZNKS1_5CloneEvEUlRS5_4SpanIS8_EE_EET_T0_ENKUlZNKS2_IS8_SC_EESD_SE_E10DummyStateS9_mE_clESF_S9_m:
  702|  79.2k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__110unique_ptrIKS1_NS3_14default_deleteIS5_EEEEZNKS1_5CloneEvEUlRS5_4SpanIS8_EE_EET_T0_ENKUlZNKS2_IS8_SC_EESD_SE_E10DummyStateS9_SB_E_clESF_S9_SB_:
  703|  80.8k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|  80.8k|                Result res{upfn(node, subs)};
  705|  80.8k|                return std::optional<Result>(std::move(res));
  706|  80.8k|            }
_ZZNK10miniscript4NodeIjE5CloneEvENKUlRKS1_4SpanINSt3__110unique_ptrIS2_NS5_14default_deleteIS2_EEEEEE_clES3_SA_:
  534|  80.8k|        auto upfn = [](const Node& node, Span<NodeRef<Key>> children) {
  535|  80.8k|            std::vector<NodeRef<Key>> new_subs;
  536|   160k|            for (auto child = children.begin(); child != children.end(); ++child) {
  ------------------
  |  Branch (536:49): [True: 79.2k, False: 80.8k]
  ------------------
  537|  79.2k|                new_subs.emplace_back(std::move(*child));
  538|  79.2k|            }
  539|       |            // std::make_unique (and therefore MakeNodeRef) doesn't work on private constructors
  540|  80.8k|            return std::unique_ptr<Node>{new Node{internal::NoDupCheck{}, node.m_script_ctx, node.fragment, std::move(new_subs), node.keys, node.data, node.k}};
  541|  80.8k|        };
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS6_10unique_ptrIKS1_NS6_14default_deleteIS9_EEEENS6_9allocatorISC_EEEENS7_IjNSD_IjEEEENS7_IhNSD_IhEEEEj:
  567|  80.8k|        : fragment(nt), k(val), keys(key), data(std::move(arg)), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript10FromScriptI12WshSatisfierEENSt3__110unique_ptrIKNS_4NodeINT_3KeyEEENS2_14default_deleteIS8_EEEERK7CScriptRKS5_:
 2645|     44|inline NodeRef<typename Ctx::Key> FromScript(const CScript& script, const Ctx& ctx) {
 2646|     44|    using namespace internal;
 2647|       |    // A too large Script is necessarily invalid, don't bother parsing it.
 2648|     44|    if (script.size() > MaxScriptSize(ctx.MsContext())) return {};
  ------------------
  |  Branch (2648:9): [True: 0, False: 44]
  ------------------
 2649|     44|    auto decomposed = DecomposeScript(script);
 2650|     44|    if (!decomposed) return {};
  ------------------
  |  Branch (2650:9): [True: 44, False: 0]
  ------------------
 2651|      0|    auto it = decomposed->begin();
 2652|      0|    auto ret = DecodeScript<typename Ctx::Key>(it, decomposed->end(), ctx);
 2653|      0|    if (!ret) return {};
  ------------------
  |  Branch (2653:9): [True: 0, False: 0]
  ------------------
 2654|      0|    if (it != decomposed->end()) return {};
  ------------------
  |  Branch (2654:9): [True: 0, False: 0]
  ------------------
 2655|      0|    return ret;
 2656|      0|}

_ZN6script5ConstERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEER4SpanIKcE:
   16|  1.41M|{
   17|  1.41M|    if ((size_t)sp.size() >= str.size() && std::equal(str.begin(), str.end(), sp.begin())) {
  ------------------
  |  Branch (17:9): [True: 1.41M, False: 7.25k]
  |  Branch (17:44): [True: 207k, False: 1.20M]
  ------------------
   18|   207k|        sp = sp.subspan(str.size());
   19|   207k|        return true;
   20|   207k|    }
   21|  1.21M|    return false;
   22|  1.41M|}
_ZN6script4FuncERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEER4SpanIKcE:
   25|   156k|{
   26|   156k|    if ((size_t)sp.size() >= str.size() + 2 && sp[str.size()] == '(' && sp[sp.size() - 1] == ')' && std::equal(str.begin(), str.end(), sp.begin())) {
  ------------------
  |  Branch (26:9): [True: 154k, False: 2.27k]
  |  Branch (26:48): [True: 29.9k, False: 124k]
  |  Branch (26:73): [True: 26.9k, False: 3.01k]
  |  Branch (26:101): [True: 12.7k, False: 14.2k]
  ------------------
   27|  12.7k|        sp = sp.subspan(str.size() + 1, sp.size() - str.size() - 2);
   28|  12.7k|        return true;
   29|  12.7k|    }
   30|   143k|    return false;
   31|   156k|}
_ZN6script4ExprER4SpanIKcE:
   34|  91.9k|{
   35|  91.9k|    int level = 0;
   36|  91.9k|    auto it = sp.begin();
   37|   154M|    while (it != sp.end()) {
  ------------------
  |  Branch (37:12): [True: 154M, False: 18.3k]
  ------------------
   38|   154M|        if (*it == '(' || *it == '{') {
  ------------------
  |  Branch (38:13): [True: 112k, False: 153M]
  |  Branch (38:27): [True: 4.42k, False: 153M]
  ------------------
   39|   117k|            ++level;
   40|   153M|        } else if (level && (*it == ')' || *it == '}')) {
  ------------------
  |  Branch (40:20): [True: 139M, False: 14.8M]
  |  Branch (40:30): [True: 72.4k, False: 139M]
  |  Branch (40:44): [True: 549, False: 139M]
  ------------------
   41|  72.9k|            --level;
   42|   153M|        } else if (level == 0 && (*it == ')' || *it == '}' || *it == ',')) {
  ------------------
  |  Branch (42:20): [True: 14.8M, False: 139M]
  |  Branch (42:35): [True: 514, False: 14.8M]
  |  Branch (42:49): [True: 179, False: 14.8M]
  |  Branch (42:63): [True: 72.9k, False: 14.8M]
  ------------------
   43|  73.6k|            break;
   44|  73.6k|        }
   45|   154M|        ++it;
   46|   154M|    }
   47|  91.9k|    Span<const char> ret = sp.first(it - sp.begin());
   48|  91.9k|    sp = sp.subspan(it - sp.begin());
   49|  91.9k|    return ret;
   50|  91.9k|}

_ZN9CScriptIDC2ERK7CScript:
   16|  25.0k|CScriptID::CScriptID(const CScript& in) : BaseHash(Hash160(in)) {}
_ZNK7CScript13IsPayToAnchorEv:
  208|  5.42k|{
  209|  5.42k|    return (this->size() == 4 &&
  ------------------
  |  Branch (209:13): [True: 2.25k, False: 3.16k]
  ------------------
  210|  5.42k|        (*this)[0] == OP_1 &&
  ------------------
  |  Branch (210:9): [True: 1.30k, False: 948]
  ------------------
  211|  5.42k|        (*this)[1] == 0x02 &&
  ------------------
  |  Branch (211:9): [True: 1.30k, False: 0]
  ------------------
  212|  5.42k|        (*this)[2] == 0x4e &&
  ------------------
  |  Branch (212:9): [True: 78, False: 1.22k]
  ------------------
  213|  5.42k|        (*this)[3] == 0x73);
  ------------------
  |  Branch (213:9): [True: 70, False: 8]
  ------------------
  214|  5.42k|}
_ZN7CScript13IsPayToAnchorEiRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  217|  2.49k|{
  218|  2.49k|    return version == 1 &&
  ------------------
  |  Branch (218:12): [True: 1.22k, False: 1.26k]
  ------------------
  219|  2.49k|        program.size() == 2 &&
  ------------------
  |  Branch (219:9): [True: 770, False: 456]
  ------------------
  220|  2.49k|        program[0] == 0x4e &&
  ------------------
  |  Branch (220:9): [True: 70, False: 700]
  ------------------
  221|  2.49k|        program[1] == 0x73;
  ------------------
  |  Branch (221:9): [True: 70, False: 0]
  ------------------
  222|  2.49k|}
_ZNK7CScript17IsPayToScriptHashEv:
  225|   168k|{
  226|       |    // Extra-fast test for pay-to-script-hash CScripts:
  227|   168k|    return (this->size() == 23 &&
  ------------------
  |  Branch (227:13): [True: 23.4k, False: 145k]
  ------------------
  228|   168k|            (*this)[0] == OP_HASH160 &&
  ------------------
  |  Branch (228:13): [True: 22.1k, False: 1.26k]
  ------------------
  229|   168k|            (*this)[1] == 0x14 &&
  ------------------
  |  Branch (229:13): [True: 22.1k, False: 0]
  ------------------
  230|   168k|            (*this)[22] == OP_EQUAL);
  ------------------
  |  Branch (230:13): [True: 22.1k, False: 0]
  ------------------
  231|   168k|}
_ZNK7CScript16IsWitnessProgramERiRNSt3__16vectorIhNS1_9allocatorIhEEEE:
  244|   153k|{
  245|   153k|    if (this->size() < 4 || this->size() > 42) {
  ------------------
  |  Branch (245:9): [True: 5.91k, False: 147k]
  |  Branch (245:29): [True: 70.1k, False: 77.6k]
  ------------------
  246|  76.0k|        return false;
  247|  76.0k|    }
  248|  77.6k|    if ((*this)[0] != OP_0 && ((*this)[0] < OP_1 || (*this)[0] > OP_16)) {
  ------------------
  |  Branch (248:9): [True: 63.2k, False: 14.3k]
  |  Branch (248:32): [True: 14.6k, False: 48.6k]
  |  Branch (248:53): [True: 34.5k, False: 14.1k]
  ------------------
  249|  49.1k|        return false;
  250|  49.1k|    }
  251|  28.4k|    if ((size_t)((*this)[1] + 2) == this->size()) {
  ------------------
  |  Branch (251:9): [True: 22.6k, False: 5.82k]
  ------------------
  252|  22.6k|        version = DecodeOP_N((opcodetype)(*this)[0]);
  253|  22.6k|        program = std::vector<unsigned char>(this->begin() + 2, this->end());
  254|  22.6k|        return true;
  255|  22.6k|    }
  256|  5.82k|    return false;
  257|  28.4k|}
_ZNK7CScript10IsPushOnlyEN9prevectorILj28EhjiE14const_iteratorE:
  260|  6.20k|{
  261|   918k|    while (pc < end())
  ------------------
  |  Branch (261:12): [True: 915k, False: 3.10k]
  ------------------
  262|   915k|    {
  263|   915k|        opcodetype opcode;
  264|   915k|        if (!GetOp(pc, opcode))
  ------------------
  |  Branch (264:13): [True: 2.60k, False: 912k]
  ------------------
  265|  2.60k|            return false;
  266|       |        // Note that IsPushOnly() *does* consider OP_RESERVED to be a
  267|       |        // push-type opcode, however execution of OP_RESERVED fails, so
  268|       |        // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
  269|       |        // the P2SH special validation code being executed.
  270|   912k|        if (opcode > OP_16)
  ------------------
  |  Branch (270:13): [True: 501, False: 911k]
  ------------------
  271|    501|            return false;
  272|   912k|    }
  273|  3.10k|    return true;
  274|  6.20k|}
_ZNK7CScript10IsPushOnlyEv:
  277|  2.44k|{
  278|  2.44k|    return this->IsPushOnly(begin());
  279|  2.44k|}
_Z11GetScriptOpRN9prevectorILj28EhjiE14const_iteratorES1_R10opcodetypePNSt3__16vectorIhNS5_9allocatorIhEEEE:
  307|  9.05M|{
  308|  9.05M|    opcodeRet = OP_INVALIDOPCODE;
  309|  9.05M|    if (pvchRet)
  ------------------
  |  Branch (309:9): [True: 5.84M, False: 3.21M]
  ------------------
  310|  5.84M|        pvchRet->clear();
  311|  9.05M|    if (pc >= end)
  ------------------
  |  Branch (311:9): [True: 17.5k, False: 9.04M]
  ------------------
  312|  17.5k|        return false;
  313|       |
  314|       |    // Read instruction
  315|  9.04M|    if (end - pc < 1)
  ------------------
  |  Branch (315:9): [True: 0, False: 9.04M]
  ------------------
  316|      0|        return false;
  317|  9.04M|    unsigned int opcode = *pc++;
  318|       |
  319|       |    // Immediate operand
  320|  9.04M|    if (opcode <= OP_PUSHDATA4)
  ------------------
  |  Branch (320:9): [True: 2.42M, False: 6.61M]
  ------------------
  321|  2.42M|    {
  322|  2.42M|        unsigned int nSize = 0;
  323|  2.42M|        if (opcode < OP_PUSHDATA1)
  ------------------
  |  Branch (323:13): [True: 2.41M, False: 8.75k]
  ------------------
  324|  2.41M|        {
  325|  2.41M|            nSize = opcode;
  326|  2.41M|        }
  327|  8.75k|        else if (opcode == OP_PUSHDATA1)
  ------------------
  |  Branch (327:18): [True: 4.00k, False: 4.74k]
  ------------------
  328|  4.00k|        {
  329|  4.00k|            if (end - pc < 1)
  ------------------
  |  Branch (329:17): [True: 76, False: 3.92k]
  ------------------
  330|     76|                return false;
  331|  3.92k|            nSize = *pc++;
  332|  3.92k|        }
  333|  4.74k|        else if (opcode == OP_PUSHDATA2)
  ------------------
  |  Branch (333:18): [True: 2.08k, False: 2.66k]
  ------------------
  334|  2.08k|        {
  335|  2.08k|            if (end - pc < 2)
  ------------------
  |  Branch (335:17): [True: 332, False: 1.74k]
  ------------------
  336|    332|                return false;
  337|  1.74k|            nSize = ReadLE16(&pc[0]);
  338|  1.74k|            pc += 2;
  339|  1.74k|        }
  340|  2.66k|        else if (opcode == OP_PUSHDATA4)
  ------------------
  |  Branch (340:18): [True: 2.66k, False: 0]
  ------------------
  341|  2.66k|        {
  342|  2.66k|            if (end - pc < 4)
  ------------------
  |  Branch (342:17): [True: 720, False: 1.94k]
  ------------------
  343|    720|                return false;
  344|  1.94k|            nSize = ReadLE32(&pc[0]);
  345|  1.94k|            pc += 4;
  346|  1.94k|        }
  347|  2.42M|        if (end - pc < 0 || (unsigned int)(end - pc) < nSize)
  ------------------
  |  Branch (347:13): [True: 0, False: 2.42M]
  |  Branch (347:29): [True: 25.9k, False: 2.39M]
  ------------------
  348|  25.9k|            return false;
  349|  2.39M|        if (pvchRet)
  ------------------
  |  Branch (349:13): [True: 1.17M, False: 1.22M]
  ------------------
  350|  1.17M|            pvchRet->assign(pc, pc + nSize);
  351|  2.39M|        pc += nSize;
  352|  2.39M|    }
  353|       |
  354|  9.01M|    opcodeRet = static_cast<opcodetype>(opcode);
  355|  9.01M|    return true;
  356|  9.04M|}
_Z16CheckMinimalPushRKNSt3__16vectorIhNS_9allocatorIhEEEE10opcodetype:
  366|  1.10M|bool CheckMinimalPush(const std::vector<unsigned char>& data, opcodetype opcode) {
  367|       |    // Excludes OP_1NEGATE, OP_1-16 since they are by definition minimal
  368|  1.10M|    assert(0 <= opcode && opcode <= OP_PUSHDATA4);
  369|  1.10M|    if (data.size() == 0) {
  ------------------
  |  Branch (369:9): [True: 927k, False: 174k]
  ------------------
  370|       |        // Should have used OP_0.
  371|   927k|        return opcode == OP_0;
  372|   927k|    } else if (data.size() == 1 && data[0] >= 1 && data[0] <= 16) {
  ------------------
  |  Branch (372:16): [True: 10.3k, False: 164k]
  |  Branch (372:36): [True: 5.97k, False: 4.35k]
  |  Branch (372:52): [True: 1.75k, False: 4.22k]
  ------------------
  373|       |        // Should have used OP_1 .. OP_16.
  374|  1.75k|        return false;
  375|   172k|    } else if (data.size() == 1 && data[0] == 0x81) {
  ------------------
  |  Branch (375:16): [True: 8.57k, False: 164k]
  |  Branch (375:36): [True: 252, False: 8.32k]
  ------------------
  376|       |        // Should have used OP_1NEGATE.
  377|    252|        return false;
  378|   172k|    } else if (data.size() <= 75) {
  ------------------
  |  Branch (378:16): [True: 171k, False: 1.09k]
  ------------------
  379|       |        // Must have used a direct push (opcode indicating number of bytes pushed + those bytes).
  380|   171k|        return opcode == data.size();
  381|   171k|    } else if (data.size() <= 255) {
  ------------------
  |  Branch (381:16): [True: 1.09k, False: 0]
  ------------------
  382|       |        // Must have used OP_PUSHDATA.
  383|  1.09k|        return opcode == OP_PUSHDATA1;
  384|  1.09k|    } else if (data.size() <= 65535) {
  ------------------
  |  Branch (384:16): [True: 0, False: 0]
  ------------------
  385|       |        // Must have used OP_PUSHDATA2.
  386|      0|        return opcode == OP_PUSHDATA2;
  387|      0|    }
  388|      0|    return true;
  389|  1.10M|}

_ZN15scriptnum_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  223|  5.43k|    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
_ZN10CScriptNumC2ERKl:
  239|  1.59M|    {
  240|  1.59M|        m_value = n;
  241|  1.59M|    }
_ZN10CScriptNumC2ERKNSt3__16vectorIhNS0_9allocatorIhEEEEbm:
  247|   201k|    {
  248|   201k|        if (vch.size() > nMaxNumSize) {
  ------------------
  |  Branch (248:13): [True: 4.59k, False: 197k]
  ------------------
  249|  4.59k|            throw scriptnum_error("script number overflow");
  250|  4.59k|        }
  251|   197k|        if (fRequireMinimal && vch.size() > 0) {
  ------------------
  |  Branch (251:13): [True: 195k, False: 1.30k]
  |  Branch (251:32): [True: 95.7k, False: 100k]
  ------------------
  252|       |            // Check that the number is encoded with the minimum possible
  253|       |            // number of bytes.
  254|       |            //
  255|       |            // If the most-significant-byte - excluding the sign bit - is zero
  256|       |            // then we're not minimal. Note how this test also rejects the
  257|       |            // negative-zero encoding, 0x80.
  258|  95.7k|            if ((vch.back() & 0x7f) == 0) {
  ------------------
  |  Branch (258:17): [True: 1.88k, False: 93.8k]
  ------------------
  259|       |                // One exception: if there's more than one byte and the most
  260|       |                // significant bit of the second-most-significant-byte is set
  261|       |                // it would conflict with the sign bit. An example of this case
  262|       |                // is +-255, which encode to 0xff00 and 0xff80 respectively.
  263|       |                // (big-endian).
  264|  1.88k|                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
  ------------------
  |  Branch (264:21): [True: 464, False: 1.42k]
  |  Branch (264:40): [True: 376, False: 1.04k]
  ------------------
  265|    840|                    throw scriptnum_error("non-minimally encoded script number");
  266|    840|                }
  267|  1.88k|            }
  268|  95.7k|        }
  269|   196k|        m_value = set_vch(vch);
  270|   196k|    }
_ZNK10CScriptNumeqERKl:
  272|  10.2k|    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
_ZNK10CScriptNumneERKl:
  273|  27.8k|    inline bool operator!=(const int64_t& rhs) const    { return m_value != rhs; }
_ZNK10CScriptNumleERKl:
  274|  12.5k|    inline bool operator<=(const int64_t& rhs) const    { return m_value <= rhs; }
_ZNK10CScriptNumltERKl:
  275|  54.1k|    inline bool operator< (const int64_t& rhs) const    { return m_value <  rhs; }
_ZNK10CScriptNumgeERKl:
  276|  4.71k|    inline bool operator>=(const int64_t& rhs) const    { return m_value >= rhs; }
_ZNK10CScriptNumgtERKl:
  277|  20.5k|    inline bool operator> (const int64_t& rhs) const    { return m_value >  rhs; }
_ZNK10CScriptNumeqERKS_:
  279|  10.2k|    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
_ZNK10CScriptNumneERKS_:
  280|  16.8k|    inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
_ZNK10CScriptNumleERKS_:
  281|  12.5k|    inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
_ZNK10CScriptNumltERKS_:
  282|  20.3k|    inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
_ZNK10CScriptNumgeERKS_:
  283|    878|    inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
_ZNK10CScriptNumgtERKS_:
  284|  5.17k|    inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
_ZNK10CScriptNumplERKl:
  286|    412|    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
_ZNK10CScriptNummiERKl:
  287|  2.27k|    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
_ZNK10CScriptNumplERKS_:
  288|    412|    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
_ZNK10CScriptNummiERKS_:
  289|  2.27k|    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
_ZN10CScriptNumpLERKS_:
  291|  3.60k|    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
_ZN10CScriptNummIERKS_:
  292|  3.07k|    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
_ZNK10CScriptNumanERKl:
  294|  21.7k|    inline CScriptNum operator&(   const int64_t& rhs)    const { return CScriptNum(m_value & rhs);}
_ZNK10CScriptNumngEv:
  300|  12.6k|    {
  301|  12.6k|        assert(m_value != std::numeric_limits<int64_t>::min());
  302|  12.6k|        return CScriptNum(-m_value);
  303|  12.6k|    }
_ZN10CScriptNumaSERKl:
  306|  32.2k|    {
  307|  32.2k|        m_value = rhs;
  308|  32.2k|        return *this;
  309|  32.2k|    }
_ZN10CScriptNumpLERKl:
  312|  3.60k|    {
  313|  3.60k|        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
  314|  3.60k|                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
  315|  3.60k|        m_value += rhs;
  316|  3.60k|        return *this;
  317|  3.60k|    }
_ZN10CScriptNummIERKl:
  320|  3.07k|    {
  321|  3.07k|        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
  322|  3.07k|                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
  323|  3.07k|        m_value -= rhs;
  324|  3.07k|        return *this;
  325|  3.07k|    }
_ZNK10CScriptNum6getintEv:
  334|  37.6k|    {
  335|  37.6k|        if (m_value > std::numeric_limits<int>::max())
  ------------------
  |  Branch (335:13): [True: 0, False: 37.6k]
  ------------------
  336|      0|            return std::numeric_limits<int>::max();
  337|  37.6k|        else if (m_value < std::numeric_limits<int>::min())
  ------------------
  |  Branch (337:18): [True: 0, False: 37.6k]
  ------------------
  338|      0|            return std::numeric_limits<int>::min();
  339|  37.6k|        return m_value;
  340|  37.6k|    }
_ZNK10CScriptNum6getvchEv:
  345|  1.58M|    {
  346|  1.58M|        return serialize(m_value);
  347|  1.58M|    }
_ZN10CScriptNum9serializeERKl:
  350|  1.65M|    {
  351|  1.65M|        if(value == 0)
  ------------------
  |  Branch (351:12): [True: 34.8k, False: 1.61M]
  ------------------
  352|  34.8k|            return std::vector<unsigned char>();
  353|       |
  354|  1.61M|        std::vector<unsigned char> result;
  355|  1.61M|        const bool neg = value < 0;
  356|  1.61M|        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
  ------------------
  |  Branch (356:29): [True: 470k, False: 1.14M]
  ------------------
  357|       |
  358|  6.50M|        while(absvalue)
  ------------------
  |  Branch (358:15): [True: 4.88M, False: 1.61M]
  ------------------
  359|  4.88M|        {
  360|  4.88M|            result.push_back(absvalue & 0xff);
  361|  4.88M|            absvalue >>= 8;
  362|  4.88M|        }
  363|       |
  364|       |//    - If the most significant byte is >= 0x80 and the value is positive, push a
  365|       |//    new zero-byte to make the significant byte < 0x80 again.
  366|       |
  367|       |//    - If the most significant byte is >= 0x80 and the value is negative, push a
  368|       |//    new 0x80 byte that will be popped off when converting to an integral.
  369|       |
  370|       |//    - If the most significant byte is < 0x80 and the value is negative, add
  371|       |//    0x80 to it, since it will be subtracted and interpreted as a negative when
  372|       |//    converting to an integral.
  373|       |
  374|  1.61M|        if (result.back() & 0x80)
  ------------------
  |  Branch (374:13): [True: 3.57k, False: 1.61M]
  ------------------
  375|  3.57k|            result.push_back(neg ? 0x80 : 0);
  ------------------
  |  Branch (375:30): [True: 347, False: 3.22k]
  ------------------
  376|  1.61M|        else if (neg)
  ------------------
  |  Branch (376:18): [True: 469k, False: 1.14M]
  ------------------
  377|   469k|            result.back() |= 0x80;
  378|       |
  379|  1.61M|        return result;
  380|  1.65M|    }
_ZN10CScriptNum7set_vchERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  384|   196k|    {
  385|   196k|      if (vch.empty())
  ------------------
  |  Branch (385:11): [True: 101k, False: 95.1k]
  ------------------
  386|   101k|          return 0;
  387|       |
  388|  95.1k|      int64_t result = 0;
  389|   216k|      for (size_t i = 0; i != vch.size(); ++i)
  ------------------
  |  Branch (389:26): [True: 121k, False: 95.1k]
  ------------------
  390|   121k|          result |= static_cast<int64_t>(vch[i]) << 8*i;
  391|       |
  392|       |      // If the input vector's most significant byte is 0x80, remove it from
  393|       |      // the result's msb and return a negative.
  394|  95.1k|      if (vch.back() & 0x80)
  ------------------
  |  Branch (394:11): [True: 11.2k, False: 83.8k]
  ------------------
  395|  11.2k|          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
  396|       |
  397|  83.8k|      return result;
  398|  95.1k|    }
_ZN7CScript14AppendDataSizeEj:
  418|  2.55M|    {
  419|  2.55M|        if (size < OP_PUSHDATA1) {
  ------------------
  |  Branch (419:13): [True: 1.86M, False: 686k]
  ------------------
  420|  1.86M|            insert(end(), static_cast<value_type>(size));
  421|  1.86M|        } else if (size <= 0xff) {
  ------------------
  |  Branch (421:20): [True: 686k, False: 0]
  ------------------
  422|   686k|            insert(end(), OP_PUSHDATA1);
  423|   686k|            insert(end(), static_cast<value_type>(size));
  424|   686k|        } else if (size <= 0xffff) {
  ------------------
  |  Branch (424:20): [True: 0, False: 0]
  ------------------
  425|      0|            insert(end(), OP_PUSHDATA2);
  426|      0|            value_type data[2];
  427|      0|            WriteLE16(data, size);
  428|      0|            insert(end(), std::cbegin(data), std::cend(data));
  429|      0|        } else {
  430|      0|            insert(end(), OP_PUSHDATA4);
  431|      0|            value_type data[4];
  432|      0|            WriteLE32(data, size);
  433|      0|            insert(end(), std::cbegin(data), std::cend(data));
  434|      0|        }
  435|  2.55M|    }
_ZN7CScript10AppendDataENSt3__14spanIKhLm18446744073709551615EEE:
  438|  2.55M|    {
  439|  2.55M|        insert(end(), data.begin(), data.end());
  440|  2.55M|    }
_ZN7CScript10push_int64El:
  444|   169k|    {
  445|   169k|        if (n == -1 || (n >= 1 && n <= 16))
  ------------------
  |  Branch (445:13): [True: 16, False: 169k]
  |  Branch (445:25): [True: 163k, False: 6.15k]
  |  Branch (445:35): [True: 94.0k, False: 69.3k]
  ------------------
  446|  94.0k|        {
  447|  94.0k|            push_back(n + (OP_1 - 1));
  448|  94.0k|        }
  449|  75.4k|        else if (n == 0)
  ------------------
  |  Branch (449:18): [True: 4.86k, False: 70.6k]
  ------------------
  450|  4.86k|        {
  451|  4.86k|            push_back(OP_0);
  452|  4.86k|        }
  453|  70.6k|        else
  454|  70.6k|        {
  455|  70.6k|            *this << CScriptNum::serialize(n);
  456|  70.6k|        }
  457|   169k|        return *this;
  458|   169k|    }
_ZN7CScriptlsEl:
  477|   169k|    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
_ZN7CScriptlsE10opcodetype:
  480|   997k|    {
  481|   997k|        if (opcode < 0 || opcode > 0xff)
  ------------------
  |  Branch (481:13): [True: 0, False: 997k]
  |  Branch (481:27): [True: 0, False: 997k]
  ------------------
  482|      0|            throw std::runtime_error("CScript::operator<<(): invalid opcode");
  483|   997k|        insert(end(), (unsigned char)opcode);
  484|   997k|        return *this;
  485|   997k|    }
_ZN7CScriptlsERK10CScriptNum:
  488|   460k|    {
  489|   460k|        *this << b.getvch();
  490|   460k|        return *this;
  491|   460k|    }
_ZN7CScriptlsENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  494|  2.55M|    {
  495|  2.55M|        AppendDataSize(b.size());
  496|  2.55M|        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
  497|  2.55M|        return *this;
  498|  2.55M|    }
_ZN7CScriptlsENSt3__14spanIKhLm18446744073709551615EEE:
  502|  2.55M|    {
  503|  2.55M|        return *this << std::as_bytes(b);
  504|  2.55M|    }
_ZNK7CScript5GetOpERN9prevectorILj28EhjiE14const_iteratorER10opcodetypeRNSt3__16vectorIhNS6_9allocatorIhEEEE:
  507|  5.84M|    {
  508|  5.84M|        return GetScriptOp(pc, end(), opcodeRet, &vchRet);
  509|  5.84M|    }
_ZNK7CScript5GetOpERN9prevectorILj28EhjiE14const_iteratorER10opcodetype:
  512|  3.21M|    {
  513|  3.21M|        return GetScriptOp(pc, end(), opcodeRet, nullptr);
  514|  3.21M|    }
_ZN7CScript10DecodeOP_NE10opcodetype:
  518|  30.5k|    {
  519|  30.5k|        if (opcode == OP_0)
  ------------------
  |  Branch (519:13): [True: 9.88k, False: 20.6k]
  ------------------
  520|  9.88k|            return 0;
  521|  20.6k|        assert(opcode >= OP_1 && opcode <= OP_16);
  522|  20.6k|        return (int)opcode - (int)(OP_1 - 1);
  523|  20.6k|    }
_ZN7CScript10EncodeOP_NEi:
  525|    534|    {
  526|    534|        assert(n >= 0 && n <= 16);
  527|    534|        if (n == 0)
  ------------------
  |  Branch (527:13): [True: 0, False: 534]
  ------------------
  528|      0|            return OP_0;
  529|    534|        return (opcodetype)(OP_1+n-1);
  530|    534|    }
_ZN7CScript5clearEv:
  577|  34.0k|    {
  578|       |        // The default prevector::clear() does not release memory
  579|  34.0k|        CScriptBase::clear();
  580|  34.0k|        shrink_to_fit();
  581|  34.0k|    }
_ZNK14CScriptWitness6IsNullEv:
  593|   112k|    bool IsNull() const { return stack.empty(); }
_ZN9CScriptIDC2ERK7uint160:
  606|  10.7k|    explicit CScriptID(const uint160& in) : BaseHash(in) {}
_ZN7CScriptC2Ev:
  461|   790k|    CScript() = default;
_ZN14CScriptWitnessC2Ev:
  591|   166k|    CScriptWitness() = default;
_ZN7CScript16SerializationOpsI12ParamsStreamIR10DataStream20TransactionSerParamsES_17ActionUnserializeEEvRT0_RT_T1_:
  465|   123k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  156|   123k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN7CScript16SerializationOpsI10DataStreamS_17ActionUnserializeEEvRT0_RT_T1_:
  465|  1.49k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  156|  1.49k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_Z12ToByteVectorI11XOnlyPubKeyENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|   597k|{
   69|   597k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|   597k|}
_ZN7CScriptC2ITkNSt3__114input_iteratorENS1_11__wrap_iterIPKhEEEET_S6_:
  463|  2.35k|    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
_Z11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_:
  617|  1.03k|{
  618|  1.03k|    CScript ret;
  619|  1.03k|    int cnt{0};
  620|       |
  621|  1.03k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.03k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.03k|            if (cnt == 0) {
  625|  1.03k|                ret = std::forward<Ts>(input);
  626|  1.03k|            } else {
  627|  1.03k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.03k|            }
  629|  1.03k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.03k|            ret << input;
  632|  1.03k|        }
  633|  1.03k|        cnt++;
  634|  1.03k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.03k|    return ret;
  637|  1.03k|}
_ZZ11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_ENKUlOS4_E_clES9_:
  621|  1.03k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.03k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.03k|            ret << input;
  632|  1.03k|        }
  633|  1.03k|        cnt++;
  634|  1.03k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  617|  1.26k|{
  618|  1.26k|    CScript ret;
  619|  1.26k|    int cnt{0};
  620|       |
  621|  1.26k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.26k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.26k|            if (cnt == 0) {
  625|  1.26k|                ret = std::forward<Ts>(input);
  626|  1.26k|            } else {
  627|  1.26k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.26k|            }
  629|  1.26k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.26k|            ret << input;
  632|  1.26k|        }
  633|  1.26k|        cnt++;
  634|  1.26k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.26k|    return ret;
  637|  1.26k|}
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESA_:
  621|  1.26k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.26k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.26k|            ret << input;
  632|  1.26k|        }
  633|  1.26k|        cnt++;
  634|  1.26k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESA_:
  621|  1.26k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.26k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.26k|            ret << input;
  632|  1.26k|        }
  633|  1.26k|        cnt++;
  634|  1.26k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS5_E_clESA_:
  621|  1.26k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.26k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.26k|            ret << input;
  632|  1.26k|        }
  633|  1.26k|        cnt++;
  634|  1.26k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESA_:
  621|  1.26k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.26k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.26k|            ret << input;
  632|  1.26k|        }
  633|  1.26k|        cnt++;
  634|  1.26k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_:
  617|     37|{
  618|     37|    CScript ret;
  619|     37|    int cnt{0};
  620|       |
  621|     37|    ([&ret, &cnt] (Ts&& input) {
  622|     37|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     37|            if (cnt == 0) {
  625|     37|                ret = std::forward<Ts>(input);
  626|     37|            } else {
  627|     37|                ret.insert(ret.end(), input.begin(), input.end());
  628|     37|            }
  629|     37|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     37|            ret << input;
  632|     37|        }
  633|     37|        cnt++;
  634|     37|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     37|    return ret;
  637|     37|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|     37|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     37|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     37|            ret << input;
  632|     37|        }
  633|     37|        cnt++;
  634|     37|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|     37|    ([&ret, &cnt] (Ts&& input) {
  622|     37|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     37|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 37]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|     37|            } else {
  627|     37|                ret.insert(ret.end(), input.begin(), input.end());
  628|     37|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     37|        cnt++;
  634|     37|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|     37|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     37|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     37|            ret << input;
  632|     37|        }
  633|     37|        cnt++;
  634|     37|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_:
  617|     17|{
  618|     17|    CScript ret;
  619|     17|    int cnt{0};
  620|       |
  621|     17|    ([&ret, &cnt] (Ts&& input) {
  622|     17|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     17|            if (cnt == 0) {
  625|     17|                ret = std::forward<Ts>(input);
  626|     17|            } else {
  627|     17|                ret.insert(ret.end(), input.begin(), input.end());
  628|     17|            }
  629|     17|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     17|            ret << input;
  632|     17|        }
  633|     17|        cnt++;
  634|     17|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     17|    return ret;
  637|     17|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlOS0_E_clES6_:
  621|     17|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     17|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     17|            ret << input;
  632|     17|        }
  633|     17|        cnt++;
  634|     17|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlS2_E_clES2_:
  621|     17|    ([&ret, &cnt] (Ts&& input) {
  622|     17|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     17|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 17]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|     17|            } else {
  627|     17|                ret.insert(ret.end(), input.begin(), input.end());
  628|     17|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     17|        cnt++;
  634|     17|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_:
  617|  29.5k|{
  618|  29.5k|    CScript ret;
  619|  29.5k|    int cnt{0};
  620|       |
  621|  29.5k|    ([&ret, &cnt] (Ts&& input) {
  622|  29.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  29.5k|            if (cnt == 0) {
  625|  29.5k|                ret = std::forward<Ts>(input);
  626|  29.5k|            } else {
  627|  29.5k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  29.5k|            }
  629|  29.5k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  29.5k|            ret << input;
  632|  29.5k|        }
  633|  29.5k|        cnt++;
  634|  29.5k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  29.5k|    return ret;
  637|  29.5k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  621|  29.5k|    ([&ret, &cnt] (Ts&& input) {
  622|  29.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  29.5k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 29.5k, False: 0]
  ------------------
  625|  29.5k|                ret = std::forward<Ts>(input);
  626|  29.5k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  29.5k|        cnt++;
  634|  29.5k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  621|  29.5k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  29.5k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  29.5k|            ret << input;
  632|  29.5k|        }
  633|  29.5k|        cnt++;
  634|  29.5k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_:
  617|  1.58k|{
  618|  1.58k|    CScript ret;
  619|  1.58k|    int cnt{0};
  620|       |
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.58k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.58k|            if (cnt == 0) {
  625|  1.58k|                ret = std::forward<Ts>(input);
  626|  1.58k|            } else {
  627|  1.58k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.58k|            }
  629|  1.58k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.58k|            ret << input;
  632|  1.58k|        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.58k|    return ret;
  637|  1.58k|}
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E2_clES6_:
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.58k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.58k|            ret << input;
  632|  1.58k|        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.58k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.58k|            ret << input;
  632|  1.58k|        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.58k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.58k|            ret << input;
  632|  1.58k|        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.58k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.58k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.58k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.58k|            } else {
  627|  1.58k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.58k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|  1.58k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.58k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.58k|            ret << input;
  632|  1.58k|        }
  633|  1.58k|        cnt++;
  634|  1.58k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeEE7CScriptDpOT_:
  617|  10.6k|{
  618|  10.6k|    CScript ret;
  619|  10.6k|    int cnt{0};
  620|       |
  621|  10.6k|    ([&ret, &cnt] (Ts&& input) {
  622|  10.6k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  10.6k|            if (cnt == 0) {
  625|  10.6k|                ret = std::forward<Ts>(input);
  626|  10.6k|            } else {
  627|  10.6k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  10.6k|            }
  629|  10.6k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  10.6k|            ret << input;
  632|  10.6k|        }
  633|  10.6k|        cnt++;
  634|  10.6k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  10.6k|    return ret;
  637|  10.6k|}
_ZZ11BuildScriptIJ10opcodetypeEE7CScriptDpOT_ENKUlOS0_E_clES5_:
  621|  10.6k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  10.6k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  10.6k|            ret << input;
  632|  10.6k|        }
  633|  10.6k|        cnt++;
  634|  10.6k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_EES0_DpOT_:
  617|  1.62k|{
  618|  1.62k|    CScript ret;
  619|  1.62k|    int cnt{0};
  620|       |
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  625|  1.62k|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|  1.62k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.62k|            }
  629|  1.62k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.62k|            ret << input;
  632|  1.62k|        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.62k|    return ret;
  637|  1.62k|}
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlOS0_E_clES5_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1.62k, False: 0]
  ------------------
  625|  1.62k|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlS1_E_clES1_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.62k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|  1.62k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.62k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_:
  617|     54|{
  618|     54|    CScript ret;
  619|     54|    int cnt{0};
  620|       |
  621|     54|    ([&ret, &cnt] (Ts&& input) {
  622|     54|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     54|            if (cnt == 0) {
  625|     54|                ret = std::forward<Ts>(input);
  626|     54|            } else {
  627|     54|                ret.insert(ret.end(), input.begin(), input.end());
  628|     54|            }
  629|     54|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     54|            ret << input;
  632|     54|        }
  633|     54|        cnt++;
  634|     54|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     54|    return ret;
  637|     54|}
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS0_E_clES6_:
  621|     54|    ([&ret, &cnt] (Ts&& input) {
  622|     54|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     54|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 54, False: 0]
  ------------------
  625|     54|                ret = std::forward<Ts>(input);
  626|     54|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     54|        cnt++;
  634|     54|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlS1_E_clES1_:
  621|     54|    ([&ret, &cnt] (Ts&& input) {
  622|     54|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     54|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 54]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|     54|            } else {
  627|     54|                ret.insert(ret.end(), input.begin(), input.end());
  628|     54|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     54|        cnt++;
  634|     54|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS2_E_clES6_:
  621|     54|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     54|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     54|            ret << input;
  632|     54|        }
  633|     54|        cnt++;
  634|     54|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_:
  617|     63|{
  618|     63|    CScript ret;
  619|     63|    int cnt{0};
  620|       |
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|     63|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     63|            if (cnt == 0) {
  625|     63|                ret = std::forward<Ts>(input);
  626|     63|            } else {
  627|     63|                ret.insert(ret.end(), input.begin(), input.end());
  628|     63|            }
  629|     63|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     63|            ret << input;
  632|     63|        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     63|    return ret;
  637|     63|}
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|     63|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     63|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 63, False: 0]
  ------------------
  625|     63|                ret = std::forward<Ts>(input);
  626|     63|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     63|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     63|            ret << input;
  632|     63|        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     63|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     63|            ret << input;
  632|     63|        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|     63|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     63|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 63]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|     63|            } else {
  627|     63|                ret.insert(ret.end(), input.begin(), input.end());
  628|     63|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  621|     63|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     63|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     63|            ret << input;
  632|     63|        }
  633|     63|        cnt++;
  634|     63|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_:
  617|  8.95k|{
  618|  8.95k|    CScript ret;
  619|  8.95k|    int cnt{0};
  620|       |
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|  8.95k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  8.95k|            if (cnt == 0) {
  625|  8.95k|                ret = std::forward<Ts>(input);
  626|  8.95k|            } else {
  627|  8.95k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  8.95k|            }
  629|  8.95k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  8.95k|            ret << input;
  632|  8.95k|        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  8.95k|    return ret;
  637|  8.95k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  8.95k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  8.95k|            ret << input;
  632|  8.95k|        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E0_clES2_:
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|  8.95k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  8.95k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 8.95k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  8.95k|            } else {
  627|  8.95k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  8.95k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  8.95k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  8.95k|            ret << input;
  632|  8.95k|        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|  8.95k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  8.95k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 8.95k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  8.95k|            } else {
  627|  8.95k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  8.95k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|  8.95k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  8.95k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  8.95k|            ret << input;
  632|  8.95k|        }
  633|  8.95k|        cnt++;
  634|  8.95k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_:
  617|      1|{
  618|      1|    CScript ret;
  619|      1|    int cnt{0};
  620|       |
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|      1|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|      1|            if (cnt == 0) {
  625|      1|                ret = std::forward<Ts>(input);
  626|      1|            } else {
  627|      1|                ret.insert(ret.end(), input.begin(), input.end());
  628|      1|            }
  629|      1|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|      1|            ret << input;
  632|      1|        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|      1|    return ret;
  637|      1|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|      1|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|      1|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1, False: 0]
  ------------------
  625|      1|                ret = std::forward<Ts>(input);
  626|      1|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|      1|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|      1|            ret << input;
  632|      1|        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E0_clES2_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|      1|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|      1|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|      1|            } else {
  627|      1|                ret.insert(ret.end(), input.begin(), input.end());
  628|      1|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|      1|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|      1|            ret << input;
  632|      1|        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|      1|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|      1|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|      1|            } else {
  627|      1|                ret.insert(ret.end(), input.begin(), input.end());
  628|      1|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  621|      1|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|      1|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|      1|            ret << input;
  632|      1|        }
  633|      1|        cnt++;
  634|      1|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKjEE7CScriptDpOT_:
  617|  1.54k|{
  618|  1.54k|    CScript ret;
  619|  1.54k|    int cnt{0};
  620|       |
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.54k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.54k|            if (cnt == 0) {
  625|  1.54k|                ret = std::forward<Ts>(input);
  626|  1.54k|            } else {
  627|  1.54k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.54k|            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.54k|    return ret;
  637|  1.54k|}
_ZZ11BuildScriptIJRKjEE7CScriptDpOT_ENKUlS1_E_clES1_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_:
  617|  10.6k|{
  618|  10.6k|    CScript ret;
  619|  10.6k|    int cnt{0};
  620|       |
  621|  10.6k|    ([&ret, &cnt] (Ts&& input) {
  622|  10.6k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  10.6k|            if (cnt == 0) {
  625|  10.6k|                ret = std::forward<Ts>(input);
  626|  10.6k|            } else {
  627|  10.6k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  10.6k|            }
  629|  10.6k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  10.6k|            ret << input;
  632|  10.6k|        }
  633|  10.6k|        cnt++;
  634|  10.6k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  10.6k|    return ret;
  637|  10.6k|}
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS0_E_clES9_:
  621|  10.6k|    ([&ret, &cnt] (Ts&& input) {
  622|  10.6k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  10.6k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 10.6k, False: 0]
  ------------------
  625|  10.6k|                ret = std::forward<Ts>(input);
  626|  10.6k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  10.6k|        cnt++;
  634|  10.6k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS5_E_clES9_:
  621|  10.6k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  10.6k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  10.6k|            ret << input;
  632|  10.6k|        }
  633|  10.6k|        cnt++;
  634|  10.6k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_:
  617|  1.54k|{
  618|  1.54k|    CScript ret;
  619|  1.54k|    int cnt{0};
  620|       |
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.54k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.54k|            if (cnt == 0) {
  625|  1.54k|                ret = std::forward<Ts>(input);
  626|  1.54k|            } else {
  627|  1.54k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.54k|            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.54k|    return ret;
  637|  1.54k|}
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.54k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.54k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1.54k, False: 0]
  ------------------
  625|  1.54k|                ret = std::forward<Ts>(input);
  626|  1.54k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOmE_clES5_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_:
  617|     89|{
  618|     89|    CScript ret;
  619|     89|    int cnt{0};
  620|       |
  621|     89|    ([&ret, &cnt] (Ts&& input) {
  622|     89|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     89|            if (cnt == 0) {
  625|     89|                ret = std::forward<Ts>(input);
  626|     89|            } else {
  627|     89|                ret.insert(ret.end(), input.begin(), input.end());
  628|     89|            }
  629|     89|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     89|            ret << input;
  632|     89|        }
  633|     89|        cnt++;
  634|     89|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     89|    return ret;
  637|     89|}
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS0_E_clES7_:
  621|     89|    ([&ret, &cnt] (Ts&& input) {
  622|     89|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     89|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 89, False: 0]
  ------------------
  625|     89|                ret = std::forward<Ts>(input);
  626|     89|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|     89|        cnt++;
  634|     89|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlS2_E_clES2_:
  621|     89|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     89|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     89|            ret << input;
  632|     89|        }
  633|     89|        cnt++;
  634|     89|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS3_E_clES7_:
  621|     89|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     89|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     89|            ret << input;
  632|     89|        }
  633|     89|        cnt++;
  634|     89|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKlEE7CScriptDpOT_:
  617|     40|{
  618|     40|    CScript ret;
  619|     40|    int cnt{0};
  620|       |
  621|     40|    ([&ret, &cnt] (Ts&& input) {
  622|     40|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     40|            if (cnt == 0) {
  625|     40|                ret = std::forward<Ts>(input);
  626|     40|            } else {
  627|     40|                ret.insert(ret.end(), input.begin(), input.end());
  628|     40|            }
  629|     40|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     40|            ret << input;
  632|     40|        }
  633|     40|        cnt++;
  634|     40|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     40|    return ret;
  637|     40|}
_ZZ11BuildScriptIJRKlEE7CScriptDpOT_ENKUlS1_E_clES1_:
  621|     40|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     40|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     40|            ret << input;
  632|     40|        }
  633|     40|        cnt++;
  634|     40|    } (std::forward<Ts>(inputs)), ...);
_ZN7CScriptC2ITkNSt3__114input_iteratorENS1_11__wrap_iterIPhEEEET_S5_:
  463|  4.22k|    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
_Z12ToByteVectorI7CPubKeyENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  59.2k|{
   69|  59.2k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  59.2k|}
_Z12ToByteVectorI6PKHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  62.7k|{
   69|  62.7k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  62.7k|}
_Z12ToByteVectorI10ScriptHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  14.9k|{
   69|  14.9k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  14.9k|}
_Z12ToByteVectorI19WitnessV0ScriptHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  4.64k|{
   69|  4.64k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  4.64k|}
_Z12ToByteVectorI16WitnessV0KeyHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  5.22k|{
   69|  5.22k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  5.22k|}
_Z12ToByteVectorI16WitnessV1TaprootENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   68|  7.28k|{
   69|  7.28k|    return std::vector<unsigned char>(in.begin(), in.end());
   70|  7.28k|}
_Z11BuildScriptIJRjEE7CScriptDpOT_:
  617|  15.0k|{
  618|  15.0k|    CScript ret;
  619|  15.0k|    int cnt{0};
  620|       |
  621|  15.0k|    ([&ret, &cnt] (Ts&& input) {
  622|  15.0k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  15.0k|            if (cnt == 0) {
  625|  15.0k|                ret = std::forward<Ts>(input);
  626|  15.0k|            } else {
  627|  15.0k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  15.0k|            }
  629|  15.0k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  15.0k|            ret << input;
  632|  15.0k|        }
  633|  15.0k|        cnt++;
  634|  15.0k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  15.0k|    return ret;
  637|  15.0k|}
_ZZ11BuildScriptIJRjEE7CScriptDpOT_ENKUlS0_E_clES0_:
  621|  15.0k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  15.0k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  15.0k|            ret << input;
  632|  15.0k|        }
  633|  15.0k|        cnt++;
  634|  15.0k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRmEE7CScriptDpOT_:
  617|    506|{
  618|    506|    CScript ret;
  619|    506|    int cnt{0};
  620|       |
  621|    506|    ([&ret, &cnt] (Ts&& input) {
  622|    506|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    506|            if (cnt == 0) {
  625|    506|                ret = std::forward<Ts>(input);
  626|    506|            } else {
  627|    506|                ret.insert(ret.end(), input.begin(), input.end());
  628|    506|            }
  629|    506|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    506|            ret << input;
  632|    506|        }
  633|    506|        cnt++;
  634|    506|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    506|    return ret;
  637|    506|}
_ZZ11BuildScriptIJRmEE7CScriptDpOT_ENKUlS0_E_clES0_:
  621|    506|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    506|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    506|            ret << input;
  632|    506|        }
  633|    506|        cnt++;
  634|    506|    } (std::forward<Ts>(inputs)), ...);
_ZN7CScript16SerializationOpsI10HashWriterKS_15ActionSerializeEEvRT0_RT_T1_:
  465|  14.5k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  156|  14.5k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN7CScript16SerializationOpsI12ParamsStreamIR10HashWriter20TransactionSerParamsEKS_15ActionSerializeEEvRT0_RT_T1_:
  465|   118k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  156|   118k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN7CScriptC2ITkNSt3__114input_iteratorEN9prevectorILj28EhjiE14const_iteratorEEET_S5_:
  463|  19.5k|    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }

_Z17ScriptErrorString13ScriptError_t:
   11|  33.9k|{
   12|  33.9k|    switch (serror)
   13|  33.9k|    {
   14|      0|        case SCRIPT_ERR_OK:
  ------------------
  |  Branch (14:9): [True: 0, False: 33.9k]
  ------------------
   15|      0|            return "No error";
   16|  4.47k|        case SCRIPT_ERR_EVAL_FALSE:
  ------------------
  |  Branch (16:9): [True: 4.47k, False: 29.4k]
  ------------------
   17|  4.47k|            return "Script evaluated without error but finished with a false/empty top stack element";
   18|    302|        case SCRIPT_ERR_VERIFY:
  ------------------
  |  Branch (18:9): [True: 302, False: 33.6k]
  ------------------
   19|    302|            return "Script failed an OP_VERIFY operation";
   20|    359|        case SCRIPT_ERR_EQUALVERIFY:
  ------------------
  |  Branch (20:9): [True: 359, False: 33.5k]
  ------------------
   21|    359|            return "Script failed an OP_EQUALVERIFY operation";
   22|      0|        case SCRIPT_ERR_CHECKMULTISIGVERIFY:
  ------------------
  |  Branch (22:9): [True: 0, False: 33.9k]
  ------------------
   23|      0|            return "Script failed an OP_CHECKMULTISIGVERIFY operation";
   24|    387|        case SCRIPT_ERR_CHECKSIGVERIFY:
  ------------------
  |  Branch (24:9): [True: 387, False: 33.5k]
  ------------------
   25|    387|            return "Script failed an OP_CHECKSIGVERIFY operation";
   26|    664|        case SCRIPT_ERR_NUMEQUALVERIFY:
  ------------------
  |  Branch (26:9): [True: 664, False: 33.2k]
  ------------------
   27|    664|            return "Script failed an OP_NUMEQUALVERIFY operation";
   28|      0|        case SCRIPT_ERR_SCRIPT_SIZE:
  ------------------
  |  Branch (28:9): [True: 0, False: 33.9k]
  ------------------
   29|      0|            return "Script is too big";
   30|    290|        case SCRIPT_ERR_PUSH_SIZE:
  ------------------
  |  Branch (30:9): [True: 290, False: 33.6k]
  ------------------
   31|    290|            return "Push value size limit exceeded";
   32|    936|        case SCRIPT_ERR_OP_COUNT:
  ------------------
  |  Branch (32:9): [True: 936, False: 32.9k]
  ------------------
   33|    936|            return "Operation limit exceeded";
   34|    223|        case SCRIPT_ERR_STACK_SIZE:
  ------------------
  |  Branch (34:9): [True: 223, False: 33.7k]
  ------------------
   35|    223|            return "Stack size limit exceeded";
   36|    620|        case SCRIPT_ERR_SIG_COUNT:
  ------------------
  |  Branch (36:9): [True: 620, False: 33.3k]
  ------------------
   37|    620|            return "Signature count negative or greater than pubkey count";
   38|    559|        case SCRIPT_ERR_PUBKEY_COUNT:
  ------------------
  |  Branch (38:9): [True: 559, False: 33.3k]
  ------------------
   39|    559|            return "Pubkey count negative or limit exceeded";
   40|  3.95k|        case SCRIPT_ERR_BAD_OPCODE:
  ------------------
  |  Branch (40:9): [True: 3.95k, False: 29.9k]
  ------------------
   41|  3.95k|            return "Opcode missing or not understood";
   42|  2.89k|        case SCRIPT_ERR_DISABLED_OPCODE:
  ------------------
  |  Branch (42:9): [True: 2.89k, False: 31.0k]
  ------------------
   43|  2.89k|            return "Attempted to use a disabled opcode";
   44|      0|        case SCRIPT_ERR_INVALID_STACK_OPERATION:
  ------------------
  |  Branch (44:9): [True: 0, False: 33.9k]
  ------------------
   45|      0|            return "Operation not valid with the current stack size";
   46|    317|        case SCRIPT_ERR_INVALID_ALTSTACK_OPERATION:
  ------------------
  |  Branch (46:9): [True: 317, False: 33.6k]
  ------------------
   47|    317|            return "Operation not valid with the current altstack size";
   48|  1.10k|        case SCRIPT_ERR_OP_RETURN:
  ------------------
  |  Branch (48:9): [True: 1.10k, False: 32.8k]
  ------------------
   49|  1.10k|            return "OP_RETURN was encountered";
   50|  1.59k|        case SCRIPT_ERR_UNBALANCED_CONDITIONAL:
  ------------------
  |  Branch (50:9): [True: 1.59k, False: 32.3k]
  ------------------
   51|  1.59k|            return "Invalid OP_IF construction";
   52|    505|        case SCRIPT_ERR_NEGATIVE_LOCKTIME:
  ------------------
  |  Branch (52:9): [True: 505, False: 33.4k]
  ------------------
   53|    505|            return "Negative locktime";
   54|  2.46k|        case SCRIPT_ERR_UNSATISFIED_LOCKTIME:
  ------------------
  |  Branch (54:9): [True: 2.46k, False: 31.4k]
  ------------------
   55|  2.46k|            return "Locktime requirement not satisfied";
   56|      0|        case SCRIPT_ERR_SIG_HASHTYPE:
  ------------------
  |  Branch (56:9): [True: 0, False: 33.9k]
  ------------------
   57|      0|            return "Signature hash type missing or not understood";
   58|  1.25k|        case SCRIPT_ERR_SIG_DER:
  ------------------
  |  Branch (58:9): [True: 1.25k, False: 32.6k]
  ------------------
   59|  1.25k|            return "Non-canonical DER signature";
   60|    984|        case SCRIPT_ERR_MINIMALDATA:
  ------------------
  |  Branch (60:9): [True: 984, False: 32.9k]
  ------------------
   61|    984|            return "Data push larger than necessary";
   62|      0|        case SCRIPT_ERR_SIG_PUSHONLY:
  ------------------
  |  Branch (62:9): [True: 0, False: 33.9k]
  ------------------
   63|      0|            return "Only push operators allowed in signatures";
   64|      0|        case SCRIPT_ERR_SIG_HIGH_S:
  ------------------
  |  Branch (64:9): [True: 0, False: 33.9k]
  ------------------
   65|      0|            return "Non-canonical signature: S value is unnecessarily high";
   66|    309|        case SCRIPT_ERR_SIG_NULLDUMMY:
  ------------------
  |  Branch (66:9): [True: 309, False: 33.6k]
  ------------------
   67|    309|            return "Dummy CHECKMULTISIG argument must be zero";
   68|      0|        case SCRIPT_ERR_MINIMALIF:
  ------------------
  |  Branch (68:9): [True: 0, False: 33.9k]
  ------------------
   69|      0|            return "OP_IF/NOTIF argument must be minimal";
   70|      0|        case SCRIPT_ERR_SIG_NULLFAIL:
  ------------------
  |  Branch (70:9): [True: 0, False: 33.9k]
  ------------------
   71|      0|            return "Signature must be zero for failed CHECK(MULTI)SIG operation";
   72|  1.06k|        case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS:
  ------------------
  |  Branch (72:9): [True: 1.06k, False: 32.8k]
  ------------------
   73|  1.06k|            return "NOPx reserved for soft-fork upgrades";
   74|  1.50k|        case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM:
  ------------------
  |  Branch (74:9): [True: 1.50k, False: 32.4k]
  ------------------
   75|  1.50k|            return "Witness version reserved for soft-fork upgrades";
   76|      0|        case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION:
  ------------------
  |  Branch (76:9): [True: 0, False: 33.9k]
  ------------------
   77|      0|            return "Taproot version reserved for soft-fork upgrades";
   78|      0|        case SCRIPT_ERR_DISCOURAGE_OP_SUCCESS:
  ------------------
  |  Branch (78:9): [True: 0, False: 33.9k]
  ------------------
   79|      0|            return "OP_SUCCESSx reserved for soft-fork upgrades";
   80|      0|        case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_PUBKEYTYPE:
  ------------------
  |  Branch (80:9): [True: 0, False: 33.9k]
  ------------------
   81|      0|            return "Public key version reserved for soft-fork upgrades";
   82|  1.51k|        case SCRIPT_ERR_PUBKEYTYPE:
  ------------------
  |  Branch (82:9): [True: 1.51k, False: 32.4k]
  ------------------
   83|  1.51k|            return "Public key is neither compressed or uncompressed";
   84|    601|        case SCRIPT_ERR_CLEANSTACK:
  ------------------
  |  Branch (84:9): [True: 601, False: 33.3k]
  ------------------
   85|    601|            return "Stack size must be exactly one after execution";
   86|    337|        case SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH:
  ------------------
  |  Branch (86:9): [True: 337, False: 33.5k]
  ------------------
   87|    337|            return "Witness program has incorrect length";
   88|    680|        case SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY:
  ------------------
  |  Branch (88:9): [True: 680, False: 33.2k]
  ------------------
   89|    680|            return "Witness program was passed an empty witness";
   90|      0|        case SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH:
  ------------------
  |  Branch (90:9): [True: 0, False: 33.9k]
  ------------------
   91|      0|            return "Witness program hash mismatch";
   92|      0|        case SCRIPT_ERR_WITNESS_MALLEATED:
  ------------------
  |  Branch (92:9): [True: 0, False: 33.9k]
  ------------------
   93|      0|            return "Witness requires empty scriptSig";
   94|      0|        case SCRIPT_ERR_WITNESS_MALLEATED_P2SH:
  ------------------
  |  Branch (94:9): [True: 0, False: 33.9k]
  ------------------
   95|      0|            return "Witness requires only-redeemscript scriptSig";
   96|      0|        case SCRIPT_ERR_WITNESS_UNEXPECTED:
  ------------------
  |  Branch (96:9): [True: 0, False: 33.9k]
  ------------------
   97|      0|            return "Witness provided for non-witness script";
   98|      0|        case SCRIPT_ERR_WITNESS_PUBKEYTYPE:
  ------------------
  |  Branch (98:9): [True: 0, False: 33.9k]
  ------------------
   99|      0|            return "Using non-compressed keys in segwit";
  100|      0|        case SCRIPT_ERR_SCHNORR_SIG_SIZE:
  ------------------
  |  Branch (100:9): [True: 0, False: 33.9k]
  ------------------
  101|      0|            return "Invalid Schnorr signature size";
  102|      0|        case SCRIPT_ERR_SCHNORR_SIG_HASHTYPE:
  ------------------
  |  Branch (102:9): [True: 0, False: 33.9k]
  ------------------
  103|      0|            return "Invalid Schnorr signature hash type";
  104|      0|        case SCRIPT_ERR_SCHNORR_SIG:
  ------------------
  |  Branch (104:9): [True: 0, False: 33.9k]
  ------------------
  105|      0|            return "Invalid Schnorr signature";
  106|      0|        case SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE:
  ------------------
  |  Branch (106:9): [True: 0, False: 33.9k]
  ------------------
  107|      0|            return "Invalid Taproot control block size";
  108|      0|        case SCRIPT_ERR_TAPSCRIPT_VALIDATION_WEIGHT:
  ------------------
  |  Branch (108:9): [True: 0, False: 33.9k]
  ------------------
  109|      0|            return "Too much signature validation relative to witness weight";
  110|      0|        case SCRIPT_ERR_TAPSCRIPT_CHECKMULTISIG:
  ------------------
  |  Branch (110:9): [True: 0, False: 33.9k]
  ------------------
  111|      0|            return "OP_CHECKMULTISIG(VERIFY) is not available in tapscript";
  112|      0|        case SCRIPT_ERR_TAPSCRIPT_MINIMALIF:
  ------------------
  |  Branch (112:9): [True: 0, False: 33.9k]
  ------------------
  113|      0|            return "OP_IF/NOTIF argument must be minimal in tapscript";
  114|    224|        case SCRIPT_ERR_OP_CODESEPARATOR:
  ------------------
  |  Branch (114:9): [True: 224, False: 33.7k]
  ------------------
  115|    224|            return "Using OP_CODESEPARATOR in non-witness script";
  116|  1.16k|        case SCRIPT_ERR_SIG_FINDANDDELETE:
  ------------------
  |  Branch (116:9): [True: 1.16k, False: 32.7k]
  ------------------
  117|  1.16k|            return "Signature is found in scriptCode";
  118|  2.63k|        case SCRIPT_ERR_UNKNOWN_ERROR:
  ------------------
  |  Branch (118:9): [True: 2.63k, False: 31.2k]
  ------------------
  119|  2.63k|        case SCRIPT_ERR_ERROR_COUNT:
  ------------------
  |  Branch (119:9): [True: 0, False: 33.9k]
  ------------------
  120|  2.63k|        default: break;
  ------------------
  |  Branch (120:9): [True: 0, False: 33.9k]
  ------------------
  121|  33.9k|    }
  122|  2.63k|    return "unknown error";
  123|  33.9k|}

_ZN34MutableTransactionSignatureCreatorC2ERK19CMutableTransactionjRKlPK26PrecomputedTransactionDatai:
   30|  54.0k|    : m_txto{tx}, nIn{input_idx}, nHashType{hash_type}, amount{amount},
   31|  54.0k|      checker{txdata ? MutableTransactionSignatureChecker{&m_txto, nIn, amount, *txdata, MissingDataBehavior::FAIL} :
  ------------------
  |  Branch (31:15): [True: 54.0k, False: 0]
  ------------------
   32|  54.0k|                       MutableTransactionSignatureChecker{&m_txto, nIn, amount, MissingDataBehavior::FAIL}},
   33|  54.0k|      m_txdata(txdata)
   34|  54.0k|{
   35|  54.0k|}
_ZNK34MutableTransactionSignatureCreator9CreateSigERK15SigningProviderRNSt3__16vectorIhNS3_9allocatorIhEEEERK6CKeyIDRK7CScript10SigVersion:
   38|  1.64k|{
   39|  1.64k|    assert(sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0);
   40|       |
   41|  1.64k|    CKey key;
   42|  1.64k|    if (!provider.GetKey(address, key))
  ------------------
  |  Branch (42:9): [True: 1.64k, False: 0]
  ------------------
   43|  1.64k|        return false;
   44|       |
   45|       |    // Signing with uncompressed keys is disabled in witness scripts
   46|      0|    if (sigversion == SigVersion::WITNESS_V0 && !key.IsCompressed())
  ------------------
  |  Branch (46:9): [True: 0, False: 0]
  |  Branch (46:49): [True: 0, False: 0]
  ------------------
   47|      0|        return false;
   48|       |
   49|       |    // Signing without known amount does not work in witness scripts.
   50|      0|    if (sigversion == SigVersion::WITNESS_V0 && !MoneyRange(amount)) return false;
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  |  Branch (50:49): [True: 0, False: 0]
  ------------------
   51|       |
   52|       |    // BASE/WITNESS_V0 signatures don't support explicit SIGHASH_DEFAULT, use SIGHASH_ALL instead.
   53|      0|    const int hashtype = nHashType == SIGHASH_DEFAULT ? SIGHASH_ALL : nHashType;
  ------------------
  |  Branch (53:26): [True: 0, False: 0]
  ------------------
   54|       |
   55|      0|    uint256 hash = SignatureHash(scriptCode, m_txto, nIn, hashtype, amount, sigversion, m_txdata);
   56|      0|    if (!key.Sign(hash, vchSig))
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        return false;
   58|      0|    vchSig.push_back((unsigned char)hashtype);
   59|      0|    return true;
   60|      0|}
_ZNK34MutableTransactionSignatureCreator16CreateSchnorrSigERK15SigningProviderRNSt3__16vectorIhNS3_9allocatorIhEEEERK11XOnlyPubKeyPK7uint256SE_10SigVersion:
   63|    658|{
   64|    658|    assert(sigversion == SigVersion::TAPROOT || sigversion == SigVersion::TAPSCRIPT);
   65|       |
   66|    658|    CKey key;
   67|    658|    if (!provider.GetKeyByXOnly(pubkey, key)) return false;
  ------------------
  |  Branch (67:9): [True: 658, False: 0]
  ------------------
   68|       |
   69|       |    // BIP341/BIP342 signing needs lots of precomputed transaction data. While some
   70|       |    // (non-SIGHASH_DEFAULT) sighash modes exist that can work with just some subset
   71|       |    // of data present, for now, only support signing when everything is provided.
   72|      0|    if (!m_txdata || !m_txdata->m_bip341_taproot_ready || !m_txdata->m_spent_outputs_ready) return false;
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  |  Branch (72:22): [True: 0, False: 0]
  |  Branch (72:59): [True: 0, False: 0]
  ------------------
   73|       |
   74|      0|    ScriptExecutionData execdata;
   75|      0|    execdata.m_annex_init = true;
   76|      0|    execdata.m_annex_present = false; // Only support annex-less signing for now.
   77|      0|    if (sigversion == SigVersion::TAPSCRIPT) {
  ------------------
  |  Branch (77:9): [True: 0, False: 0]
  ------------------
   78|      0|        execdata.m_codeseparator_pos_init = true;
   79|      0|        execdata.m_codeseparator_pos = 0xFFFFFFFF; // Only support non-OP_CODESEPARATOR BIP342 signing for now.
   80|      0|        if (!leaf_hash) return false; // BIP342 signing needs leaf hash.
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|        execdata.m_tapleaf_hash_init = true;
   82|      0|        execdata.m_tapleaf_hash = *leaf_hash;
   83|      0|    }
   84|      0|    uint256 hash;
   85|      0|    if (!SignatureHashSchnorr(hash, execdata, m_txto, nIn, nHashType, sigversion, *m_txdata, MissingDataBehavior::FAIL)) return false;
  ------------------
  |  Branch (85:9): [True: 0, False: 0]
  ------------------
   86|      0|    sig.resize(64);
   87|       |    // Use uint256{} as aux_rnd for now.
   88|      0|    if (!key.SignSchnorr(hash, sig, merkle_root, {})) return false;
  ------------------
  |  Branch (88:9): [True: 0, False: 0]
  ------------------
   89|      0|    if (nHashType) sig.push_back(nHashType);
  ------------------
  |  Branch (89:9): [True: 0, False: 0]
  ------------------
   90|      0|    return true;
   91|      0|}
_Z16ProduceSignatureRK15SigningProviderRK20BaseSignatureCreatorRK7CScriptR13SignatureData:
  503|  54.0k|{
  504|  54.0k|    if (sigdata.complete) return true;
  ------------------
  |  Branch (504:9): [True: 1.12k, False: 52.9k]
  ------------------
  505|       |
  506|  52.9k|    std::vector<valtype> result;
  507|  52.9k|    TxoutType whichType;
  508|  52.9k|    bool solved = SignStep(provider, creator, fromPubKey, result, whichType, SigVersion::BASE, sigdata);
  509|  52.9k|    bool P2SH = false;
  510|  52.9k|    CScript subscript;
  511|       |
  512|  52.9k|    if (solved && whichType == TxoutType::SCRIPTHASH)
  ------------------
  |  Branch (512:9): [True: 2.30k, False: 50.6k]
  |  Branch (512:19): [True: 2.26k, False: 44]
  ------------------
  513|  2.26k|    {
  514|       |        // Solver returns the subscript that needs to be evaluated;
  515|       |        // the final scriptSig is the signatures from that
  516|       |        // and then the serialized subscript:
  517|  2.26k|        subscript = CScript(result[0].begin(), result[0].end());
  518|  2.26k|        sigdata.redeem_script = subscript;
  519|  2.26k|        solved = solved && SignStep(provider, creator, subscript, result, whichType, SigVersion::BASE, sigdata) && whichType != TxoutType::SCRIPTHASH;
  ------------------
  |  Branch (519:18): [True: 2.26k, False: 0]
  |  Branch (519:28): [True: 0, False: 2.26k]
  |  Branch (519:116): [True: 0, False: 0]
  ------------------
  520|  2.26k|        P2SH = true;
  521|  2.26k|    }
  522|       |
  523|  52.9k|    if (solved && whichType == TxoutType::WITNESS_V0_KEYHASH)
  ------------------
  |  Branch (523:9): [True: 44, False: 52.9k]
  |  Branch (523:19): [True: 0, False: 44]
  ------------------
  524|      0|    {
  525|      0|        CScript witnessscript;
  526|      0|        witnessscript << OP_DUP << OP_HASH160 << ToByteVector(result[0]) << OP_EQUALVERIFY << OP_CHECKSIG;
  527|      0|        TxoutType subType;
  528|      0|        solved = solved && SignStep(provider, creator, witnessscript, result, subType, SigVersion::WITNESS_V0, sigdata);
  ------------------
  |  Branch (528:18): [True: 0, False: 0]
  |  Branch (528:28): [True: 0, False: 0]
  ------------------
  529|      0|        sigdata.scriptWitness.stack = result;
  530|      0|        sigdata.witness = true;
  531|      0|        result.clear();
  532|      0|    }
  533|  52.9k|    else if (solved && whichType == TxoutType::WITNESS_V0_SCRIPTHASH)
  ------------------
  |  Branch (533:14): [True: 44, False: 52.9k]
  |  Branch (533:24): [True: 44, False: 0]
  ------------------
  534|     44|    {
  535|     44|        CScript witnessscript(result[0].begin(), result[0].end());
  536|     44|        sigdata.witness_script = witnessscript;
  537|       |
  538|     44|        TxoutType subType{TxoutType::NONSTANDARD};
  539|     44|        solved = solved && SignStep(provider, creator, witnessscript, result, subType, SigVersion::WITNESS_V0, sigdata) && subType != TxoutType::SCRIPTHASH && subType != TxoutType::WITNESS_V0_SCRIPTHASH && subType != TxoutType::WITNESS_V0_KEYHASH;
  ------------------
  |  Branch (539:18): [True: 44, False: 0]
  |  Branch (539:28): [True: 0, False: 44]
  |  Branch (539:124): [True: 0, False: 0]
  |  Branch (539:160): [True: 0, False: 0]
  |  Branch (539:207): [True: 0, False: 0]
  ------------------
  540|       |
  541|       |        // If we couldn't find a solution with the legacy satisfier, try satisfying the script using Miniscript.
  542|       |        // Note we need to check if the result stack is empty before, because it might be used even if the Script
  543|       |        // isn't fully solved. For instance the CHECKMULTISIG satisfaction in SignStep() pushes partial signatures
  544|       |        // and the extractor relies on this behaviour to combine witnesses.
  545|     44|        if (!solved && result.empty()) {
  ------------------
  |  Branch (545:13): [True: 44, False: 0]
  |  Branch (545:24): [True: 44, False: 0]
  ------------------
  546|     44|            WshSatisfier ms_satisfier{provider, sigdata, creator, witnessscript};
  547|     44|            const auto ms = miniscript::FromScript(witnessscript, ms_satisfier);
  548|     44|            solved = ms && ms->Satisfy(ms_satisfier, result) == miniscript::Availability::YES;
  ------------------
  |  Branch (548:22): [True: 0, False: 44]
  |  Branch (548:28): [True: 0, False: 0]
  ------------------
  549|     44|        }
  550|     44|        result.emplace_back(witnessscript.begin(), witnessscript.end());
  551|       |
  552|     44|        sigdata.scriptWitness.stack = result;
  553|     44|        sigdata.witness = true;
  554|     44|        result.clear();
  555|  52.9k|    } else if (whichType == TxoutType::WITNESS_V1_TAPROOT && !P2SH) {
  ------------------
  |  Branch (555:16): [True: 329, False: 52.5k]
  |  Branch (555:62): [True: 329, False: 0]
  ------------------
  556|    329|        sigdata.witness = true;
  557|    329|        if (solved) {
  ------------------
  |  Branch (557:13): [True: 0, False: 329]
  ------------------
  558|      0|            sigdata.scriptWitness.stack = std::move(result);
  559|      0|        }
  560|    329|        result.clear();
  561|  52.5k|    } else if (solved && whichType == TxoutType::WITNESS_UNKNOWN) {
  ------------------
  |  Branch (561:16): [True: 0, False: 52.5k]
  |  Branch (561:26): [True: 0, False: 0]
  ------------------
  562|      0|        sigdata.witness = true;
  563|      0|    }
  564|       |
  565|  52.9k|    if (!sigdata.witness) sigdata.scriptWitness.stack.clear();
  ------------------
  |  Branch (565:9): [True: 52.5k, False: 373]
  ------------------
  566|  52.9k|    if (P2SH) {
  ------------------
  |  Branch (566:9): [True: 2.26k, False: 50.6k]
  ------------------
  567|  2.26k|        result.emplace_back(subscript.begin(), subscript.end());
  568|  2.26k|    }
  569|  52.9k|    sigdata.scriptSig = PushAll(result);
  570|       |
  571|       |    // Test solution
  572|  52.9k|    sigdata.complete = solved && VerifyScript(sigdata.scriptSig, fromPubKey, &sigdata.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, creator.Checker());
  ------------------
  |  Branch (572:24): [True: 0, False: 52.9k]
  |  Branch (572:34): [True: 0, False: 0]
  ------------------
  573|  52.9k|    return sigdata.complete;
  574|  54.0k|}
_Z19DataFromTransactionRK19CMutableTransactionjRK6CTxOut:
  611|  53.1k|{
  612|  53.1k|    SignatureData data;
  613|  53.1k|    assert(tx.vin.size() > nIn);
  614|  53.1k|    data.scriptSig = tx.vin[nIn].scriptSig;
  615|  53.1k|    data.scriptWitness = tx.vin[nIn].scriptWitness;
  616|  53.1k|    Stacks stack(data);
  617|       |
  618|       |    // Get signatures
  619|  53.1k|    MutableTransactionSignatureChecker tx_checker(&tx, nIn, txout.nValue, MissingDataBehavior::FAIL);
  620|  53.1k|    SignatureExtractorChecker extractor_checker(data, tx_checker);
  621|  53.1k|    if (VerifyScript(data.scriptSig, txout.scriptPubKey, &data.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, extractor_checker)) {
  ------------------
  |  Branch (621:9): [True: 1.12k, False: 52.0k]
  ------------------
  622|  1.12k|        data.complete = true;
  623|  1.12k|        return data;
  624|  1.12k|    }
  625|       |
  626|       |    // Get scripts
  627|  52.0k|    std::vector<std::vector<unsigned char>> solutions;
  628|  52.0k|    TxoutType script_type = Solver(txout.scriptPubKey, solutions);
  629|  52.0k|    SigVersion sigversion = SigVersion::BASE;
  630|  52.0k|    CScript next_script = txout.scriptPubKey;
  631|       |
  632|  52.0k|    if (script_type == TxoutType::SCRIPTHASH && !stack.script.empty() && !stack.script.back().empty()) {
  ------------------
  |  Branch (632:9): [True: 6.17k, False: 45.9k]
  |  Branch (632:49): [True: 1.03k, False: 5.13k]
  |  Branch (632:74): [True: 715, False: 321]
  ------------------
  633|       |        // Get the redeemScript
  634|    715|        CScript redeem_script(stack.script.back().begin(), stack.script.back().end());
  635|    715|        data.redeem_script = redeem_script;
  636|    715|        next_script = std::move(redeem_script);
  637|       |
  638|       |        // Get redeemScript type
  639|    715|        script_type = Solver(next_script, solutions);
  640|    715|        stack.script.pop_back();
  641|    715|    }
  642|  52.0k|    if (script_type == TxoutType::WITNESS_V0_SCRIPTHASH && !stack.witness.empty() && !stack.witness.back().empty()) {
  ------------------
  |  Branch (642:9): [True: 395, False: 51.6k]
  |  Branch (642:60): [True: 83, False: 312]
  |  Branch (642:86): [True: 78, False: 5]
  ------------------
  643|       |        // Get the witnessScript
  644|     78|        CScript witness_script(stack.witness.back().begin(), stack.witness.back().end());
  645|     78|        data.witness_script = witness_script;
  646|     78|        next_script = std::move(witness_script);
  647|       |
  648|       |        // Get witnessScript type
  649|     78|        script_type = Solver(next_script, solutions);
  650|     78|        stack.witness.pop_back();
  651|     78|        stack.script = std::move(stack.witness);
  652|     78|        stack.witness.clear();
  653|     78|        sigversion = SigVersion::WITNESS_V0;
  654|     78|    }
  655|  52.0k|    if (script_type == TxoutType::MULTISIG && !stack.script.empty()) {
  ------------------
  |  Branch (655:9): [True: 0, False: 52.0k]
  |  Branch (655:47): [True: 0, False: 0]
  ------------------
  656|       |        // Build a map of pubkey -> signature by matching sigs to pubkeys:
  657|      0|        assert(solutions.size() > 1);
  658|      0|        unsigned int num_pubkeys = solutions.size()-2;
  659|      0|        unsigned int last_success_key = 0;
  660|      0|        for (const valtype& sig : stack.script) {
  ------------------
  |  Branch (660:33): [True: 0, False: 0]
  ------------------
  661|      0|            for (unsigned int i = last_success_key; i < num_pubkeys; ++i) {
  ------------------
  |  Branch (661:53): [True: 0, False: 0]
  ------------------
  662|      0|                const valtype& pubkey = solutions[i+1];
  663|       |                // We either have a signature for this pubkey, or we have found a signature and it is valid
  664|      0|                if (data.signatures.count(CPubKey(pubkey).GetID()) || extractor_checker.CheckECDSASignature(sig, pubkey, next_script, sigversion)) {
  ------------------
  |  Branch (664:21): [True: 0, False: 0]
  |  Branch (664:21): [True: 0, False: 0]
  |  Branch (664:71): [True: 0, False: 0]
  ------------------
  665|      0|                    last_success_key = i + 1;
  666|      0|                    break;
  667|      0|                }
  668|      0|            }
  669|      0|        }
  670|      0|    }
  671|       |
  672|  52.0k|    return data;
  673|  52.0k|}
_Z11UpdateInputR5CTxInRK13SignatureData:
  676|  53.1k|{
  677|  53.1k|    input.scriptSig = data.scriptSig;
  678|  53.1k|    input.scriptWitness = data.scriptWitness;
  679|  53.1k|}
_Z15SignTransactionR19CMutableTransactionPK15SigningProviderRKNSt3__13mapI9COutPoint4CoinNS4_4lessIS6_EENS4_9allocatorINS4_4pairIKS6_S7_EEEEEEiRNS5_Ii13bilingual_strNS8_IiEENSA_INSB_IKiSI_EEEEEE:
  767|  2.78k|{
  768|  2.78k|    bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE);
  769|       |
  770|       |    // Use CTransaction for the constant parts of the
  771|       |    // transaction to avoid rehashing.
  772|  2.78k|    const CTransaction txConst(mtx);
  773|       |
  774|  2.78k|    PrecomputedTransactionData txdata;
  775|  2.78k|    std::vector<CTxOut> spent_outputs;
  776|  4.59k|    for (unsigned int i = 0; i < mtx.vin.size(); ++i) {
  ------------------
  |  Branch (776:30): [True: 3.79k, False: 801]
  ------------------
  777|  3.79k|        CTxIn& txin = mtx.vin[i];
  778|  3.79k|        auto coin = coins.find(txin.prevout);
  779|  3.79k|        if (coin == coins.end() || coin->second.IsSpent()) {
  ------------------
  |  Branch (779:13): [True: 1.98k, False: 1.80k]
  |  Branch (779:13): [True: 1.98k, False: 1.80k]
  |  Branch (779:36): [True: 0, False: 1.80k]
  ------------------
  780|  1.98k|            txdata.Init(txConst, /*spent_outputs=*/{}, /*force=*/true);
  781|  1.98k|            break;
  782|  1.98k|        } else {
  783|  1.80k|            spent_outputs.emplace_back(coin->second.out.nValue, coin->second.out.scriptPubKey);
  784|  1.80k|        }
  785|  3.79k|    }
  786|  2.78k|    if (spent_outputs.size() == mtx.vin.size()) {
  ------------------
  |  Branch (786:9): [True: 801, False: 1.98k]
  ------------------
  787|    801|        txdata.Init(txConst, std::move(spent_outputs), true);
  788|    801|    }
  789|       |
  790|       |    // Sign what we can:
  791|   106k|    for (unsigned int i = 0; i < mtx.vin.size(); ++i) {
  ------------------
  |  Branch (791:30): [True: 104k, False: 2.78k]
  ------------------
  792|   104k|        CTxIn& txin = mtx.vin[i];
  793|   104k|        auto coin = coins.find(txin.prevout);
  794|   104k|        if (coin == coins.end() || coin->second.IsSpent()) {
  ------------------
  |  Branch (794:13): [True: 50.9k, False: 53.1k]
  |  Branch (794:13): [True: 50.9k, False: 53.1k]
  |  Branch (794:36): [True: 0, False: 53.1k]
  ------------------
  795|  50.9k|            input_errors[i] = _("Input not found or already spent");
  796|  50.9k|            continue;
  797|  50.9k|        }
  798|  53.1k|        const CScript& prevPubKey = coin->second.out.scriptPubKey;
  799|  53.1k|        const CAmount& amount = coin->second.out.nValue;
  800|       |
  801|  53.1k|        SignatureData sigdata = DataFromTransaction(mtx, i, coin->second.out);
  802|       |        // Only sign SIGHASH_SINGLE if there's a corresponding output:
  803|  53.1k|        if (!fHashSingle || (i < mtx.vout.size())) {
  ------------------
  |  Branch (803:13): [True: 53.1k, False: 0]
  |  Branch (803:29): [True: 0, False: 0]
  ------------------
  804|  53.1k|            ProduceSignature(*keystore, MutableTransactionSignatureCreator(mtx, i, amount, &txdata, nHashType), prevPubKey, sigdata);
  805|  53.1k|        }
  806|       |
  807|  53.1k|        UpdateInput(txin, sigdata);
  808|       |
  809|       |        // amount must be specified for valid segwit signature
  810|  53.1k|        if (amount == MAX_MONEY && !txin.scriptWitness.IsNull()) {
  ------------------
  |  Branch (810:13): [True: 0, False: 53.1k]
  |  Branch (810:36): [True: 0, False: 0]
  ------------------
  811|      0|            input_errors[i] = _("Missing amount");
  812|      0|            continue;
  813|      0|        }
  814|       |
  815|  53.1k|        ScriptError serror = SCRIPT_ERR_OK;
  816|  53.1k|        if (!sigdata.complete && !VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount, txdata, MissingDataBehavior::FAIL), &serror)) {
  ------------------
  |  Branch (816:13): [True: 52.0k, False: 1.12k]
  |  Branch (816:13): [True: 51.5k, False: 1.66k]
  |  Branch (816:34): [True: 51.5k, False: 534]
  ------------------
  817|  51.5k|            if (serror == SCRIPT_ERR_INVALID_STACK_OPERATION) {
  ------------------
  |  Branch (817:17): [True: 17.6k, False: 33.9k]
  ------------------
  818|       |                // Unable to sign input and verification failed (possible attempt to partially sign).
  819|  17.6k|                input_errors[i] = Untranslated("Unable to sign input, invalid stack size (possibly missing key)");
  820|  33.9k|            } else if (serror == SCRIPT_ERR_SIG_NULLFAIL) {
  ------------------
  |  Branch (820:24): [True: 0, False: 33.9k]
  ------------------
  821|       |                // Verification failed (possibly due to insufficient signatures).
  822|      0|                input_errors[i] = Untranslated("CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)");
  823|  33.9k|            } else {
  824|  33.9k|                input_errors[i] = Untranslated(ScriptErrorString(serror));
  825|  33.9k|            }
  826|  51.5k|        } else {
  827|       |            // If this input succeeds, make sure there is no error set for it
  828|  1.66k|            input_errors.erase(i);
  829|  1.66k|        }
  830|  53.1k|    }
  831|  2.78k|    return input_errors.empty();
  832|  2.78k|}
sign.cpp:_ZL8SignStepRK15SigningProviderRK20BaseSignatureCreatorRK7CScriptRNSt3__16vectorINS9_IhNS8_9allocatorIhEEEENSA_ISC_EEEER9TxoutType10SigVersionR13SignatureData:
  403|  55.2k|{
  404|  55.2k|    CScript scriptRet;
  405|  55.2k|    ret.clear();
  406|  55.2k|    std::vector<unsigned char> sig;
  407|       |
  408|  55.2k|    std::vector<valtype> vSolutions;
  409|  55.2k|    whichTypeRet = Solver(scriptPubKey, vSolutions);
  410|       |
  411|  55.2k|    switch (whichTypeRet) {
  ------------------
  |  Branch (411:13): [True: 0, False: 55.2k]
  ------------------
  412|  43.6k|    case TxoutType::NONSTANDARD:
  ------------------
  |  Branch (412:5): [True: 43.6k, False: 11.5k]
  ------------------
  413|  44.0k|    case TxoutType::NULL_DATA:
  ------------------
  |  Branch (413:5): [True: 345, False: 54.9k]
  ------------------
  414|  45.7k|    case TxoutType::WITNESS_UNKNOWN:
  ------------------
  |  Branch (414:5): [True: 1.75k, False: 53.5k]
  ------------------
  415|  45.7k|        return false;
  416|  1.64k|    case TxoutType::PUBKEY:
  ------------------
  |  Branch (416:5): [True: 1.64k, False: 53.6k]
  ------------------
  417|  1.64k|        if (!CreateSig(creator, sigdata, provider, sig, CPubKey(vSolutions[0]), scriptPubKey, sigversion)) return false;
  ------------------
  |  Branch (417:13): [True: 1.64k, False: 0]
  ------------------
  418|      0|        ret.push_back(std::move(sig));
  419|      0|        return true;
  420|    948|    case TxoutType::PUBKEYHASH: {
  ------------------
  |  Branch (420:5): [True: 948, False: 54.3k]
  ------------------
  421|    948|        CKeyID keyID = CKeyID(uint160(vSolutions[0]));
  422|    948|        CPubKey pubkey;
  423|    948|        if (!GetPubKey(provider, sigdata, keyID, pubkey)) {
  ------------------
  |  Branch (423:13): [True: 948, False: 0]
  ------------------
  424|       |            // Pubkey could not be found, add to missing
  425|    948|            sigdata.missing_pubkeys.push_back(keyID);
  426|    948|            return false;
  427|    948|        }
  428|      0|        if (!CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) return false;
  ------------------
  |  Branch (428:13): [True: 0, False: 0]
  ------------------
  429|      0|        ret.push_back(std::move(sig));
  430|      0|        ret.push_back(ToByteVector(pubkey));
  431|      0|        return true;
  432|      0|    }
  433|  6.17k|    case TxoutType::SCRIPTHASH: {
  ------------------
  |  Branch (433:5): [True: 6.17k, False: 49.0k]
  ------------------
  434|  6.17k|        uint160 h160{vSolutions[0]};
  435|  6.17k|        if (GetCScript(provider, sigdata, CScriptID{h160}, scriptRet)) {
  ------------------
  |  Branch (435:13): [True: 2.26k, False: 3.90k]
  ------------------
  436|  2.26k|            ret.emplace_back(scriptRet.begin(), scriptRet.end());
  437|  2.26k|            return true;
  438|  2.26k|        }
  439|       |        // Could not find redeemScript, add to missing
  440|  3.90k|        sigdata.missing_redeem_script = h160;
  441|  3.90k|        return false;
  442|  6.17k|    }
  443|      0|    case TxoutType::MULTISIG: {
  ------------------
  |  Branch (443:5): [True: 0, False: 55.2k]
  ------------------
  444|      0|        size_t required = vSolutions.front()[0];
  445|      0|        ret.emplace_back(); // workaround CHECKMULTISIG bug
  446|      0|        for (size_t i = 1; i < vSolutions.size() - 1; ++i) {
  ------------------
  |  Branch (446:28): [True: 0, False: 0]
  ------------------
  447|      0|            CPubKey pubkey = CPubKey(vSolutions[i]);
  448|       |            // We need to always call CreateSig in order to fill sigdata with all
  449|       |            // possible signatures that we can create. This will allow further PSBT
  450|       |            // processing to work as it needs all possible signature and pubkey pairs
  451|      0|            if (CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) {
  ------------------
  |  Branch (451:17): [True: 0, False: 0]
  ------------------
  452|      0|                if (ret.size() < required + 1) {
  ------------------
  |  Branch (452:21): [True: 0, False: 0]
  ------------------
  453|      0|                    ret.push_back(std::move(sig));
  454|      0|                }
  455|      0|            }
  456|      0|        }
  457|      0|        bool ok = ret.size() == required + 1;
  458|      0|        for (size_t i = 0; i + ret.size() < required + 1; ++i) {
  ------------------
  |  Branch (458:28): [True: 0, False: 0]
  ------------------
  459|      0|            ret.emplace_back();
  460|      0|        }
  461|      0|        return ok;
  462|  6.17k|    }
  463|      0|    case TxoutType::WITNESS_V0_KEYHASH:
  ------------------
  |  Branch (463:5): [True: 0, False: 55.2k]
  ------------------
  464|      0|        ret.push_back(vSolutions[0]);
  465|      0|        return true;
  466|       |
  467|    395|    case TxoutType::WITNESS_V0_SCRIPTHASH:
  ------------------
  |  Branch (467:5): [True: 395, False: 54.8k]
  ------------------
  468|    395|        if (GetCScript(provider, sigdata, CScriptID{RIPEMD160(vSolutions[0])}, scriptRet)) {
  ------------------
  |  Branch (468:13): [True: 44, False: 351]
  ------------------
  469|     44|            ret.emplace_back(scriptRet.begin(), scriptRet.end());
  470|     44|            return true;
  471|     44|        }
  472|       |        // Could not find witnessScript, add to missing
  473|    351|        sigdata.missing_witness_script = uint256(vSolutions[0]);
  474|    351|        return false;
  475|       |
  476|    329|    case TxoutType::WITNESS_V1_TAPROOT:
  ------------------
  |  Branch (476:5): [True: 329, False: 54.9k]
  ------------------
  477|    329|        return SignTaproot(provider, creator, WitnessV1Taproot(XOnlyPubKey{vSolutions[0]}), sigdata, ret);
  478|       |
  479|      0|    case TxoutType::ANCHOR:
  ------------------
  |  Branch (479:5): [True: 0, False: 55.2k]
  ------------------
  480|      0|        return true;
  481|  55.2k|    } // no default case, so the compiler can warn about missing cases
  482|      0|    assert(false);
  483|      0|}
sign.cpp:_ZL9CreateSigRK20BaseSignatureCreatorR13SignatureDataRK15SigningProviderRNSt3__16vectorIhNS7_9allocatorIhEEEERK7CPubKeyRK7CScript10SigVersion:
  133|  1.64k|{
  134|  1.64k|    CKeyID keyid = pubkey.GetID();
  135|  1.64k|    const auto it = sigdata.signatures.find(keyid);
  136|  1.64k|    if (it != sigdata.signatures.end()) {
  ------------------
  |  Branch (136:9): [True: 0, False: 1.64k]
  ------------------
  137|      0|        sig_out = it->second.second;
  138|      0|        return true;
  139|      0|    }
  140|  1.64k|    KeyOriginInfo info;
  141|  1.64k|    if (provider.GetKeyOrigin(keyid, info)) {
  ------------------
  |  Branch (141:9): [True: 0, False: 1.64k]
  ------------------
  142|      0|        sigdata.misc_pubkeys.emplace(keyid, std::make_pair(pubkey, std::move(info)));
  143|      0|    }
  144|  1.64k|    if (creator.CreateSig(provider, sig_out, keyid, scriptcode, sigversion)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 1.64k]
  ------------------
  145|      0|        auto i = sigdata.signatures.emplace(keyid, SigPair(pubkey, sig_out));
  146|      0|        assert(i.second);
  147|      0|        return true;
  148|      0|    }
  149|       |    // Could not make signature or signature not found, add keyid to missing
  150|  1.64k|    sigdata.missing_sigs.push_back(keyid);
  151|  1.64k|    return false;
  152|  1.64k|}
sign.cpp:_ZL9GetPubKeyRK15SigningProviderRK13SignatureDataRK6CKeyIDR7CPubKey:
  110|    948|{
  111|       |    // Look for pubkey in all partial sigs
  112|    948|    const auto it = sigdata.signatures.find(address);
  113|    948|    if (it != sigdata.signatures.end()) {
  ------------------
  |  Branch (113:9): [True: 0, False: 948]
  ------------------
  114|      0|        pubkey = it->second.first;
  115|      0|        return true;
  116|      0|    }
  117|       |    // Look for pubkey in pubkey lists
  118|    948|    const auto& pk_it = sigdata.misc_pubkeys.find(address);
  119|    948|    if (pk_it != sigdata.misc_pubkeys.end()) {
  ------------------
  |  Branch (119:9): [True: 0, False: 948]
  ------------------
  120|      0|        pubkey = pk_it->second.first;
  121|      0|        return true;
  122|      0|    }
  123|    948|    const auto& tap_pk_it = sigdata.tap_pubkeys.find(address);
  124|    948|    if (tap_pk_it != sigdata.tap_pubkeys.end()) {
  ------------------
  |  Branch (124:9): [True: 0, False: 948]
  ------------------
  125|      0|        pubkey = tap_pk_it->second.GetEvenCorrespondingCPubKey();
  126|      0|        return true;
  127|      0|    }
  128|       |    // Query the underlying provider
  129|    948|    return provider.GetPubKey(address, pubkey);
  130|    948|}
sign.cpp:_ZL10GetCScriptRK15SigningProviderRK13SignatureDataRK9CScriptIDR7CScript:
   94|  6.56k|{
   95|  6.56k|    if (provider.GetCScript(scriptid, script)) {
  ------------------
  |  Branch (95:9): [True: 0, False: 6.56k]
  ------------------
   96|      0|        return true;
   97|      0|    }
   98|       |    // Look for scripts in SignatureData
   99|  6.56k|    if (CScriptID(sigdata.redeem_script) == scriptid) {
  ------------------
  |  Branch (99:9): [True: 2.07k, False: 4.48k]
  ------------------
  100|  2.07k|        script = sigdata.redeem_script;
  101|  2.07k|        return true;
  102|  4.48k|    } else if (CScriptID(sigdata.witness_script) == scriptid) {
  ------------------
  |  Branch (102:16): [True: 231, False: 4.25k]
  ------------------
  103|    231|        script = sigdata.witness_script;
  104|    231|        return true;
  105|    231|    }
  106|  4.25k|    return false;
  107|  6.56k|}
sign.cpp:_ZL11SignTaprootRK15SigningProviderRK20BaseSignatureCreatorRK16WitnessV1TaprootR13SignatureDataRNSt3__16vectorINSB_IhNSA_9allocatorIhEEEENSC_ISE_EEEE:
  334|    329|{
  335|    329|    TaprootSpendData spenddata;
  336|    329|    TaprootBuilder builder;
  337|       |
  338|       |    // Gather information about this output.
  339|    329|    if (provider.GetTaprootSpendData(output, spenddata)) {
  ------------------
  |  Branch (339:9): [True: 0, False: 329]
  ------------------
  340|      0|        sigdata.tr_spenddata.Merge(spenddata);
  341|      0|    }
  342|    329|    if (provider.GetTaprootBuilder(output, builder)) {
  ------------------
  |  Branch (342:9): [True: 0, False: 329]
  ------------------
  343|      0|        sigdata.tr_builder = builder;
  344|      0|    }
  345|       |
  346|       |    // Try key path spending.
  347|    329|    {
  348|    329|        KeyOriginInfo info;
  349|    329|        if (provider.GetKeyOriginByXOnly(sigdata.tr_spenddata.internal_key, info)) {
  ------------------
  |  Branch (349:13): [True: 0, False: 329]
  ------------------
  350|      0|            auto it = sigdata.taproot_misc_pubkeys.find(sigdata.tr_spenddata.internal_key);
  351|      0|            if (it == sigdata.taproot_misc_pubkeys.end()) {
  ------------------
  |  Branch (351:17): [True: 0, False: 0]
  ------------------
  352|      0|                sigdata.taproot_misc_pubkeys.emplace(sigdata.tr_spenddata.internal_key, std::make_pair(std::set<uint256>(), info));
  353|      0|            }
  354|      0|        }
  355|       |
  356|    329|        std::vector<unsigned char> sig;
  357|    329|        if (sigdata.taproot_key_path_sig.size() == 0) {
  ------------------
  |  Branch (357:13): [True: 329, False: 0]
  ------------------
  358|    329|            if (creator.CreateSchnorrSig(provider, sig, sigdata.tr_spenddata.internal_key, nullptr, &sigdata.tr_spenddata.merkle_root, SigVersion::TAPROOT)) {
  ------------------
  |  Branch (358:17): [True: 0, False: 329]
  ------------------
  359|      0|                sigdata.taproot_key_path_sig = sig;
  360|      0|            }
  361|    329|        }
  362|    329|        if (sigdata.taproot_key_path_sig.size() == 0) {
  ------------------
  |  Branch (362:13): [True: 329, False: 0]
  ------------------
  363|    329|            if (creator.CreateSchnorrSig(provider, sig, output, nullptr, nullptr, SigVersion::TAPROOT)) {
  ------------------
  |  Branch (363:17): [True: 0, False: 329]
  ------------------
  364|      0|                sigdata.taproot_key_path_sig = sig;
  365|      0|            }
  366|    329|        }
  367|    329|        if (sigdata.taproot_key_path_sig.size()) {
  ------------------
  |  Branch (367:13): [True: 0, False: 329]
  ------------------
  368|      0|            result = Vector(sigdata.taproot_key_path_sig);
  369|      0|            return true;
  370|      0|        }
  371|    329|    }
  372|       |
  373|       |    // Try script path spending.
  374|    329|    std::vector<std::vector<unsigned char>> smallest_result_stack;
  375|    329|    for (const auto& [key, control_blocks] : sigdata.tr_spenddata.scripts) {
  ------------------
  |  Branch (375:44): [True: 0, False: 329]
  ------------------
  376|      0|        const auto& [script, leaf_ver] = key;
  377|      0|        std::vector<std::vector<unsigned char>> result_stack;
  378|      0|        if (SignTaprootScript(provider, creator, sigdata, leaf_ver, script, result_stack)) {
  ------------------
  |  Branch (378:13): [True: 0, False: 0]
  ------------------
  379|      0|            result_stack.emplace_back(std::begin(script), std::end(script)); // Push the script
  380|      0|            result_stack.push_back(*control_blocks.begin()); // Push the smallest control block
  381|      0|            if (smallest_result_stack.size() == 0 ||
  ------------------
  |  Branch (381:17): [True: 0, False: 0]
  ------------------
  382|      0|                GetSerializeSize(result_stack) < GetSerializeSize(smallest_result_stack)) {
  ------------------
  |  Branch (382:17): [True: 0, False: 0]
  ------------------
  383|      0|                smallest_result_stack = std::move(result_stack);
  384|      0|            }
  385|      0|        }
  386|      0|    }
  387|    329|    if (smallest_result_stack.size() != 0) {
  ------------------
  |  Branch (387:9): [True: 0, False: 329]
  ------------------
  388|      0|        result = std::move(smallest_result_stack);
  389|      0|        return true;
  390|      0|    }
  391|       |
  392|    329|    return false;
  393|    329|}
_ZN12WshSatisfierC2ERK15SigningProviderR13SignatureDataRK20BaseSignatureCreatorRK7CScript:
  260|     44|                          : Satisfier(provider, sig_data, creator, witscript, miniscript::MiniscriptContext::P2WSH) {}
_ZN9SatisfierI7CPubKeyEC2ERK15SigningProviderR13SignatureDataRK20BaseSignatureCreatorRK7CScriptN10miniscript17MiniscriptContextE:
  208|     44|                       miniscript::MiniscriptContext script_ctx) : m_provider(provider),
  209|     44|                                                                   m_sig_data(sig_data),
  210|     44|                                                                   m_creator(creator),
  211|     44|                                                                   m_witness_script(witscript),
  212|     44|                                                                   m_script_ctx(script_ctx) {}
sign.cpp:_ZL7PushAllRKNSt3__16vectorINS0_IhNS_9allocatorIhEEEENS1_IS3_EEEE:
  486|  52.9k|{
  487|  52.9k|    CScript result;
  488|  52.9k|    for (const valtype& v : values) {
  ------------------
  |  Branch (488:27): [True: 2.26k, False: 52.9k]
  ------------------
  489|  2.26k|        if (v.size() == 0) {
  ------------------
  |  Branch (489:13): [True: 2.16k, False: 104]
  ------------------
  490|  2.16k|            result << OP_0;
  491|  2.16k|        } else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
  ------------------
  |  Branch (491:20): [True: 57, False: 47]
  |  Branch (491:37): [True: 56, False: 1]
  |  Branch (491:50): [True: 27, False: 29]
  ------------------
  492|     27|            result << CScript::EncodeOP_N(v[0]);
  493|     77|        } else if (v.size() == 1 && v[0] == 0x81) {
  ------------------
  |  Branch (493:20): [True: 30, False: 47]
  |  Branch (493:37): [True: 19, False: 11]
  ------------------
  494|     19|            result << OP_1NEGATE;
  495|     58|        } else {
  496|     58|            result << v;
  497|     58|        }
  498|  2.26k|    }
  499|  52.9k|    return result;
  500|  52.9k|}
sign.cpp:_ZN12_GLOBAL__N_16StacksC2ERK13SignatureData:
  603|  53.1k|    explicit Stacks(const SignatureData& data) : witness(data.scriptWitness.stack) {
  604|  53.1k|        EvalScript(script, data.scriptSig, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker(), SigVersion::BASE);
  605|  53.1k|    }
sign.cpp:_ZN12_GLOBAL__N_125SignatureExtractorCheckerC2ER13SignatureDataR20BaseSignatureChecker:
  583|  53.1k|    SignatureExtractorChecker(SignatureData& sigdata, BaseSignatureChecker& checker) : DeferringSignatureChecker(checker), sigdata(sigdata) {}
sign.cpp:_ZNK12_GLOBAL__N_125SignatureExtractorChecker19CheckECDSASignatureERKNSt3__16vectorIhNS1_9allocatorIhEEEES7_RK7CScript10SigVersion:
  586|    633|    {
  587|    633|        if (m_checker.CheckECDSASignature(scriptSig, vchPubKey, scriptCode, sigversion)) {
  ------------------
  |  Branch (587:13): [True: 0, False: 633]
  ------------------
  588|      0|            CPubKey pubkey(vchPubKey);
  589|      0|            sigdata.signatures.emplace(pubkey.GetID(), SigPair(pubkey, scriptSig));
  590|      0|            return true;
  591|      0|        }
  592|    633|        return false;
  593|    633|    }
_ZNK9SatisfierI7CPubKeyE9MsContextEv:
  251|     44|    miniscript::MiniscriptContext MsContext() const {
  252|     44|        return m_script_ctx;
  253|     44|    }

_ZN13SignatureDataC2Ev:
   92|  54.0k|    SignatureData() = default;
_ZN20BaseSignatureCreatorD2Ev:
   30|  53.1k|    virtual ~BaseSignatureCreator() = default;

_ZNK19FlatSigningProvider10GetCScriptERK9CScriptIDR7CScript:
   56|  10.7k|bool FlatSigningProvider::GetCScript(const CScriptID& scriptid, CScript& script) const { return LookupHelper(scripts, scriptid, script); }
_ZNK19FlatSigningProvider9GetPubKeyERK6CKeyIDR7CPubKey:
   57|  1.85k|bool FlatSigningProvider::GetPubKey(const CKeyID& keyid, CPubKey& pubkey) const { return LookupHelper(pubkeys, keyid, pubkey); }
_ZNK19FlatSigningProvider12GetKeyOriginERK6CKeyIDR13KeyOriginInfo:
   59|  29.9k|{
   60|  29.9k|    std::pair<CPubKey, KeyOriginInfo> out;
   61|  29.9k|    bool ret = LookupHelper(origins, keyid, out);
   62|  29.9k|    if (ret) info = std::move(out.second);
  ------------------
  |  Branch (62:9): [True: 23.2k, False: 6.77k]
  ------------------
   63|  29.9k|    return ret;
   64|  29.9k|}
_ZNK19FlatSigningProvider6GetKeyERK6CKeyIDR4CKey:
   70|  68.1k|bool FlatSigningProvider::GetKey(const CKeyID& keyid, CKey& key) const { return LookupHelper(keys, keyid, key); }
_ZNK19FlatSigningProvider19GetTaprootSpendDataERK11XOnlyPubKeyR16TaprootSpendData:
   72|  2.18k|{
   73|  2.18k|    TaprootBuilder builder;
   74|  2.18k|    if (LookupHelper(tr_trees, output_key, builder)) {
  ------------------
  |  Branch (74:9): [True: 1.75k, False: 430]
  ------------------
   75|  1.75k|        spenddata = builder.GetSpendData();
   76|  1.75k|        return true;
   77|  1.75k|    }
   78|    430|    return false;
   79|  2.18k|}
_ZNK19FlatSigningProvider17GetTaprootBuilderERK11XOnlyPubKeyR14TaprootBuilder:
   81|    329|{
   82|    329|    return LookupHelper(tr_trees, output_key, builder);
   83|    329|}
_ZN19FlatSigningProvider5MergeEOS_:
   86|  86.6k|{
   87|  86.6k|    scripts.merge(b.scripts);
   88|  86.6k|    pubkeys.merge(b.pubkeys);
   89|  86.6k|    keys.merge(b.keys);
   90|  86.6k|    origins.merge(b.origins);
   91|  86.6k|    tr_trees.merge(b.tr_trees);
   92|  86.6k|    return *this;
   93|  86.6k|}
_Z20GetKeyForDestinationRK15SigningProviderRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  204|  27.6k|{
  205|       |    // Only supports destinations which map to single public keys:
  206|       |    // P2PKH, P2WPKH, P2SH-P2WPKH, P2TR
  207|  27.6k|    if (auto id = std::get_if<PKHash>(&dest)) {
  ------------------
  |  Branch (207:14): [True: 18.2k, False: 9.41k]
  ------------------
  208|  18.2k|        return ToKeyID(*id);
  209|  18.2k|    }
  210|  9.41k|    if (auto witness_id = std::get_if<WitnessV0KeyHash>(&dest)) {
  ------------------
  |  Branch (210:14): [True: 2.24k, False: 7.17k]
  ------------------
  211|  2.24k|        return ToKeyID(*witness_id);
  212|  2.24k|    }
  213|  7.17k|    if (auto script_hash = std::get_if<ScriptHash>(&dest)) {
  ------------------
  |  Branch (213:14): [True: 4.19k, False: 2.97k]
  ------------------
  214|  4.19k|        CScript script;
  215|  4.19k|        CScriptID script_id = ToScriptID(*script_hash);
  216|  4.19k|        CTxDestination inner_dest;
  217|  4.19k|        if (store.GetCScript(script_id, script) && ExtractDestination(script, inner_dest)) {
  ------------------
  |  Branch (217:13): [True: 4.15k, False: 43]
  |  Branch (217:52): [True: 2.24k, False: 1.90k]
  ------------------
  218|  2.24k|            if (auto inner_witness_id = std::get_if<WitnessV0KeyHash>(&inner_dest)) {
  ------------------
  |  Branch (218:22): [True: 2.10k, False: 148]
  ------------------
  219|  2.10k|                return ToKeyID(*inner_witness_id);
  220|  2.10k|            }
  221|  2.24k|        }
  222|  4.19k|    }
  223|  5.07k|    if (auto output_key = std::get_if<WitnessV1Taproot>(&dest)) {
  ------------------
  |  Branch (223:14): [True: 1.85k, False: 3.21k]
  ------------------
  224|  1.85k|        TaprootSpendData spenddata;
  225|  1.85k|        CPubKey pub;
  226|  1.85k|        if (store.GetTaprootSpendData(*output_key, spenddata)
  ------------------
  |  Branch (226:13): [True: 1.75k, False: 101]
  ------------------
  227|  1.85k|            && !spenddata.internal_key.IsNull()
  ------------------
  |  Branch (227:16): [True: 1.75k, False: 0]
  ------------------
  228|  1.85k|            && spenddata.merkle_root.IsNull()
  ------------------
  |  Branch (228:16): [True: 603, False: 1.15k]
  ------------------
  229|  1.85k|            && store.GetPubKeyByXOnly(spenddata.internal_key, pub)) {
  ------------------
  |  Branch (229:16): [True: 603, False: 0]
  ------------------
  230|    603|            return pub.GetID();
  231|    603|        }
  232|  1.85k|    }
  233|  4.46k|    return CKeyID();
  234|  5.07k|}
_ZN14TaprootBuilder7CombineEONS_8NodeInfoES1_:
  291|  4.02k|{
  292|  4.02k|    NodeInfo ret;
  293|       |    /* Iterate over all tracked leaves in a, add b's hash to their Merkle branch, and move them to ret. */
  294|  8.18k|    for (auto& leaf : a.leaves) {
  ------------------
  |  Branch (294:21): [True: 8.18k, False: 4.02k]
  ------------------
  295|  8.18k|        leaf.merkle_branch.push_back(b.hash);
  296|  8.18k|        ret.leaves.emplace_back(std::move(leaf));
  297|  8.18k|    }
  298|       |    /* Iterate over all tracked leaves in b, add a's hash to their Merkle branch, and move them to ret. */
  299|  11.1k|    for (auto& leaf : b.leaves) {
  ------------------
  |  Branch (299:21): [True: 11.1k, False: 4.02k]
  ------------------
  300|  11.1k|        leaf.merkle_branch.push_back(a.hash);
  301|  11.1k|        ret.leaves.emplace_back(std::move(leaf));
  302|  11.1k|    }
  303|  4.02k|    ret.hash = ComputeTapbranchHash(a.hash, b.hash);
  304|  4.02k|    return ret;
  305|  4.02k|}
_ZN14TaprootBuilder6InsertEONS_8NodeInfoEi:
  323|  8.27k|{
  324|  8.27k|    assert(depth >= 0 && (size_t)depth <= TAPROOT_CONTROL_MAX_NODE_COUNT);
  325|       |    /* We cannot insert a leaf at a lower depth while a deeper branch is unfinished. Doing
  326|       |     * so would mean the Add() invocations do not correspond to a DFS traversal of a
  327|       |     * binary tree. */
  328|  8.27k|    if ((size_t)depth + 1 < m_branch.size()) {
  ------------------
  |  Branch (328:9): [True: 27, False: 8.25k]
  ------------------
  329|     27|        m_valid = false;
  330|     27|        return;
  331|     27|    }
  332|       |    /* As long as an entry in the branch exists at the specified depth, combine it and propagate up.
  333|       |     * The 'node' variable is overwritten here with the newly combined node. */
  334|  12.2k|    while (m_valid && m_branch.size() > (size_t)depth && m_branch[depth].has_value()) {
  ------------------
  |  Branch (334:12): [True: 12.2k, False: 8]
  |  Branch (334:23): [True: 6.14k, False: 6.12k]
  |  Branch (334:58): [True: 4.02k, False: 2.12k]
  ------------------
  335|  4.02k|        node = Combine(std::move(node), std::move(*m_branch[depth]));
  336|  4.02k|        m_branch.pop_back();
  337|  4.02k|        if (depth == 0) m_valid = false; /* Can't propagate further up than the root */
  ------------------
  |  Branch (337:13): [True: 8, False: 4.01k]
  ------------------
  338|  4.02k|        --depth;
  339|  4.02k|    }
  340|  8.25k|    if (m_valid) {
  ------------------
  |  Branch (340:9): [True: 8.24k, False: 8]
  ------------------
  341|       |        /* Make sure the branch is big enough to place the new node. */
  342|  8.24k|        if (m_branch.size() <= (size_t)depth) m_branch.resize((size_t)depth + 1);
  ------------------
  |  Branch (342:13): [True: 6.12k, False: 2.12k]
  ------------------
  343|  8.24k|        assert(!m_branch[depth].has_value());
  344|  8.24k|        m_branch[depth] = std::move(node);
  345|  8.24k|    }
  346|  8.25k|}
_ZN14TaprootBuilder11ValidDepthsERKNSt3__16vectorIiNS0_9allocatorIiEEEE:
  349|    981|{
  350|    981|    std::vector<bool> branch;
  351|    981|    for (int depth : depths) {
  ------------------
  |  Branch (351:20): [True: 551, False: 981]
  ------------------
  352|       |        // This inner loop corresponds to effectively the same logic on branch
  353|       |        // as what Insert() performs on the m_branch variable. Instead of
  354|       |        // storing a NodeInfo object, just remember whether or not there is one
  355|       |        // at that depth.
  356|    551|        if (depth < 0 || (size_t)depth > TAPROOT_CONTROL_MAX_NODE_COUNT) return false;
  ------------------
  |  Branch (356:13): [True: 0, False: 551]
  |  Branch (356:26): [True: 0, False: 551]
  ------------------
  357|    551|        if ((size_t)depth + 1 < branch.size()) return false;
  ------------------
  |  Branch (357:13): [True: 0, False: 551]
  ------------------
  358|    653|        while (branch.size() > (size_t)depth && branch[depth]) {
  ------------------
  |  Branch (358:16): [True: 204, False: 449]
  |  Branch (358:16): [True: 102, False: 551]
  |  Branch (358:49): [True: 102, False: 102]
  ------------------
  359|    102|            branch.pop_back();
  360|    102|            if (depth == 0) return false;
  ------------------
  |  Branch (360:17): [True: 0, False: 102]
  ------------------
  361|    102|            --depth;
  362|    102|        }
  363|    551|        if (branch.size() <= (size_t)depth) branch.resize((size_t)depth + 1);
  ------------------
  |  Branch (363:13): [True: 449, False: 102]
  ------------------
  364|    551|        assert(!branch[depth]);
  365|    551|        branch[depth] = true;
  366|    551|    }
  367|       |    // And this check corresponds to the IsComplete() check on m_branch.
  368|    981|    return branch.size() == 0 || (branch.size() == 1 && branch[0]);
  ------------------
  |  Branch (368:12): [True: 532, False: 449]
  |  Branch (368:35): [True: 449, False: 0]
  |  Branch (368:57): [True: 449, False: 0]
  ------------------
  369|    981|}
_ZN14TaprootBuilder3AddEi4SpanIKhEib:
  372|  8.65k|{
  373|  8.65k|    assert((leaf_version & ~TAPROOT_LEAF_MASK) == 0);
  374|  8.65k|    if (!IsValid()) return *this;
  ------------------
  |  Branch (374:9): [True: 374, False: 8.27k]
  ------------------
  375|       |    /* Construct NodeInfo object with leaf hash and (if track is true) also leaf information. */
  376|  8.27k|    NodeInfo node;
  377|  8.27k|    node.hash = ComputeTapleafHash(leaf_version, script);
  378|  8.27k|    if (track) node.leaves.emplace_back(LeafInfo{std::vector<unsigned char>(script.begin(), script.end()), leaf_version, {}});
  ------------------
  |  Branch (378:9): [True: 8.27k, False: 0]
  ------------------
  379|       |    /* Insert into the branch. */
  380|  8.27k|    Insert(std::move(node), depth);
  381|  8.27k|    return *this;
  382|  8.65k|}
_ZN14TaprootBuilder8FinalizeERK11XOnlyPubKey:
  395|  4.84k|{
  396|       |    /* Can only call this function when IsComplete() is true. */
  397|  4.84k|    assert(IsComplete());
  398|  4.84k|    m_internal_key = internal_key;
  399|  4.84k|    auto ret = m_internal_key.CreateTapTweak(m_branch.size() == 0 ? nullptr : &m_branch[0]->hash);
  ------------------
  |  Branch (399:46): [True: 1.16k, False: 3.68k]
  ------------------
  400|  4.84k|    assert(ret.has_value());
  401|  4.84k|    std::tie(m_output_key, m_parity) = *ret;
  402|  4.84k|    return *this;
  403|  4.84k|}
_ZN14TaprootBuilder9GetOutputEv:
  405|  4.84k|WitnessV1Taproot TaprootBuilder::GetOutput() { return WitnessV1Taproot{m_output_key}; }
_ZNK14TaprootBuilder12GetSpendDataEv:
  408|  1.75k|{
  409|  1.75k|    assert(IsComplete());
  410|  1.75k|    assert(m_output_key.IsFullyValid());
  411|  1.75k|    TaprootSpendData spd;
  412|  1.75k|    spd.merkle_root = m_branch.size() == 0 ? uint256() : m_branch[0]->hash;
  ------------------
  |  Branch (412:23): [True: 603, False: 1.15k]
  ------------------
  413|  1.75k|    spd.internal_key = m_internal_key;
  414|  1.75k|    if (m_branch.size()) {
  ------------------
  |  Branch (414:9): [True: 1.15k, False: 603]
  ------------------
  415|       |        // If any script paths exist, they have been combined into the root m_branch[0]
  416|       |        // by now. Compute the control block for each of its tracked leaves, and put them in
  417|       |        // spd.scripts.
  418|  1.49k|        for (const auto& leaf : m_branch[0]->leaves) {
  ------------------
  |  Branch (418:31): [True: 1.49k, False: 1.15k]
  ------------------
  419|  1.49k|            std::vector<unsigned char> control_block;
  420|  1.49k|            control_block.resize(TAPROOT_CONTROL_BASE_SIZE + TAPROOT_CONTROL_NODE_SIZE * leaf.merkle_branch.size());
  421|  1.49k|            control_block[0] = leaf.leaf_version | (m_parity ? 1 : 0);
  ------------------
  |  Branch (421:53): [True: 687, False: 806]
  ------------------
  422|  1.49k|            std::copy(m_internal_key.begin(), m_internal_key.end(), control_block.begin() + 1);
  423|  1.49k|            if (leaf.merkle_branch.size()) {
  ------------------
  |  Branch (423:17): [True: 510, False: 983]
  ------------------
  424|    510|                std::copy(leaf.merkle_branch[0].begin(),
  425|    510|                          leaf.merkle_branch[0].begin() + TAPROOT_CONTROL_NODE_SIZE * leaf.merkle_branch.size(),
  426|    510|                          control_block.begin() + TAPROOT_CONTROL_BASE_SIZE);
  427|    510|            }
  428|  1.49k|            spd.scripts[{leaf.script, leaf.leaf_version}].insert(std::move(control_block));
  429|  1.49k|        }
  430|  1.15k|    }
  431|  1.75k|    return spd;
  432|  1.75k|}
_Z12LookupHelperINSt3__13mapI9CScriptID7CScriptNS0_4lessIS2_EENS0_9allocatorINS0_4pairIKS2_S3_EEEEEES2_S3_EbRKT_RKT0_RT1_:
   16|  10.7k|{
   17|  10.7k|    auto it = map.find(key);
   18|  10.7k|    if (it != map.end()) {
  ------------------
  |  Branch (18:9): [True: 4.15k, False: 6.60k]
  ------------------
   19|  4.15k|        value = it->second;
   20|  4.15k|        return true;
   21|  4.15k|    }
   22|  6.60k|    return false;
   23|  10.7k|}
_Z12LookupHelperINSt3__13mapI6CKeyID7CPubKeyNS0_4lessIS2_EENS0_9allocatorINS0_4pairIKS2_S3_EEEEEES2_S3_EbRKT_RKT0_RT1_:
   16|  1.85k|{
   17|  1.85k|    auto it = map.find(key);
   18|  1.85k|    if (it != map.end()) {
  ------------------
  |  Branch (18:9): [True: 603, False: 1.25k]
  ------------------
   19|    603|        value = it->second;
   20|    603|        return true;
   21|    603|    }
   22|  1.25k|    return false;
   23|  1.85k|}
_Z12LookupHelperINSt3__13mapI6CKeyIDNS0_4pairI7CPubKey13KeyOriginInfoEENS0_4lessIS2_EENS0_9allocatorINS3_IKS2_S6_EEEEEES2_S6_EbRKT_RKT0_RT1_:
   16|  29.9k|{
   17|  29.9k|    auto it = map.find(key);
   18|  29.9k|    if (it != map.end()) {
  ------------------
  |  Branch (18:9): [True: 23.2k, False: 6.77k]
  ------------------
   19|  23.2k|        value = it->second;
   20|  23.2k|        return true;
   21|  23.2k|    }
   22|  6.77k|    return false;
   23|  29.9k|}
_Z12LookupHelperINSt3__13mapI6CKeyID4CKeyNS0_4lessIS2_EENS0_9allocatorINS0_4pairIKS2_S3_EEEEEES2_S3_EbRKT_RKT0_RT1_:
   16|  68.1k|{
   17|  68.1k|    auto it = map.find(key);
   18|  68.1k|    if (it != map.end()) {
  ------------------
  |  Branch (18:9): [True: 59.1k, False: 9.01k]
  ------------------
   19|  59.1k|        value = it->second;
   20|  59.1k|        return true;
   21|  59.1k|    }
   22|  9.01k|    return false;
   23|  68.1k|}
_Z12LookupHelperINSt3__13mapI11XOnlyPubKey14TaprootBuilderNS0_4lessIS2_EENS0_9allocatorINS0_4pairIKS2_S3_EEEEEES2_S3_EbRKT_RKT0_RT1_:
   16|  2.51k|{
   17|  2.51k|    auto it = map.find(key);
   18|  2.51k|    if (it != map.end()) {
  ------------------
  |  Branch (18:9): [True: 1.75k, False: 759]
  ------------------
   19|  1.75k|        value = it->second;
   20|  1.75k|        return true;
   21|  1.75k|    }
   22|    759|    return false;
   23|  2.51k|}

_ZNK29ShortestVectorFirstComparatorclERKNSt3__16vectorIhNS0_9allocatorIhEEEES6_:
   20|    689|    {
   21|    689|        if (a.size() < b.size()) return true;
  ------------------
  |  Branch (21:13): [True: 44, False: 645]
  ------------------
   22|    645|        if (a.size() > b.size()) return false;
  ------------------
  |  Branch (22:13): [True: 44, False: 601]
  ------------------
   23|    601|        return a < b;
   24|    645|    }
_ZNK14TaprootBuilder7IsValidEv:
  126|  8.65k|    bool IsValid() const { return m_valid; }
_ZNK14TaprootBuilder10IsCompleteEv:
  128|  11.8k|    bool IsComplete() const { return m_valid && (m_branch.size() == 0 || (m_branch.size() == 1 && m_branch[0].has_value())); }
  ------------------
  |  Branch (128:38): [True: 11.8k, False: 9]
  |  Branch (128:50): [True: 2.92k, False: 8.90k]
  |  Branch (128:75): [True: 8.90k, False: 1]
  |  Branch (128:99): [True: 8.90k, False: 0]
  ------------------
_ZNK15SigningProvider6GetKeyERK6CKeyIDR4CKey:
  159|  1.71k|    virtual bool GetKey(const CKeyID &address, CKey& key) const { return false; }
_ZNK15SigningProvider13GetKeyByXOnlyERK11XOnlyPubKeyR4CKey:
  166|  2.74k|    {
  167|  4.55k|        for (const auto& id : pubkey.GetKeyIDs()) {
  ------------------
  |  Branch (167:29): [True: 4.55k, False: 680]
  ------------------
  168|  4.55k|            if (GetKey(id, key)) return true;
  ------------------
  |  Branch (168:17): [True: 2.06k, False: 2.49k]
  ------------------
  169|  4.55k|        }
  170|    680|        return false;
  171|  2.74k|    }
_ZNK15SigningProvider16GetPubKeyByXOnlyERK11XOnlyPubKeyR7CPubKey:
  174|    603|    {
  175|    905|        for (const auto& id : pubkey.GetKeyIDs()) {
  ------------------
  |  Branch (175:29): [True: 905, False: 0]
  ------------------
  176|    905|            if (GetPubKey(id, out)) return true;
  ------------------
  |  Branch (176:17): [True: 603, False: 302]
  ------------------
  177|    905|        }
  178|      0|        return false;
  179|    603|    }
_ZNK15SigningProvider19GetKeyOriginByXOnlyERK11XOnlyPubKeyR13KeyOriginInfo:
  182|    329|    {
  183|    658|        for (const auto& id : pubkey.GetKeyIDs()) {
  ------------------
  |  Branch (183:29): [True: 658, False: 329]
  ------------------
  184|    658|            if (GetKeyOrigin(id, info)) return true;
  ------------------
  |  Branch (184:17): [True: 0, False: 658]
  ------------------
  185|    658|        }
  186|    329|        return false;
  187|    329|    }
_ZN21HidingSigningProviderC2EPK15SigningProviderbb:
  200|    903|    HidingSigningProvider(const SigningProvider* provider, bool hide_secret, bool hide_origin) : m_hide_secret(hide_secret), m_hide_origin(hide_origin), m_provider(provider) {}
_ZN15SigningProviderD2Ev:
  155|   254k|    virtual ~SigningProvider() = default;

_Z6SolverRK7CScriptRNSt3__16vectorINS3_IhNS2_9allocatorIhEEEENS4_IS6_EEEE:
  142|   163k|{
  143|   163k|    vSolutionsRet.clear();
  144|       |
  145|       |    // Shortcut for pay-to-script-hash, which are more constrained than the other types:
  146|       |    // it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
  147|   163k|    if (scriptPubKey.IsPayToScriptHash())
  ------------------
  |  Branch (147:9): [True: 19.7k, False: 143k]
  ------------------
  148|  19.7k|    {
  149|  19.7k|        std::vector<unsigned char> hashBytes(scriptPubKey.begin()+2, scriptPubKey.begin()+22);
  150|  19.7k|        vSolutionsRet.push_back(hashBytes);
  151|  19.7k|        return TxoutType::SCRIPTHASH;
  152|  19.7k|    }
  153|       |
  154|   143k|    int witnessversion;
  155|   143k|    std::vector<unsigned char> witnessprogram;
  156|   143k|    if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
  ------------------
  |  Branch (156:9): [True: 17.7k, False: 125k]
  ------------------
  157|  17.7k|        if (witnessversion == 0 && witnessprogram.size() == WITNESS_V0_KEYHASH_SIZE) {
  ------------------
  |  Branch (157:13): [True: 8.56k, False: 9.18k]
  |  Branch (157:36): [True: 4.63k, False: 3.92k]
  ------------------
  158|  4.63k|            vSolutionsRet.push_back(std::move(witnessprogram));
  159|  4.63k|            return TxoutType::WITNESS_V0_KEYHASH;
  160|  4.63k|        }
  161|  13.1k|        if (witnessversion == 0 && witnessprogram.size() == WITNESS_V0_SCRIPTHASH_SIZE) {
  ------------------
  |  Branch (161:13): [True: 3.92k, False: 9.18k]
  |  Branch (161:36): [True: 3.24k, False: 689]
  ------------------
  162|  3.24k|            vSolutionsRet.push_back(std::move(witnessprogram));
  163|  3.24k|            return TxoutType::WITNESS_V0_SCRIPTHASH;
  164|  3.24k|        }
  165|  9.87k|        if (witnessversion == 1 && witnessprogram.size() == WITNESS_V1_TAPROOT_SIZE) {
  ------------------
  |  Branch (165:13): [True: 6.40k, False: 3.47k]
  |  Branch (165:36): [True: 4.45k, False: 1.94k]
  ------------------
  166|  4.45k|            vSolutionsRet.push_back(std::move(witnessprogram));
  167|  4.45k|            return TxoutType::WITNESS_V1_TAPROOT;
  168|  4.45k|        }
  169|  5.42k|        if (scriptPubKey.IsPayToAnchor()) {
  ------------------
  |  Branch (169:13): [True: 70, False: 5.35k]
  ------------------
  170|     70|            return TxoutType::ANCHOR;
  171|     70|        }
  172|  5.35k|        if (witnessversion != 0) {
  ------------------
  |  Branch (172:13): [True: 4.66k, False: 689]
  ------------------
  173|  4.66k|            vSolutionsRet.push_back(std::vector<unsigned char>{(unsigned char)witnessversion});
  174|  4.66k|            vSolutionsRet.push_back(std::move(witnessprogram));
  175|  4.66k|            return TxoutType::WITNESS_UNKNOWN;
  176|  4.66k|        }
  177|    689|        return TxoutType::NONSTANDARD;
  178|  5.35k|    }
  179|       |
  180|       |    // Provably prunable, data-carrying output
  181|       |    //
  182|       |    // So long as script passes the IsUnspendable() test and all but the first
  183|       |    // byte passes the IsPushOnly() test we don't care what exactly is in the
  184|       |    // script.
  185|   125k|    if (scriptPubKey.size() >= 1 && scriptPubKey[0] == OP_RETURN && scriptPubKey.IsPushOnly(scriptPubKey.begin()+1)) {
  ------------------
  |  Branch (185:9): [True: 121k, False: 3.87k]
  |  Branch (185:9): [True: 801, False: 124k]
  |  Branch (185:37): [True: 3.76k, False: 118k]
  |  Branch (185:69): [True: 801, False: 2.96k]
  ------------------
  186|    801|        return TxoutType::NULL_DATA;
  187|    801|    }
  188|       |
  189|   124k|    std::vector<unsigned char> data;
  190|   124k|    if (MatchPayToPubkey(scriptPubKey, data)) {
  ------------------
  |  Branch (190:9): [True: 8.72k, False: 116k]
  ------------------
  191|  8.72k|        vSolutionsRet.push_back(std::move(data));
  192|  8.72k|        return TxoutType::PUBKEY;
  193|  8.72k|    }
  194|       |
  195|   116k|    if (MatchPayToPubkeyHash(scriptPubKey, data)) {
  ------------------
  |  Branch (195:9): [True: 24.5k, False: 91.6k]
  ------------------
  196|  24.5k|        vSolutionsRet.push_back(std::move(data));
  197|  24.5k|        return TxoutType::PUBKEYHASH;
  198|  24.5k|    }
  199|       |
  200|  91.6k|    int required;
  201|  91.6k|    std::vector<std::vector<unsigned char>> keys;
  202|  91.6k|    if (MatchMultisig(scriptPubKey, required, keys)) {
  ------------------
  |  Branch (202:9): [True: 3.26k, False: 88.3k]
  ------------------
  203|  3.26k|        vSolutionsRet.push_back({static_cast<unsigned char>(required)}); // safe as required is in range 1..20
  204|  3.26k|        vSolutionsRet.insert(vSolutionsRet.end(), keys.begin(), keys.end());
  205|  3.26k|        vSolutionsRet.push_back({static_cast<unsigned char>(keys.size())}); // safe as size is in range 1..20
  206|  3.26k|        return TxoutType::MULTISIG;
  207|  3.26k|    }
  208|       |
  209|  88.3k|    vSolutionsRet.clear();
  210|  88.3k|    return TxoutType::NONSTANDARD;
  211|  91.6k|}
_Z21GetScriptForRawPubKeyRK7CPubKey:
  214|  4.42k|{
  215|  4.42k|    return CScript() << std::vector<unsigned char>(pubKey.begin(), pubKey.end()) << OP_CHECKSIG;
  216|  4.42k|}
_Z20GetScriptForMultisigiRKNSt3__16vectorI7CPubKeyNS_9allocatorIS1_EEEE:
  219|  8.55k|{
  220|  8.55k|    CScript script;
  221|       |
  222|  8.55k|    script << nRequired;
  223|  8.55k|    for (const CPubKey& key : keys)
  ------------------
  |  Branch (223:29): [True: 59.2k, False: 8.55k]
  ------------------
  224|  59.2k|        script << ToByteVector(key);
  225|  8.55k|    script << keys.size() << OP_CHECKMULTISIG;
  226|       |
  227|  8.55k|    return script;
  228|  8.55k|}
solver.cpp:_ZL15GetScriptNumber10opcodetypeNSt3__16vectorIhNS0_9allocatorIhEEEEii:
   67|  10.3k|{
   68|  10.3k|    int count;
   69|  10.3k|    if (IsSmallInteger(opcode)) {
  ------------------
  |  Branch (69:9): [True: 7.87k, False: 2.43k]
  ------------------
   70|  7.87k|        count = CScript::DecodeOP_N(opcode);
   71|  7.87k|    } else if (IsPushdataOp(opcode)) {
  ------------------
  |  Branch (71:16): [True: 1.29k, False: 1.14k]
  ------------------
   72|  1.29k|        if (!CheckMinimalPush(data, opcode)) return {};
  ------------------
  |  Branch (72:13): [True: 308, False: 982]
  ------------------
   73|    982|        try {
   74|    982|            count = CScriptNum(data, /* fRequireMinimal = */ true).getint();
   75|    982|        } catch (const scriptnum_error&) {
   76|    505|            return {};
   77|    505|        }
   78|  1.14k|    } else {
   79|  1.14k|        return {};
   80|  1.14k|    }
   81|  8.35k|    if (count < min || count > max) return {};
  ------------------
  |  Branch (81:9): [True: 369, False: 7.98k]
  |  Branch (81:24): [True: 107, False: 7.87k]
  ------------------
   82|  7.87k|    return count;
   83|  8.35k|}
solver.cpp:_ZL14IsSmallInteger10opcodetype:
   60|  10.3k|{
   61|  10.3k|    return opcode >= OP_1 && opcode <= OP_16;
  ------------------
  |  Branch (61:12): [True: 8.41k, False: 1.89k]
  |  Branch (61:30): [True: 7.87k, False: 544]
  ------------------
   62|  10.3k|}
solver.cpp:_ZL16MatchPayToPubkeyRK7CScriptRNSt3__16vectorIhNS2_9allocatorIhEEEE:
   37|   124k|{
   38|   124k|    if (script.size() == CPubKey::SIZE + 2 && script[0] == CPubKey::SIZE && script.back() == OP_CHECKSIG) {
  ------------------
  |  Branch (38:9): [True: 3.46k, False: 121k]
  |  Branch (38:47): [True: 3.11k, False: 354]
  |  Branch (38:77): [True: 2.84k, False: 268]
  ------------------
   39|  2.84k|        pubkey = valtype(script.begin() + 1, script.begin() + CPubKey::SIZE + 1);
   40|  2.84k|        return CPubKey::ValidSize(pubkey);
   41|  2.84k|    }
   42|   122k|    if (script.size() == CPubKey::COMPRESSED_SIZE + 2 && script[0] == CPubKey::COMPRESSED_SIZE && script.back() == OP_CHECKSIG) {
  ------------------
  |  Branch (42:9): [True: 12.9k, False: 109k]
  |  Branch (42:58): [True: 9.66k, False: 3.24k]
  |  Branch (42:99): [True: 7.67k, False: 1.98k]
  ------------------
   43|  7.67k|        pubkey = valtype(script.begin() + 1, script.begin() + CPubKey::COMPRESSED_SIZE + 1);
   44|  7.67k|        return CPubKey::ValidSize(pubkey);
   45|  7.67k|    }
   46|   114k|    return false;
   47|   122k|}
solver.cpp:_ZL20MatchPayToPubkeyHashRK7CScriptRNSt3__16vectorIhNS2_9allocatorIhEEEE:
   50|   116k|{
   51|   116k|    if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160 && script[2] == 20 && script[23] == OP_EQUALVERIFY && script[24] == OP_CHECKSIG) {
  ------------------
  |  Branch (51:9): [True: 24.7k, False: 91.3k]
  |  Branch (51:32): [True: 24.5k, False: 270]
  |  Branch (51:55): [True: 24.5k, False: 0]
  |  Branch (51:82): [True: 24.5k, False: 0]
  |  Branch (51:101): [True: 24.5k, False: 0]
  |  Branch (51:133): [True: 24.5k, False: 0]
  ------------------
   52|  24.5k|        pubkeyhash = valtype(script.begin () + 3, script.begin() + 23);
   53|  24.5k|        return true;
   54|  24.5k|    }
   55|  91.6k|    return false;
   56|   116k|}
solver.cpp:_ZL13MatchMultisigRK7CScriptRiRNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEE:
   86|  91.6k|{
   87|  91.6k|    opcodetype opcode;
   88|  91.6k|    valtype data;
   89|       |
   90|  91.6k|    CScript::const_iterator it = script.begin();
   91|  91.6k|    if (script.size() < 1 || script.back() != OP_CHECKMULTISIG) return false;
  ------------------
  |  Branch (91:9): [True: 3.87k, False: 87.7k]
  |  Branch (91:30): [True: 81.4k, False: 6.26k]
  ------------------
   92|       |
   93|  6.26k|    if (!script.GetOp(it, opcode, data)) return false;
  ------------------
  |  Branch (93:9): [True: 481, False: 5.78k]
  ------------------
   94|  5.78k|    auto req_sigs = GetScriptNumber(opcode, data, 1, MAX_PUBKEYS_PER_MULTISIG);
   95|  5.78k|    if (!req_sigs) return false;
  ------------------
  |  Branch (95:9): [True: 1.24k, False: 4.53k]
  ------------------
   96|  4.53k|    required_sigs = *req_sigs;
   97|  21.1k|    while (script.GetOp(it, opcode, data) && CPubKey::ValidSize(data)) {
  ------------------
  |  Branch (97:12): [True: 20.7k, False: 367]
  |  Branch (97:46): [True: 16.6k, False: 4.16k]
  ------------------
   98|  16.6k|        pubkeys.emplace_back(std::move(data));
   99|  16.6k|    }
  100|  4.53k|    auto num_keys = GetScriptNumber(opcode, data, required_sigs, MAX_PUBKEYS_PER_MULTISIG);
  101|  4.53k|    if (!num_keys) return false;
  ------------------
  |  Branch (101:9): [True: 1.19k, False: 3.34k]
  ------------------
  102|  3.34k|    if (pubkeys.size() != static_cast<unsigned long>(*num_keys)) return false;
  ------------------
  |  Branch (102:9): [True: 83, False: 3.26k]
  ------------------
  103|       |
  104|  3.26k|    return (it + 1 == script.end());
  105|  3.34k|}

_Z12IsPushdataOp10opcodetype:
   41|  2.43k|{
   42|  2.43k|    return opcode > OP_FALSE && opcode <= OP_PUSHDATA4;
  ------------------
  |  Branch (42:12): [True: 1.86k, False: 578]
  |  Branch (42:33): [True: 1.29k, False: 570]
  ------------------
   43|  2.43k|}

secp256k1.c:secp256k1_ecdsa_sig_sign:
  266|  14.7k|static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid) {
  267|  14.7k|    unsigned char b[32];
  268|  14.7k|    secp256k1_gej rp;
  269|  14.7k|    secp256k1_ge r;
  270|  14.7k|    secp256k1_scalar n;
  271|  14.7k|    int overflow = 0;
  272|  14.7k|    int high;
  273|       |
  274|  14.7k|    secp256k1_ecmult_gen(ctx, &rp, nonce);
  275|  14.7k|    secp256k1_ge_set_gej(&r, &rp);
  276|  14.7k|    secp256k1_fe_normalize(&r.x);
  ------------------
  |  |   78|  14.7k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  277|  14.7k|    secp256k1_fe_normalize(&r.y);
  ------------------
  |  |   78|  14.7k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  278|  14.7k|    secp256k1_fe_get_b32(b, &r.x);
  ------------------
  |  |   89|  14.7k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
  279|  14.7k|    secp256k1_scalar_set_b32(sigr, b, &overflow);
  280|  14.7k|    if (recid) {
  ------------------
  |  Branch (280:9): [True: 14.7k, False: 0]
  ------------------
  281|       |        /* The overflow condition is cryptographically unreachable as hitting it requires finding the discrete log
  282|       |         * of some P where P.x >= order, and only 1 in about 2^127 points meet this criteria.
  283|       |         */
  284|  14.7k|        *recid = (overflow << 1) | secp256k1_fe_is_odd(&r.y);
  ------------------
  |  |   85|  14.7k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  285|  14.7k|    }
  286|  14.7k|    secp256k1_scalar_mul(&n, sigr, seckey);
  287|  14.7k|    secp256k1_scalar_add(&n, &n, message);
  288|  14.7k|    secp256k1_scalar_inverse(sigs, nonce);
  289|  14.7k|    secp256k1_scalar_mul(sigs, sigs, &n);
  290|  14.7k|    secp256k1_scalar_clear(&n);
  291|  14.7k|    secp256k1_gej_clear(&rp);
  292|  14.7k|    secp256k1_ge_clear(&r);
  293|  14.7k|    high = secp256k1_scalar_is_high(sigs);
  294|  14.7k|    secp256k1_scalar_cond_negate(sigs, high);
  295|  14.7k|    if (recid) {
  ------------------
  |  Branch (295:9): [True: 14.7k, False: 0]
  ------------------
  296|  14.7k|        *recid ^= high;
  297|  14.7k|    }
  298|       |    /* P.x = order is on the curve, so technically sig->r could end up being zero, which would be an invalid signature.
  299|       |     * This is cryptographically unreachable as hitting it requires finding the discrete log of P.x = N.
  300|       |     */
  301|  14.7k|    return (int)(!secp256k1_scalar_is_zero(sigr)) & (int)(!secp256k1_scalar_is_zero(sigs));
  302|  14.7k|}

secp256k1.c:secp256k1_eckey_pubkey_parse:
   17|  60.5k|static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size) {
   18|  60.5k|    if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  216|   116k|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
                  if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  217|  28.0k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (18:9): [True: 58.4k, False: 2.01k]
  |  Branch (18:24): [True: 30.4k, False: 28.0k]
  |  Branch (18:63): [True: 28.0k, False: 0]
  ------------------
   19|  58.4k|        secp256k1_fe x;
   20|  58.4k|        return secp256k1_fe_set_b32_limit(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD);
  ------------------
  |  |   88|  58.4k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
                      return secp256k1_fe_set_b32_limit(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD);
  ------------------
  |  |  217|  58.4k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (20:16): [True: 58.4k, False: 32]
  |  Branch (20:57): [True: 56.6k, False: 1.81k]
  ------------------
   21|  58.4k|    } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  218|  4.03k|#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04
  ------------------
                  } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  219|  2.01k|#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06
  ------------------
                  } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  220|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (21:16): [True: 2.01k, False: 0]
  |  Branch (21:31): [True: 2.01k, False: 0]
  |  Branch (21:78): [True: 0, False: 0]
  |  Branch (21:124): [True: 0, False: 0]
  ------------------
   22|  2.01k|        secp256k1_fe x, y;
   23|  2.01k|        if (!secp256k1_fe_set_b32_limit(&x, pub+1) || !secp256k1_fe_set_b32_limit(&y, pub+33)) {
  ------------------
  |  |   88|  2.01k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
                      if (!secp256k1_fe_set_b32_limit(&x, pub+1) || !secp256k1_fe_set_b32_limit(&y, pub+33)) {
  ------------------
  |  |   88|  2.01k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  |  Branch (23:13): [True: 1, False: 2.01k]
  |  Branch (23:55): [True: 2, False: 2.01k]
  ------------------
   24|      3|            return 0;
   25|      3|        }
   26|  2.01k|        secp256k1_ge_set_xy(elem, &x, &y);
   27|  2.01k|        if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  219|  4.02k|#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06
  ------------------
                      if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  220|  2.01k|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (27:14): [True: 0, False: 2.01k]
  |  Branch (27:60): [True: 0, False: 2.01k]
  ------------------
   28|  2.01k|            secp256k1_fe_is_odd(&y) != (pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |   85|      0|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
                          secp256k1_fe_is_odd(&y) != (pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  220|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (28:13): [True: 0, False: 0]
  ------------------
   29|      0|            return 0;
   30|      0|        }
   31|  2.01k|        return secp256k1_ge_is_valid_var(elem);
   32|  2.01k|    } else {
   33|      0|        return 0;
   34|      0|    }
   35|  60.5k|}
secp256k1.c:secp256k1_eckey_pubkey_serialize:
   37|   342k|static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, int compressed) {
   38|   342k|    if (secp256k1_ge_is_infinity(elem)) {
  ------------------
  |  Branch (38:9): [True: 0, False: 342k]
  ------------------
   39|      0|        return 0;
   40|      0|    }
   41|   342k|    secp256k1_fe_normalize_var(&elem->x);
  ------------------
  |  |   80|   342k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   42|   342k|    secp256k1_fe_normalize_var(&elem->y);
  ------------------
  |  |   80|   342k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   43|   342k|    secp256k1_fe_get_b32(&pub[1], &elem->x);
  ------------------
  |  |   89|   342k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   44|   342k|    if (compressed) {
  ------------------
  |  Branch (44:9): [True: 341k, False: 1.83k]
  ------------------
   45|   341k|        *size = 33;
   46|   341k|        pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |   85|   341k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
                      pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  217|   162k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
                      pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  216|   520k|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
  |  Branch (46:18): [True: 162k, False: 178k]
  ------------------
   47|   341k|    } else {
   48|  1.83k|        *size = 65;
   49|  1.83k|        pub[0] = SECP256K1_TAG_PUBKEY_UNCOMPRESSED;
  ------------------
  |  |  218|  1.83k|#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04
  ------------------
   50|  1.83k|        secp256k1_fe_get_b32(&pub[33], &elem->y);
  ------------------
  |  |   89|  1.83k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   51|  1.83k|    }
   52|   342k|    return 1;
   53|   342k|}
secp256k1.c:secp256k1_eckey_privkey_tweak_add:
   55|  62.9k|static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak) {
   56|  62.9k|    secp256k1_scalar_add(key, key, tweak);
   57|  62.9k|    return !secp256k1_scalar_is_zero(key);
   58|  62.9k|}
secp256k1.c:secp256k1_eckey_pubkey_tweak_add:
   60|  47.9k|static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge *key, const secp256k1_scalar *tweak) {
   61|  47.9k|    secp256k1_gej pt;
   62|  47.9k|    secp256k1_gej_set_ge(&pt, key);
   63|  47.9k|    secp256k1_ecmult(&pt, &pt, &secp256k1_scalar_one, tweak);
   64|       |
   65|  47.9k|    if (secp256k1_gej_is_infinity(&pt)) {
  ------------------
  |  Branch (65:9): [True: 0, False: 47.9k]
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|  47.9k|    secp256k1_ge_set_gej(key, &pt);
   69|  47.9k|    return 1;
   70|  47.9k|}

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|   298k|static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx) {
   23|   298k|    return ctx->built;
   24|   298k|}
secp256k1.c:secp256k1_ecmult_gen:
   54|   298k|static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *gn) {
   55|   298k|    uint32_t comb_off;
   56|   298k|    secp256k1_ge add;
   57|   298k|    secp256k1_fe neg;
   58|   298k|    secp256k1_ge_storage adds;
   59|   298k|    secp256k1_scalar d;
   60|       |    /* Array of uint32_t values large enough to store COMB_BITS bits. Only the bottom
   61|       |     * 8 are ever nonzero, but having the zero padding at the end if COMB_BITS>256
   62|       |     * avoids the need to deal with out-of-bounds reads from a scalar. */
   63|   298k|    uint32_t recoded[(COMB_BITS + 31) >> 5] = {0};
   64|   298k|    int first = 1, i;
   65|       |
   66|   298k|    memset(&adds, 0, sizeof(adds));
   67|       |
   68|       |    /* We want to compute R = gn*G.
   69|       |     *
   70|       |     * To blind the scalar used in the computation, we rewrite this to be
   71|       |     * R = (gn - b)*G + b*G, with a blinding value b determined by the context.
   72|       |     *
   73|       |     * The multiplication (gn-b)*G will be performed using a signed-digit multi-comb (see Section
   74|       |     * 3.3 of "Fast and compact elliptic-curve cryptography" by Mike Hamburg,
   75|       |     * https://eprint.iacr.org/2012/309).
   76|       |     *
   77|       |     * Let comb(s, P) = sum((2*s[i]-1)*2^i*P for i=0..COMB_BITS-1), where s[i] is the i'th bit of
   78|       |     * the binary representation of scalar s. So the s[i] values determine whether -2^i*P (s[i]=0)
   79|       |     * or +2^i*P (s[i]=1) are added together. COMB_BITS is at least 256, so all bits of s are
   80|       |     * covered. By manipulating:
   81|       |     *
   82|       |     *     comb(s, P) = sum((2*s[i]-1)*2^i*P for i=0..COMB_BITS-1)
   83|       |     * <=> comb(s, P) = sum((2*s[i]-1)*2^i for i=0..COMB_BITS-1) * P
   84|       |     * <=> comb(s, P) = (2*sum(s[i]*2^i for i=0..COMB_BITS-1) - sum(2^i for i=0..COMB_BITS-1)) * P
   85|       |     * <=> comb(s, P) = (2*s - (2^COMB_BITS - 1)) * P
   86|       |     *
   87|       |     * If we wanted to compute (gn-b)*G as comb(s, G), it would need to hold that
   88|       |     *
   89|       |     *     (gn - b) * G = (2*s - (2^COMB_BITS - 1)) * G
   90|       |     * <=> s = (gn - b + (2^COMB_BITS - 1))/2 (mod order)
   91|       |     *
   92|       |     * We use an alternative here that avoids the modular division by two: instead we compute
   93|       |     * (gn-b)*G as comb(d, G/2). For that to hold it must be the case that
   94|       |     *
   95|       |     *     (gn - b) * G = (2*d - (2^COMB_BITS - 1)) * (G/2)
   96|       |     * <=> d = gn - b + (2^COMB_BITS - 1)/2 (mod order)
   97|       |     *
   98|       |     * Adding precomputation, our final equations become:
   99|       |     *
  100|       |     *     ctx->scalar_offset = (2^COMB_BITS - 1)/2 - b (mod order)
  101|       |     *     ctx->ge_offset = b*G
  102|       |     *     d = gn + ctx->scalar_offset (mod order)
  103|       |     *     R = comb(d, G/2) + ctx->ge_offset
  104|       |     *
  105|       |     * comb(d, G/2) function is then computed by summing + or - 2^(i-1)*G, for i=0..COMB_BITS-1,
  106|       |     * depending on the value of the bits d[i] of the binary representation of scalar d.
  107|       |     */
  108|       |
  109|       |    /* Compute the scalar d = (gn + ctx->scalar_offset). */
  110|   298k|    secp256k1_scalar_add(&d, &ctx->scalar_offset, gn);
  111|       |    /* Convert to recoded array. */
  112|  2.68M|    for (i = 0; i < 8 && i < ((COMB_BITS + 31) >> 5); ++i) {
  ------------------
  |  |   84|  2.38M|#define COMB_BITS (COMB_BLOCKS * COMB_TEETH * COMB_SPACING)
  |  |  ------------------
  |  |  |  |   78|  2.38M|#define COMB_SPACING CEIL_DIV(COMB_RANGE, COMB_BLOCKS * COMB_TEETH)
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  2.38M|#define CEIL_DIV(x, y) (1 + ((x) - 1) / (y))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (112:17): [True: 2.38M, False: 298k]
  |  Branch (112:26): [True: 2.38M, False: 0]
  ------------------
  113|  2.38M|        recoded[i] = secp256k1_scalar_get_bits_limb32(&d, 32 * i, 32);
  114|  2.38M|    }
  115|   298k|    secp256k1_scalar_clear(&d);
  116|       |
  117|       |    /* In secp256k1_ecmult_gen_prec_table we have precomputed sums of the
  118|       |     * (2*d[i]-1) * 2^(i-1) * G points, for various combinations of i positions.
  119|       |     * We rewrite our equation in terms of these table entries.
  120|       |     *
  121|       |     * Let mask(b) = sum(2^((b*COMB_TEETH + t)*COMB_SPACING) for t=0..COMB_TEETH-1),
  122|       |     * with b ranging from 0 to COMB_BLOCKS-1. So for example with COMB_BLOCKS=11,
  123|       |     * COMB_TEETH=6, COMB_SPACING=4, we would have:
  124|       |     *   mask(0)  = 2^0   + 2^4   + 2^8   + 2^12  + 2^16  + 2^20,
  125|       |     *   mask(1)  = 2^24  + 2^28  + 2^32  + 2^36  + 2^40  + 2^44,
  126|       |     *   mask(2)  = 2^48  + 2^52  + 2^56  + 2^60  + 2^64  + 2^68,
  127|       |     *   ...
  128|       |     *   mask(10) = 2^240 + 2^244 + 2^248 + 2^252 + 2^256 + 2^260
  129|       |     *
  130|       |     * We will split up the bits d[i] using these masks. Specifically, each mask is
  131|       |     * used COMB_SPACING times, with different shifts:
  132|       |     *
  133|       |     * d = (d & mask(0)<<0) + (d & mask(1)<<0) + ... + (d & mask(COMB_BLOCKS-1)<<0) +
  134|       |     *     (d & mask(0)<<1) + (d & mask(1)<<1) + ... + (d & mask(COMB_BLOCKS-1)<<1) +
  135|       |     *     ...
  136|       |     *     (d & mask(0)<<(COMB_SPACING-1)) + ...
  137|       |     *
  138|       |     * Now define table(b, m) = (m - mask(b)/2) * G, and we will precompute these values for
  139|       |     * b=0..COMB_BLOCKS-1, and for all values m which (d & mask(b)) can take (so m can take on
  140|       |     * 2^COMB_TEETH distinct values).
  141|       |     *
  142|       |     * If m=(d & mask(b)), then table(b, m) is the sum of 2^i * (2*d[i]-1) * G/2, with i
  143|       |     * iterating over the set bits in mask(b). In our example, table(2, 2^48 + 2^56 + 2^68)
  144|       |     * would equal (2^48 - 2^52 + 2^56 - 2^60 - 2^64 + 2^68) * G/2.
  145|       |     *
  146|       |     * With that, we can rewrite comb(d, G/2) as:
  147|       |     *
  148|       |     *     2^0 * (table(0, d>>0 & mask(0)) + ... + table(COMB_BLOCKS-1, d>>0 & mask(COMP_BLOCKS-1)))
  149|       |     *   + 2^1 * (table(0, d>>1 & mask(0)) + ... + table(COMB_BLOCKS-1, d>>1 & mask(COMP_BLOCKS-1)))
  150|       |     *   + 2^2 * (table(0, d>>2 & mask(0)) + ... + table(COMB_BLOCKS-1, d>>2 & mask(COMP_BLOCKS-1)))
  151|       |     *   + ...
  152|       |     *   + 2^(COMB_SPACING-1) * (table(0, d>>(COMB_SPACING-1) & mask(0)) + ...)
  153|       |     *
  154|       |     * Or more generically as
  155|       |     *
  156|       |     *   sum(2^i * sum(table(b, d>>i & mask(b)), b=0..COMB_BLOCKS-1), i=0..COMB_SPACING-1)
  157|       |     *
  158|       |     * This is implemented using an outer loop that runs in reverse order over the lines of this
  159|       |     * equation, which in each iteration runs an inner loop that adds the terms of that line and
  160|       |     * then doubles the result before proceeding to the next line.
  161|       |     *
  162|       |     * In pseudocode:
  163|       |     *   c = infinity
  164|       |     *   for comb_off in range(COMB_SPACING - 1, -1, -1):
  165|       |     *     for block in range(COMB_BLOCKS):
  166|       |     *       c += table(block, (d >> comb_off) & mask(block))
  167|       |     *     if comb_off > 0:
  168|       |     *       c = 2*c
  169|       |     *   return c
  170|       |     *
  171|       |     * This computes c = comb(d, G/2), and thus finally R = c + ctx->ge_offset. Note that it would
  172|       |     * be possible to apply an initial offset instead of a final offset (moving ge_offset to take
  173|       |     * the place of infinity above), but the chosen approach allows using (in a future improvement)
  174|       |     * an incomplete addition formula for most of the multiplication.
  175|       |     *
  176|       |     * The last question is how to implement the table(b, m) function. For any value of b,
  177|       |     * m=(d & mask(b)) can only take on at most 2^COMB_TEETH possible values (the last one may have
  178|       |     * fewer as there mask(b) may exceed the curve order). So we could create COMB_BLOCK tables
  179|       |     * which contain a value for each such m value.
  180|       |     *
  181|       |     * Now note that if m=(d & mask(b)), then flipping the relevant bits of m results in negating
  182|       |     * the result of table(b, m). This is because table(b,m XOR mask(b)) = table(b, mask(b) - m) =
  183|       |     * (mask(b) - m - mask(b)/2)*G = (-m + mask(b)/2)*G = -(m - mask(b)/2)*G = -table(b, m).
  184|       |     * Because of this it suffices to only store the first half of the m values for every b. If an
  185|       |     * entry from the second half is needed, we look up its bit-flipped version instead, and negate
  186|       |     * it.
  187|       |     *
  188|       |     * secp256k1_ecmult_gen_prec_table[b][index] stores the table(b, m) entries. Index
  189|       |     * is the relevant mask(b) bits of m packed together without gaps. */
  190|       |
  191|       |    /* Outer loop: iterate over comb_off from COMB_SPACING - 1 down to 0. */
  192|   298k|    comb_off = COMB_SPACING - 1;
  ------------------
  |  |   78|   298k|#define COMB_SPACING CEIL_DIV(COMB_RANGE, COMB_BLOCKS * COMB_TEETH)
  |  |  ------------------
  |  |  |  |  180|   298k|#define CEIL_DIV(x, y) (1 + ((x) - 1) / (y))
  |  |  ------------------
  ------------------
  193|   298k|    while (1) {
  ------------------
  |  Branch (193:12): [Folded - Ignored]
  ------------------
  194|   298k|        uint32_t block;
  195|   298k|        uint32_t bit_pos = comb_off;
  196|       |        /* Inner loop: for each block, add table entries to the result. */
  197|  13.1M|        for (block = 0; block < COMB_BLOCKS; ++block) {
  ------------------
  |  Branch (197:25): [True: 12.8M, False: 298k]
  ------------------
  198|       |            /* Gather the mask(block)-selected bits of d into bits. They're packed:
  199|       |             * bits[tooth] = d[(block*COMB_TEETH + tooth)*COMB_SPACING + comb_off]. */
  200|  12.8M|            uint32_t bits = 0, sign, abs, index, tooth;
  201|       |            /* Instead of reading individual bits here to construct the bits variable,
  202|       |             * build up the result by xoring rotated reads together. In every iteration,
  203|       |             * one additional bit is made correct, starting at the bottom. The bits
  204|       |             * above that contain junk. This reduces leakage by avoiding computations
  205|       |             * on variables that can have only a low number of possible values (e.g.,
  206|       |             * just two values when reading a single bit into a variable.) See:
  207|       |             * https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-alam.pdf
  208|       |             */
  209|  89.7M|            for (tooth = 0; tooth < COMB_TEETH; ++tooth) {
  ------------------
  |  Branch (209:29): [True: 76.8M, False: 12.8M]
  ------------------
  210|       |                /* Construct bitdata s.t. the bottom bit is the bit we'd like to read.
  211|       |                 *
  212|       |                 * We could just set bitdata = recoded[bit_pos >> 5] >> (bit_pos & 0x1f)
  213|       |                 * but this would simply discard the bits that fall off at the bottom,
  214|       |                 * and thus, for example, bitdata could still have only two values if we
  215|       |                 * happen to shift by exactly 31 positions. We use a rotation instead,
  216|       |                 * which ensures that bitdata doesn't loose entropy. This relies on the
  217|       |                 * rotation being atomic, i.e., the compiler emitting an actual rot
  218|       |                 * instruction. */
  219|  76.8M|                uint32_t bitdata = secp256k1_rotr32(recoded[bit_pos >> 5], bit_pos & 0x1f);
  220|       |
  221|       |                /* Clear the bit at position tooth, but sssh, don't tell clang. */
  222|  76.8M|                uint32_t volatile vmask = ~(1 << tooth);
  223|  76.8M|                bits &= vmask;
  224|       |
  225|       |                /* Write the bit into position tooth (and junk into higher bits). */
  226|  76.8M|                bits ^= bitdata << tooth;
  227|  76.8M|                bit_pos += COMB_SPACING;
  ------------------
  |  |   78|  76.8M|#define COMB_SPACING CEIL_DIV(COMB_RANGE, COMB_BLOCKS * COMB_TEETH)
  |  |  ------------------
  |  |  |  |  180|  76.8M|#define CEIL_DIV(x, y) (1 + ((x) - 1) / (y))
  |  |  ------------------
  ------------------
  228|  76.8M|            }
  229|       |
  230|       |            /* If the top bit of bits is 1, flip them all (corresponding to looking up
  231|       |             * the negated table value), and remember to negate the result in sign. */
  232|  12.8M|            sign = (bits >> (COMB_TEETH - 1)) & 1;
  233|  12.8M|            abs = (bits ^ -sign) & (COMB_POINTS - 1);
  ------------------
  |  |   86|  12.8M|#define COMB_POINTS (1 << (COMB_TEETH - 1))
  ------------------
  234|  12.8M|            VERIFY_CHECK(sign == 0 || sign == 1);
  235|  12.8M|            VERIFY_CHECK(abs < COMB_POINTS);
  236|       |
  237|       |            /** This uses a conditional move to avoid any secret data in array indexes.
  238|       |             *   _Any_ use of secret indexes has been demonstrated to result in timing
  239|       |             *   sidechannels, even when the cache-line access patterns are uniform.
  240|       |             *  See also:
  241|       |             *   "A word of warning", CHES 2013 Rump Session, by Daniel J. Bernstein and Peter Schwabe
  242|       |             *    (https://cryptojedi.org/peter/data/chesrump-20130822.pdf) and
  243|       |             *   "Cache Attacks and Countermeasures: the Case of AES", RSA 2006,
  244|       |             *    by Dag Arne Osvik, Adi Shamir, and Eran Tromer
  245|       |             *    (https://www.tau.ac.il/~tromer/papers/cache.pdf)
  246|       |             */
  247|   422M|            for (index = 0; index < COMB_POINTS; ++index) {
  ------------------
  |  |   86|   422M|#define COMB_POINTS (1 << (COMB_TEETH - 1))
  ------------------
  |  Branch (247:29): [True: 410M, False: 12.8M]
  ------------------
  248|   410M|                secp256k1_ge_storage_cmov(&adds, &secp256k1_ecmult_gen_prec_table[block][index], index == abs);
  249|   410M|            }
  250|       |
  251|       |            /* Set add=adds or add=-adds, in constant time, based on sign. */
  252|  12.8M|            secp256k1_ge_from_storage(&add, &adds);
  253|  12.8M|            secp256k1_fe_negate(&neg, &add.y, 1);
  ------------------
  |  |  211|  12.8M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  12.8M|            secp256k1_fe_cmov(&add.y, &neg, sign);
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  255|       |
  256|       |            /* Add the looked up and conditionally negated value to r. */
  257|  12.8M|            if (EXPECT(first, 0)) {
  ------------------
  |  |  136|  12.8M|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  ------------------
  |  |  |  Branch (136:21): [True: 298k, False: 12.5M]
  |  |  ------------------
  ------------------
  258|       |                /* If this is the first table lookup, we can skip addition. */
  259|   298k|                secp256k1_gej_set_ge(r, &add);
  260|       |                /* Give the entry a random Z coordinate to blind intermediary results. */
  261|   298k|                secp256k1_gej_rescale(r, &ctx->proj_blind);
  262|   298k|                first = 0;
  263|  12.5M|            } else {
  264|  12.5M|                secp256k1_gej_add_ge(r, r, &add);
  265|  12.5M|            }
  266|  12.8M|        }
  267|       |
  268|       |        /* Double the result, except in the last iteration. */
  269|   298k|        if (comb_off-- == 0) break;
  ------------------
  |  Branch (269:13): [True: 298k, False: 0]
  ------------------
  270|      0|        secp256k1_gej_double(r, r);
  271|      0|    }
  272|       |
  273|       |    /* Correct for the scalar_offset added at the start (ge_offset = b*G, while b was
  274|       |     * subtracted from the input scalar gn). */
  275|   298k|    secp256k1_gej_add_ge(r, r, &ctx->ge_offset);
  276|       |
  277|       |    /* Cleanup. */
  278|   298k|    secp256k1_fe_clear(&neg);
  279|   298k|    secp256k1_ge_clear(&add);
  280|   298k|    secp256k1_memclear(&adds, sizeof(adds));
  281|   298k|    secp256k1_memclear(&recoded, sizeof(recoded));
  282|   298k|}

secp256k1.c:secp256k1_ecmult:
  349|  62.6k|static void secp256k1_ecmult(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) {
  350|  62.6k|    secp256k1_fe aux[ECMULT_TABLE_SIZE(WINDOW_A)];
  351|  62.6k|    secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)];
  352|  62.6k|    struct secp256k1_strauss_point_state ps[1];
  353|  62.6k|    struct secp256k1_strauss_state state;
  354|       |
  355|  62.6k|    state.aux = aux;
  356|  62.6k|    state.pre_a = pre_a;
  357|  62.6k|    state.ps = ps;
  358|  62.6k|    secp256k1_ecmult_strauss_wnaf(&state, r, 1, a, na, ng);
  359|  62.6k|}
secp256k1.c:secp256k1_ecmult_strauss_wnaf:
  237|  62.6k|static void secp256k1_ecmult_strauss_wnaf(const struct secp256k1_strauss_state *state, secp256k1_gej *r, size_t num, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) {
  238|  62.6k|    secp256k1_ge tmpa;
  239|  62.6k|    secp256k1_fe Z;
  240|       |    /* Split G factors. */
  241|  62.6k|    secp256k1_scalar ng_1, ng_128;
  242|  62.6k|    int wnaf_ng_1[129];
  243|  62.6k|    int bits_ng_1 = 0;
  244|  62.6k|    int wnaf_ng_128[129];
  245|  62.6k|    int bits_ng_128 = 0;
  246|  62.6k|    int i;
  247|  62.6k|    int bits = 0;
  248|  62.6k|    size_t np;
  249|  62.6k|    size_t no = 0;
  250|       |
  251|  62.6k|    secp256k1_fe_set_int(&Z, 1);
  ------------------
  |  |   83|  62.6k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  252|   125k|    for (np = 0; np < num; ++np) {
  ------------------
  |  Branch (252:18): [True: 62.6k, False: 62.6k]
  ------------------
  253|  62.6k|        secp256k1_gej tmp;
  254|  62.6k|        secp256k1_scalar na_1, na_lam;
  255|  62.6k|        if (secp256k1_scalar_is_zero(&na[np]) || secp256k1_gej_is_infinity(&a[np])) {
  ------------------
  |  Branch (255:13): [True: 0, False: 62.6k]
  |  Branch (255:50): [True: 0, False: 62.6k]
  ------------------
  256|      0|            continue;
  257|      0|        }
  258|       |        /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */
  259|  62.6k|        secp256k1_scalar_split_lambda(&na_1, &na_lam, &na[np]);
  260|       |
  261|       |        /* build wnaf representation for na_1 and na_lam. */
  262|  62.6k|        state->ps[no].bits_na_1   = secp256k1_ecmult_wnaf(state->ps[no].wnaf_na_1,   129, &na_1,   WINDOW_A);
  ------------------
  |  |   32|  62.6k|#  define WINDOW_A 5
  ------------------
  263|  62.6k|        state->ps[no].bits_na_lam = secp256k1_ecmult_wnaf(state->ps[no].wnaf_na_lam, 129, &na_lam, WINDOW_A);
  ------------------
  |  |   32|  62.6k|#  define WINDOW_A 5
  ------------------
  264|  62.6k|        VERIFY_CHECK(state->ps[no].bits_na_1 <= 129);
  265|  62.6k|        VERIFY_CHECK(state->ps[no].bits_na_lam <= 129);
  266|  62.6k|        if (state->ps[no].bits_na_1 > bits) {
  ------------------
  |  Branch (266:13): [True: 62.6k, False: 0]
  ------------------
  267|  62.6k|            bits = state->ps[no].bits_na_1;
  268|  62.6k|        }
  269|  62.6k|        if (state->ps[no].bits_na_lam > bits) {
  ------------------
  |  Branch (269:13): [True: 5.89k, False: 56.7k]
  ------------------
  270|  5.89k|            bits = state->ps[no].bits_na_lam;
  271|  5.89k|        }
  272|       |
  273|       |        /* Calculate odd multiples of a.
  274|       |         * All multiples are brought to the same Z 'denominator', which is stored
  275|       |         * in Z. Due to secp256k1' isomorphism we can do all operations pretending
  276|       |         * that the Z coordinate was 1, use affine addition formulae, and correct
  277|       |         * the Z coordinate of the result once at the end.
  278|       |         * The exception is the precomputed G table points, which are actually
  279|       |         * affine. Compared to the base used for other points, they have a Z ratio
  280|       |         * of 1/Z, so we can use secp256k1_gej_add_zinv_var, which uses the same
  281|       |         * isomorphism to efficiently add with a known Z inverse.
  282|       |         */
  283|  62.6k|        tmp = a[np];
  284|  62.6k|        if (no) {
  ------------------
  |  Branch (284:13): [True: 0, False: 62.6k]
  ------------------
  285|      0|            secp256k1_gej_rescale(&tmp, &Z);
  286|      0|        }
  287|  62.6k|        secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), state->pre_a + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &Z, &tmp);
  ------------------
  |  |   41|  62.6k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                      secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), state->pre_a + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &Z, &tmp);
  ------------------
  |  |   41|  62.6k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                      secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), state->pre_a + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &Z, &tmp);
  ------------------
  |  |   41|  62.6k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
  288|  62.6k|        if (no) secp256k1_fe_mul(state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &(a[np].z));
  ------------------
  |  |   93|      0|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                      if (no) secp256k1_fe_mul(state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &(a[np].z));
  ------------------
  |  |   41|      0|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                      if (no) secp256k1_fe_mul(state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + no * ECMULT_TABLE_SIZE(WINDOW_A), &(a[np].z));
  ------------------
  |  |   41|      0|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
  |  Branch (288:13): [True: 0, False: 62.6k]
  ------------------
  289|       |
  290|  62.6k|        ++no;
  291|  62.6k|    }
  292|       |
  293|       |    /* Bring them to the same Z denominator. */
  294|  62.6k|    if (no) {
  ------------------
  |  Branch (294:9): [True: 62.6k, False: 0]
  ------------------
  295|  62.6k|        secp256k1_ge_table_set_globalz(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, state->aux);
  ------------------
  |  |   41|  62.6k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
  296|  62.6k|    }
  297|       |
  298|   125k|    for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (298:18): [True: 62.6k, False: 62.6k]
  ------------------
  299|   563k|        for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) {
  ------------------
  |  |   41|   563k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
  |  Branch (299:21): [True: 500k, False: 62.6k]
  ------------------
  300|   500k|            secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + i], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + i].x, &secp256k1_const_beta);
  ------------------
  |  |   93|   500k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                          secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + i], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + i].x, &secp256k1_const_beta);
  ------------------
  |  |   41|   500k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                          secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + i], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + i].x, &secp256k1_const_beta);
  ------------------
  |  |   41|   500k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
  301|   500k|        }
  302|  62.6k|    }
  303|       |
  304|  62.6k|    if (ng) {
  ------------------
  |  Branch (304:9): [True: 62.6k, False: 0]
  ------------------
  305|       |        /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */
  306|  62.6k|        secp256k1_scalar_split_128(&ng_1, &ng_128, ng);
  307|       |
  308|       |        /* Build wnaf representation for ng_1 and ng_128 */
  309|  62.6k|        bits_ng_1   = secp256k1_ecmult_wnaf(wnaf_ng_1,   129, &ng_1,   WINDOW_G);
  ------------------
  |  |   29|  62.6k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  310|  62.6k|        bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, 129, &ng_128, WINDOW_G);
  ------------------
  |  |   29|  62.6k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  311|  62.6k|        if (bits_ng_1 > bits) {
  ------------------
  |  Branch (311:13): [True: 51.3k, False: 11.2k]
  ------------------
  312|  51.3k|            bits = bits_ng_1;
  313|  51.3k|        }
  314|  62.6k|        if (bits_ng_128 > bits) {
  ------------------
  |  Branch (314:13): [True: 26.6k, False: 35.9k]
  ------------------
  315|  26.6k|            bits = bits_ng_128;
  316|  26.6k|        }
  317|  62.6k|    }
  318|       |
  319|  62.6k|    secp256k1_gej_set_infinity(r);
  320|       |
  321|  7.91M|    for (i = bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (321:24): [True: 7.85M, False: 62.6k]
  ------------------
  322|  7.85M|        int n;
  323|  7.85M|        secp256k1_gej_double_var(r, r, NULL);
  324|  15.7M|        for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (324:22): [True: 7.85M, False: 7.85M]
  ------------------
  325|  7.85M|            if (i < state->ps[np].bits_na_1 && (n = state->ps[np].wnaf_na_1[i])) {
  ------------------
  |  Branch (325:17): [True: 1.89M, False: 5.96M]
  |  Branch (325:48): [True: 365k, False: 1.52M]
  ------------------
  326|   365k|                secp256k1_ecmult_table_get_ge(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   41|   365k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                              secp256k1_ecmult_table_get_ge(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   32|   365k|#  define WINDOW_A 5
  ------------------
  327|   365k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  328|   365k|            }
  329|  7.85M|            if (i < state->ps[np].bits_na_lam && (n = state->ps[np].wnaf_na_lam[i])) {
  ------------------
  |  Branch (329:17): [True: 1.84M, False: 6.01M]
  |  Branch (329:50): [True: 317k, False: 1.52M]
  ------------------
  330|   317k|                secp256k1_ecmult_table_get_ge_lambda(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   41|   317k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                              secp256k1_ecmult_table_get_ge_lambda(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   41|   317k|#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
  ------------------
                              secp256k1_ecmult_table_get_ge_lambda(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), state->aux + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   32|   317k|#  define WINDOW_A 5
  ------------------
  331|   317k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  332|   317k|            }
  333|  7.85M|        }
  334|  7.85M|        if (i < bits_ng_1 && (n = wnaf_ng_1[i])) {
  ------------------
  |  Branch (334:13): [True: 7.61M, False: 241k]
  |  Branch (334:30): [True: 530k, False: 7.08M]
  ------------------
  335|   530k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g, n, WINDOW_G);
  ------------------
  |  |   29|   530k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  336|   530k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  337|   530k|        }
  338|  7.85M|        if (i < bits_ng_128 && (n = wnaf_ng_128[i])) {
  ------------------
  |  Branch (338:13): [True: 7.63M, False: 218k]
  |  Branch (338:32): [True: 534k, False: 7.10M]
  ------------------
  339|   534k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g_128, n, WINDOW_G);
  ------------------
  |  |   29|   534k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  340|   534k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  341|   534k|        }
  342|  7.85M|    }
  343|       |
  344|  62.6k|    if (!r->infinity) {
  ------------------
  |  Branch (344:9): [True: 62.6k, False: 0]
  ------------------
  345|  62.6k|        secp256k1_fe_mul(&r->z, &r->z, &Z);
  ------------------
  |  |   93|  62.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  346|  62.6k|    }
  347|  62.6k|}
secp256k1.c:secp256k1_ecmult_wnaf:
  162|   250k|static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a, int w) {
  163|   250k|    secp256k1_scalar s;
  164|   250k|    int last_set_bit = -1;
  165|   250k|    int bit = 0;
  166|   250k|    int sign = 1;
  167|   250k|    int carry = 0;
  168|       |
  169|   250k|    VERIFY_CHECK(wnaf != NULL);
  170|   250k|    VERIFY_CHECK(0 <= len && len <= 256);
  171|   250k|    VERIFY_CHECK(a != NULL);
  172|   250k|    VERIFY_CHECK(2 <= w && w <= 31);
  173|       |
  174|  32.5M|    for (bit = 0; bit < len; bit++) {
  ------------------
  |  Branch (174:19): [True: 32.3M, False: 250k]
  ------------------
  175|  32.3M|        wnaf[bit] = 0;
  176|  32.3M|    }
  177|       |
  178|   250k|    s = *a;
  179|   250k|    if (secp256k1_scalar_get_bits_limb32(&s, 255, 1)) {
  ------------------
  |  Branch (179:9): [True: 14.7k, False: 235k]
  ------------------
  180|  14.7k|        secp256k1_scalar_negate(&s, &s);
  181|  14.7k|        sign = -1;
  182|  14.7k|    }
  183|       |
  184|   250k|    bit = 0;
  185|  15.8M|    while (bit < len) {
  ------------------
  |  Branch (185:12): [True: 15.5M, False: 250k]
  ------------------
  186|  15.5M|        int now;
  187|  15.5M|        int word;
  188|  15.5M|        if (secp256k1_scalar_get_bits_limb32(&s, bit, 1) == (unsigned int)carry) {
  ------------------
  |  Branch (188:13): [True: 13.8M, False: 1.74M]
  ------------------
  189|  13.8M|            bit++;
  190|  13.8M|            continue;
  191|  13.8M|        }
  192|       |
  193|  1.74M|        now = w;
  194|  1.74M|        if (now > len - bit) {
  ------------------
  |  Branch (194:13): [True: 115k, False: 1.63M]
  ------------------
  195|   115k|            now = len - bit;
  196|   115k|        }
  197|       |
  198|  1.74M|        word = secp256k1_scalar_get_bits_var(&s, bit, now) + carry;
  199|       |
  200|  1.74M|        carry = (word >> (w-1)) & 1;
  201|  1.74M|        word -= carry << w;
  202|       |
  203|  1.74M|        wnaf[bit] = sign * word;
  204|  1.74M|        last_set_bit = bit;
  205|       |
  206|  1.74M|        bit += now;
  207|  1.74M|    }
  208|       |#ifdef VERIFY
  209|       |    {
  210|       |        int verify_bit = bit;
  211|       |
  212|       |        VERIFY_CHECK(carry == 0);
  213|       |
  214|       |        while (verify_bit < 256) {
  215|       |            VERIFY_CHECK(secp256k1_scalar_get_bits_limb32(&s, verify_bit, 1) == 0);
  216|       |            verify_bit++;
  217|       |        }
  218|       |    }
  219|       |#endif
  220|   250k|    return last_set_bit + 1;
  221|   250k|}
secp256k1.c:secp256k1_ecmult_odd_multiples_table:
   73|  62.6k|static void secp256k1_ecmult_odd_multiples_table(int n, secp256k1_ge *pre_a, secp256k1_fe *zr, secp256k1_fe *z, const secp256k1_gej *a) {
   74|  62.6k|    secp256k1_gej d, ai;
   75|  62.6k|    secp256k1_ge d_ge;
   76|  62.6k|    int i;
   77|       |
   78|  62.6k|    VERIFY_CHECK(!a->infinity);
   79|       |
   80|  62.6k|    secp256k1_gej_double_var(&d, a, NULL);
   81|       |
   82|       |    /*
   83|       |     * Perform the additions using an isomorphic curve Y^2 = X^3 + 7*C^6 where C := d.z.
   84|       |     * The isomorphism, phi, maps a secp256k1 point (x, y) to the point (x*C^2, y*C^3) on the other curve.
   85|       |     * In Jacobian coordinates phi maps (x, y, z) to (x*C^2, y*C^3, z) or, equivalently to (x, y, z/C).
   86|       |     *
   87|       |     *     phi(x, y, z) = (x*C^2, y*C^3, z) = (x, y, z/C)
   88|       |     *   d_ge := phi(d) = (d.x, d.y, 1)
   89|       |     *     ai := phi(a) = (a.x*C^2, a.y*C^3, a.z)
   90|       |     *
   91|       |     * The group addition functions work correctly on these isomorphic curves.
   92|       |     * In particular phi(d) is easy to represent in affine coordinates under this isomorphism.
   93|       |     * This lets us use the faster secp256k1_gej_add_ge_var group addition function that we wouldn't be able to use otherwise.
   94|       |     */
   95|  62.6k|    secp256k1_ge_set_xy(&d_ge, &d.x, &d.y);
   96|  62.6k|    secp256k1_ge_set_gej_zinv(&pre_a[0], a, &d.z);
   97|  62.6k|    secp256k1_gej_set_ge(&ai, &pre_a[0]);
   98|  62.6k|    ai.z = a->z;
   99|       |
  100|       |    /* pre_a[0] is the point (a.x*C^2, a.y*C^3, a.z*C) which is equivalent to a.
  101|       |     * Set zr[0] to C, which is the ratio between the omitted z(pre_a[0]) value and a.z.
  102|       |     */
  103|  62.6k|    zr[0] = d.z;
  104|       |
  105|   500k|    for (i = 1; i < n; i++) {
  ------------------
  |  Branch (105:17): [True: 438k, False: 62.6k]
  ------------------
  106|   438k|        secp256k1_gej_add_ge_var(&ai, &ai, &d_ge, &zr[i]);
  107|   438k|        secp256k1_ge_set_xy(&pre_a[i], &ai.x, &ai.y);
  108|   438k|    }
  109|       |
  110|       |    /* Multiply the last z-coordinate by C to undo the isomorphism.
  111|       |     * Since the z-coordinates of the pre_a values are implied by the zr array of z-coordinate ratios,
  112|       |     * undoing the isomorphism here undoes the isomorphism for all pre_a values.
  113|       |     */
  114|  62.6k|    secp256k1_fe_mul(z, &ai.z, &d.z);
  ------------------
  |  |   93|  62.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  115|  62.6k|}
secp256k1.c:secp256k1_ecmult_table_get_ge:
  125|   365k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge(secp256k1_ge *r, const secp256k1_ge *pre, int n, int w) {
  126|   365k|    secp256k1_ecmult_table_verify(n,w);
  127|   365k|    if (n > 0) {
  ------------------
  |  Branch (127:9): [True: 207k, False: 158k]
  ------------------
  128|   207k|        *r = pre[(n-1)/2];
  129|   207k|    } else {
  130|   158k|        *r = pre[(-n-1)/2];
  131|   158k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|   158k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|   158k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|   158k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 158k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|   158k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 158k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|   158k|    } \
  |  |  |  |   84|   158k|    stmt; \
  |  |  |  |   85|   158k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|   158k|    }
  133|   365k|}
secp256k1.c:secp256k1_ecmult_table_verify:
  117|  1.74M|SECP256K1_INLINE static void secp256k1_ecmult_table_verify(int n, int w) {
  118|  1.74M|    (void)n;
  119|  1.74M|    (void)w;
  120|  1.74M|    VERIFY_CHECK(((n) & 1) == 1);
  121|  1.74M|    VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1));
  122|  1.74M|    VERIFY_CHECK((n) <=  ((1 << ((w)-1)) - 1));
  123|  1.74M|}
secp256k1.c:secp256k1_ecmult_table_get_ge_lambda:
  135|   317k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge_lambda(secp256k1_ge *r, const secp256k1_ge *pre, const secp256k1_fe *x, int n, int w) {
  136|   317k|    secp256k1_ecmult_table_verify(n,w);
  137|   317k|    if (n > 0) {
  ------------------
  |  Branch (137:9): [True: 158k, False: 158k]
  ------------------
  138|   158k|        secp256k1_ge_set_xy(r, &x[(n-1)/2], &pre[(n-1)/2].y);
  139|   158k|    } else {
  140|   158k|        secp256k1_ge_set_xy(r, &x[(-n-1)/2], &pre[(-n-1)/2].y);
  141|   158k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|   158k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|   158k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|   158k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 158k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|   158k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 158k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|   158k|    } \
  |  |  |  |   84|   158k|    stmt; \
  |  |  |  |   85|   158k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  142|   158k|    }
  143|   317k|}
secp256k1.c:secp256k1_ecmult_table_get_ge_storage:
  145|  1.06M|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge_storage(secp256k1_ge *r, const secp256k1_ge_storage *pre, int n, int w) {
  146|  1.06M|    secp256k1_ecmult_table_verify(n,w);
  147|  1.06M|    if (n > 0) {
  ------------------
  |  Branch (147:9): [True: 591k, False: 473k]
  ------------------
  148|   591k|        secp256k1_ge_from_storage(r, &pre[(n-1)/2]);
  149|   591k|    } else {
  150|   473k|        secp256k1_ge_from_storage(r, &pre[(-n-1)/2]);
  151|   473k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|   473k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|   473k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|   473k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 473k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|   473k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 473k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|   473k|    } \
  |  |  |  |   84|   473k|    stmt; \
  |  |  |  |   85|   473k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|   473k|    }
  153|  1.06M|}

secp256k1.c:secp256k1_fe_impl_sqr:
  345|   124M|SECP256K1_INLINE static void secp256k1_fe_impl_sqr(secp256k1_fe *r, const secp256k1_fe *a) {
  346|   124M|    secp256k1_fe_sqr_inner(r->n, a->n);
  347|   124M|}
secp256k1.c:secp256k1_fe_impl_mul:
  341|   137M|SECP256K1_INLINE static void secp256k1_fe_impl_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) {
  342|   137M|    secp256k1_fe_mul_inner(r->n, a->n, b->n);
  343|   137M|}
secp256k1.c:secp256k1_fe_impl_add_int:
  329|  86.8k|SECP256K1_INLINE static void secp256k1_fe_impl_add_int(secp256k1_fe *r, int a) {
  330|  86.8k|    r->n[0] += a;
  331|  86.8k|}
secp256k1.c:secp256k1_fe_impl_to_storage:
  428|   842k|static void secp256k1_fe_impl_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) {
  429|   842k|    r->n[0] = a->n[0] | a->n[1] << 52;
  430|   842k|    r->n[1] = a->n[1] >> 12 | a->n[2] << 40;
  431|   842k|    r->n[2] = a->n[2] >> 24 | a->n[3] << 28;
  432|   842k|    r->n[3] = a->n[3] >> 36 | a->n[4] << 16;
  433|   842k|}
secp256k1.c:secp256k1_fe_impl_from_storage:
  435|  28.5M|static SECP256K1_INLINE void secp256k1_fe_impl_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) {
  436|  28.5M|    r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL;
  437|  28.5M|    r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL);
  438|  28.5M|    r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL);
  439|  28.5M|    r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL);
  440|  28.5M|    r->n[4] = a->n[3] >> 16;
  441|  28.5M|}
secp256k1.c:secp256k1_fe_impl_is_zero:
  206|   400k|SECP256K1_INLINE static int secp256k1_fe_impl_is_zero(const secp256k1_fe *a) {
  207|   400k|    const uint64_t *t = a->n;
  208|   400k|    return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
  209|   400k|}
secp256k1.c:secp256k1_fe_impl_add:
  333|   136M|SECP256K1_INLINE static void secp256k1_fe_impl_add(secp256k1_fe *r, const secp256k1_fe *a) {
  334|   136M|    r->n[0] += a->n[0];
  335|   136M|    r->n[1] += a->n[1];
  336|   136M|    r->n[2] += a->n[2];
  337|   136M|    r->n[3] += a->n[3];
  338|   136M|    r->n[4] += a->n[4];
  339|   136M|}
secp256k1.c:secp256k1_fe_storage_cmov:
  416|   820M|static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) {
  417|   820M|    uint64_t mask0, mask1;
  418|   820M|    volatile int vflag = flag;
  419|   820M|    SECP256K1_CHECKMEM_CHECK_VERIFY(r->n, sizeof(r->n));
  ------------------
  |  |   99|   820M|#define SECP256K1_CHECKMEM_CHECK_VERIFY(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   820M|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|   820M|    mask0 = vflag + ~((uint64_t)0);
  421|   820M|    mask1 = ~mask0;
  422|   820M|    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
  423|   820M|    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
  424|   820M|    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
  425|   820M|    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
  426|   820M|}
secp256k1.c:secp256k1_fe_impl_negate_unchecked:
  306|  74.2M|SECP256K1_INLINE static void secp256k1_fe_impl_negate_unchecked(secp256k1_fe *r, const secp256k1_fe *a, int m) {
  307|       |    /* For all legal values of m (0..31), the following properties hold: */
  308|  74.2M|    VERIFY_CHECK(0xFFFFEFFFFFC2FULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  309|  74.2M|    VERIFY_CHECK(0xFFFFFFFFFFFFFULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  310|  74.2M|    VERIFY_CHECK(0x0FFFFFFFFFFFFULL * 2 * (m + 1) >= 0x0FFFFFFFFFFFFULL * 2 * m);
  311|       |
  312|       |    /* Due to the properties above, the left hand in the subtractions below is never less than
  313|       |     * the right hand. */
  314|  74.2M|    r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0];
  315|  74.2M|    r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1];
  316|  74.2M|    r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2];
  317|  74.2M|    r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3];
  318|  74.2M|    r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4];
  319|  74.2M|}
secp256k1.c:secp256k1_fe_impl_cmov:
  349|  89.7M|SECP256K1_INLINE static void secp256k1_fe_impl_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) {
  350|  89.7M|    uint64_t mask0, mask1;
  351|  89.7M|    volatile int vflag = flag;
  352|  89.7M|    SECP256K1_CHECKMEM_CHECK_VERIFY(r->n, sizeof(r->n));
  ------------------
  |  |   99|  89.7M|#define SECP256K1_CHECKMEM_CHECK_VERIFY(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  89.7M|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|  89.7M|    mask0 = vflag + ~((uint64_t)0);
  354|  89.7M|    mask1 = ~mask0;
  355|  89.7M|    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
  356|  89.7M|    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
  357|  89.7M|    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
  358|  89.7M|    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
  359|  89.7M|    r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1);
  360|  89.7M|}
secp256k1.c:secp256k1_fe_impl_mul_int_unchecked:
  321|  33.4M|SECP256K1_INLINE static void secp256k1_fe_impl_mul_int_unchecked(secp256k1_fe *r, int a) {
  322|  33.4M|    r->n[0] *= a;
  323|  33.4M|    r->n[1] *= a;
  324|  33.4M|    r->n[2] *= a;
  325|  33.4M|    r->n[3] *= a;
  326|  33.4M|    r->n[4] *= a;
  327|  33.4M|}
secp256k1.c:secp256k1_fe_impl_half:
  362|  20.6M|static SECP256K1_INLINE void secp256k1_fe_impl_half(secp256k1_fe *r) {
  363|  20.6M|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
  364|  20.6M|    uint64_t one = (uint64_t)1;
  365|  20.6M|    uint64_t mask = -(t0 & one) >> 12;
  366|       |
  367|       |    /* Bounds analysis (over the rationals).
  368|       |     *
  369|       |     * Let m = r->magnitude
  370|       |     *     C = 0xFFFFFFFFFFFFFULL * 2
  371|       |     *     D = 0x0FFFFFFFFFFFFULL * 2
  372|       |     *
  373|       |     * Initial bounds: t0..t3 <= C * m
  374|       |     *                     t4 <= D * m
  375|       |     */
  376|       |
  377|  20.6M|    t0 += 0xFFFFEFFFFFC2FULL & mask;
  378|  20.6M|    t1 += mask;
  379|  20.6M|    t2 += mask;
  380|  20.6M|    t3 += mask;
  381|  20.6M|    t4 += mask >> 4;
  382|       |
  383|  20.6M|    VERIFY_CHECK((t0 & one) == 0);
  384|       |
  385|       |    /* t0..t3: added <= C/2
  386|       |     *     t4: added <= D/2
  387|       |     *
  388|       |     * Current bounds: t0..t3 <= C * (m + 1/2)
  389|       |     *                     t4 <= D * (m + 1/2)
  390|       |     */
  391|       |
  392|  20.6M|    r->n[0] = (t0 >> 1) + ((t1 & one) << 51);
  393|  20.6M|    r->n[1] = (t1 >> 1) + ((t2 & one) << 51);
  394|  20.6M|    r->n[2] = (t2 >> 1) + ((t3 & one) << 51);
  395|  20.6M|    r->n[3] = (t3 >> 1) + ((t4 & one) << 51);
  396|  20.6M|    r->n[4] = (t4 >> 1);
  397|       |
  398|       |    /* t0..t3: shifted right and added <= C/4 + 1/2
  399|       |     *     t4: shifted right
  400|       |     *
  401|       |     * Current bounds: t0..t3 <= C * (m/2 + 1/2)
  402|       |     *                     t4 <= D * (m/2 + 1/4)
  403|       |     *
  404|       |     * Therefore the output magnitude (M) has to be set such that:
  405|       |     *     t0..t3: C * M >= C * (m/2 + 1/2)
  406|       |     *         t4: D * M >= D * (m/2 + 1/4)
  407|       |     *
  408|       |     * It suffices for all limbs that, for any input magnitude m:
  409|       |     *     M >= m/2 + 1/2
  410|       |     *
  411|       |     * and since we want the smallest such integer value for M:
  412|       |     *     M == floor(m/2) + 1
  413|       |     */
  414|  20.6M|}
secp256k1.c:secp256k1_fe_impl_normalize_weak:
   80|  62.6k|static void secp256k1_fe_impl_normalize_weak(secp256k1_fe *r) {
   81|  62.6k|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
   82|       |
   83|       |    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
   84|  62.6k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   85|       |
   86|       |    /* The first pass ensures the magnitude is 1, ... */
   87|  62.6k|    t0 += x * 0x1000003D1ULL;
   88|  62.6k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   89|  62.6k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   90|  62.6k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   91|  62.6k|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
   92|       |
   93|       |    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
   94|  62.6k|    VERIFY_CHECK(t4 >> 49 == 0);
   95|       |
   96|  62.6k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   97|  62.6k|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero:
  137|  25.7M|static int secp256k1_fe_impl_normalizes_to_zero(const secp256k1_fe *r) {
  138|  25.7M|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
  139|       |
  140|       |    /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */
  141|  25.7M|    uint64_t z0, z1;
  142|       |
  143|       |    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
  144|  25.7M|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  145|       |
  146|       |    /* The first pass ensures the magnitude is 1, ... */
  147|  25.7M|    t0 += x * 0x1000003D1ULL;
  148|  25.7M|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0  = t0; z1  = t0 ^ 0x1000003D0ULL;
  149|  25.7M|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  150|  25.7M|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  151|  25.7M|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  152|  25.7M|                                                z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL;
  153|       |
  154|       |    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
  155|  25.7M|    VERIFY_CHECK(t4 >> 49 == 0);
  156|       |
  157|  25.7M|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  158|  25.7M|}
secp256k1.c:secp256k1_fe_impl_set_int:
  201|  1.28M|SECP256K1_INLINE static void secp256k1_fe_impl_set_int(secp256k1_fe *r, int a) {
  202|  1.28M|    r->n[0] = a;
  203|  1.28M|    r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
  204|  1.28M|}
secp256k1.c:secp256k1_fe_impl_inv:
  479|   345k|static void secp256k1_fe_impl_inv(secp256k1_fe *r, const secp256k1_fe *x) {
  480|   345k|    secp256k1_fe tmp = *x;
  481|   345k|    secp256k1_modinv64_signed62 s;
  482|       |
  483|   345k|    secp256k1_fe_normalize(&tmp);
  ------------------
  |  |   78|   345k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  484|   345k|    secp256k1_fe_to_signed62(&s, &tmp);
  485|   345k|    secp256k1_modinv64(&s, &secp256k1_const_modinfo_fe);
  486|   345k|    secp256k1_fe_from_signed62(r, &s);
  487|   345k|}
secp256k1.c:secp256k1_fe_to_signed62:
  463|   360k|static void secp256k1_fe_to_signed62(secp256k1_modinv64_signed62 *r, const secp256k1_fe *a) {
  464|   360k|    const uint64_t M62 = UINT64_MAX >> 2;
  465|   360k|    const uint64_t a0 = a->n[0], a1 = a->n[1], a2 = a->n[2], a3 = a->n[3], a4 = a->n[4];
  466|       |
  467|   360k|    r->v[0] = (a0       | a1 << 52) & M62;
  468|   360k|    r->v[1] = (a1 >> 10 | a2 << 42) & M62;
  469|   360k|    r->v[2] = (a2 >> 20 | a3 << 32) & M62;
  470|   360k|    r->v[3] = (a3 >> 30 | a4 << 22) & M62;
  471|   360k|    r->v[4] =  a4 >> 40;
  472|   360k|}
secp256k1.c:secp256k1_fe_from_signed62:
  443|   360k|static void secp256k1_fe_from_signed62(secp256k1_fe *r, const secp256k1_modinv64_signed62 *a) {
  444|   360k|    const uint64_t M52 = UINT64_MAX >> 12;
  445|   360k|    const uint64_t a0 = a->v[0], a1 = a->v[1], a2 = a->v[2], a3 = a->v[3], a4 = a->v[4];
  446|       |
  447|       |    /* The output from secp256k1_modinv64{_var} should be normalized to range [0,modulus), and
  448|       |     * have limbs in [0,2^62). The modulus is < 2^256, so the top limb must be below 2^(256-62*4).
  449|       |     */
  450|   360k|    VERIFY_CHECK(a0 >> 62 == 0);
  451|   360k|    VERIFY_CHECK(a1 >> 62 == 0);
  452|   360k|    VERIFY_CHECK(a2 >> 62 == 0);
  453|   360k|    VERIFY_CHECK(a3 >> 62 == 0);
  454|   360k|    VERIFY_CHECK(a4 >> 8 == 0);
  455|       |
  456|   360k|    r->n[0] =  a0                   & M52;
  457|   360k|    r->n[1] = (a0 >> 52 | a1 << 10) & M52;
  458|   360k|    r->n[2] = (a1 >> 42 | a2 << 20) & M52;
  459|   360k|    r->n[3] = (a2 >> 32 | a3 << 30) & M52;
  460|   360k|    r->n[4] = (a3 >> 22 | a4 << 40);
  461|   360k|}
secp256k1.c:secp256k1_fe_impl_set_b32_limit:
  265|  88.9k|static int secp256k1_fe_impl_set_b32_limit(secp256k1_fe *r, const unsigned char *a) {
  266|  88.9k|    secp256k1_fe_impl_set_b32_mod(r, a);
  267|  88.9k|    return !((r->n[4] == 0x0FFFFFFFFFFFFULL) & ((r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL) & (r->n[0] >= 0xFFFFEFFFFFC2FULL));
  268|  88.9k|}
secp256k1.c:secp256k1_fe_impl_get_b32:
  271|   364k|static void secp256k1_fe_impl_get_b32(unsigned char *r, const secp256k1_fe *a) {
  272|   364k|    r[0] = (a->n[4] >> 40) & 0xFF;
  273|   364k|    r[1] = (a->n[4] >> 32) & 0xFF;
  274|   364k|    r[2] = (a->n[4] >> 24) & 0xFF;
  275|   364k|    r[3] = (a->n[4] >> 16) & 0xFF;
  276|   364k|    r[4] = (a->n[4] >> 8) & 0xFF;
  277|   364k|    r[5] = a->n[4] & 0xFF;
  278|   364k|    r[6] = (a->n[3] >> 44) & 0xFF;
  279|   364k|    r[7] = (a->n[3] >> 36) & 0xFF;
  280|   364k|    r[8] = (a->n[3] >> 28) & 0xFF;
  281|   364k|    r[9] = (a->n[3] >> 20) & 0xFF;
  282|   364k|    r[10] = (a->n[3] >> 12) & 0xFF;
  283|   364k|    r[11] = (a->n[3] >> 4) & 0xFF;
  284|   364k|    r[12] = ((a->n[2] >> 48) & 0xF) | ((a->n[3] & 0xF) << 4);
  285|   364k|    r[13] = (a->n[2] >> 40) & 0xFF;
  286|   364k|    r[14] = (a->n[2] >> 32) & 0xFF;
  287|   364k|    r[15] = (a->n[2] >> 24) & 0xFF;
  288|   364k|    r[16] = (a->n[2] >> 16) & 0xFF;
  289|   364k|    r[17] = (a->n[2] >> 8) & 0xFF;
  290|   364k|    r[18] = a->n[2] & 0xFF;
  291|   364k|    r[19] = (a->n[1] >> 44) & 0xFF;
  292|   364k|    r[20] = (a->n[1] >> 36) & 0xFF;
  293|   364k|    r[21] = (a->n[1] >> 28) & 0xFF;
  294|   364k|    r[22] = (a->n[1] >> 20) & 0xFF;
  295|   364k|    r[23] = (a->n[1] >> 12) & 0xFF;
  296|   364k|    r[24] = (a->n[1] >> 4) & 0xFF;
  297|   364k|    r[25] = ((a->n[0] >> 48) & 0xF) | ((a->n[1] & 0xF) << 4);
  298|   364k|    r[26] = (a->n[0] >> 40) & 0xFF;
  299|   364k|    r[27] = (a->n[0] >> 32) & 0xFF;
  300|   364k|    r[28] = (a->n[0] >> 24) & 0xFF;
  301|   364k|    r[29] = (a->n[0] >> 16) & 0xFF;
  302|   364k|    r[30] = (a->n[0] >> 8) & 0xFF;
  303|   364k|    r[31] = a->n[0] & 0xFF;
  304|   364k|}
secp256k1.c:secp256k1_fe_impl_normalize_var:
   99|   785k|static void secp256k1_fe_impl_normalize_var(secp256k1_fe *r) {
  100|   785k|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
  101|       |
  102|       |    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
  103|   785k|    uint64_t m;
  104|   785k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  105|       |
  106|       |    /* The first pass ensures the magnitude is 1, ... */
  107|   785k|    t0 += x * 0x1000003D1ULL;
  108|   785k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  109|   785k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
  110|   785k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
  111|   785k|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3;
  112|       |
  113|       |    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
  114|   785k|    VERIFY_CHECK(t4 >> 49 == 0);
  115|       |
  116|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
  117|   785k|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
  118|   785k|        & (t0 >= 0xFFFFEFFFFFC2FULL));
  119|       |
  120|   785k|    if (x) {
  ------------------
  |  Branch (120:9): [True: 0, False: 785k]
  ------------------
  121|      0|        t0 += 0x1000003D1ULL;
  122|      0|        t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  123|      0|        t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
  124|      0|        t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
  125|      0|        t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
  126|       |
  127|       |        /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */
  128|      0|        VERIFY_CHECK(t4 >> 48 == x);
  129|       |
  130|       |        /* Mask off the possible multiple of 2^256 from the final reduction */
  131|      0|        t4 &= 0x0FFFFFFFFFFFFULL;
  132|      0|    }
  133|       |
  134|   785k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
  135|   785k|}
secp256k1.c:secp256k1_fe_impl_is_odd:
  211|   445k|SECP256K1_INLINE static int secp256k1_fe_impl_is_odd(const secp256k1_fe *a) {
  212|   445k|    return a->n[0] & 1;
  213|   445k|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero_var:
  160|  2.12M|static int secp256k1_fe_impl_normalizes_to_zero_var(const secp256k1_fe *r) {
  161|  2.12M|    uint64_t t0, t1, t2, t3, t4;
  162|  2.12M|    uint64_t z0, z1;
  163|  2.12M|    uint64_t x;
  164|       |
  165|  2.12M|    t0 = r->n[0];
  166|  2.12M|    t4 = r->n[4];
  167|       |
  168|       |    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
  169|  2.12M|    x = t4 >> 48;
  170|       |
  171|       |    /* The first pass ensures the magnitude is 1, ... */
  172|  2.12M|    t0 += x * 0x1000003D1ULL;
  173|       |
  174|       |    /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */
  175|  2.12M|    z0 = t0 & 0xFFFFFFFFFFFFFULL;
  176|  2.12M|    z1 = z0 ^ 0x1000003D0ULL;
  177|       |
  178|       |    /* Fast return path should catch the majority of cases */
  179|  2.12M|    if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) {
  ------------------
  |  Branch (179:9): [True: 2.12M, False: 0]
  ------------------
  180|  2.12M|        return 0;
  181|  2.12M|    }
  182|       |
  183|      0|    t1 = r->n[1];
  184|      0|    t2 = r->n[2];
  185|      0|    t3 = r->n[3];
  186|       |
  187|      0|    t4 &= 0x0FFFFFFFFFFFFULL;
  188|       |
  189|      0|    t1 += (t0 >> 52);
  190|      0|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  191|      0|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  192|      0|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  193|      0|                                                z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL;
  194|       |
  195|       |    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
  196|      0|    VERIFY_CHECK(t4 >> 49 == 0);
  197|       |
  198|      0|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  199|  2.12M|}
secp256k1.c:secp256k1_fe_impl_inv_var:
  489|  14.7k|static void secp256k1_fe_impl_inv_var(secp256k1_fe *r, const secp256k1_fe *x) {
  490|  14.7k|    secp256k1_fe tmp = *x;
  491|  14.7k|    secp256k1_modinv64_signed62 s;
  492|       |
  493|  14.7k|    secp256k1_fe_normalize_var(&tmp);
  ------------------
  |  |   80|  14.7k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  494|  14.7k|    secp256k1_fe_to_signed62(&s, &tmp);
  495|  14.7k|    secp256k1_modinv64_var(&s, &secp256k1_const_modinfo_fe);
  496|  14.7k|    secp256k1_fe_from_signed62(r, &s);
  497|  14.7k|}
secp256k1.c:secp256k1_fe_impl_set_b32_mod:
  228|  88.9k|static void secp256k1_fe_impl_set_b32_mod(secp256k1_fe *r, const unsigned char *a) {
  229|  88.9k|    r->n[0] = (uint64_t)a[31]
  230|  88.9k|            | ((uint64_t)a[30] << 8)
  231|  88.9k|            | ((uint64_t)a[29] << 16)
  232|  88.9k|            | ((uint64_t)a[28] << 24)
  233|  88.9k|            | ((uint64_t)a[27] << 32)
  234|  88.9k|            | ((uint64_t)a[26] << 40)
  235|  88.9k|            | ((uint64_t)(a[25] & 0xF)  << 48);
  236|  88.9k|    r->n[1] = (uint64_t)((a[25] >> 4) & 0xF)
  237|  88.9k|            | ((uint64_t)a[24] << 4)
  238|  88.9k|            | ((uint64_t)a[23] << 12)
  239|  88.9k|            | ((uint64_t)a[22] << 20)
  240|  88.9k|            | ((uint64_t)a[21] << 28)
  241|  88.9k|            | ((uint64_t)a[20] << 36)
  242|  88.9k|            | ((uint64_t)a[19] << 44);
  243|  88.9k|    r->n[2] = (uint64_t)a[18]
  244|  88.9k|            | ((uint64_t)a[17] << 8)
  245|  88.9k|            | ((uint64_t)a[16] << 16)
  246|  88.9k|            | ((uint64_t)a[15] << 24)
  247|  88.9k|            | ((uint64_t)a[14] << 32)
  248|  88.9k|            | ((uint64_t)a[13] << 40)
  249|  88.9k|            | ((uint64_t)(a[12] & 0xF) << 48);
  250|  88.9k|    r->n[3] = (uint64_t)((a[12] >> 4) & 0xF)
  251|  88.9k|            | ((uint64_t)a[11] << 4)
  252|  88.9k|            | ((uint64_t)a[10] << 12)
  253|  88.9k|            | ((uint64_t)a[9]  << 20)
  254|  88.9k|            | ((uint64_t)a[8]  << 28)
  255|  88.9k|            | ((uint64_t)a[7]  << 36)
  256|  88.9k|            | ((uint64_t)a[6]  << 44);
  257|  88.9k|    r->n[4] = (uint64_t)a[5]
  258|  88.9k|            | ((uint64_t)a[4] << 8)
  259|  88.9k|            | ((uint64_t)a[3] << 16)
  260|  88.9k|            | ((uint64_t)a[2] << 24)
  261|  88.9k|            | ((uint64_t)a[1] << 32)
  262|  88.9k|            | ((uint64_t)a[0] << 40);
  263|  88.9k|}
secp256k1.c:secp256k1_fe_impl_normalize:
   43|  1.21M|static void secp256k1_fe_impl_normalize(secp256k1_fe *r) {
   44|  1.21M|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
   45|       |
   46|       |    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
   47|  1.21M|    uint64_t m;
   48|  1.21M|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   49|       |
   50|       |    /* The first pass ensures the magnitude is 1, ... */
   51|  1.21M|    t0 += x * 0x1000003D1ULL;
   52|  1.21M|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   53|  1.21M|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
   54|  1.21M|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
   55|  1.21M|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3;
   56|       |
   57|       |    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
   58|  1.21M|    VERIFY_CHECK(t4 >> 49 == 0);
   59|       |
   60|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
   61|  1.21M|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
   62|  1.21M|        & (t0 >= 0xFFFFEFFFFFC2FULL));
   63|       |
   64|       |    /* Apply the final reduction (for constant-time behaviour, we do it always) */
   65|  1.21M|    t0 += x * 0x1000003D1ULL;
   66|  1.21M|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   67|  1.21M|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   68|  1.21M|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   69|  1.21M|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
   70|       |
   71|       |    /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */
   72|  1.21M|    VERIFY_CHECK(t4 >> 48 == x);
   73|       |
   74|       |    /* Mask off the possible multiple of 2^256 from the final reduction */
   75|  1.21M|    t4 &= 0x0FFFFFFFFFFFFULL;
   76|       |
   77|  1.21M|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   78|  1.21M|}

secp256k1.c:secp256k1_fe_sqr_inner:
  154|   124M|SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) {
  155|   124M|    secp256k1_uint128 c, d;
  156|   124M|    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
  157|   124M|    uint64_t t3, t4, tx, u0;
  158|   124M|    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
  159|       |
  160|   124M|    VERIFY_BITS(a[0], 56);
  161|   124M|    VERIFY_BITS(a[1], 56);
  162|   124M|    VERIFY_BITS(a[2], 56);
  163|   124M|    VERIFY_BITS(a[3], 56);
  164|   124M|    VERIFY_BITS(a[4], 52);
  165|       |
  166|       |    /**  [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
  167|       |     *  px is a shorthand for sum(a[i]*a[x-i], i=0..x).
  168|       |     *  Note that [x 0 0 0 0 0] = [x*R].
  169|       |     */
  170|       |
  171|   124M|    secp256k1_u128_mul(&d, a0*2, a3);
  172|   124M|    secp256k1_u128_accum_mul(&d, a1*2, a2);
  173|   124M|    VERIFY_BITS_128(&d, 114);
  174|       |    /* [d 0 0 0] = [p3 0 0 0] */
  175|   124M|    secp256k1_u128_mul(&c, a4, a4);
  176|   124M|    VERIFY_BITS_128(&c, 112);
  177|       |    /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
  178|   124M|    secp256k1_u128_accum_mul(&d, R, secp256k1_u128_to_u64(&c)); secp256k1_u128_rshift(&c, 64);
  179|   124M|    VERIFY_BITS_128(&d, 115);
  180|   124M|    VERIFY_BITS_128(&c, 48);
  181|       |    /* [(c<<12) 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
  182|   124M|    t3 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  183|   124M|    VERIFY_BITS(t3, 52);
  184|   124M|    VERIFY_BITS_128(&d, 63);
  185|       |    /* [(c<<12) 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
  186|       |
  187|   124M|    a4 *= 2;
  188|   124M|    secp256k1_u128_accum_mul(&d, a0, a4);
  189|   124M|    secp256k1_u128_accum_mul(&d, a1*2, a3);
  190|   124M|    secp256k1_u128_accum_mul(&d, a2, a2);
  191|   124M|    VERIFY_BITS_128(&d, 115);
  192|       |    /* [(c<<12) 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  193|   124M|    secp256k1_u128_accum_mul(&d, R << 12, secp256k1_u128_to_u64(&c));
  194|   124M|    VERIFY_BITS_128(&d, 116);
  195|       |    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  196|   124M|    t4 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  197|   124M|    VERIFY_BITS(t4, 52);
  198|   124M|    VERIFY_BITS_128(&d, 64);
  199|       |    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  200|   124M|    tx = (t4 >> 48); t4 &= (M >> 4);
  201|   124M|    VERIFY_BITS(tx, 4);
  202|   124M|    VERIFY_BITS(t4, 48);
  203|       |    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  204|       |
  205|   124M|    secp256k1_u128_mul(&c, a0, a0);
  206|   124M|    VERIFY_BITS_128(&c, 112);
  207|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
  208|   124M|    secp256k1_u128_accum_mul(&d, a1, a4);
  209|   124M|    secp256k1_u128_accum_mul(&d, a2*2, a3);
  210|   124M|    VERIFY_BITS_128(&d, 114);
  211|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  212|   124M|    u0 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  213|   124M|    VERIFY_BITS(u0, 52);
  214|   124M|    VERIFY_BITS_128(&d, 62);
  215|       |    /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  216|       |    /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  217|   124M|    u0 = (u0 << 4) | tx;
  218|   124M|    VERIFY_BITS(u0, 56);
  219|       |    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  220|   124M|    secp256k1_u128_accum_mul(&c, u0, R >> 4);
  221|   124M|    VERIFY_BITS_128(&c, 113);
  222|       |    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  223|   124M|    r[0] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  224|   124M|    VERIFY_BITS(r[0], 52);
  225|   124M|    VERIFY_BITS_128(&c, 61);
  226|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
  227|       |
  228|   124M|    a0 *= 2;
  229|   124M|    secp256k1_u128_accum_mul(&c, a0, a1);
  230|   124M|    VERIFY_BITS_128(&c, 114);
  231|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
  232|   124M|    secp256k1_u128_accum_mul(&d, a2, a4);
  233|   124M|    secp256k1_u128_accum_mul(&d, a3, a3);
  234|   124M|    VERIFY_BITS_128(&d, 114);
  235|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  236|   124M|    secp256k1_u128_accum_mul(&c, secp256k1_u128_to_u64(&d) & M, R); secp256k1_u128_rshift(&d, 52);
  237|   124M|    VERIFY_BITS_128(&c, 115);
  238|   124M|    VERIFY_BITS_128(&d, 62);
  239|       |    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  240|   124M|    r[1] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  241|   124M|    VERIFY_BITS(r[1], 52);
  242|   124M|    VERIFY_BITS_128(&c, 63);
  243|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  244|       |
  245|   124M|    secp256k1_u128_accum_mul(&c, a0, a2);
  246|   124M|    secp256k1_u128_accum_mul(&c, a1, a1);
  247|   124M|    VERIFY_BITS_128(&c, 114);
  248|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
  249|   124M|    secp256k1_u128_accum_mul(&d, a3, a4);
  250|   124M|    VERIFY_BITS_128(&d, 114);
  251|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  252|   124M|    secp256k1_u128_accum_mul(&c, R, secp256k1_u128_to_u64(&d)); secp256k1_u128_rshift(&d, 64);
  253|   124M|    VERIFY_BITS_128(&c, 115);
  254|   124M|    VERIFY_BITS_128(&d, 50);
  255|       |    /* [(d<<12) 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  256|   124M|    r[2] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  257|   124M|    VERIFY_BITS(r[2], 52);
  258|   124M|    VERIFY_BITS_128(&c, 63);
  259|       |    /* [(d<<12) 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  260|       |
  261|   124M|    secp256k1_u128_accum_mul(&c, R << 12, secp256k1_u128_to_u64(&d));
  262|   124M|    secp256k1_u128_accum_u64(&c, t3);
  263|   124M|    VERIFY_BITS_128(&c, 100);
  264|       |    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  265|   124M|    r[3] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  266|   124M|    VERIFY_BITS(r[3], 52);
  267|   124M|    VERIFY_BITS_128(&c, 48);
  268|       |    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  269|   124M|    r[4] = secp256k1_u128_to_u64(&c) + t4;
  270|   124M|    VERIFY_BITS(r[4], 49);
  271|       |    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  272|   124M|}
secp256k1.c:secp256k1_fe_mul_inner:
   18|   137M|SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) {
   19|   137M|    secp256k1_uint128 c, d;
   20|   137M|    uint64_t t3, t4, tx, u0;
   21|   137M|    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
   22|   137M|    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
   23|       |
   24|   137M|    VERIFY_BITS(a[0], 56);
   25|   137M|    VERIFY_BITS(a[1], 56);
   26|   137M|    VERIFY_BITS(a[2], 56);
   27|   137M|    VERIFY_BITS(a[3], 56);
   28|   137M|    VERIFY_BITS(a[4], 52);
   29|   137M|    VERIFY_BITS(b[0], 56);
   30|   137M|    VERIFY_BITS(b[1], 56);
   31|   137M|    VERIFY_BITS(b[2], 56);
   32|   137M|    VERIFY_BITS(b[3], 56);
   33|   137M|    VERIFY_BITS(b[4], 52);
   34|   137M|    VERIFY_CHECK(r != b);
   35|   137M|    VERIFY_CHECK(a != b);
   36|       |
   37|       |    /*  [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
   38|       |     *  for 0 <= x <= 4, px is a shorthand for sum(a[i]*b[x-i], i=0..x).
   39|       |     *  for 4 <= x <= 8, px is a shorthand for sum(a[i]*b[x-i], i=(x-4)..4)
   40|       |     *  Note that [x 0 0 0 0 0] = [x*R].
   41|       |     */
   42|       |
   43|   137M|    secp256k1_u128_mul(&d, a0, b[3]);
   44|   137M|    secp256k1_u128_accum_mul(&d, a1, b[2]);
   45|   137M|    secp256k1_u128_accum_mul(&d, a2, b[1]);
   46|   137M|    secp256k1_u128_accum_mul(&d, a3, b[0]);
   47|   137M|    VERIFY_BITS_128(&d, 114);
   48|       |    /* [d 0 0 0] = [p3 0 0 0] */
   49|   137M|    secp256k1_u128_mul(&c, a4, b[4]);
   50|   137M|    VERIFY_BITS_128(&c, 112);
   51|       |    /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
   52|   137M|    secp256k1_u128_accum_mul(&d, R, secp256k1_u128_to_u64(&c)); secp256k1_u128_rshift(&c, 64);
   53|   137M|    VERIFY_BITS_128(&d, 115);
   54|   137M|    VERIFY_BITS_128(&c, 48);
   55|       |    /* [(c<<12) 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
   56|   137M|    t3 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   57|   137M|    VERIFY_BITS(t3, 52);
   58|   137M|    VERIFY_BITS_128(&d, 63);
   59|       |    /* [(c<<12) 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
   60|       |
   61|   137M|    secp256k1_u128_accum_mul(&d, a0, b[4]);
   62|   137M|    secp256k1_u128_accum_mul(&d, a1, b[3]);
   63|   137M|    secp256k1_u128_accum_mul(&d, a2, b[2]);
   64|   137M|    secp256k1_u128_accum_mul(&d, a3, b[1]);
   65|   137M|    secp256k1_u128_accum_mul(&d, a4, b[0]);
   66|   137M|    VERIFY_BITS_128(&d, 115);
   67|       |    /* [(c<<12) 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   68|   137M|    secp256k1_u128_accum_mul(&d, R << 12, secp256k1_u128_to_u64(&c));
   69|   137M|    VERIFY_BITS_128(&d, 116);
   70|       |    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   71|   137M|    t4 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   72|   137M|    VERIFY_BITS(t4, 52);
   73|   137M|    VERIFY_BITS_128(&d, 64);
   74|       |    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   75|   137M|    tx = (t4 >> 48); t4 &= (M >> 4);
   76|   137M|    VERIFY_BITS(tx, 4);
   77|   137M|    VERIFY_BITS(t4, 48);
   78|       |    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   79|       |
   80|   137M|    secp256k1_u128_mul(&c, a0, b[0]);
   81|   137M|    VERIFY_BITS_128(&c, 112);
   82|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
   83|   137M|    secp256k1_u128_accum_mul(&d, a1, b[4]);
   84|   137M|    secp256k1_u128_accum_mul(&d, a2, b[3]);
   85|   137M|    secp256k1_u128_accum_mul(&d, a3, b[2]);
   86|   137M|    secp256k1_u128_accum_mul(&d, a4, b[1]);
   87|   137M|    VERIFY_BITS_128(&d, 114);
   88|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   89|   137M|    u0 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   90|   137M|    VERIFY_BITS(u0, 52);
   91|   137M|    VERIFY_BITS_128(&d, 62);
   92|       |    /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   93|       |    /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   94|   137M|    u0 = (u0 << 4) | tx;
   95|   137M|    VERIFY_BITS(u0, 56);
   96|       |    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   97|   137M|    secp256k1_u128_accum_mul(&c, u0, R >> 4);
   98|   137M|    VERIFY_BITS_128(&c, 113);
   99|       |    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  100|   137M|    r[0] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  101|   137M|    VERIFY_BITS(r[0], 52);
  102|   137M|    VERIFY_BITS_128(&c, 61);
  103|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
  104|       |
  105|   137M|    secp256k1_u128_accum_mul(&c, a0, b[1]);
  106|   137M|    secp256k1_u128_accum_mul(&c, a1, b[0]);
  107|   137M|    VERIFY_BITS_128(&c, 114);
  108|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
  109|   137M|    secp256k1_u128_accum_mul(&d, a2, b[4]);
  110|   137M|    secp256k1_u128_accum_mul(&d, a3, b[3]);
  111|   137M|    secp256k1_u128_accum_mul(&d, a4, b[2]);
  112|   137M|    VERIFY_BITS_128(&d, 114);
  113|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  114|   137M|    secp256k1_u128_accum_mul(&c, secp256k1_u128_to_u64(&d) & M, R); secp256k1_u128_rshift(&d, 52);
  115|   137M|    VERIFY_BITS_128(&c, 115);
  116|   137M|    VERIFY_BITS_128(&d, 62);
  117|       |    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  118|   137M|    r[1] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  119|   137M|    VERIFY_BITS(r[1], 52);
  120|   137M|    VERIFY_BITS_128(&c, 63);
  121|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  122|       |
  123|   137M|    secp256k1_u128_accum_mul(&c, a0, b[2]);
  124|   137M|    secp256k1_u128_accum_mul(&c, a1, b[1]);
  125|   137M|    secp256k1_u128_accum_mul(&c, a2, b[0]);
  126|   137M|    VERIFY_BITS_128(&c, 114);
  127|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
  128|   137M|    secp256k1_u128_accum_mul(&d, a3, b[4]);
  129|   137M|    secp256k1_u128_accum_mul(&d, a4, b[3]);
  130|   137M|    VERIFY_BITS_128(&d, 114);
  131|       |    /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  132|   137M|    secp256k1_u128_accum_mul(&c, R, secp256k1_u128_to_u64(&d)); secp256k1_u128_rshift(&d, 64);
  133|   137M|    VERIFY_BITS_128(&c, 115);
  134|   137M|    VERIFY_BITS_128(&d, 50);
  135|       |    /* [(d<<12) 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  136|       |
  137|   137M|    r[2] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  138|   137M|    VERIFY_BITS(r[2], 52);
  139|   137M|    VERIFY_BITS_128(&c, 63);
  140|       |    /* [(d<<12) 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  141|   137M|    secp256k1_u128_accum_mul(&c, R << 12, secp256k1_u128_to_u64(&d));
  142|   137M|    secp256k1_u128_accum_u64(&c, t3);
  143|   137M|    VERIFY_BITS_128(&c, 100);
  144|       |    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  145|   137M|    r[3] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  146|   137M|    VERIFY_BITS(r[3], 52);
  147|   137M|    VERIFY_BITS_128(&c, 48);
  148|       |    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  149|   137M|    r[4] = secp256k1_u128_to_u64(&c) + t4;
  150|   137M|    VERIFY_BITS(r[4], 49);
  151|       |    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  152|   137M|}

secp256k1.c:secp256k1_fe_verify:
  149|   260M|static void secp256k1_fe_verify(const secp256k1_fe *a) { (void)a; }
secp256k1.c:secp256k1_fe_verify_magnitude:
  150|   256M|static void secp256k1_fe_verify_magnitude(const secp256k1_fe *a, int m) { (void)a; (void)m; }
secp256k1.c:secp256k1_fe_sqrt:
   37|  84.8k|static int secp256k1_fe_sqrt(secp256k1_fe * SECP256K1_RESTRICT r, const secp256k1_fe * SECP256K1_RESTRICT a) {
   38|       |    /** Given that p is congruent to 3 mod 4, we can compute the square root of
   39|       |     *  a mod p as the (p+1)/4'th power of a.
   40|       |     *
   41|       |     *  As (p+1)/4 is an even number, it will have the same result for a and for
   42|       |     *  (-a). Only one of these two numbers actually has a square root however,
   43|       |     *  so we test at the end by squaring and comparing to the input.
   44|       |     *  Also because (p+1)/4 is an even number, the computed square root is
   45|       |     *  itself always a square (a ** ((p+1)/4) is the square of a ** ((p+1)/8)).
   46|       |     */
   47|  84.8k|    secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1;
   48|  84.8k|    int j, ret;
   49|       |
   50|  84.8k|    VERIFY_CHECK(r != a);
   51|  84.8k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  344|  84.8k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   52|  84.8k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 8);
  ------------------
  |  |  348|  84.8k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   53|       |
   54|       |    /** The binary representation of (p + 1)/4 has 3 blocks of 1s, with lengths in
   55|       |     *  { 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block:
   56|       |     *  1, [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223]
   57|       |     */
   58|       |
   59|  84.8k|    secp256k1_fe_sqr(&x2, a);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   60|  84.8k|    secp256k1_fe_mul(&x2, &x2, a);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   61|       |
   62|  84.8k|    secp256k1_fe_sqr(&x3, &x2);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   63|  84.8k|    secp256k1_fe_mul(&x3, &x3, a);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   64|       |
   65|  84.8k|    x6 = x3;
   66|   339k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (66:15): [True: 254k, False: 84.8k]
  ------------------
   67|   254k|        secp256k1_fe_sqr(&x6, &x6);
  ------------------
  |  |   94|   254k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   68|   254k|    }
   69|  84.8k|    secp256k1_fe_mul(&x6, &x6, &x3);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   70|       |
   71|  84.8k|    x9 = x6;
   72|   339k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (72:15): [True: 254k, False: 84.8k]
  ------------------
   73|   254k|        secp256k1_fe_sqr(&x9, &x9);
  ------------------
  |  |   94|   254k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   74|   254k|    }
   75|  84.8k|    secp256k1_fe_mul(&x9, &x9, &x3);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   76|       |
   77|  84.8k|    x11 = x9;
   78|   254k|    for (j=0; j<2; j++) {
  ------------------
  |  Branch (78:15): [True: 169k, False: 84.8k]
  ------------------
   79|   169k|        secp256k1_fe_sqr(&x11, &x11);
  ------------------
  |  |   94|   169k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   80|   169k|    }
   81|  84.8k|    secp256k1_fe_mul(&x11, &x11, &x2);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   82|       |
   83|  84.8k|    x22 = x11;
   84|  1.01M|    for (j=0; j<11; j++) {
  ------------------
  |  Branch (84:15): [True: 933k, False: 84.8k]
  ------------------
   85|   933k|        secp256k1_fe_sqr(&x22, &x22);
  ------------------
  |  |   94|   933k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   86|   933k|    }
   87|  84.8k|    secp256k1_fe_mul(&x22, &x22, &x11);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   88|       |
   89|  84.8k|    x44 = x22;
   90|  1.95M|    for (j=0; j<22; j++) {
  ------------------
  |  Branch (90:15): [True: 1.86M, False: 84.8k]
  ------------------
   91|  1.86M|        secp256k1_fe_sqr(&x44, &x44);
  ------------------
  |  |   94|  1.86M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   92|  1.86M|    }
   93|  84.8k|    secp256k1_fe_mul(&x44, &x44, &x22);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   94|       |
   95|  84.8k|    x88 = x44;
   96|  3.81M|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (96:15): [True: 3.73M, False: 84.8k]
  ------------------
   97|  3.73M|        secp256k1_fe_sqr(&x88, &x88);
  ------------------
  |  |   94|  3.73M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   98|  3.73M|    }
   99|  84.8k|    secp256k1_fe_mul(&x88, &x88, &x44);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  100|       |
  101|  84.8k|    x176 = x88;
  102|  7.55M|    for (j=0; j<88; j++) {
  ------------------
  |  Branch (102:15): [True: 7.46M, False: 84.8k]
  ------------------
  103|  7.46M|        secp256k1_fe_sqr(&x176, &x176);
  ------------------
  |  |   94|  7.46M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  104|  7.46M|    }
  105|  84.8k|    secp256k1_fe_mul(&x176, &x176, &x88);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  106|       |
  107|  84.8k|    x220 = x176;
  108|  3.81M|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (108:15): [True: 3.73M, False: 84.8k]
  ------------------
  109|  3.73M|        secp256k1_fe_sqr(&x220, &x220);
  ------------------
  |  |   94|  3.73M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  110|  3.73M|    }
  111|  84.8k|    secp256k1_fe_mul(&x220, &x220, &x44);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  112|       |
  113|  84.8k|    x223 = x220;
  114|   339k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (114:15): [True: 254k, False: 84.8k]
  ------------------
  115|   254k|        secp256k1_fe_sqr(&x223, &x223);
  ------------------
  |  |   94|   254k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  116|   254k|    }
  117|  84.8k|    secp256k1_fe_mul(&x223, &x223, &x3);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  118|       |
  119|       |    /* The final result is then assembled using a sliding window over the blocks. */
  120|       |
  121|  84.8k|    t1 = x223;
  122|  2.03M|    for (j=0; j<23; j++) {
  ------------------
  |  Branch (122:15): [True: 1.95M, False: 84.8k]
  ------------------
  123|  1.95M|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|  1.95M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|  1.95M|    }
  125|  84.8k|    secp256k1_fe_mul(&t1, &t1, &x22);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|   594k|    for (j=0; j<6; j++) {
  ------------------
  |  Branch (126:15): [True: 509k, False: 84.8k]
  ------------------
  127|   509k|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|   509k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  128|   509k|    }
  129|  84.8k|    secp256k1_fe_mul(&t1, &t1, &x2);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  130|  84.8k|    secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  131|  84.8k|    secp256k1_fe_sqr(r, &t1);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  132|       |
  133|       |    /* Check that a square root was actually calculated */
  134|       |
  135|  84.8k|    secp256k1_fe_sqr(&t1, r);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  136|  84.8k|    ret = secp256k1_fe_equal(&t1, a);
  137|       |
  138|       |#ifdef VERIFY
  139|       |    if (!ret) {
  140|       |        secp256k1_fe_negate(&t1, &t1, 1);
  141|       |        secp256k1_fe_normalize_var(&t1);
  142|       |        VERIFY_CHECK(secp256k1_fe_equal(&t1, a));
  143|       |    }
  144|       |#endif
  145|  84.8k|    return ret;
  146|  84.8k|}
secp256k1.c:secp256k1_fe_equal:
   25|  86.8k|SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) {
   26|  86.8k|    secp256k1_fe na;
   27|  86.8k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  344|  86.8k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   28|  86.8k|    SECP256K1_FE_VERIFY(b);
  ------------------
  |  |  344|  86.8k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   29|  86.8k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 1);
  ------------------
  |  |  348|  86.8k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   30|  86.8k|    SECP256K1_FE_VERIFY_MAGNITUDE(b, 31);
  ------------------
  |  |  348|  86.8k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   31|       |
   32|  86.8k|    secp256k1_fe_negate(&na, a, 1);
  ------------------
  |  |  211|  86.8k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  86.8k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  86.8k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 86.8k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  86.8k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 86.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  86.8k|    } \
  |  |  |  |   84|  86.8k|    stmt; \
  |  |  |  |   85|  86.8k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   33|  86.8k|    secp256k1_fe_add(&na, b);
  ------------------
  |  |   92|  86.8k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
   34|  86.8k|    return secp256k1_fe_normalizes_to_zero(&na);
  ------------------
  |  |   81|  86.8k|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
   35|  86.8k|}
secp256k1.c:secp256k1_fe_clear:
   21|   298k|SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) {
   22|   298k|    secp256k1_memclear(a, sizeof(secp256k1_fe));
   23|   298k|}

secp256k1.c:secp256k1_ge_set_xy:
  132|   834k|static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) {
  133|   834k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  344|   834k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  134|   834k|    SECP256K1_FE_VERIFY(y);
  ------------------
  |  |  344|   834k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  135|       |
  136|   834k|    r->infinity = 0;
  137|   834k|    r->x = *x;
  138|   834k|    r->y = *y;
  139|       |
  140|   834k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|   834k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  141|   834k|}
secp256k1.c:secp256k1_ge_verify:
   78|  32.7M|static void secp256k1_ge_verify(const secp256k1_ge *a) {
   79|  32.7M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  344|  32.7M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   80|  32.7M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  344|  32.7M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   81|  32.7M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GE_X_MAGNITUDE_MAX);
  ------------------
  |  |  348|  32.7M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   82|  32.7M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GE_Y_MAGNITUDE_MAX);
  ------------------
  |  |  348|  32.7M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   83|  32.7M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   84|  32.7M|    (void)a;
   85|  32.7M|}
secp256k1.c:secp256k1_ge_is_valid_var:
  408|  2.01k|static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
  409|  2.01k|    secp256k1_fe y2, x3;
  410|  2.01k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|  2.01k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  411|       |
  412|  2.01k|    if (a->infinity) {
  ------------------
  |  Branch (412:9): [True: 0, False: 2.01k]
  ------------------
  413|      0|        return 0;
  414|      0|    }
  415|       |    /* y^2 = x^3 + 7 */
  416|  2.01k|    secp256k1_fe_sqr(&y2, &a->y);
  ------------------
  |  |   94|  2.01k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  417|  2.01k|    secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   94|  2.01k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
                  secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   93|  2.01k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  418|  2.01k|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|  2.01k|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|  2.01k|#define SECP256K1_B 7
  ------------------
  419|  2.01k|    return secp256k1_fe_equal(&y2, &x3);
  420|  2.01k|}
secp256k1.c:secp256k1_ge_is_in_correct_subgroup:
  886|  70.3k|static int secp256k1_ge_is_in_correct_subgroup(const secp256k1_ge* ge) {
  887|       |#ifdef EXHAUSTIVE_TEST_ORDER
  888|       |    secp256k1_gej out;
  889|       |    int i;
  890|       |    SECP256K1_GE_VERIFY(ge);
  891|       |
  892|       |    /* A very simple EC multiplication ladder that avoids a dependency on ecmult. */
  893|       |    secp256k1_gej_set_infinity(&out);
  894|       |    for (i = 0; i < 32; ++i) {
  895|       |        secp256k1_gej_double_var(&out, &out, NULL);
  896|       |        if ((((uint32_t)EXHAUSTIVE_TEST_ORDER) >> (31 - i)) & 1) {
  897|       |            secp256k1_gej_add_ge_var(&out, &out, ge, NULL);
  898|       |        }
  899|       |    }
  900|       |    return secp256k1_gej_is_infinity(&out);
  901|       |#else
  902|  70.3k|    SECP256K1_GE_VERIFY(ge);
  ------------------
  |  |  206|  70.3k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  903|       |
  904|  70.3k|    (void)ge;
  905|       |    /* The real secp256k1 group has cofactor 1, so the subgroup is the entire curve. */
  906|  70.3k|    return 1;
  907|  70.3k|#endif
  908|  70.3k|}
secp256k1.c:secp256k1_ge_to_bytes:
  937|   421k|static void secp256k1_ge_to_bytes(unsigned char *buf, const secp256k1_ge *a) {
  938|   421k|    secp256k1_ge_storage s;
  939|       |
  940|       |    /* We require that the secp256k1_ge_storage type is exactly 64 bytes.
  941|       |     * This is formally not guaranteed by the C standard, but should hold on any
  942|       |     * sane compiler in the real world. */
  943|   421k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   64|   421k|#define STATIC_ASSERT(expr) do { \
  |  |   65|   421k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (65:12): [Folded - Ignored]
  |  |  ------------------
  |  |   66|   421k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 421k, False: 0]
  |  |  ------------------
  |  |   67|   421k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   68|   421k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (68:9): [True: 0, False: 421k]
  |  |  ------------------
  |  |   69|   421k|        ; \
  |  |   70|   421k|    } \
  |  |   71|   421k|} while(0)
  |  |  ------------------
  |  |  |  Branch (71:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  944|   421k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(a));
  945|   421k|    secp256k1_ge_to_storage(&s, a);
  946|   421k|    memcpy(buf, &s, 64);
  947|   421k|}
secp256k1.c:secp256k1_ge_to_storage:
  839|   421k|static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) {
  840|   421k|    secp256k1_fe x, y;
  841|   421k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|   421k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  842|   421k|    VERIFY_CHECK(!a->infinity);
  843|       |
  844|   421k|    x = a->x;
  845|   421k|    secp256k1_fe_normalize(&x);
  ------------------
  |  |   78|   421k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  846|   421k|    y = a->y;
  847|   421k|    secp256k1_fe_normalize(&y);
  ------------------
  |  |   78|   421k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  848|   421k|    secp256k1_fe_to_storage(&r->x, &x);
  ------------------
  |  |   96|   421k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  849|   421k|    secp256k1_fe_to_storage(&r->y, &y);
  ------------------
  |  |   96|   421k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  850|   421k|}
secp256k1.c:secp256k1_ge_clear:
  305|   371k|static void secp256k1_ge_clear(secp256k1_ge *r) {
  306|   371k|    secp256k1_memclear(r, sizeof(secp256k1_ge));
  307|   371k|}
secp256k1.c:secp256k1_ge_from_bytes:
  949|   400k|static void secp256k1_ge_from_bytes(secp256k1_ge *r, const unsigned char *buf) {
  950|   400k|    secp256k1_ge_storage s;
  951|       |
  952|   400k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   64|   400k|#define STATIC_ASSERT(expr) do { \
  |  |   65|   400k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (65:12): [Folded - Ignored]
  |  |  ------------------
  |  |   66|   400k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 400k, False: 0]
  |  |  ------------------
  |  |   67|   400k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   68|   400k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (68:9): [True: 0, False: 400k]
  |  |  ------------------
  |  |   69|   400k|        ; \
  |  |   70|   400k|    } \
  |  |   71|   400k|} while(0)
  |  |  ------------------
  |  |  |  Branch (71:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  953|   400k|    memcpy(&s, buf, 64);
  954|   400k|    secp256k1_ge_from_storage(r, &s);
  955|   400k|}
secp256k1.c:secp256k1_ge_from_storage:
  852|  14.2M|static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) {
  853|  14.2M|    secp256k1_fe_from_storage(&r->x, &a->x);
  ------------------
  |  |   97|  14.2M|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  854|  14.2M|    secp256k1_fe_from_storage(&r->y, &a->y);
  ------------------
  |  |   97|  14.2M|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  855|  14.2M|    r->infinity = 0;
  856|       |
  857|  14.2M|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|  14.2M|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  858|  14.2M|}
secp256k1.c:secp256k1_gej_verify:
   87|  63.5M|static void secp256k1_gej_verify(const secp256k1_gej *a) {
   88|  63.5M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  344|  63.5M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   89|  63.5M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  344|  63.5M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   90|  63.5M|    SECP256K1_FE_VERIFY(&a->z);
  ------------------
  |  |  344|  63.5M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   91|  63.5M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GEJ_X_MAGNITUDE_MAX);
  ------------------
  |  |  348|  63.5M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   92|  63.5M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GEJ_Y_MAGNITUDE_MAX);
  ------------------
  |  |  348|  63.5M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   93|  63.5M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->z, SECP256K1_GEJ_Z_MAGNITUDE_MAX);
  ------------------
  |  |  348|  63.5M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   94|  63.5M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   95|  63.5M|    (void)a;
   96|  63.5M|}
secp256k1.c:secp256k1_ge_storage_cmov:
  872|   410M|static SECP256K1_INLINE void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag) {
  873|   410M|    secp256k1_fe_storage_cmov(&r->x, &a->x, flag);
  874|   410M|    secp256k1_fe_storage_cmov(&r->y, &a->y, flag);
  875|   410M|}
secp256k1.c:secp256k1_gej_rescale:
  823|   298k|static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *s) {
  824|       |    /* Operations: 4 mul, 1 sqr */
  825|   298k|    secp256k1_fe zz;
  826|   298k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|   298k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  827|   298k|    SECP256K1_FE_VERIFY(s);
  ------------------
  |  |  344|   298k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  828|   298k|    VERIFY_CHECK(!secp256k1_fe_normalizes_to_zero_var(s));
  829|       |
  830|   298k|    secp256k1_fe_sqr(&zz, s);
  ------------------
  |  |   94|   298k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  831|   298k|    secp256k1_fe_mul(&r->x, &r->x, &zz);                /* r->x *= s^2 */
  ------------------
  |  |   93|   298k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  832|   298k|    secp256k1_fe_mul(&r->y, &r->y, &zz);
  ------------------
  |  |   93|   298k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  833|   298k|    secp256k1_fe_mul(&r->y, &r->y, s);                  /* r->y *= s^3 */
  ------------------
  |  |   93|   298k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  834|   298k|    secp256k1_fe_mul(&r->z, &r->z, s);                  /* r->z *= s   */
  ------------------
  |  |   93|   298k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  835|       |
  836|   298k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|   298k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  837|   298k|}
secp256k1.c:secp256k1_gej_double:
  422|  7.85M|static SECP256K1_INLINE void secp256k1_gej_double(secp256k1_gej *r, const secp256k1_gej *a) {
  423|       |    /* Operations: 3 mul, 4 sqr, 8 add/half/mul_int/negate */
  424|  7.85M|    secp256k1_fe l, s, t;
  425|  7.85M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  7.85M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  426|       |
  427|  7.85M|    r->infinity = a->infinity;
  428|       |
  429|       |    /* Formula used:
  430|       |     * L = (3/2) * X1^2
  431|       |     * S = Y1^2
  432|       |     * T = -X1*S
  433|       |     * X3 = L^2 + 2*T
  434|       |     * Y3 = -(L*(X3 + T) + S^2)
  435|       |     * Z3 = Y1*Z1
  436|       |     */
  437|       |
  438|  7.85M|    secp256k1_fe_mul(&r->z, &a->z, &a->y); /* Z3 = Y1*Z1 (1) */
  ------------------
  |  |   93|  7.85M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  439|  7.85M|    secp256k1_fe_sqr(&s, &a->y);           /* S = Y1^2 (1) */
  ------------------
  |  |   94|  7.85M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  440|  7.85M|    secp256k1_fe_sqr(&l, &a->x);           /* L = X1^2 (1) */
  ------------------
  |  |   94|  7.85M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  441|  7.85M|    secp256k1_fe_mul_int(&l, 3);           /* L = 3*X1^2 (3) */
  ------------------
  |  |  233|  7.85M|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   77|  7.85M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  7.85M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 7.85M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  7.85M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 7.85M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  7.85M|    } \
  |  |  |  |   84|  7.85M|    stmt; \
  |  |  |  |   85|  7.85M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  7.85M|    secp256k1_fe_half(&l);                 /* L = 3/2*X1^2 (2) */
  ------------------
  |  |  101|  7.85M|#  define secp256k1_fe_half secp256k1_fe_impl_half
  ------------------
  443|  7.85M|    secp256k1_fe_negate(&t, &s, 1);        /* T = -S (2) */
  ------------------
  |  |  211|  7.85M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  7.85M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  7.85M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 7.85M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  7.85M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 7.85M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  7.85M|    } \
  |  |  |  |   84|  7.85M|    stmt; \
  |  |  |  |   85|  7.85M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  444|  7.85M|    secp256k1_fe_mul(&t, &t, &a->x);       /* T = -X1*S (1) */
  ------------------
  |  |   93|  7.85M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  445|  7.85M|    secp256k1_fe_sqr(&r->x, &l);           /* X3 = L^2 (1) */
  ------------------
  |  |   94|  7.85M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  446|  7.85M|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + T (2) */
  ------------------
  |  |   92|  7.85M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  447|  7.85M|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + 2*T (3) */
  ------------------
  |  |   92|  7.85M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  448|  7.85M|    secp256k1_fe_sqr(&s, &s);              /* S' = S^2 (1) */
  ------------------
  |  |   94|  7.85M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  449|  7.85M|    secp256k1_fe_add(&t, &r->x);           /* T' = X3 + T (4) */
  ------------------
  |  |   92|  7.85M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  450|  7.85M|    secp256k1_fe_mul(&r->y, &t, &l);       /* Y3 = L*(X3 + T) (1) */
  ------------------
  |  |   93|  7.85M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  451|  7.85M|    secp256k1_fe_add(&r->y, &s);           /* Y3 = L*(X3 + T) + S^2 (2) */
  ------------------
  |  |   92|  7.85M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  452|  7.85M|    secp256k1_fe_negate(&r->y, &r->y, 2);  /* Y3 = -(L*(X3 + T) + S^2) (3) */
  ------------------
  |  |  211|  7.85M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  7.85M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  7.85M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 7.85M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  7.85M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 7.85M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  7.85M|    } \
  |  |  |  |   84|  7.85M|    stmt; \
  |  |  |  |   85|  7.85M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  453|       |
  454|  7.85M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  7.85M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  455|  7.85M|}
secp256k1.c:secp256k1_gej_clear:
  301|   298k|static void secp256k1_gej_clear(secp256k1_gej *r) {
  302|   298k|    secp256k1_memclear(r, sizeof(secp256k1_gej));
  303|   298k|}
secp256k1.c:secp256k1_gej_set_infinity:
  284|   125k|static void secp256k1_gej_set_infinity(secp256k1_gej *r) {
  285|   125k|    r->infinity = 1;
  286|   125k|    secp256k1_fe_set_int(&r->x, 0);
  ------------------
  |  |   83|   125k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  287|   125k|    secp256k1_fe_set_int(&r->y, 0);
  ------------------
  |  |   83|   125k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  288|   125k|    secp256k1_fe_set_int(&r->z, 0);
  ------------------
  |  |   83|   125k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  289|       |
  290|   125k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|   125k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  291|   125k|}
secp256k1.c:secp256k1_gej_add_ge:
  686|  12.8M|static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b) {
  687|       |    /* Operations: 7 mul, 5 sqr, 21 add/cmov/half/mul_int/negate/normalizes_to_zero */
  688|  12.8M|    secp256k1_fe zz, u1, u2, s1, s2, t, tt, m, n, q, rr;
  689|  12.8M|    secp256k1_fe m_alt, rr_alt;
  690|  12.8M|    int degenerate;
  691|  12.8M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  12.8M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  692|  12.8M|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  206|  12.8M|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  693|  12.8M|    VERIFY_CHECK(!b->infinity);
  694|       |
  695|       |    /*  In:
  696|       |     *    Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks.
  697|       |     *    In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002.
  698|       |     *  we find as solution for a unified addition/doubling formula:
  699|       |     *    lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation.
  700|       |     *    x3 = lambda^2 - (x1 + x2)
  701|       |     *    2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2).
  702|       |     *
  703|       |     *  Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives:
  704|       |     *    U1 = X1*Z2^2, U2 = X2*Z1^2
  705|       |     *    S1 = Y1*Z2^3, S2 = Y2*Z1^3
  706|       |     *    Z = Z1*Z2
  707|       |     *    T = U1+U2
  708|       |     *    M = S1+S2
  709|       |     *    Q = -T*M^2
  710|       |     *    R = T^2-U1*U2
  711|       |     *    X3 = R^2+Q
  712|       |     *    Y3 = -(R*(2*X3+Q)+M^4)/2
  713|       |     *    Z3 = M*Z
  714|       |     *  (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.)
  715|       |     *
  716|       |     *  This formula has the benefit of being the same for both addition
  717|       |     *  of distinct points and doubling. However, it breaks down in the
  718|       |     *  case that either point is infinity, or that y1 = -y2. We handle
  719|       |     *  these cases in the following ways:
  720|       |     *
  721|       |     *    - If b is infinity we simply bail by means of a VERIFY_CHECK.
  722|       |     *
  723|       |     *    - If a is infinity, we detect this, and at the end of the
  724|       |     *      computation replace the result (which will be meaningless,
  725|       |     *      but we compute to be constant-time) with b.x : b.y : 1.
  726|       |     *
  727|       |     *    - If a = -b, we have y1 = -y2, which is a degenerate case.
  728|       |     *      But here the answer is infinity, so we simply set the
  729|       |     *      infinity flag of the result, overriding the computed values
  730|       |     *      without even needing to cmov.
  731|       |     *
  732|       |     *    - If y1 = -y2 but x1 != x2, which does occur thanks to certain
  733|       |     *      properties of our curve (specifically, 1 has nontrivial cube
  734|       |     *      roots in our field, and the curve equation has no x coefficient)
  735|       |     *      then the answer is not infinity but also not given by the above
  736|       |     *      equation. In this case, we cmov in place an alternate expression
  737|       |     *      for lambda. Specifically (y1 - y2)/(x1 - x2). Where both these
  738|       |     *      expressions for lambda are defined, they are equal, and can be
  739|       |     *      obtained from each other by multiplication by (y1 + y2)/(y1 + y2)
  740|       |     *      then substitution of x^3 + 7 for y^2 (using the curve equation).
  741|       |     *      For all pairs of nonzero points (a, b) at least one is defined,
  742|       |     *      so this covers everything.
  743|       |     */
  744|       |
  745|  12.8M|    secp256k1_fe_sqr(&zz, &a->z);                       /* z = Z1^2 */
  ------------------
  |  |   94|  12.8M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  746|  12.8M|    u1 = a->x;                                          /* u1 = U1 = X1*Z2^2 (GEJ_X_M) */
  747|  12.8M|    secp256k1_fe_mul(&u2, &b->x, &zz);                  /* u2 = U2 = X2*Z1^2 (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  748|  12.8M|    s1 = a->y;                                          /* s1 = S1 = Y1*Z2^3 (GEJ_Y_M) */
  749|  12.8M|    secp256k1_fe_mul(&s2, &b->y, &zz);                  /* s2 = Y2*Z1^2 (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  750|  12.8M|    secp256k1_fe_mul(&s2, &s2, &a->z);                  /* s2 = S2 = Y2*Z1^3 (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  751|  12.8M|    t = u1; secp256k1_fe_add(&t, &u2);                  /* t = T = U1+U2 (GEJ_X_M+1) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  752|  12.8M|    m = s1; secp256k1_fe_add(&m, &s2);                  /* m = M = S1+S2 (GEJ_Y_M+1) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  753|  12.8M|    secp256k1_fe_sqr(&rr, &t);                          /* rr = T^2 (1) */
  ------------------
  |  |   94|  12.8M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  754|  12.8M|    secp256k1_fe_negate(&m_alt, &u2, 1);                /* Malt = -X2*Z1^2 (2) */
  ------------------
  |  |  211|  12.8M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  755|  12.8M|    secp256k1_fe_mul(&tt, &u1, &m_alt);                 /* tt = -U1*U2 (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  756|  12.8M|    secp256k1_fe_add(&rr, &tt);                         /* rr = R = T^2-U1*U2 (2) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  757|       |    /* If lambda = R/M = R/0 we have a problem (except in the "trivial"
  758|       |     * case that Z = z1z2 = 0, and this is special-cased later on). */
  759|  12.8M|    degenerate = secp256k1_fe_normalizes_to_zero(&m);
  ------------------
  |  |   81|  12.8M|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
  760|       |    /* This only occurs when y1 == -y2 and x1^3 == x2^3, but x1 != x2.
  761|       |     * This means either x1 == beta*x2 or beta*x1 == x2, where beta is
  762|       |     * a nontrivial cube root of one. In either case, an alternate
  763|       |     * non-indeterminate expression for lambda is (y1 - y2)/(x1 - x2),
  764|       |     * so we set R/M equal to this. */
  765|  12.8M|    rr_alt = s1;
  766|  12.8M|    secp256k1_fe_mul_int(&rr_alt, 2);       /* rr_alt = Y1*Z2^3 - Y2*Z1^3 (GEJ_Y_M*2) */
  ------------------
  |  |  233|  12.8M|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  767|  12.8M|    secp256k1_fe_add(&m_alt, &u1);          /* Malt = X1*Z2^2 - X2*Z1^2 (GEJ_X_M+2) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  768|       |
  769|  12.8M|    secp256k1_fe_cmov(&rr_alt, &rr, !degenerate);       /* rr_alt (GEJ_Y_M*2) */
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  770|  12.8M|    secp256k1_fe_cmov(&m_alt, &m, !degenerate);         /* m_alt (GEJ_X_M+2) */
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  771|       |    /* Now Ralt / Malt = lambda and is guaranteed not to be Ralt / 0.
  772|       |     * From here on out Ralt and Malt represent the numerator
  773|       |     * and denominator of lambda; R and M represent the explicit
  774|       |     * expressions x1^2 + x2^2 + x1x2 and y1 + y2. */
  775|  12.8M|    secp256k1_fe_sqr(&n, &m_alt);                       /* n = Malt^2 (1) */
  ------------------
  |  |   94|  12.8M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  776|  12.8M|    secp256k1_fe_negate(&q, &t,
  ------------------
  |  |  211|  12.8M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  777|  12.8M|        SECP256K1_GEJ_X_MAGNITUDE_MAX + 1);             /* q = -T (GEJ_X_M+2) */
  778|  12.8M|    secp256k1_fe_mul(&q, &q, &n);                       /* q = Q = -T*Malt^2 (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  779|       |    /* These two lines use the observation that either M == Malt or M == 0,
  780|       |     * so M^3 * Malt is either Malt^4 (which is computed by squaring), or
  781|       |     * zero (which is "computed" by cmov). So the cost is one squaring
  782|       |     * versus two multiplications. */
  783|  12.8M|    secp256k1_fe_sqr(&n, &n);                           /* n = Malt^4 (1) */
  ------------------
  |  |   94|  12.8M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  784|  12.8M|    secp256k1_fe_cmov(&n, &m, degenerate);              /* n = M^3 * Malt (GEJ_Y_M+1) */
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  785|  12.8M|    secp256k1_fe_sqr(&t, &rr_alt);                      /* t = Ralt^2 (1) */
  ------------------
  |  |   94|  12.8M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  786|  12.8M|    secp256k1_fe_mul(&r->z, &a->z, &m_alt);             /* r->z = Z3 = Malt*Z (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  787|  12.8M|    secp256k1_fe_add(&t, &q);                           /* t = Ralt^2 + Q (2) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  788|  12.8M|    r->x = t;                                           /* r->x = X3 = Ralt^2 + Q (2) */
  789|  12.8M|    secp256k1_fe_mul_int(&t, 2);                        /* t = 2*X3 (4) */
  ------------------
  |  |  233|  12.8M|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  790|  12.8M|    secp256k1_fe_add(&t, &q);                           /* t = 2*X3 + Q (5) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  791|  12.8M|    secp256k1_fe_mul(&t, &t, &rr_alt);                  /* t = Ralt*(2*X3 + Q) (1) */
  ------------------
  |  |   93|  12.8M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  792|  12.8M|    secp256k1_fe_add(&t, &n);                           /* t = Ralt*(2*X3 + Q) + M^3*Malt (GEJ_Y_M+2) */
  ------------------
  |  |   92|  12.8M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  793|  12.8M|    secp256k1_fe_negate(&r->y, &t,
  ------------------
  |  |  211|  12.8M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  12.8M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  12.8M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 12.8M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  12.8M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 12.8M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  12.8M|    } \
  |  |  |  |   84|  12.8M|    stmt; \
  |  |  |  |   85|  12.8M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  794|  12.8M|        SECP256K1_GEJ_Y_MAGNITUDE_MAX + 2);             /* r->y = -(Ralt*(2*X3 + Q) + M^3*Malt) (GEJ_Y_M+3) */
  795|  12.8M|    secp256k1_fe_half(&r->y);                           /* r->y = Y3 = -(Ralt*(2*X3 + Q) + M^3*Malt)/2 ((GEJ_Y_M+3)/2 + 1) */
  ------------------
  |  |  101|  12.8M|#  define secp256k1_fe_half secp256k1_fe_impl_half
  ------------------
  796|       |
  797|       |    /* In case a->infinity == 1, replace r with (b->x, b->y, 1). */
  798|  12.8M|    secp256k1_fe_cmov(&r->x, &b->x, a->infinity);
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  799|  12.8M|    secp256k1_fe_cmov(&r->y, &b->y, a->infinity);
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  800|  12.8M|    secp256k1_fe_cmov(&r->z, &secp256k1_fe_one, a->infinity);
  ------------------
  |  |   95|  12.8M|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  801|       |
  802|       |    /* Set r->infinity if r->z is 0.
  803|       |     *
  804|       |     * If a->infinity is set, then r->infinity = (r->z == 0) = (1 == 0) = false,
  805|       |     * which is correct because the function assumes that b is not infinity.
  806|       |     *
  807|       |     * Now assume !a->infinity. This implies Z = Z1 != 0.
  808|       |     *
  809|       |     * Case y1 = -y2:
  810|       |     * In this case we could have a = -b, namely if x1 = x2.
  811|       |     * We have degenerate = true, r->z = (x1 - x2) * Z.
  812|       |     * Then r->infinity = ((x1 - x2)Z == 0) = (x1 == x2) = (a == -b).
  813|       |     *
  814|       |     * Case y1 != -y2:
  815|       |     * In this case, we can't have a = -b.
  816|       |     * We have degenerate = false, r->z = (y1 + y2) * Z.
  817|       |     * Then r->infinity = ((y1 + y2)Z == 0) = (y1 == -y2) = false. */
  818|  12.8M|    r->infinity = secp256k1_fe_normalizes_to_zero(&r->z);
  ------------------
  |  |   81|  12.8M|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
  819|       |
  820|  12.8M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  12.8M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  821|  12.8M|}
secp256k1.c:secp256k1_gej_is_infinity:
  402|   139k|static int secp256k1_gej_is_infinity(const secp256k1_gej *a) {
  403|   139k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|   139k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  404|       |
  405|   139k|    return a->infinity;
  406|   139k|}
secp256k1.c:secp256k1_ge_set_gej:
  159|   345k|static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a) {
  160|   345k|    secp256k1_fe z2, z3;
  161|   345k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|   345k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  162|       |
  163|   345k|    r->infinity = a->infinity;
  164|   345k|    secp256k1_fe_inv(&a->z, &a->z);
  ------------------
  |  |   98|   345k|#  define secp256k1_fe_inv secp256k1_fe_impl_inv
  ------------------
  165|   345k|    secp256k1_fe_sqr(&z2, &a->z);
  ------------------
  |  |   94|   345k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  166|   345k|    secp256k1_fe_mul(&z3, &a->z, &z2);
  ------------------
  |  |   93|   345k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  167|   345k|    secp256k1_fe_mul(&a->x, &a->x, &z2);
  ------------------
  |  |   93|   345k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  168|   345k|    secp256k1_fe_mul(&a->y, &a->y, &z3);
  ------------------
  |  |   93|   345k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  169|   345k|    secp256k1_fe_set_int(&a->z, 1);
  ------------------
  |  |   83|   345k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  170|   345k|    r->x = a->x;
  171|   345k|    r->y = a->y;
  172|       |
  173|   345k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|   345k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  174|   345k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|   345k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  175|   345k|}
secp256k1.c:secp256k1_ge_set_xo_var:
  309|  84.8k|static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) {
  310|  84.8k|    secp256k1_fe x2, x3;
  311|  84.8k|    int ret;
  312|  84.8k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  344|  84.8k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  313|       |
  314|  84.8k|    r->x = *x;
  315|  84.8k|    secp256k1_fe_sqr(&x2, x);
  ------------------
  |  |   94|  84.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  316|  84.8k|    secp256k1_fe_mul(&x3, x, &x2);
  ------------------
  |  |   93|  84.8k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  317|  84.8k|    r->infinity = 0;
  318|  84.8k|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|  84.8k|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|  84.8k|#define SECP256K1_B 7
  ------------------
  319|  84.8k|    ret = secp256k1_fe_sqrt(&r->y, &x3);
  320|  84.8k|    secp256k1_fe_normalize_var(&r->y);
  ------------------
  |  |   80|  84.8k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  321|  84.8k|    if (secp256k1_fe_is_odd(&r->y) != odd) {
  ------------------
  |  |   85|  84.8k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (321:9): [True: 41.5k, False: 43.3k]
  ------------------
  322|  41.5k|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|  41.5k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  41.5k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  41.5k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 41.5k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  41.5k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 41.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  41.5k|    } \
  |  |  |  |   84|  41.5k|    stmt; \
  |  |  |  |   85|  41.5k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  41.5k|    }
  324|       |
  325|  84.8k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|  84.8k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  326|  84.8k|    return ret;
  327|  84.8k|}
secp256k1.c:secp256k1_gej_set_ge:
  329|   432k|static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a) {
  330|   432k|   SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|   432k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  331|       |
  332|   432k|   r->infinity = a->infinity;
  333|   432k|   r->x = a->x;
  334|   432k|   r->y = a->y;
  335|   432k|   secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|   432k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  336|       |
  337|   432k|   SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|   432k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  338|   432k|}
secp256k1.c:secp256k1_ge_set_gej_zinv:
   99|  62.6k|static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
  100|  62.6k|    secp256k1_fe zi2;
  101|  62.6k|    secp256k1_fe zi3;
  102|  62.6k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  62.6k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  103|  62.6k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  344|  62.6k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  104|  62.6k|    VERIFY_CHECK(!a->infinity);
  105|       |
  106|  62.6k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|  62.6k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  107|  62.6k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|  62.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  108|  62.6k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|  62.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  109|  62.6k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|  62.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  110|  62.6k|    r->infinity = a->infinity;
  111|       |
  112|  62.6k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|  62.6k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  113|  62.6k|}
secp256k1.c:secp256k1_ge_table_set_globalz:
  251|  62.6k|static void secp256k1_ge_table_set_globalz(size_t len, secp256k1_ge *a, const secp256k1_fe *zr) {
  252|  62.6k|    size_t i;
  253|  62.6k|    secp256k1_fe zs;
  254|       |#ifdef VERIFY
  255|       |    for (i = 0; i < len; i++) {
  256|       |        SECP256K1_GE_VERIFY(&a[i]);
  257|       |        SECP256K1_FE_VERIFY(&zr[i]);
  258|       |    }
  259|       |#endif
  260|       |
  261|  62.6k|    if (len > 0) {
  ------------------
  |  Branch (261:9): [True: 62.6k, False: 0]
  ------------------
  262|  62.6k|        i = len - 1;
  263|       |        /* Ensure all y values are in weak normal form for fast negation of points */
  264|  62.6k|        secp256k1_fe_normalize_weak(&a[i].y);
  ------------------
  |  |   79|  62.6k|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  265|  62.6k|        zs = zr[i];
  266|       |
  267|       |        /* Work our way backwards, using the z-ratios to scale the x/y values. */
  268|   500k|        while (i > 0) {
  ------------------
  |  Branch (268:16): [True: 438k, False: 62.6k]
  ------------------
  269|   438k|            if (i != len - 1) {
  ------------------
  |  Branch (269:17): [True: 375k, False: 62.6k]
  ------------------
  270|   375k|                secp256k1_fe_mul(&zs, &zs, &zr[i]);
  ------------------
  |  |   93|   375k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  271|   375k|            }
  272|   438k|            i--;
  273|   438k|            secp256k1_ge_set_ge_zinv(&a[i], &a[i], &zs);
  274|   438k|        }
  275|  62.6k|    }
  276|       |
  277|       |#ifdef VERIFY
  278|       |    for (i = 0; i < len; i++) {
  279|       |        SECP256K1_GE_VERIFY(&a[i]);
  280|       |    }
  281|       |#endif
  282|  62.6k|}
secp256k1.c:secp256k1_ge_set_ge_zinv:
  116|   438k|static void secp256k1_ge_set_ge_zinv(secp256k1_ge *r, const secp256k1_ge *a, const secp256k1_fe *zi) {
  117|   438k|    secp256k1_fe zi2;
  118|   438k|    secp256k1_fe zi3;
  119|   438k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|   438k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  120|   438k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  344|   438k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  121|   438k|    VERIFY_CHECK(!a->infinity);
  122|       |
  123|   438k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|   438k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|   438k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|   438k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  125|   438k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|   438k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|   438k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|   438k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  127|   438k|    r->infinity = a->infinity;
  128|       |
  129|   438k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|   438k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  130|   438k|}
secp256k1.c:secp256k1_gej_double_var:
  457|  7.91M|static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) {
  458|  7.91M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  7.91M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  459|       |
  460|       |    /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity,
  461|       |     *  Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have
  462|       |     *  y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p.
  463|       |     *
  464|       |     *  Having said this, if this function receives a point on a sextic twist, e.g. by
  465|       |     *  a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6,
  466|       |     *  since -6 does have a cube root mod p. For this point, this function will not set
  467|       |     *  the infinity flag even though the point doubles to infinity, and the result
  468|       |     *  point will be gibberish (z = 0 but infinity = 0).
  469|       |     */
  470|  7.91M|    if (a->infinity) {
  ------------------
  |  Branch (470:9): [True: 62.6k, False: 7.85M]
  ------------------
  471|  62.6k|        secp256k1_gej_set_infinity(r);
  472|  62.6k|        if (rzr != NULL) {
  ------------------
  |  Branch (472:13): [True: 0, False: 62.6k]
  ------------------
  473|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  474|      0|        }
  475|  62.6k|        return;
  476|  62.6k|    }
  477|       |
  478|  7.85M|    if (rzr != NULL) {
  ------------------
  |  Branch (478:9): [True: 0, False: 7.85M]
  ------------------
  479|      0|        *rzr = a->y;
  480|      0|        secp256k1_fe_normalize_weak(rzr);
  ------------------
  |  |   79|      0|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  481|      0|    }
  482|       |
  483|  7.85M|    secp256k1_gej_double(r, a);
  484|       |
  485|  7.85M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  7.85M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  486|  7.85M|}
secp256k1.c:secp256k1_gej_add_ge_var:
  552|  1.12M|static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr) {
  553|       |    /* Operations: 8 mul, 3 sqr, 11 add/negate/normalizes_to_zero (ignoring special cases) */
  554|  1.12M|    secp256k1_fe z12, u1, u2, s1, s2, h, i, h2, h3, t;
  555|  1.12M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  1.12M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  556|  1.12M|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  206|  1.12M|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  557|       |
  558|  1.12M|    if (a->infinity) {
  ------------------
  |  Branch (558:9): [True: 8.84k, False: 1.11M]
  ------------------
  559|  8.84k|        VERIFY_CHECK(rzr == NULL);
  560|  8.84k|        secp256k1_gej_set_ge(r, b);
  561|  8.84k|        return;
  562|  8.84k|    }
  563|  1.11M|    if (b->infinity) {
  ------------------
  |  Branch (563:9): [True: 0, False: 1.11M]
  ------------------
  564|      0|        if (rzr != NULL) {
  ------------------
  |  Branch (564:13): [True: 0, False: 0]
  ------------------
  565|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  566|      0|        }
  567|      0|        *r = *a;
  568|      0|        return;
  569|      0|    }
  570|       |
  571|  1.11M|    secp256k1_fe_sqr(&z12, &a->z);
  ------------------
  |  |   94|  1.11M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  572|  1.11M|    u1 = a->x;
  573|  1.11M|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  574|  1.11M|    s1 = a->y;
  575|  1.11M|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  576|  1.11M|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|  1.11M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.11M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.11M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.11M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.11M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.11M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.11M|    } \
  |  |  |  |   84|  1.11M|    stmt; \
  |  |  |  |   85|  1.11M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  577|  1.11M|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|  1.11M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.11M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.11M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.11M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.11M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.11M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.11M|    } \
  |  |  |  |   84|  1.11M|    stmt; \
  |  |  |  |   85|  1.11M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  578|  1.11M|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|  1.11M|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (578:9): [True: 0, False: 1.11M]
  ------------------
  579|      0|        if (secp256k1_fe_normalizes_to_zero_var(&i)) {
  ------------------
  |  |   82|      0|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (579:13): [True: 0, False: 0]
  ------------------
  580|      0|            secp256k1_gej_double_var(r, a, rzr);
  581|      0|        } else {
  582|      0|            if (rzr != NULL) {
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  ------------------
  583|      0|                secp256k1_fe_set_int(rzr, 0);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  584|      0|            }
  585|      0|            secp256k1_gej_set_infinity(r);
  586|      0|        }
  587|      0|        return;
  588|      0|    }
  589|       |
  590|  1.11M|    r->infinity = 0;
  591|  1.11M|    if (rzr != NULL) {
  ------------------
  |  Branch (591:9): [True: 438k, False: 674k]
  ------------------
  592|   438k|        *rzr = h;
  593|   438k|    }
  594|  1.11M|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  595|       |
  596|  1.11M|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|  1.11M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  597|  1.11M|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|  1.11M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.11M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.11M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.11M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.11M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.11M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.11M|    } \
  |  |  |  |   84|  1.11M|    stmt; \
  |  |  |  |   85|  1.11M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  598|  1.11M|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  599|  1.11M|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  600|       |
  601|  1.11M|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|  1.11M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  602|  1.11M|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  603|  1.11M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  604|  1.11M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  605|       |
  606|  1.11M|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  607|  1.11M|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  608|  1.11M|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|  1.11M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  609|  1.11M|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|  1.11M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  610|       |
  611|  1.11M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  1.11M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  612|  1.11M|    if (rzr != NULL) SECP256K1_FE_VERIFY(rzr);
  ------------------
  |  |  344|   438k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  |  Branch (612:9): [True: 438k, False: 674k]
  ------------------
  613|  1.11M|}
secp256k1.c:secp256k1_gej_add_zinv_var:
  615|  1.06M|static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv) {
  616|       |    /* Operations: 9 mul, 3 sqr, 11 add/negate/normalizes_to_zero (ignoring special cases) */
  617|  1.06M|    secp256k1_fe az, z12, u1, u2, s1, s2, h, i, h2, h3, t;
  618|  1.06M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  1.06M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  619|  1.06M|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  206|  1.06M|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  620|  1.06M|    SECP256K1_FE_VERIFY(bzinv);
  ------------------
  |  |  344|  1.06M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  621|       |
  622|  1.06M|    if (a->infinity) {
  ------------------
  |  Branch (622:9): [True: 53.7k, False: 1.01M]
  ------------------
  623|  53.7k|        secp256k1_fe bzinv2, bzinv3;
  624|  53.7k|        r->infinity = b->infinity;
  625|  53.7k|        secp256k1_fe_sqr(&bzinv2, bzinv);
  ------------------
  |  |   94|  53.7k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  626|  53.7k|        secp256k1_fe_mul(&bzinv3, &bzinv2, bzinv);
  ------------------
  |  |   93|  53.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  627|  53.7k|        secp256k1_fe_mul(&r->x, &b->x, &bzinv2);
  ------------------
  |  |   93|  53.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  628|  53.7k|        secp256k1_fe_mul(&r->y, &b->y, &bzinv3);
  ------------------
  |  |   93|  53.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  629|  53.7k|        secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|  53.7k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  630|  53.7k|        SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  53.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  631|  53.7k|        return;
  632|  53.7k|    }
  633|  1.01M|    if (b->infinity) {
  ------------------
  |  Branch (633:9): [True: 0, False: 1.01M]
  ------------------
  634|      0|        *r = *a;
  635|      0|        return;
  636|      0|    }
  637|       |
  638|       |    /** We need to calculate (rx,ry,rz) = (ax,ay,az) + (bx,by,1/bzinv). Due to
  639|       |     *  secp256k1's isomorphism we can multiply the Z coordinates on both sides
  640|       |     *  by bzinv, and get: (rx,ry,rz*bzinv) = (ax,ay,az*bzinv) + (bx,by,1).
  641|       |     *  This means that (rx,ry,rz) can be calculated as
  642|       |     *  (ax,ay,az*bzinv) + (bx,by,1), when not applying the bzinv factor to rz.
  643|       |     *  The variable az below holds the modified Z coordinate for a, which is used
  644|       |     *  for the computation of rx and ry, but not for rz.
  645|       |     */
  646|  1.01M|    secp256k1_fe_mul(&az, &a->z, bzinv);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  647|       |
  648|  1.01M|    secp256k1_fe_sqr(&z12, &az);
  ------------------
  |  |   94|  1.01M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  649|  1.01M|    u1 = a->x;
  650|  1.01M|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  651|  1.01M|    s1 = a->y;
  652|  1.01M|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  653|  1.01M|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|  1.01M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.01M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.01M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.01M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.01M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.01M|    } \
  |  |  |  |   84|  1.01M|    stmt; \
  |  |  |  |   85|  1.01M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  654|  1.01M|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|  1.01M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.01M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.01M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.01M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.01M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.01M|    } \
  |  |  |  |   84|  1.01M|    stmt; \
  |  |  |  |   85|  1.01M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  655|  1.01M|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|  1.01M|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (655:9): [True: 0, False: 1.01M]
  ------------------
  656|      0|        if (secp256k1_fe_normalizes_to_zero_var(&i)) {
  ------------------
  |  |   82|      0|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (656:13): [True: 0, False: 0]
  ------------------
  657|      0|            secp256k1_gej_double_var(r, a, NULL);
  658|      0|        } else {
  659|      0|            secp256k1_gej_set_infinity(r);
  660|      0|        }
  661|      0|        return;
  662|      0|    }
  663|       |
  664|  1.01M|    r->infinity = 0;
  665|  1.01M|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  666|       |
  667|  1.01M|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|  1.01M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  668|  1.01M|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|  1.01M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  1.01M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  1.01M|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  1.01M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 1.01M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  1.01M|    } \
  |  |  |  |   84|  1.01M|    stmt; \
  |  |  |  |   85|  1.01M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|  1.01M|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  670|  1.01M|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  671|       |
  672|  1.01M|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|  1.01M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  673|  1.01M|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  674|  1.01M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  675|  1.01M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  676|       |
  677|  1.01M|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  678|  1.01M|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  679|  1.01M|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|  1.01M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  680|  1.01M|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|  1.01M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  681|       |
  682|  1.01M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  210|  1.01M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  683|  1.01M|}
secp256k1.c:secp256k1_ge_set_gej_var:
  177|  14.7k|static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) {
  178|  14.7k|    secp256k1_fe z2, z3;
  179|  14.7k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  14.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  180|       |
  181|  14.7k|    if (secp256k1_gej_is_infinity(a)) {
  ------------------
  |  Branch (181:9): [True: 0, False: 14.7k]
  ------------------
  182|      0|        secp256k1_ge_set_infinity(r);
  183|      0|        return;
  184|      0|    }
  185|  14.7k|    r->infinity = 0;
  186|  14.7k|    secp256k1_fe_inv_var(&a->z, &a->z);
  ------------------
  |  |   99|  14.7k|#  define secp256k1_fe_inv_var secp256k1_fe_impl_inv_var
  ------------------
  187|  14.7k|    secp256k1_fe_sqr(&z2, &a->z);
  ------------------
  |  |   94|  14.7k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  188|  14.7k|    secp256k1_fe_mul(&z3, &a->z, &z2);
  ------------------
  |  |   93|  14.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  189|  14.7k|    secp256k1_fe_mul(&a->x, &a->x, &z2);
  ------------------
  |  |   93|  14.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  190|  14.7k|    secp256k1_fe_mul(&a->y, &a->y, &z3);
  ------------------
  |  |   93|  14.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  191|  14.7k|    secp256k1_fe_set_int(&a->z, 1);
  ------------------
  |  |   83|  14.7k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  192|  14.7k|    secp256k1_ge_set_xy(r, &a->x, &a->y);
  193|       |
  194|  14.7k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  210|  14.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  195|  14.7k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|  14.7k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  196|  14.7k|}
secp256k1.c:secp256k1_ge_is_infinity:
  143|   342k|static int secp256k1_ge_is_infinity(const secp256k1_ge *a) {
  144|   342k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|   342k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  145|       |
  146|   342k|    return a->infinity;
  147|   342k|}

secp256k1.c:secp256k1_sha256_initialize:
   31|   147k|static void secp256k1_sha256_initialize(secp256k1_sha256 *hash) {
   32|   147k|    hash->s[0] = 0x6a09e667ul;
   33|   147k|    hash->s[1] = 0xbb67ae85ul;
   34|   147k|    hash->s[2] = 0x3c6ef372ul;
   35|   147k|    hash->s[3] = 0xa54ff53aul;
   36|   147k|    hash->s[4] = 0x510e527ful;
   37|   147k|    hash->s[5] = 0x9b05688cul;
   38|   147k|    hash->s[6] = 0x1f83d9abul;
   39|   147k|    hash->s[7] = 0x5be0cd19ul;
   40|   147k|    hash->bytes = 0;
   41|   147k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_initialize:
  222|  14.7k|static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256 *rng, const unsigned char *key, size_t keylen) {
  223|  14.7k|    secp256k1_hmac_sha256 hmac;
  224|  14.7k|    static const unsigned char zero[1] = {0x00};
  225|  14.7k|    static const unsigned char one[1] = {0x01};
  226|       |
  227|  14.7k|    memset(rng->v, 0x01, 32); /* RFC6979 3.2.b. */
  228|  14.7k|    memset(rng->k, 0x00, 32); /* RFC6979 3.2.c. */
  229|       |
  230|       |    /* RFC6979 3.2.d. */
  231|  14.7k|    secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  232|  14.7k|    secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  233|  14.7k|    secp256k1_hmac_sha256_write(&hmac, zero, 1);
  234|  14.7k|    secp256k1_hmac_sha256_write(&hmac, key, keylen);
  235|  14.7k|    secp256k1_hmac_sha256_finalize(&hmac, rng->k);
  236|  14.7k|    secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  237|  14.7k|    secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  238|  14.7k|    secp256k1_hmac_sha256_finalize(&hmac, rng->v);
  239|       |
  240|       |    /* RFC6979 3.2.f. */
  241|  14.7k|    secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  242|  14.7k|    secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  243|  14.7k|    secp256k1_hmac_sha256_write(&hmac, one, 1);
  244|  14.7k|    secp256k1_hmac_sha256_write(&hmac, key, keylen);
  245|  14.7k|    secp256k1_hmac_sha256_finalize(&hmac, rng->k);
  246|  14.7k|    secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  247|  14.7k|    secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  248|  14.7k|    secp256k1_hmac_sha256_finalize(&hmac, rng->v);
  249|  14.7k|    rng->retry = 0;
  250|  14.7k|}
secp256k1.c:secp256k1_hmac_sha256_initialize:
  178|  73.5k|static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256 *hash, const unsigned char *key, size_t keylen) {
  179|  73.5k|    size_t n;
  180|  73.5k|    unsigned char rkey[64];
  181|  73.5k|    if (keylen <= sizeof(rkey)) {
  ------------------
  |  Branch (181:9): [True: 73.5k, False: 0]
  ------------------
  182|  73.5k|        memcpy(rkey, key, keylen);
  183|  73.5k|        memset(rkey + keylen, 0, sizeof(rkey) - keylen);
  184|  73.5k|    } else {
  185|      0|        secp256k1_sha256 sha256;
  186|      0|        secp256k1_sha256_initialize(&sha256);
  187|      0|        secp256k1_sha256_write(&sha256, key, keylen);
  188|      0|        secp256k1_sha256_finalize(&sha256, rkey);
  189|      0|        memset(rkey + 32, 0, 32);
  190|      0|    }
  191|       |
  192|  73.5k|    secp256k1_sha256_initialize(&hash->outer);
  193|  4.77M|    for (n = 0; n < sizeof(rkey); n++) {
  ------------------
  |  Branch (193:17): [True: 4.70M, False: 73.5k]
  ------------------
  194|  4.70M|        rkey[n] ^= 0x5c;
  195|  4.70M|    }
  196|  73.5k|    secp256k1_sha256_write(&hash->outer, rkey, sizeof(rkey));
  197|       |
  198|  73.5k|    secp256k1_sha256_initialize(&hash->inner);
  199|  4.77M|    for (n = 0; n < sizeof(rkey); n++) {
  ------------------
  |  Branch (199:17): [True: 4.70M, False: 73.5k]
  ------------------
  200|  4.70M|        rkey[n] ^= 0x5c ^ 0x36;
  201|  4.70M|    }
  202|  73.5k|    secp256k1_sha256_write(&hash->inner, rkey, sizeof(rkey));
  203|  73.5k|    secp256k1_memclear(rkey, sizeof(rkey));
  204|  73.5k|}
secp256k1.c:secp256k1_hmac_sha256_write:
  206|   132k|static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256 *hash, const unsigned char *data, size_t size) {
  207|   132k|    secp256k1_sha256_write(&hash->inner, data, size);
  208|   132k|}
secp256k1.c:secp256k1_hmac_sha256_finalize:
  210|  73.5k|static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256 *hash, unsigned char *out32) {
  211|  73.5k|    unsigned char temp[32];
  212|  73.5k|    secp256k1_sha256_finalize(&hash->inner, temp);
  213|  73.5k|    secp256k1_sha256_write(&hash->outer, temp, 32);
  214|  73.5k|    secp256k1_memclear(temp, sizeof(temp));
  215|  73.5k|    secp256k1_sha256_finalize(&hash->outer, out32);
  216|  73.5k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_generate:
  252|  14.7k|static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256 *rng, unsigned char *out, size_t outlen) {
  253|       |    /* RFC6979 3.2.h. */
  254|  14.7k|    static const unsigned char zero[1] = {0x00};
  255|  14.7k|    if (rng->retry) {
  ------------------
  |  Branch (255:9): [True: 0, False: 14.7k]
  ------------------
  256|      0|        secp256k1_hmac_sha256 hmac;
  257|      0|        secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  258|      0|        secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  259|      0|        secp256k1_hmac_sha256_write(&hmac, zero, 1);
  260|      0|        secp256k1_hmac_sha256_finalize(&hmac, rng->k);
  261|      0|        secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  262|      0|        secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  263|      0|        secp256k1_hmac_sha256_finalize(&hmac, rng->v);
  264|      0|    }
  265|       |
  266|  29.4k|    while (outlen > 0) {
  ------------------
  |  Branch (266:12): [True: 14.7k, False: 14.7k]
  ------------------
  267|  14.7k|        secp256k1_hmac_sha256 hmac;
  268|  14.7k|        int now = outlen;
  269|  14.7k|        secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32);
  270|  14.7k|        secp256k1_hmac_sha256_write(&hmac, rng->v, 32);
  271|  14.7k|        secp256k1_hmac_sha256_finalize(&hmac, rng->v);
  272|  14.7k|        if (now > 32) {
  ------------------
  |  Branch (272:13): [True: 0, False: 14.7k]
  ------------------
  273|      0|            now = 32;
  274|      0|        }
  275|  14.7k|        memcpy(out, rng->v, now);
  276|  14.7k|        out += now;
  277|  14.7k|        outlen -= now;
  278|  14.7k|    }
  279|       |
  280|  14.7k|    rng->retry = 1;
  281|  14.7k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_finalize:
  283|  14.7k|static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256 *rng) {
  284|  14.7k|    (void) rng;
  285|  14.7k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_clear:
  287|  14.7k|static void secp256k1_rfc6979_hmac_sha256_clear(secp256k1_rfc6979_hmac_sha256 *rng) {
  288|  14.7k|    secp256k1_memclear(rng, sizeof(*rng));
  289|  14.7k|}
secp256k1.c:secp256k1_sha256_write:
  126|   647k|static void secp256k1_sha256_write(secp256k1_sha256 *hash, const unsigned char *data, size_t len) {
  127|   647k|    size_t bufsize = hash->bytes & 0x3F;
  128|   647k|    hash->bytes += len;
  129|   647k|    VERIFY_CHECK(hash->bytes >= len);
  130|   970k|    while (len >= 64 - bufsize) {
  ------------------
  |  Branch (130:12): [True: 323k, False: 647k]
  ------------------
  131|       |        /* Fill the buffer, and process it. */
  132|   323k|        size_t chunk_len = 64 - bufsize;
  133|   323k|        memcpy(hash->buf + bufsize, data, chunk_len);
  134|   323k|        data += chunk_len;
  135|   323k|        len -= chunk_len;
  136|   323k|        secp256k1_sha256_transform(hash->s, hash->buf);
  137|   323k|        bufsize = 0;
  138|   323k|    }
  139|   647k|    if (len) {
  ------------------
  |  Branch (139:9): [True: 352k, False: 294k]
  ------------------
  140|       |        /* Fill the buffer with what remains. */
  141|   352k|        memcpy(hash->buf + bufsize, data, len);
  142|   352k|    }
  143|   647k|}
secp256k1.c:secp256k1_sha256_transform:
   44|   323k|static void secp256k1_sha256_transform(uint32_t* s, const unsigned char* buf) {
   45|   323k|    uint32_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];
   46|   323k|    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
   47|       |
   48|   323k|    Round(a, b, c, d, e, f, g, h, 0x428a2f98,  w0 = secp256k1_read_be32(&buf[0]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   49|   323k|    Round(h, a, b, c, d, e, f, g, 0x71374491,  w1 = secp256k1_read_be32(&buf[4]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   50|   323k|    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf,  w2 = secp256k1_read_be32(&buf[8]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   51|   323k|    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5,  w3 = secp256k1_read_be32(&buf[12]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   52|   323k|    Round(e, f, g, h, a, b, c, d, 0x3956c25b,  w4 = secp256k1_read_be32(&buf[16]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   53|   323k|    Round(d, e, f, g, h, a, b, c, 0x59f111f1,  w5 = secp256k1_read_be32(&buf[20]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   54|   323k|    Round(c, d, e, f, g, h, a, b, 0x923f82a4,  w6 = secp256k1_read_be32(&buf[24]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   55|   323k|    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5,  w7 = secp256k1_read_be32(&buf[28]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   56|   323k|    Round(a, b, c, d, e, f, g, h, 0xd807aa98,  w8 = secp256k1_read_be32(&buf[32]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   57|   323k|    Round(h, a, b, c, d, e, f, g, 0x12835b01,  w9 = secp256k1_read_be32(&buf[36]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   58|   323k|    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = secp256k1_read_be32(&buf[40]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   59|   323k|    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = secp256k1_read_be32(&buf[44]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|   323k|    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = secp256k1_read_be32(&buf[48]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|   323k|    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = secp256k1_read_be32(&buf[52]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   62|   323k|    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = secp256k1_read_be32(&buf[56]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|   323k|    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = secp256k1_read_be32(&buf[60]));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   64|       |
   65|   323k|    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   66|   323k|    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|   323k|    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   68|   323k|    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|   323k|    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|   323k|    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|   323k|    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|   323k|    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   73|   323k|    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   74|   323k|    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   75|   323k|    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   76|   323k|    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   77|   323k|    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|   323k|    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   79|   323k|    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   80|   323k|    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   81|       |
   82|   323k|    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|   323k|    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|   323k|    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|   323k|    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|   323k|    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   87|   323k|    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|   323k|    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   89|   323k|    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|   323k|    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   91|   323k|    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|   323k|    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|   323k|    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   94|   323k|    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|   323k|    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|   323k|    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|   323k|    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|       |
   99|   323k|    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  100|   323k|    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  101|   323k|    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  102|   323k|    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|   323k|    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  104|   323k|    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|   323k|    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  106|   323k|    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|   323k|    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  108|   323k|    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  109|   323k|    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  110|   323k|    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  111|   323k|    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|   323k|    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|   323k|    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|   323k|    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|   323k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|   323k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|   323k|#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
  |  |  ------------------
  |  |                   uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   17|   323k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|   323k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|   323k|#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
  |  |  ------------------
  |  |                   uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   18|   323k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|   323k|    (d) += t1; \
  |  |   28|   323k|    (h) = t1 + t2; \
  |  |   29|   323k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|       |
  116|   323k|    s[0] += a;
  117|   323k|    s[1] += b;
  118|   323k|    s[2] += c;
  119|   323k|    s[3] += d;
  120|   323k|    s[4] += e;
  121|   323k|    s[5] += f;
  122|   323k|    s[6] += g;
  123|   323k|    s[7] += h;
  124|   323k|}
secp256k1.c:secp256k1_sha256_finalize:
  145|   147k|static void secp256k1_sha256_finalize(secp256k1_sha256 *hash, unsigned char *out32) {
  146|   147k|    static const unsigned char pad[64] = {0x80};
  147|   147k|    unsigned char sizedesc[8];
  148|   147k|    int i;
  149|       |    /* The maximum message size of SHA256 is 2^64-1 bits. */
  150|   147k|    VERIFY_CHECK(hash->bytes < ((uint64_t)1 << 61));
  151|   147k|    secp256k1_write_be32(&sizedesc[0], hash->bytes >> 29);
  152|   147k|    secp256k1_write_be32(&sizedesc[4], hash->bytes << 3);
  153|   147k|    secp256k1_sha256_write(hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64));
  154|   147k|    secp256k1_sha256_write(hash, sizedesc, 8);
  155|  1.32M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (155:17): [True: 1.17M, False: 147k]
  ------------------
  156|  1.17M|        secp256k1_write_be32(&out32[4*i], hash->s[i]);
  157|  1.17M|        hash->s[i] = 0;
  158|  1.17M|    }
  159|   147k|}

secp256k1.c:secp256k1_u128_mul:
   11|   786M|static SECP256K1_INLINE void secp256k1_u128_mul(secp256k1_uint128 *r, uint64_t a, uint64_t b) {
   12|   786M|   *r = (uint128_t)a * b;
   13|   786M|}
secp256k1.c:secp256k1_u128_accum_mul:
   15|  6.09G|static SECP256K1_INLINE void secp256k1_u128_accum_mul(secp256k1_uint128 *r, uint64_t a, uint64_t b) {
   16|  6.09G|   *r += (uint128_t)a * b;
   17|  6.09G|}
secp256k1.c:secp256k1_u128_to_u64:
   28|  3.41G|static SECP256K1_INLINE uint64_t secp256k1_u128_to_u64(const secp256k1_uint128 *a) {
   29|  3.41G|   return (uint64_t)(*a);
   30|  3.41G|}
secp256k1.c:secp256k1_u128_rshift:
   23|  2.62G|static SECP256K1_INLINE void secp256k1_u128_rshift(secp256k1_uint128 *r, unsigned int n) {
   24|  2.62G|   VERIFY_CHECK(n < 128);
   25|  2.62G|   *r >>= n;
   26|  2.62G|}
secp256k1.c:secp256k1_u128_accum_u64:
   19|   275M|static SECP256K1_INLINE void secp256k1_u128_accum_u64(secp256k1_uint128 *r, uint64_t a) {
   20|   275M|   *r += a;
   21|   275M|}
secp256k1.c:secp256k1_u128_from_u64:
   36|  2.17M|static SECP256K1_INLINE void secp256k1_u128_from_u64(secp256k1_uint128 *r, uint64_t a) {
   37|  2.17M|   *r = a;
   38|  2.17M|}
secp256k1.c:secp256k1_i128_mul:
   49|  15.4M|static SECP256K1_INLINE void secp256k1_i128_mul(secp256k1_int128 *r, int64_t a, int64_t b) {
   50|  15.4M|   *r = (int128_t)a * b;
   51|  15.4M|}
secp256k1.c:secp256k1_i128_accum_mul:
   53|   153M|static SECP256K1_INLINE void secp256k1_i128_accum_mul(secp256k1_int128 *r, int64_t a, int64_t b) {
   54|   153M|   int128_t ab = (int128_t)a * b;
   55|   153M|   VERIFY_CHECK(0 <= ab ? *r <= INT128_MAX - ab : INT128_MIN - ab <= *r);
   56|   153M|   *r += ab;
   57|   153M|}
secp256k1.c:secp256k1_i128_to_u64:
   71|  68.5M|static SECP256K1_INLINE uint64_t secp256k1_i128_to_u64(const secp256k1_int128 *a) {
   72|  68.5M|   return (uint64_t)*a;
   73|  68.5M|}
secp256k1.c:secp256k1_i128_rshift:
   66|  76.2M|static SECP256K1_INLINE void secp256k1_i128_rshift(secp256k1_int128 *r, unsigned int n) {
   67|  76.2M|   VERIFY_CHECK(n < 128);
   68|  76.2M|   *r >>= n;
   69|  76.2M|}
secp256k1.c:secp256k1_i128_to_i64:
   75|  15.4M|static SECP256K1_INLINE int64_t secp256k1_i128_to_i64(const secp256k1_int128 *a) {
   76|  15.4M|   VERIFY_CHECK(INT64_MIN <= *a && *a <= INT64_MAX);
   77|  15.4M|   return *a;
   78|  15.4M|}

secp256k1.c:secp256k1_modinv64_var:
  637|  29.4k|static void secp256k1_modinv64_var(secp256k1_modinv64_signed62 *x, const secp256k1_modinv64_modinfo *modinfo) {
  638|       |    /* Start with d=0, e=1, f=modulus, g=x, eta=-1. */
  639|  29.4k|    secp256k1_modinv64_signed62 d = {{0, 0, 0, 0, 0}};
  640|  29.4k|    secp256k1_modinv64_signed62 e = {{1, 0, 0, 0, 0}};
  641|  29.4k|    secp256k1_modinv64_signed62 f = modinfo->modulus;
  642|  29.4k|    secp256k1_modinv64_signed62 g = *x;
  643|       |#ifdef VERIFY
  644|       |    int i = 0;
  645|       |#endif
  646|  29.4k|    int j, len = 5;
  647|  29.4k|    int64_t eta = -1; /* eta = -delta; delta is initially 1 */
  648|  29.4k|    int64_t cond, fn, gn;
  649|       |
  650|       |    /* Do iterations of 62 divsteps each until g=0. */
  651|   264k|    while (1) {
  ------------------
  |  Branch (651:12): [Folded - Ignored]
  ------------------
  652|       |        /* Compute transition matrix and new eta after 62 divsteps. */
  653|   264k|        secp256k1_modinv64_trans2x2 t;
  654|   264k|        eta = secp256k1_modinv64_divsteps_62_var(eta, f.v[0], g.v[0], &t);
  655|       |        /* Update d,e using that transition matrix. */
  656|   264k|        secp256k1_modinv64_update_de_62(&d, &e, &t, modinfo);
  657|       |        /* Update f,g using that transition matrix. */
  658|   264k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
  659|   264k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  660|   264k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, -1) > 0); /* g > -modulus */
  661|   264k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  662|       |
  663|   264k|        secp256k1_modinv64_update_fg_62_var(len, &f, &g, &t);
  664|       |        /* If the bottom limb of g is zero, there is a chance that g=0. */
  665|   264k|        if (g.v[0] == 0) {
  ------------------
  |  Branch (665:13): [True: 29.4k, False: 235k]
  ------------------
  666|  29.4k|            cond = 0;
  667|       |            /* Check if the other limbs are also 0. */
  668|  29.4k|            for (j = 1; j < len; ++j) {
  ------------------
  |  Branch (668:25): [True: 0, False: 29.4k]
  ------------------
  669|      0|                cond |= g.v[j];
  670|      0|            }
  671|       |            /* If so, we're done. */
  672|  29.4k|            if (cond == 0) break;
  ------------------
  |  Branch (672:17): [True: 29.4k, False: 0]
  ------------------
  673|  29.4k|        }
  674|       |
  675|       |        /* Determine if len>1 and limb (len-1) of both f and g is 0 or -1. */
  676|   235k|        fn = f.v[len - 1];
  677|   235k|        gn = g.v[len - 1];
  678|   235k|        cond = ((int64_t)len - 2) >> 63;
  679|   235k|        cond |= fn ^ (fn >> 63);
  680|   235k|        cond |= gn ^ (gn >> 63);
  681|       |        /* If so, reduce length, propagating the sign of f and g's top limb into the one below. */
  682|   235k|        if (cond == 0) {
  ------------------
  |  Branch (682:13): [True: 117k, False: 117k]
  ------------------
  683|   117k|            f.v[len - 2] |= (uint64_t)fn << 62;
  684|   117k|            g.v[len - 2] |= (uint64_t)gn << 62;
  685|   117k|            --len;
  686|   117k|        }
  687|       |
  688|   235k|        VERIFY_CHECK(++i < 12); /* We should never need more than 12*62 = 744 divsteps */
  689|   235k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
  690|   235k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  691|   235k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, -1) > 0); /* g > -modulus */
  692|   235k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  693|   235k|    }
  694|       |
  695|       |    /* At this point g is 0 and (if g was not originally 0) f must now equal +/- GCD of
  696|       |     * the initial f, g values i.e. +/- 1, and d now contains +/- the modular inverse. */
  697|       |
  698|       |    /* g == 0 */
  699|  29.4k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &SECP256K1_SIGNED62_ONE, 0) == 0);
  700|       |    /* |f| == 1, or (x == 0 and d == 0 and f == modulus) */
  701|  29.4k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &SECP256K1_SIGNED62_ONE, -1) == 0 ||
  702|  29.4k|                 secp256k1_modinv64_mul_cmp_62(&f, len, &SECP256K1_SIGNED62_ONE, 1) == 0 ||
  703|  29.4k|                 (secp256k1_modinv64_mul_cmp_62(x, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  704|  29.4k|                  secp256k1_modinv64_mul_cmp_62(&d, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  705|  29.4k|                  secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) == 0));
  706|       |
  707|       |    /* Optionally negate d, normalize to [0,modulus), and return it. */
  708|  29.4k|    secp256k1_modinv64_normalize_62(&d, f.v[len - 1], modinfo);
  709|  29.4k|    *x = d;
  710|  29.4k|}
secp256k1.c:secp256k1_modinv64_divsteps_62_var:
  239|   264k|static int64_t secp256k1_modinv64_divsteps_62_var(int64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {
  240|       |    /* Transformation matrix; see comments in secp256k1_modinv64_divsteps_62. */
  241|   264k|    uint64_t u = 1, v = 0, q = 0, r = 1;
  242|   264k|    uint64_t f = f0, g = g0, m;
  243|   264k|    uint32_t w;
  244|   264k|    int i = 62, limit, zeros;
  245|       |
  246|  4.33M|    for (;;) {
  247|       |        /* Use a sentinel bit to count zeros only up to i. */
  248|  4.33M|        zeros = secp256k1_ctz64_var(g | (UINT64_MAX << i));
  249|       |        /* Perform zeros divsteps at once; they all just divide g by two. */
  250|  4.33M|        g >>= zeros;
  251|  4.33M|        u <<= zeros;
  252|  4.33M|        v <<= zeros;
  253|  4.33M|        eta -= zeros;
  254|  4.33M|        i -= zeros;
  255|       |        /* We're done once we've done 62 divsteps. */
  256|  4.33M|        if (i == 0) break;
  ------------------
  |  Branch (256:13): [True: 264k, False: 4.07M]
  ------------------
  257|  4.07M|        VERIFY_CHECK((f & 1) == 1);
  258|  4.07M|        VERIFY_CHECK((g & 1) == 1);
  259|  4.07M|        VERIFY_CHECK((u * f0 + v * g0) == f << (62 - i));
  260|  4.07M|        VERIFY_CHECK((q * f0 + r * g0) == g << (62 - i));
  261|       |        /* Bounds on eta that follow from the bounds on iteration count (max 12*62 divsteps). */
  262|  4.07M|        VERIFY_CHECK(eta >= -745 && eta <= 745);
  263|       |        /* If eta is negative, negate it and replace f,g with g,-f. */
  264|  4.07M|        if (eta < 0) {
  ------------------
  |  Branch (264:13): [True: 3.93M, False: 140k]
  ------------------
  265|  3.93M|            uint64_t tmp;
  266|  3.93M|            eta = -eta;
  267|  3.93M|            tmp = f; f = g; g = -tmp;
  268|  3.93M|            tmp = u; u = q; q = -tmp;
  269|  3.93M|            tmp = v; v = r; r = -tmp;
  270|       |            /* Use a formula to cancel out up to 6 bits of g. Also, no more than i can be cancelled
  271|       |             * out (as we'd be done before that point), and no more than eta+1 can be done as its
  272|       |             * sign will flip again once that happens. */
  273|  3.93M|            limit = ((int)eta + 1) > i ? i : ((int)eta + 1);
  ------------------
  |  Branch (273:21): [True: 77.3k, False: 3.85M]
  ------------------
  274|  3.93M|            VERIFY_CHECK(limit > 0 && limit <= 62);
  275|       |            /* m is a mask for the bottom min(limit, 6) bits. */
  276|  3.93M|            m = (UINT64_MAX >> (64 - limit)) & 63U;
  277|       |            /* Find what multiple of f must be added to g to cancel its bottom min(limit, 6)
  278|       |             * bits. */
  279|  3.93M|            w = (f * g * (f * f - 2)) & m;
  280|  3.93M|        } else {
  281|       |            /* In this branch, use a simpler formula that only lets us cancel up to 4 bits of g, as
  282|       |             * eta tends to be smaller here. */
  283|   140k|            limit = ((int)eta + 1) > i ? i : ((int)eta + 1);
  ------------------
  |  Branch (283:21): [True: 977, False: 139k]
  ------------------
  284|   140k|            VERIFY_CHECK(limit > 0 && limit <= 62);
  285|       |            /* m is a mask for the bottom min(limit, 4) bits. */
  286|   140k|            m = (UINT64_MAX >> (64 - limit)) & 15U;
  287|       |            /* Find what multiple of f must be added to g to cancel its bottom min(limit, 4)
  288|       |             * bits. */
  289|   140k|            w = f + (((f + 1) & 4) << 1);
  290|   140k|            w = (-w * g) & m;
  291|   140k|        }
  292|  4.07M|        g += f * w;
  293|  4.07M|        q += u * w;
  294|  4.07M|        r += v * w;
  295|  4.07M|        VERIFY_CHECK((g & m) == 0);
  296|  4.07M|    }
  297|       |    /* Return data in t and return value. */
  298|   264k|    t->u = (int64_t)u;
  299|   264k|    t->v = (int64_t)v;
  300|   264k|    t->q = (int64_t)q;
  301|   264k|    t->r = (int64_t)r;
  302|       |
  303|       |    /* The determinant of t must be a power of two. This guarantees that multiplication with t
  304|       |     * does not change the gcd of f and g, apart from adding a power-of-2 factor to it (which
  305|       |     * will be divided out again). As each divstep's individual matrix has determinant 2, the
  306|       |     * aggregate of 62 of them will have determinant 2^62. */
  307|   264k|    VERIFY_CHECK(secp256k1_modinv64_det_check_pow2(t, 62, 0));
  308|       |
  309|   264k|    return eta;
  310|   264k|}
secp256k1.c:secp256k1_modinv64_update_de_62:
  411|  3.87M|static void secp256k1_modinv64_update_de_62(secp256k1_modinv64_signed62 *d, secp256k1_modinv64_signed62 *e, const secp256k1_modinv64_trans2x2 *t, const secp256k1_modinv64_modinfo* modinfo) {
  412|  3.87M|    const uint64_t M62 = UINT64_MAX >> 2;
  413|  3.87M|    const int64_t d0 = d->v[0], d1 = d->v[1], d2 = d->v[2], d3 = d->v[3], d4 = d->v[4];
  414|  3.87M|    const int64_t e0 = e->v[0], e1 = e->v[1], e2 = e->v[2], e3 = e->v[3], e4 = e->v[4];
  415|  3.87M|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  416|  3.87M|    int64_t md, me, sd, se;
  417|  3.87M|    secp256k1_int128 cd, ce;
  418|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  419|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  420|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  421|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  422|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_abs(u) <= (((int64_t)1 << 62) - secp256k1_modinv64_abs(v))); /* |u|+|v| <= 2^62 */
  423|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_abs(q) <= (((int64_t)1 << 62) - secp256k1_modinv64_abs(r))); /* |q|+|r| <= 2^62 */
  424|       |
  425|       |    /* [md,me] start as zero; plus [u,q] if d is negative; plus [v,r] if e is negative. */
  426|  3.87M|    sd = d4 >> 63;
  427|  3.87M|    se = e4 >> 63;
  428|  3.87M|    md = (u & sd) + (v & se);
  429|  3.87M|    me = (q & sd) + (r & se);
  430|       |    /* Begin computing t*[d,e]. */
  431|  3.87M|    secp256k1_i128_mul(&cd, u, d0);
  432|  3.87M|    secp256k1_i128_accum_mul(&cd, v, e0);
  433|  3.87M|    secp256k1_i128_mul(&ce, q, d0);
  434|  3.87M|    secp256k1_i128_accum_mul(&ce, r, e0);
  435|       |    /* Correct md,me so that t*[d,e]+modulus*[md,me] has 62 zero bottom bits. */
  436|  3.87M|    md -= (modinfo->modulus_inv62 * secp256k1_i128_to_u64(&cd) + md) & M62;
  437|  3.87M|    me -= (modinfo->modulus_inv62 * secp256k1_i128_to_u64(&ce) + me) & M62;
  438|       |    /* Update the beginning of computation for t*[d,e]+modulus*[md,me] now md,me are known. */
  439|  3.87M|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[0], md);
  440|  3.87M|    secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[0], me);
  441|       |    /* Verify that the low 62 bits of the computation are indeed zero, and then throw them away. */
  442|  3.87M|    VERIFY_CHECK((secp256k1_i128_to_u64(&cd) & M62) == 0); secp256k1_i128_rshift(&cd, 62);
  443|  3.87M|    VERIFY_CHECK((secp256k1_i128_to_u64(&ce) & M62) == 0); secp256k1_i128_rshift(&ce, 62);
  444|       |    /* Compute limb 1 of t*[d,e]+modulus*[md,me], and store it as output limb 0 (= down shift). */
  445|  3.87M|    secp256k1_i128_accum_mul(&cd, u, d1);
  446|  3.87M|    secp256k1_i128_accum_mul(&cd, v, e1);
  447|  3.87M|    secp256k1_i128_accum_mul(&ce, q, d1);
  448|  3.87M|    secp256k1_i128_accum_mul(&ce, r, e1);
  449|  3.87M|    if (modinfo->modulus.v[1]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (449:9): [True: 279k, False: 3.59M]
  ------------------
  450|   279k|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[1], md);
  451|   279k|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[1], me);
  452|   279k|    }
  453|  3.87M|    d->v[0] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  454|  3.87M|    e->v[0] = secp256k1_i128_to_u64(&ce) & M62; secp256k1_i128_rshift(&ce, 62);
  455|       |    /* Compute limb 2 of t*[d,e]+modulus*[md,me], and store it as output limb 1. */
  456|  3.87M|    secp256k1_i128_accum_mul(&cd, u, d2);
  457|  3.87M|    secp256k1_i128_accum_mul(&cd, v, e2);
  458|  3.87M|    secp256k1_i128_accum_mul(&ce, q, d2);
  459|  3.87M|    secp256k1_i128_accum_mul(&ce, r, e2);
  460|  3.87M|    if (modinfo->modulus.v[2]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (460:9): [True: 279k, False: 3.59M]
  ------------------
  461|   279k|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[2], md);
  462|   279k|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[2], me);
  463|   279k|    }
  464|  3.87M|    d->v[1] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  465|  3.87M|    e->v[1] = secp256k1_i128_to_u64(&ce) & M62; secp256k1_i128_rshift(&ce, 62);
  466|       |    /* Compute limb 3 of t*[d,e]+modulus*[md,me], and store it as output limb 2. */
  467|  3.87M|    secp256k1_i128_accum_mul(&cd, u, d3);
  468|  3.87M|    secp256k1_i128_accum_mul(&cd, v, e3);
  469|  3.87M|    secp256k1_i128_accum_mul(&ce, q, d3);
  470|  3.87M|    secp256k1_i128_accum_mul(&ce, r, e3);
  471|  3.87M|    if (modinfo->modulus.v[3]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (471:9): [True: 0, False: 3.87M]
  ------------------
  472|      0|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[3], md);
  473|      0|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[3], me);
  474|      0|    }
  475|  3.87M|    d->v[2] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  476|  3.87M|    e->v[2] = secp256k1_i128_to_u64(&ce) & M62; secp256k1_i128_rshift(&ce, 62);
  477|       |    /* Compute limb 4 of t*[d,e]+modulus*[md,me], and store it as output limb 3. */
  478|  3.87M|    secp256k1_i128_accum_mul(&cd, u, d4);
  479|  3.87M|    secp256k1_i128_accum_mul(&cd, v, e4);
  480|  3.87M|    secp256k1_i128_accum_mul(&ce, q, d4);
  481|  3.87M|    secp256k1_i128_accum_mul(&ce, r, e4);
  482|  3.87M|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[4], md);
  483|  3.87M|    secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[4], me);
  484|  3.87M|    d->v[3] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  485|  3.87M|    e->v[3] = secp256k1_i128_to_u64(&ce) & M62; secp256k1_i128_rshift(&ce, 62);
  486|       |    /* What remains is limb 5 of t*[d,e]+modulus*[md,me]; store it as output limb 4. */
  487|  3.87M|    d->v[4] = secp256k1_i128_to_i64(&cd);
  488|  3.87M|    e->v[4] = secp256k1_i128_to_i64(&ce);
  489|       |
  490|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  491|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  492|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  493|  3.87M|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  494|  3.87M|}
secp256k1.c:secp256k1_modinv64_update_fg_62_var:
  553|   264k|static void secp256k1_modinv64_update_fg_62_var(int len, secp256k1_modinv64_signed62 *f, secp256k1_modinv64_signed62 *g, const secp256k1_modinv64_trans2x2 *t) {
  554|   264k|    const uint64_t M62 = UINT64_MAX >> 2;
  555|   264k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  556|   264k|    int64_t fi, gi;
  557|   264k|    secp256k1_int128 cf, cg;
  558|   264k|    int i;
  559|   264k|    VERIFY_CHECK(len > 0);
  560|       |    /* Start computing t*[f,g]. */
  561|   264k|    fi = f->v[0];
  562|   264k|    gi = g->v[0];
  563|   264k|    secp256k1_i128_mul(&cf, u, fi);
  564|   264k|    secp256k1_i128_accum_mul(&cf, v, gi);
  565|   264k|    secp256k1_i128_mul(&cg, q, fi);
  566|   264k|    secp256k1_i128_accum_mul(&cg, r, gi);
  567|       |    /* Verify that the bottom 62 bits of the result are zero, and then throw them away. */
  568|   264k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cf) & M62) == 0); secp256k1_i128_rshift(&cf, 62);
  569|   264k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cg) & M62) == 0); secp256k1_i128_rshift(&cg, 62);
  570|       |    /* Now iteratively compute limb i=1..len of t*[f,g], and store them in output limb i-1 (shifting
  571|       |     * down by 62 bits). */
  572|   735k|    for (i = 1; i < len; ++i) {
  ------------------
  |  Branch (572:17): [True: 470k, False: 264k]
  ------------------
  573|   470k|        fi = f->v[i];
  574|   470k|        gi = g->v[i];
  575|   470k|        secp256k1_i128_accum_mul(&cf, u, fi);
  576|   470k|        secp256k1_i128_accum_mul(&cf, v, gi);
  577|   470k|        secp256k1_i128_accum_mul(&cg, q, fi);
  578|   470k|        secp256k1_i128_accum_mul(&cg, r, gi);
  579|   470k|        f->v[i - 1] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  580|   470k|        g->v[i - 1] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  581|   470k|    }
  582|       |    /* What remains is limb (len) of t*[f,g]; store it as output limb (len-1). */
  583|   264k|    f->v[len - 1] = secp256k1_i128_to_i64(&cf);
  584|   264k|    g->v[len - 1] = secp256k1_i128_to_i64(&cg);
  585|   264k|}
secp256k1.c:secp256k1_modinv64_normalize_62:
   88|   390k|static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t sign, const secp256k1_modinv64_modinfo *modinfo) {
   89|   390k|    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);
   90|   390k|    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];
   91|   390k|    volatile int64_t cond_add, cond_negate;
   92|       |
   93|       |#ifdef VERIFY
   94|       |    /* Verify that all limbs are in range (-2^62,2^62). */
   95|       |    int i;
   96|       |    for (i = 0; i < 5; ++i) {
   97|       |        VERIFY_CHECK(r->v[i] >= -M62);
   98|       |        VERIFY_CHECK(r->v[i] <= M62);
   99|       |    }
  100|       |    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, -2) > 0); /* r > -2*modulus */
  101|       |    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 1) < 0); /* r < modulus */
  102|       |#endif
  103|       |
  104|       |    /* In a first step, add the modulus if the input is negative, and then negate if requested.
  105|       |     * This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input
  106|       |     * limbs are in range (-2^62,2^62), this cannot overflow an int64_t. Note that the right
  107|       |     * shifts below are signed sign-extending shifts (see assumptions.h for tests that that is
  108|       |     * indeed the behavior of the right shift operator). */
  109|   390k|    cond_add = r4 >> 63;
  110|   390k|    r0 += modinfo->modulus.v[0] & cond_add;
  111|   390k|    r1 += modinfo->modulus.v[1] & cond_add;
  112|   390k|    r2 += modinfo->modulus.v[2] & cond_add;
  113|   390k|    r3 += modinfo->modulus.v[3] & cond_add;
  114|   390k|    r4 += modinfo->modulus.v[4] & cond_add;
  115|   390k|    cond_negate = sign >> 63;
  116|   390k|    r0 = (r0 ^ cond_negate) - cond_negate;
  117|   390k|    r1 = (r1 ^ cond_negate) - cond_negate;
  118|   390k|    r2 = (r2 ^ cond_negate) - cond_negate;
  119|   390k|    r3 = (r3 ^ cond_negate) - cond_negate;
  120|   390k|    r4 = (r4 ^ cond_negate) - cond_negate;
  121|       |    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */
  122|   390k|    r1 += r0 >> 62; r0 &= M62;
  123|   390k|    r2 += r1 >> 62; r1 &= M62;
  124|   390k|    r3 += r2 >> 62; r2 &= M62;
  125|   390k|    r4 += r3 >> 62; r3 &= M62;
  126|       |
  127|       |    /* In a second step add the modulus again if the result is still negative, bringing
  128|       |     * r to range [0,modulus). */
  129|   390k|    cond_add = r4 >> 63;
  130|   390k|    r0 += modinfo->modulus.v[0] & cond_add;
  131|   390k|    r1 += modinfo->modulus.v[1] & cond_add;
  132|   390k|    r2 += modinfo->modulus.v[2] & cond_add;
  133|   390k|    r3 += modinfo->modulus.v[3] & cond_add;
  134|   390k|    r4 += modinfo->modulus.v[4] & cond_add;
  135|       |    /* And propagate again. */
  136|   390k|    r1 += r0 >> 62; r0 &= M62;
  137|   390k|    r2 += r1 >> 62; r1 &= M62;
  138|   390k|    r3 += r2 >> 62; r2 &= M62;
  139|   390k|    r4 += r3 >> 62; r3 &= M62;
  140|       |
  141|   390k|    r->v[0] = r0;
  142|   390k|    r->v[1] = r1;
  143|   390k|    r->v[2] = r2;
  144|   390k|    r->v[3] = r3;
  145|   390k|    r->v[4] = r4;
  146|       |
  147|   390k|    VERIFY_CHECK(r0 >> 62 == 0);
  148|   390k|    VERIFY_CHECK(r1 >> 62 == 0);
  149|   390k|    VERIFY_CHECK(r2 >> 62 == 0);
  150|   390k|    VERIFY_CHECK(r3 >> 62 == 0);
  151|   390k|    VERIFY_CHECK(r4 >> 62 == 0);
  152|   390k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 0) >= 0); /* r >= 0 */
  153|   390k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 1) < 0); /* r < modulus */
  154|   390k|}
secp256k1.c:secp256k1_modinv64:
  588|   360k|static void secp256k1_modinv64(secp256k1_modinv64_signed62 *x, const secp256k1_modinv64_modinfo *modinfo) {
  589|       |    /* Start with d=0, e=1, f=modulus, g=x, zeta=-1. */
  590|   360k|    secp256k1_modinv64_signed62 d = {{0, 0, 0, 0, 0}};
  591|   360k|    secp256k1_modinv64_signed62 e = {{1, 0, 0, 0, 0}};
  592|   360k|    secp256k1_modinv64_signed62 f = modinfo->modulus;
  593|   360k|    secp256k1_modinv64_signed62 g = *x;
  594|   360k|    int i;
  595|   360k|    int64_t zeta = -1; /* zeta = -(delta+1/2); delta starts at 1/2. */
  596|       |
  597|       |    /* Do 10 iterations of 59 divsteps each = 590 divsteps. This suffices for 256-bit inputs. */
  598|  3.96M|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (598:17): [True: 3.60M, False: 360k]
  ------------------
  599|       |        /* Compute transition matrix and new zeta after 59 divsteps. */
  600|  3.60M|        secp256k1_modinv64_trans2x2 t;
  601|  3.60M|        zeta = secp256k1_modinv64_divsteps_59(zeta, f.v[0], g.v[0], &t);
  602|       |        /* Update d,e using that transition matrix. */
  603|  3.60M|        secp256k1_modinv64_update_de_62(&d, &e, &t, modinfo);
  604|       |        /* Update f,g using that transition matrix. */
  605|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  606|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  607|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  608|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  609|       |
  610|  3.60M|        secp256k1_modinv64_update_fg_62(&f, &g, &t);
  611|       |
  612|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  613|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  614|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  615|  3.60M|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  616|  3.60M|    }
  617|       |
  618|       |    /* At this point sufficient iterations have been performed that g must have reached 0
  619|       |     * and (if g was not originally 0) f must now equal +/- GCD of the initial f, g
  620|       |     * values i.e. +/- 1, and d now contains +/- the modular inverse. */
  621|       |
  622|       |    /* g == 0 */
  623|   360k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &SECP256K1_SIGNED62_ONE, 0) == 0);
  624|       |    /* |f| == 1, or (x == 0 and d == 0 and f == modulus) */
  625|   360k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, -1) == 0 ||
  626|   360k|                 secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, 1) == 0 ||
  627|   360k|                 (secp256k1_modinv64_mul_cmp_62(x, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  628|   360k|                  secp256k1_modinv64_mul_cmp_62(&d, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  629|   360k|                  secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) == 0));
  630|       |
  631|       |    /* Optionally negate d, normalize to [0,modulus), and return it. */
  632|   360k|    secp256k1_modinv64_normalize_62(&d, f.v[4], modinfo);
  633|   360k|    *x = d;
  634|   360k|}
secp256k1.c:secp256k1_modinv64_divsteps_59:
  167|  3.60M|static int64_t secp256k1_modinv64_divsteps_59(int64_t zeta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {
  168|       |    /* u,v,q,r are the elements of the transformation matrix being built up,
  169|       |     * starting with the identity matrix times 8 (because the caller expects
  170|       |     * a result scaled by 2^62). Semantically they are signed integers
  171|       |     * in range [-2^62,2^62], but here represented as unsigned mod 2^64. This
  172|       |     * permits left shifting (which is UB for negative numbers). The range
  173|       |     * being inside [-2^63,2^63) means that casting to signed works correctly.
  174|       |     */
  175|  3.60M|    uint64_t u = 8, v = 0, q = 0, r = 8;
  176|  3.60M|    volatile uint64_t c1, c2;
  177|  3.60M|    uint64_t mask1, mask2, f = f0, g = g0, x, y, z;
  178|  3.60M|    int i;
  179|       |
  180|   216M|    for (i = 3; i < 62; ++i) {
  ------------------
  |  Branch (180:17): [True: 212M, False: 3.60M]
  ------------------
  181|   212M|        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */
  182|   212M|        VERIFY_CHECK((u * f0 + v * g0) == f << i);
  183|   212M|        VERIFY_CHECK((q * f0 + r * g0) == g << i);
  184|       |        /* Compute conditional masks for (zeta < 0) and for (g & 1). */
  185|   212M|        c1 = zeta >> 63;
  186|   212M|        mask1 = c1;
  187|   212M|        c2 = g & 1;
  188|   212M|        mask2 = -c2;
  189|       |        /* Compute x,y,z, conditionally negated versions of f,u,v. */
  190|   212M|        x = (f ^ mask1) - mask1;
  191|   212M|        y = (u ^ mask1) - mask1;
  192|   212M|        z = (v ^ mask1) - mask1;
  193|       |        /* Conditionally add x,y,z to g,q,r. */
  194|   212M|        g += x & mask2;
  195|   212M|        q += y & mask2;
  196|   212M|        r += z & mask2;
  197|       |        /* In what follows, c1 is a condition mask for (zeta < 0) and (g & 1). */
  198|   212M|        mask1 &= mask2;
  199|       |        /* Conditionally change zeta into -zeta-2 or zeta-1. */
  200|   212M|        zeta = (zeta ^ mask1) - 1;
  201|       |        /* Conditionally add g,q,r to f,u,v. */
  202|   212M|        f += g & mask1;
  203|   212M|        u += q & mask1;
  204|   212M|        v += r & mask1;
  205|       |        /* Shifts */
  206|   212M|        g >>= 1;
  207|   212M|        u <<= 1;
  208|   212M|        v <<= 1;
  209|       |        /* Bounds on zeta that follow from the bounds on iteration count (max 10*59 divsteps). */
  210|   212M|        VERIFY_CHECK(zeta >= -591 && zeta <= 591);
  211|   212M|    }
  212|       |    /* Return data in t and return value. */
  213|  3.60M|    t->u = (int64_t)u;
  214|  3.60M|    t->v = (int64_t)v;
  215|  3.60M|    t->q = (int64_t)q;
  216|  3.60M|    t->r = (int64_t)r;
  217|       |
  218|       |    /* The determinant of t must be a power of two. This guarantees that multiplication with t
  219|       |     * does not change the gcd of f and g, apart from adding a power-of-2 factor to it (which
  220|       |     * will be divided out again). As each divstep's individual matrix has determinant 2, the
  221|       |     * aggregate of 59 of them will have determinant 2^59. Multiplying with the initial
  222|       |     * 8*identity (which has determinant 2^6) means the overall outputs has determinant
  223|       |     * 2^65. */
  224|  3.60M|    VERIFY_CHECK(secp256k1_modinv64_det_check_pow2(t, 65, 0));
  225|       |
  226|  3.60M|    return zeta;
  227|  3.60M|}
secp256k1.c:secp256k1_modinv64_update_fg_62:
  500|  3.60M|static void secp256k1_modinv64_update_fg_62(secp256k1_modinv64_signed62 *f, secp256k1_modinv64_signed62 *g, const secp256k1_modinv64_trans2x2 *t) {
  501|  3.60M|    const uint64_t M62 = UINT64_MAX >> 2;
  502|  3.60M|    const int64_t f0 = f->v[0], f1 = f->v[1], f2 = f->v[2], f3 = f->v[3], f4 = f->v[4];
  503|  3.60M|    const int64_t g0 = g->v[0], g1 = g->v[1], g2 = g->v[2], g3 = g->v[3], g4 = g->v[4];
  504|  3.60M|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  505|  3.60M|    secp256k1_int128 cf, cg;
  506|       |    /* Start computing t*[f,g]. */
  507|  3.60M|    secp256k1_i128_mul(&cf, u, f0);
  508|  3.60M|    secp256k1_i128_accum_mul(&cf, v, g0);
  509|  3.60M|    secp256k1_i128_mul(&cg, q, f0);
  510|  3.60M|    secp256k1_i128_accum_mul(&cg, r, g0);
  511|       |    /* Verify that the bottom 62 bits of the result are zero, and then throw them away. */
  512|  3.60M|    VERIFY_CHECK((secp256k1_i128_to_u64(&cf) & M62) == 0); secp256k1_i128_rshift(&cf, 62);
  513|  3.60M|    VERIFY_CHECK((secp256k1_i128_to_u64(&cg) & M62) == 0); secp256k1_i128_rshift(&cg, 62);
  514|       |    /* Compute limb 1 of t*[f,g], and store it as output limb 0 (= down shift). */
  515|  3.60M|    secp256k1_i128_accum_mul(&cf, u, f1);
  516|  3.60M|    secp256k1_i128_accum_mul(&cf, v, g1);
  517|  3.60M|    secp256k1_i128_accum_mul(&cg, q, f1);
  518|  3.60M|    secp256k1_i128_accum_mul(&cg, r, g1);
  519|  3.60M|    f->v[0] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  520|  3.60M|    g->v[0] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  521|       |    /* Compute limb 2 of t*[f,g], and store it as output limb 1. */
  522|  3.60M|    secp256k1_i128_accum_mul(&cf, u, f2);
  523|  3.60M|    secp256k1_i128_accum_mul(&cf, v, g2);
  524|  3.60M|    secp256k1_i128_accum_mul(&cg, q, f2);
  525|  3.60M|    secp256k1_i128_accum_mul(&cg, r, g2);
  526|  3.60M|    f->v[1] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  527|  3.60M|    g->v[1] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  528|       |    /* Compute limb 3 of t*[f,g], and store it as output limb 2. */
  529|  3.60M|    secp256k1_i128_accum_mul(&cf, u, f3);
  530|  3.60M|    secp256k1_i128_accum_mul(&cf, v, g3);
  531|  3.60M|    secp256k1_i128_accum_mul(&cg, q, f3);
  532|  3.60M|    secp256k1_i128_accum_mul(&cg, r, g3);
  533|  3.60M|    f->v[2] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  534|  3.60M|    g->v[2] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  535|       |    /* Compute limb 4 of t*[f,g], and store it as output limb 3. */
  536|  3.60M|    secp256k1_i128_accum_mul(&cf, u, f4);
  537|  3.60M|    secp256k1_i128_accum_mul(&cf, v, g4);
  538|  3.60M|    secp256k1_i128_accum_mul(&cg, q, f4);
  539|  3.60M|    secp256k1_i128_accum_mul(&cg, r, g4);
  540|  3.60M|    f->v[3] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  541|  3.60M|    g->v[3] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  542|       |    /* What remains is limb 5 of t*[f,g]; store it as output limb 4. */
  543|  3.60M|    f->v[4] = secp256k1_i128_to_i64(&cf);
  544|  3.60M|    g->v[4] = secp256k1_i128_to_i64(&cg);
  545|  3.60M|}

secp256k1_xonly_pubkey_parse:
   22|  11.7k|int secp256k1_xonly_pubkey_parse(const secp256k1_context* ctx, secp256k1_xonly_pubkey *pubkey, const unsigned char *input32) {
   23|  11.7k|    secp256k1_ge pk;
   24|  11.7k|    secp256k1_fe x;
   25|       |
   26|  11.7k|    VERIFY_CHECK(ctx != NULL);
   27|  11.7k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  11.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  11.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   28|  11.7k|    memset(pubkey, 0, sizeof(*pubkey));
   29|  11.7k|    ARG_CHECK(input32 != NULL);
  ------------------
  |  |   45|  11.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  11.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   30|       |
   31|  11.7k|    if (!secp256k1_fe_set_b32_limit(&x, input32)) {
  ------------------
  |  |   88|  11.7k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  |  Branch (31:9): [True: 0, False: 11.7k]
  ------------------
   32|      0|        return 0;
   33|      0|    }
   34|  11.7k|    if (!secp256k1_ge_set_xo_var(&pk, &x, 0)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 11.7k]
  ------------------
   35|      0|        return 0;
   36|      0|    }
   37|  11.7k|    if (!secp256k1_ge_is_in_correct_subgroup(&pk)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 11.7k]
  ------------------
   38|      0|        return 0;
   39|      0|    }
   40|  11.7k|    secp256k1_xonly_pubkey_save(pubkey, &pk);
   41|  11.7k|    return 1;
   42|  11.7k|}
secp256k1_xonly_pubkey_serialize:
   44|  4.84k|int secp256k1_xonly_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output32, const secp256k1_xonly_pubkey *pubkey) {
   45|  4.84k|    secp256k1_ge pk;
   46|       |
   47|  4.84k|    VERIFY_CHECK(ctx != NULL);
   48|  4.84k|    ARG_CHECK(output32 != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   49|  4.84k|    memset(output32, 0, 32);
   50|  4.84k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   51|       |
   52|  4.84k|    if (!secp256k1_xonly_pubkey_load(ctx, &pk, pubkey)) {
  ------------------
  |  Branch (52:9): [True: 0, False: 4.84k]
  ------------------
   53|      0|        return 0;
   54|      0|    }
   55|  4.84k|    secp256k1_fe_get_b32(output32, &pk.x);
  ------------------
  |  |   89|  4.84k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   56|  4.84k|    return 1;
   57|  4.84k|}
secp256k1_xonly_pubkey_from_pubkey:
   99|  4.84k|int secp256k1_xonly_pubkey_from_pubkey(const secp256k1_context* ctx, secp256k1_xonly_pubkey *xonly_pubkey, int *pk_parity, const secp256k1_pubkey *pubkey) {
  100|  4.84k|    secp256k1_ge pk;
  101|  4.84k|    int tmp;
  102|       |
  103|  4.84k|    VERIFY_CHECK(ctx != NULL);
  104|  4.84k|    ARG_CHECK(xonly_pubkey != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|  4.84k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  106|       |
  107|  4.84k|    if (!secp256k1_pubkey_load(ctx, &pk, pubkey)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 4.84k]
  ------------------
  108|      0|        return 0;
  109|      0|    }
  110|  4.84k|    tmp = secp256k1_extrakeys_ge_even_y(&pk);
  111|  4.84k|    if (pk_parity != NULL) {
  ------------------
  |  Branch (111:9): [True: 4.84k, False: 0]
  ------------------
  112|  4.84k|        *pk_parity = tmp;
  113|  4.84k|    }
  114|  4.84k|    secp256k1_xonly_pubkey_save(xonly_pubkey, &pk);
  115|  4.84k|    return 1;
  116|  4.84k|}
secp256k1_xonly_pubkey_tweak_add:
  118|  4.84k|int secp256k1_xonly_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *output_pubkey, const secp256k1_xonly_pubkey *internal_pubkey, const unsigned char *tweak32) {
  119|  4.84k|    secp256k1_ge pk;
  120|       |
  121|  4.84k|    VERIFY_CHECK(ctx != NULL);
  122|  4.84k|    ARG_CHECK(output_pubkey != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|  4.84k|    memset(output_pubkey, 0, sizeof(*output_pubkey));
  124|  4.84k|    ARG_CHECK(internal_pubkey != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  125|  4.84k|    ARG_CHECK(tweak32 != NULL);
  ------------------
  |  |   45|  4.84k|#define ARG_CHECK(cond) do { \
  |  |   46|  4.84k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  4.84k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  4.84k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|       |
  127|  4.84k|    if (!secp256k1_xonly_pubkey_load(ctx, &pk, internal_pubkey)
  ------------------
  |  Branch (127:9): [True: 0, False: 4.84k]
  ------------------
  128|  4.84k|        || !secp256k1_ec_pubkey_tweak_add_helper(&pk, tweak32)) {
  ------------------
  |  Branch (128:12): [True: 0, False: 4.84k]
  ------------------
  129|      0|        return 0;
  130|      0|    }
  131|  4.84k|    secp256k1_pubkey_save(output_pubkey, &pk);
  132|  4.84k|    return 1;
  133|  4.84k|}
secp256k1.c:secp256k1_xonly_pubkey_save:
   18|  16.5k|static SECP256K1_INLINE void secp256k1_xonly_pubkey_save(secp256k1_xonly_pubkey *pubkey, secp256k1_ge *ge) {
   19|  16.5k|    secp256k1_pubkey_save((secp256k1_pubkey *) pubkey, ge);
   20|  16.5k|}
secp256k1.c:secp256k1_xonly_pubkey_load:
   14|  9.69k|static SECP256K1_INLINE int secp256k1_xonly_pubkey_load(const secp256k1_context* ctx, secp256k1_ge *ge, const secp256k1_xonly_pubkey *pubkey) {
   15|  9.69k|    return secp256k1_pubkey_load(ctx, ge, (const secp256k1_pubkey *) pubkey);
   16|  9.69k|}
secp256k1.c:secp256k1_extrakeys_ge_even_y:
   88|  4.84k|static int secp256k1_extrakeys_ge_even_y(secp256k1_ge *r) {
   89|  4.84k|    int y_parity = 0;
   90|  4.84k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(r));
   91|       |
   92|  4.84k|    if (secp256k1_fe_is_odd(&r->y)) {
  ------------------
  |  |   85|  4.84k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (92:9): [True: 2.40k, False: 2.44k]
  ------------------
   93|  2.40k|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|  2.40k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|  2.40k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|  2.40k|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|  2.40k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 2.40k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|  2.40k|    } \
  |  |  |  |   84|  2.40k|    stmt; \
  |  |  |  |   85|  2.40k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  2.40k|        y_parity = 1;
   95|  2.40k|    }
   96|  4.84k|    return y_parity;
   97|  4.84k|}

secp256k1_ecdsa_recoverable_signature_serialize_compact:
   60|  14.7k|int secp256k1_ecdsa_recoverable_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, int *recid, const secp256k1_ecdsa_recoverable_signature* sig) {
   61|  14.7k|    secp256k1_scalar r, s;
   62|       |
   63|  14.7k|    VERIFY_CHECK(ctx != NULL);
   64|  14.7k|    ARG_CHECK(output64 != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   65|  14.7k|    ARG_CHECK(sig != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   66|  14.7k|    ARG_CHECK(recid != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|       |
   68|  14.7k|    secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, recid, sig);
   69|  14.7k|    secp256k1_scalar_get_b32(&output64[0], &r);
   70|  14.7k|    secp256k1_scalar_get_b32(&output64[32], &s);
   71|  14.7k|    return 1;
   72|  14.7k|}
secp256k1_ecdsa_sign_recoverable:
  123|  14.7k|int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msghash32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) {
  124|  14.7k|    secp256k1_scalar r, s;
  125|  14.7k|    int ret, recid;
  126|  14.7k|    VERIFY_CHECK(ctx != NULL);
  127|  14.7k|    ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|  14.7k|    ARG_CHECK(msghash32 != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|  14.7k|    ARG_CHECK(signature != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|  14.7k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|       |
  132|  14.7k|    ret = secp256k1_ecdsa_sign_inner(ctx, &r, &s, &recid, msghash32, seckey, noncefp, noncedata);
  133|  14.7k|    secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid);
  134|  14.7k|    return ret;
  135|  14.7k|}
secp256k1_ecdsa_recover:
  137|  14.7k|int secp256k1_ecdsa_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msghash32) {
  138|  14.7k|    secp256k1_ge q;
  139|  14.7k|    secp256k1_scalar r, s;
  140|  14.7k|    secp256k1_scalar m;
  141|  14.7k|    int recid;
  142|  14.7k|    VERIFY_CHECK(ctx != NULL);
  143|  14.7k|    ARG_CHECK(msghash32 != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  144|  14.7k|    ARG_CHECK(signature != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  145|  14.7k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  14.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  14.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  146|       |
  147|  14.7k|    secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, &recid, signature);
  148|  14.7k|    VERIFY_CHECK(recid >= 0 && recid < 4);  /* should have been caught in parse_compact */
  149|  14.7k|    secp256k1_scalar_set_b32(&m, msghash32, NULL);
  150|  14.7k|    if (secp256k1_ecdsa_sig_recover(&r, &s, &q, &m, recid)) {
  ------------------
  |  Branch (150:9): [True: 14.7k, False: 0]
  ------------------
  151|  14.7k|        secp256k1_pubkey_save(pubkey, &q);
  152|  14.7k|        return 1;
  153|  14.7k|    } else {
  154|      0|        memset(pubkey, 0, sizeof(*pubkey));
  155|      0|        return 0;
  156|      0|    }
  157|  14.7k|}
secp256k1.c:secp256k1_ecdsa_recoverable_signature_save:
   27|  14.7k|static void secp256k1_ecdsa_recoverable_signature_save(secp256k1_ecdsa_recoverable_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s, int recid) {
   28|  14.7k|    if (sizeof(secp256k1_scalar) == 32) {
  ------------------
  |  Branch (28:9): [Folded - Ignored]
  ------------------
   29|  14.7k|        memcpy(&sig->data[0], r, 32);
   30|  14.7k|        memcpy(&sig->data[32], s, 32);
   31|  14.7k|    } else {
   32|      0|        secp256k1_scalar_get_b32(&sig->data[0], r);
   33|      0|        secp256k1_scalar_get_b32(&sig->data[32], s);
   34|      0|    }
   35|  14.7k|    sig->data[64] = recid;
   36|  14.7k|}
secp256k1.c:secp256k1_ecdsa_recoverable_signature_load:
   12|  29.4k|static void secp256k1_ecdsa_recoverable_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const secp256k1_ecdsa_recoverable_signature* sig) {
   13|  29.4k|    (void)ctx;
   14|  29.4k|    if (sizeof(secp256k1_scalar) == 32) {
  ------------------
  |  Branch (14:9): [Folded - Ignored]
  ------------------
   15|       |        /* When the secp256k1_scalar type is exactly 32 byte, use its
   16|       |         * representation inside secp256k1_ecdsa_signature, as conversion is very fast.
   17|       |         * Note that secp256k1_ecdsa_signature_save must use the same representation. */
   18|  29.4k|        memcpy(r, &sig->data[0], 32);
   19|  29.4k|        memcpy(s, &sig->data[32], 32);
   20|  29.4k|    } else {
   21|      0|        secp256k1_scalar_set_b32(r, &sig->data[0], NULL);
   22|      0|        secp256k1_scalar_set_b32(s, &sig->data[32], NULL);
   23|      0|    }
   24|  29.4k|    *recid = sig->data[64];
   25|  29.4k|}
secp256k1.c:secp256k1_ecdsa_sig_recover:
   87|  14.7k|static int secp256k1_ecdsa_sig_recover(const secp256k1_scalar *sigr, const secp256k1_scalar* sigs, secp256k1_ge *pubkey, const secp256k1_scalar *message, int recid) {
   88|  14.7k|    unsigned char brx[32];
   89|  14.7k|    secp256k1_fe fx;
   90|  14.7k|    secp256k1_ge x;
   91|  14.7k|    secp256k1_gej xj;
   92|  14.7k|    secp256k1_scalar rn, u1, u2;
   93|  14.7k|    secp256k1_gej qj;
   94|  14.7k|    int r;
   95|       |
   96|  14.7k|    if (secp256k1_scalar_is_zero(sigr) || secp256k1_scalar_is_zero(sigs)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 14.7k]
  |  Branch (96:43): [True: 0, False: 14.7k]
  ------------------
   97|      0|        return 0;
   98|      0|    }
   99|       |
  100|  14.7k|    secp256k1_scalar_get_b32(brx, sigr);
  101|  14.7k|    r = secp256k1_fe_set_b32_limit(&fx, brx);
  ------------------
  |  |   88|  14.7k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  102|  14.7k|    (void)r;
  103|  14.7k|    VERIFY_CHECK(r); /* brx comes from a scalar, so is less than the order; certainly less than p */
  104|  14.7k|    if (recid & 2) {
  ------------------
  |  Branch (104:9): [True: 0, False: 14.7k]
  ------------------
  105|      0|        if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_const_p_minus_order) >= 0) {
  ------------------
  |  |   86|      0|#  define secp256k1_fe_cmp_var secp256k1_fe_impl_cmp_var
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            return 0;
  107|      0|        }
  108|      0|        secp256k1_fe_add(&fx, &secp256k1_ecdsa_const_order_as_fe);
  ------------------
  |  |   92|      0|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  109|      0|    }
  110|  14.7k|    if (!secp256k1_ge_set_xo_var(&x, &fx, recid & 1)) {
  ------------------
  |  Branch (110:9): [True: 0, False: 14.7k]
  ------------------
  111|      0|        return 0;
  112|      0|    }
  113|  14.7k|    secp256k1_gej_set_ge(&xj, &x);
  114|  14.7k|    secp256k1_scalar_inverse_var(&rn, sigr);
  115|  14.7k|    secp256k1_scalar_mul(&u1, &rn, message);
  116|  14.7k|    secp256k1_scalar_negate(&u1, &u1);
  117|  14.7k|    secp256k1_scalar_mul(&u2, &rn, sigs);
  118|  14.7k|    secp256k1_ecmult(&qj, &xj, &u2, &u1);
  119|  14.7k|    secp256k1_ge_set_gej_var(pubkey, &qj);
  120|  14.7k|    return !secp256k1_gej_is_infinity(&qj);
  121|  14.7k|}

secp256k1.c:secp256k1_scalar_set_b32:
  144|   698k|static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) {
  145|   698k|    int over;
  146|   698k|    r->d[0] = secp256k1_read_be64(&b32[24]);
  147|   698k|    r->d[1] = secp256k1_read_be64(&b32[16]);
  148|   698k|    r->d[2] = secp256k1_read_be64(&b32[8]);
  149|   698k|    r->d[3] = secp256k1_read_be64(&b32[0]);
  150|   698k|    over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r));
  151|   698k|    if (overflow) {
  ------------------
  |  Branch (151:9): [True: 654k, False: 44.1k]
  ------------------
  152|   654k|        *overflow = over;
  153|   654k|    }
  154|       |
  155|   698k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   698k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  156|   698k|}
secp256k1.c:secp256k1_scalar_reduce:
   74|  1.44M|SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, unsigned int overflow) {
   75|  1.44M|    secp256k1_uint128 t;
   76|  1.44M|    VERIFY_CHECK(overflow <= 1);
   77|       |
   78|  1.44M|    secp256k1_u128_from_u64(&t, r->d[0]);
   79|  1.44M|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_0);
  ------------------
  |  |   22|  1.44M|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|  1.44M|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
   80|  1.44M|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   81|  1.44M|    secp256k1_u128_accum_u64(&t, r->d[1]);
   82|  1.44M|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_1);
  ------------------
  |  |   23|  1.44M|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|  1.44M|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
   83|  1.44M|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   84|  1.44M|    secp256k1_u128_accum_u64(&t, r->d[2]);
   85|  1.44M|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_2);
  ------------------
  |  |   24|  1.44M|#define SECP256K1_N_C_2 (1)
  ------------------
   86|  1.44M|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   87|  1.44M|    secp256k1_u128_accum_u64(&t, r->d[3]);
   88|  1.44M|    r->d[3] = secp256k1_u128_to_u64(&t);
   89|       |
   90|  1.44M|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  1.44M|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   91|  1.44M|    return overflow;
   92|  1.44M|}
secp256k1.c:secp256k1_scalar_check_overflow:
   62|  1.44M|SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) {
   63|  1.44M|    int yes = 0;
   64|  1.44M|    int no = 0;
   65|  1.44M|    no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */
  ------------------
  |  |   19|  1.44M|#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
   66|  1.44M|    no |= (a->d[2] < SECP256K1_N_2);
  ------------------
  |  |   18|  1.44M|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
   67|  1.44M|    yes |= (a->d[2] > SECP256K1_N_2) & ~no;
  ------------------
  |  |   18|  1.44M|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
   68|  1.44M|    no |= (a->d[1] < SECP256K1_N_1);
  ------------------
  |  |   17|  1.44M|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
   69|  1.44M|    yes |= (a->d[1] > SECP256K1_N_1) & ~no;
  ------------------
  |  |   17|  1.44M|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
   70|  1.44M|    yes |= (a->d[0] >= SECP256K1_N_0) & ~no;
  ------------------
  |  |   16|  1.44M|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  ------------------
   71|  1.44M|    return yes;
   72|  1.44M|}
secp256k1.c:secp256k1_scalar_get_b32:
  158|   121k|static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) {
  159|   121k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   121k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  160|       |
  161|   121k|    secp256k1_write_be64(&bin[0],  a->d[3]);
  162|   121k|    secp256k1_write_be64(&bin[8],  a->d[2]);
  163|   121k|    secp256k1_write_be64(&bin[16], a->d[1]);
  164|   121k|    secp256k1_write_be64(&bin[24], a->d[0]);
  165|   121k|}
secp256k1.c:secp256k1_scalar_is_high:
  241|  14.7k|static int secp256k1_scalar_is_high(const secp256k1_scalar *a) {
  242|  14.7k|    int yes = 0;
  243|  14.7k|    int no = 0;
  244|  14.7k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  245|       |
  246|  14.7k|    no |= (a->d[3] < SECP256K1_N_H_3);
  ------------------
  |  |   30|  14.7k|#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL)
  ------------------
  247|  14.7k|    yes |= (a->d[3] > SECP256K1_N_H_3) & ~no;
  ------------------
  |  |   30|  14.7k|#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL)
  ------------------
  248|  14.7k|    no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; /* No need for a > check. */
  ------------------
  |  |   29|  14.7k|#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
  249|  14.7k|    no |= (a->d[1] < SECP256K1_N_H_1) & ~yes;
  ------------------
  |  |   28|  14.7k|#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL)
  ------------------
  250|  14.7k|    yes |= (a->d[1] > SECP256K1_N_H_1) & ~no;
  ------------------
  |  |   28|  14.7k|#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL)
  ------------------
  251|  14.7k|    yes |= (a->d[0] > SECP256K1_N_H_0) & ~no;
  ------------------
  |  |   27|  14.7k|#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL)
  ------------------
  252|  14.7k|    return yes;
  253|  14.7k|}
secp256k1.c:secp256k1_scalar_negate:
  173|  92.0k|static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) {
  174|  92.0k|    uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0);
  175|  92.0k|    secp256k1_uint128 t;
  176|  92.0k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  92.0k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  177|       |
  178|  92.0k|    secp256k1_u128_from_u64(&t, ~a->d[0]);
  179|  92.0k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_0 + 1);
  ------------------
  |  |   16|  92.0k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  ------------------
  180|  92.0k|    r->d[0] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  181|  92.0k|    secp256k1_u128_accum_u64(&t, ~a->d[1]);
  182|  92.0k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_1);
  ------------------
  |  |   17|  92.0k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
  183|  92.0k|    r->d[1] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  184|  92.0k|    secp256k1_u128_accum_u64(&t, ~a->d[2]);
  185|  92.0k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_2);
  ------------------
  |  |   18|  92.0k|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
  186|  92.0k|    r->d[2] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  187|  92.0k|    secp256k1_u128_accum_u64(&t, ~a->d[3]);
  188|  92.0k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_3);
  ------------------
  |  |   19|  92.0k|#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
  189|  92.0k|    r->d[3] = secp256k1_u128_to_u64(&t) & nonzero;
  190|       |
  191|  92.0k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  92.0k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  192|  92.0k|}
secp256k1.c:secp256k1_scalar_inverse_var:
  979|  14.7k|static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
  980|  14.7k|    secp256k1_modinv64_signed62 s;
  981|       |#ifdef VERIFY
  982|       |    int zero_in = secp256k1_scalar_is_zero(x);
  983|       |#endif
  984|  14.7k|    SECP256K1_SCALAR_VERIFY(x);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  985|       |
  986|  14.7k|    secp256k1_scalar_to_signed62(&s, x);
  987|  14.7k|    secp256k1_modinv64_var(&s, &secp256k1_const_modinfo_scalar);
  988|  14.7k|    secp256k1_scalar_from_signed62(r, &s);
  989|       |
  990|  14.7k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  991|  14.7k|    VERIFY_CHECK(secp256k1_scalar_is_zero(r) == zero_in);
  992|  14.7k|}
secp256k1.c:secp256k1_scalar_to_signed62:
  947|  29.4k|static void secp256k1_scalar_to_signed62(secp256k1_modinv64_signed62 *r, const secp256k1_scalar *a) {
  948|  29.4k|    const uint64_t M62 = UINT64_MAX >> 2;
  949|  29.4k|    const uint64_t a0 = a->d[0], a1 = a->d[1], a2 = a->d[2], a3 = a->d[3];
  950|  29.4k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  29.4k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  951|       |
  952|  29.4k|    r->v[0] =  a0                   & M62;
  953|  29.4k|    r->v[1] = (a0 >> 62 | a1 <<  2) & M62;
  954|  29.4k|    r->v[2] = (a1 >> 60 | a2 <<  4) & M62;
  955|  29.4k|    r->v[3] = (a2 >> 58 | a3 <<  6) & M62;
  956|  29.4k|    r->v[4] =  a3 >> 56;
  957|  29.4k|}
secp256k1.c:secp256k1_scalar_from_signed62:
  927|  29.4k|static void secp256k1_scalar_from_signed62(secp256k1_scalar *r, const secp256k1_modinv64_signed62 *a) {
  928|  29.4k|    const uint64_t a0 = a->v[0], a1 = a->v[1], a2 = a->v[2], a3 = a->v[3], a4 = a->v[4];
  929|       |
  930|       |    /* The output from secp256k1_modinv64{_var} should be normalized to range [0,modulus), and
  931|       |     * have limbs in [0,2^62). The modulus is < 2^256, so the top limb must be below 2^(256-62*4).
  932|       |     */
  933|  29.4k|    VERIFY_CHECK(a0 >> 62 == 0);
  934|  29.4k|    VERIFY_CHECK(a1 >> 62 == 0);
  935|  29.4k|    VERIFY_CHECK(a2 >> 62 == 0);
  936|  29.4k|    VERIFY_CHECK(a3 >> 62 == 0);
  937|  29.4k|    VERIFY_CHECK(a4 >> 8 == 0);
  938|       |
  939|  29.4k|    r->d[0] = a0      | a1 << 62;
  940|  29.4k|    r->d[1] = a1 >> 2 | a2 << 60;
  941|  29.4k|    r->d[2] = a2 >> 4 | a3 << 58;
  942|  29.4k|    r->d[3] = a3 >> 6 | a4 << 56;
  943|       |
  944|  29.4k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  29.4k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  945|  29.4k|}
secp256k1.c:secp256k1_scalar_mul:
  855|   246k|static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
  856|   246k|    uint64_t l[8];
  857|   246k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   246k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  858|   246k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|   246k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  859|       |
  860|   246k|    secp256k1_scalar_mul_512(l, a, b);
  861|   246k|    secp256k1_scalar_reduce_512(r, l);
  862|       |
  863|   246k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   246k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  864|   246k|}
secp256k1.c:secp256k1_scalar_mul_512:
  678|   371k|static void secp256k1_scalar_mul_512(uint64_t *l8, const secp256k1_scalar *a, const secp256k1_scalar *b) {
  679|   371k|#ifdef USE_ASM_X86_64
  680|   371k|    const uint64_t *pb = b->d;
  681|   371k|    __asm__ __volatile__(
  682|       |    /* Preload */
  683|   371k|    "movq 0(%%rdi), %%r15\n"
  684|   371k|    "movq 8(%%rdi), %%rbx\n"
  685|   371k|    "movq 16(%%rdi), %%rcx\n"
  686|   371k|    "movq 0(%%rdx), %%r11\n"
  687|   371k|    "movq 8(%%rdx), %%r12\n"
  688|   371k|    "movq 16(%%rdx), %%r13\n"
  689|   371k|    "movq 24(%%rdx), %%r14\n"
  690|       |    /* (rax,rdx) = a0 * b0 */
  691|   371k|    "movq %%r15, %%rax\n"
  692|   371k|    "mulq %%r11\n"
  693|       |    /* Extract l8[0] */
  694|   371k|    "movq %%rax, 0(%%rsi)\n"
  695|       |    /* (r8,r9,r10) = (rdx) */
  696|   371k|    "movq %%rdx, %%r8\n"
  697|   371k|    "xorq %%r9, %%r9\n"
  698|   371k|    "xorq %%r10, %%r10\n"
  699|       |    /* (r8,r9,r10) += a0 * b1 */
  700|   371k|    "movq %%r15, %%rax\n"
  701|   371k|    "mulq %%r12\n"
  702|   371k|    "addq %%rax, %%r8\n"
  703|   371k|    "adcq %%rdx, %%r9\n"
  704|   371k|    "adcq $0, %%r10\n"
  705|       |    /* (r8,r9,r10) += a1 * b0 */
  706|   371k|    "movq %%rbx, %%rax\n"
  707|   371k|    "mulq %%r11\n"
  708|   371k|    "addq %%rax, %%r8\n"
  709|   371k|    "adcq %%rdx, %%r9\n"
  710|   371k|    "adcq $0, %%r10\n"
  711|       |    /* Extract l8[1] */
  712|   371k|    "movq %%r8, 8(%%rsi)\n"
  713|   371k|    "xorq %%r8, %%r8\n"
  714|       |    /* (r9,r10,r8) += a0 * b2 */
  715|   371k|    "movq %%r15, %%rax\n"
  716|   371k|    "mulq %%r13\n"
  717|   371k|    "addq %%rax, %%r9\n"
  718|   371k|    "adcq %%rdx, %%r10\n"
  719|   371k|    "adcq $0, %%r8\n"
  720|       |    /* (r9,r10,r8) += a1 * b1 */
  721|   371k|    "movq %%rbx, %%rax\n"
  722|   371k|    "mulq %%r12\n"
  723|   371k|    "addq %%rax, %%r9\n"
  724|   371k|    "adcq %%rdx, %%r10\n"
  725|   371k|    "adcq $0, %%r8\n"
  726|       |    /* (r9,r10,r8) += a2 * b0 */
  727|   371k|    "movq %%rcx, %%rax\n"
  728|   371k|    "mulq %%r11\n"
  729|   371k|    "addq %%rax, %%r9\n"
  730|   371k|    "adcq %%rdx, %%r10\n"
  731|   371k|    "adcq $0, %%r8\n"
  732|       |    /* Extract l8[2] */
  733|   371k|    "movq %%r9, 16(%%rsi)\n"
  734|   371k|    "xorq %%r9, %%r9\n"
  735|       |    /* (r10,r8,r9) += a0 * b3 */
  736|   371k|    "movq %%r15, %%rax\n"
  737|   371k|    "mulq %%r14\n"
  738|   371k|    "addq %%rax, %%r10\n"
  739|   371k|    "adcq %%rdx, %%r8\n"
  740|   371k|    "adcq $0, %%r9\n"
  741|       |    /* Preload a3 */
  742|   371k|    "movq 24(%%rdi), %%r15\n"
  743|       |    /* (r10,r8,r9) += a1 * b2 */
  744|   371k|    "movq %%rbx, %%rax\n"
  745|   371k|    "mulq %%r13\n"
  746|   371k|    "addq %%rax, %%r10\n"
  747|   371k|    "adcq %%rdx, %%r8\n"
  748|   371k|    "adcq $0, %%r9\n"
  749|       |    /* (r10,r8,r9) += a2 * b1 */
  750|   371k|    "movq %%rcx, %%rax\n"
  751|   371k|    "mulq %%r12\n"
  752|   371k|    "addq %%rax, %%r10\n"
  753|   371k|    "adcq %%rdx, %%r8\n"
  754|   371k|    "adcq $0, %%r9\n"
  755|       |    /* (r10,r8,r9) += a3 * b0 */
  756|   371k|    "movq %%r15, %%rax\n"
  757|   371k|    "mulq %%r11\n"
  758|   371k|    "addq %%rax, %%r10\n"
  759|   371k|    "adcq %%rdx, %%r8\n"
  760|   371k|    "adcq $0, %%r9\n"
  761|       |    /* Extract l8[3] */
  762|   371k|    "movq %%r10, 24(%%rsi)\n"
  763|   371k|    "xorq %%r10, %%r10\n"
  764|       |    /* (r8,r9,r10) += a1 * b3 */
  765|   371k|    "movq %%rbx, %%rax\n"
  766|   371k|    "mulq %%r14\n"
  767|   371k|    "addq %%rax, %%r8\n"
  768|   371k|    "adcq %%rdx, %%r9\n"
  769|   371k|    "adcq $0, %%r10\n"
  770|       |    /* (r8,r9,r10) += a2 * b2 */
  771|   371k|    "movq %%rcx, %%rax\n"
  772|   371k|    "mulq %%r13\n"
  773|   371k|    "addq %%rax, %%r8\n"
  774|   371k|    "adcq %%rdx, %%r9\n"
  775|   371k|    "adcq $0, %%r10\n"
  776|       |    /* (r8,r9,r10) += a3 * b1 */
  777|   371k|    "movq %%r15, %%rax\n"
  778|   371k|    "mulq %%r12\n"
  779|   371k|    "addq %%rax, %%r8\n"
  780|   371k|    "adcq %%rdx, %%r9\n"
  781|   371k|    "adcq $0, %%r10\n"
  782|       |    /* Extract l8[4] */
  783|   371k|    "movq %%r8, 32(%%rsi)\n"
  784|   371k|    "xorq %%r8, %%r8\n"
  785|       |    /* (r9,r10,r8) += a2 * b3 */
  786|   371k|    "movq %%rcx, %%rax\n"
  787|   371k|    "mulq %%r14\n"
  788|   371k|    "addq %%rax, %%r9\n"
  789|   371k|    "adcq %%rdx, %%r10\n"
  790|   371k|    "adcq $0, %%r8\n"
  791|       |    /* (r9,r10,r8) += a3 * b2 */
  792|   371k|    "movq %%r15, %%rax\n"
  793|   371k|    "mulq %%r13\n"
  794|   371k|    "addq %%rax, %%r9\n"
  795|   371k|    "adcq %%rdx, %%r10\n"
  796|   371k|    "adcq $0, %%r8\n"
  797|       |    /* Extract l8[5] */
  798|   371k|    "movq %%r9, 40(%%rsi)\n"
  799|       |    /* (r10,r8) += a3 * b3 */
  800|   371k|    "movq %%r15, %%rax\n"
  801|   371k|    "mulq %%r14\n"
  802|   371k|    "addq %%rax, %%r10\n"
  803|   371k|    "adcq %%rdx, %%r8\n"
  804|       |    /* Extract l8[6] */
  805|   371k|    "movq %%r10, 48(%%rsi)\n"
  806|       |    /* Extract l8[7] */
  807|   371k|    "movq %%r8, 56(%%rsi)\n"
  808|   371k|    : "+d"(pb)
  809|   371k|    : "S"(l8), "D"(a->d)
  810|   371k|    : "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc", "memory");
  811|       |
  812|   371k|    SECP256K1_CHECKMEM_MSAN_DEFINE(l8, sizeof(*l8) * 8);
  ------------------
  |  |   60|   371k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   371k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  813|       |
  814|       |#else
  815|       |    /* 160 bit accumulator. */
  816|       |    uint64_t c0 = 0, c1 = 0;
  817|       |    uint32_t c2 = 0;
  818|       |
  819|       |    /* l8[0..7] = a[0..3] * b[0..3]. */
  820|       |    muladd_fast(a->d[0], b->d[0]);
  821|       |    extract_fast(l8[0]);
  822|       |    muladd(a->d[0], b->d[1]);
  823|       |    muladd(a->d[1], b->d[0]);
  824|       |    extract(l8[1]);
  825|       |    muladd(a->d[0], b->d[2]);
  826|       |    muladd(a->d[1], b->d[1]);
  827|       |    muladd(a->d[2], b->d[0]);
  828|       |    extract(l8[2]);
  829|       |    muladd(a->d[0], b->d[3]);
  830|       |    muladd(a->d[1], b->d[2]);
  831|       |    muladd(a->d[2], b->d[1]);
  832|       |    muladd(a->d[3], b->d[0]);
  833|       |    extract(l8[3]);
  834|       |    muladd(a->d[1], b->d[3]);
  835|       |    muladd(a->d[2], b->d[2]);
  836|       |    muladd(a->d[3], b->d[1]);
  837|       |    extract(l8[4]);
  838|       |    muladd(a->d[2], b->d[3]);
  839|       |    muladd(a->d[3], b->d[2]);
  840|       |    extract(l8[5]);
  841|       |    muladd_fast(a->d[3], b->d[3]);
  842|       |    extract_fast(l8[6]);
  843|       |    VERIFY_CHECK(c1 == 0);
  844|       |    l8[7] = c0;
  845|       |#endif
  846|   371k|}
secp256k1.c:secp256k1_scalar_reduce_512:
  347|   246k|static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) {
  348|   246k|#ifdef USE_ASM_X86_64
  349|       |    /* Reduce 512 bits into 385. */
  350|   246k|    uint64_t m0, m1, m2, m3, m4, m5, m6;
  351|   246k|    uint64_t p0, p1, p2, p3, p4;
  352|   246k|    uint64_t c;
  353|       |
  354|   246k|    __asm__ __volatile__(
  355|       |    /* Preload. */
  356|   246k|    "movq 32(%%rsi), %%r11\n"
  357|   246k|    "movq 40(%%rsi), %%r12\n"
  358|   246k|    "movq 48(%%rsi), %%r13\n"
  359|   246k|    "movq 56(%%rsi), %%r14\n"
  360|       |    /* Initialize r8,r9,r10 */
  361|   246k|    "movq 0(%%rsi), %%r8\n"
  362|   246k|    "xorq %%r9, %%r9\n"
  363|   246k|    "xorq %%r10, %%r10\n"
  364|       |    /* (r8,r9) += n0 * c0 */
  365|   246k|    "movq %8, %%rax\n"
  366|   246k|    "mulq %%r11\n"
  367|   246k|    "addq %%rax, %%r8\n"
  368|   246k|    "adcq %%rdx, %%r9\n"
  369|       |    /* extract m0 */
  370|   246k|    "movq %%r8, %q0\n"
  371|   246k|    "xorq %%r8, %%r8\n"
  372|       |    /* (r9,r10) += l1 */
  373|   246k|    "addq 8(%%rsi), %%r9\n"
  374|   246k|    "adcq $0, %%r10\n"
  375|       |    /* (r9,r10,r8) += n1 * c0 */
  376|   246k|    "movq %8, %%rax\n"
  377|   246k|    "mulq %%r12\n"
  378|   246k|    "addq %%rax, %%r9\n"
  379|   246k|    "adcq %%rdx, %%r10\n"
  380|   246k|    "adcq $0, %%r8\n"
  381|       |    /* (r9,r10,r8) += n0 * c1 */
  382|   246k|    "movq %9, %%rax\n"
  383|   246k|    "mulq %%r11\n"
  384|   246k|    "addq %%rax, %%r9\n"
  385|   246k|    "adcq %%rdx, %%r10\n"
  386|   246k|    "adcq $0, %%r8\n"
  387|       |    /* extract m1 */
  388|   246k|    "movq %%r9, %q1\n"
  389|   246k|    "xorq %%r9, %%r9\n"
  390|       |    /* (r10,r8,r9) += l2 */
  391|   246k|    "addq 16(%%rsi), %%r10\n"
  392|   246k|    "adcq $0, %%r8\n"
  393|   246k|    "adcq $0, %%r9\n"
  394|       |    /* (r10,r8,r9) += n2 * c0 */
  395|   246k|    "movq %8, %%rax\n"
  396|   246k|    "mulq %%r13\n"
  397|   246k|    "addq %%rax, %%r10\n"
  398|   246k|    "adcq %%rdx, %%r8\n"
  399|   246k|    "adcq $0, %%r9\n"
  400|       |    /* (r10,r8,r9) += n1 * c1 */
  401|   246k|    "movq %9, %%rax\n"
  402|   246k|    "mulq %%r12\n"
  403|   246k|    "addq %%rax, %%r10\n"
  404|   246k|    "adcq %%rdx, %%r8\n"
  405|   246k|    "adcq $0, %%r9\n"
  406|       |    /* (r10,r8,r9) += n0 */
  407|   246k|    "addq %%r11, %%r10\n"
  408|   246k|    "adcq $0, %%r8\n"
  409|   246k|    "adcq $0, %%r9\n"
  410|       |    /* extract m2 */
  411|   246k|    "movq %%r10, %q2\n"
  412|   246k|    "xorq %%r10, %%r10\n"
  413|       |    /* (r8,r9,r10) += l3 */
  414|   246k|    "addq 24(%%rsi), %%r8\n"
  415|   246k|    "adcq $0, %%r9\n"
  416|   246k|    "adcq $0, %%r10\n"
  417|       |    /* (r8,r9,r10) += n3 * c0 */
  418|   246k|    "movq %8, %%rax\n"
  419|   246k|    "mulq %%r14\n"
  420|   246k|    "addq %%rax, %%r8\n"
  421|   246k|    "adcq %%rdx, %%r9\n"
  422|   246k|    "adcq $0, %%r10\n"
  423|       |    /* (r8,r9,r10) += n2 * c1 */
  424|   246k|    "movq %9, %%rax\n"
  425|   246k|    "mulq %%r13\n"
  426|   246k|    "addq %%rax, %%r8\n"
  427|   246k|    "adcq %%rdx, %%r9\n"
  428|   246k|    "adcq $0, %%r10\n"
  429|       |    /* (r8,r9,r10) += n1 */
  430|   246k|    "addq %%r12, %%r8\n"
  431|   246k|    "adcq $0, %%r9\n"
  432|   246k|    "adcq $0, %%r10\n"
  433|       |    /* extract m3 */
  434|   246k|    "movq %%r8, %q3\n"
  435|   246k|    "xorq %%r8, %%r8\n"
  436|       |    /* (r9,r10,r8) += n3 * c1 */
  437|   246k|    "movq %9, %%rax\n"
  438|   246k|    "mulq %%r14\n"
  439|   246k|    "addq %%rax, %%r9\n"
  440|   246k|    "adcq %%rdx, %%r10\n"
  441|   246k|    "adcq $0, %%r8\n"
  442|       |    /* (r9,r10,r8) += n2 */
  443|   246k|    "addq %%r13, %%r9\n"
  444|   246k|    "adcq $0, %%r10\n"
  445|   246k|    "adcq $0, %%r8\n"
  446|       |    /* extract m4 */
  447|   246k|    "movq %%r9, %q4\n"
  448|       |    /* (r10,r8) += n3 */
  449|   246k|    "addq %%r14, %%r10\n"
  450|   246k|    "adcq $0, %%r8\n"
  451|       |    /* extract m5 */
  452|   246k|    "movq %%r10, %q5\n"
  453|       |    /* extract m6 */
  454|   246k|    "movq %%r8, %q6\n"
  455|   246k|    : "=&g"(m0), "=&g"(m1), "=&g"(m2), "=g"(m3), "=g"(m4), "=g"(m5), "=g"(m6)
  456|   246k|    : "S"(l), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   22|   246k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|   246k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
                  : "S"(l), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   23|   246k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|   246k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  457|   246k|    : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc");
  458|       |
  459|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m0, sizeof(m0));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m1, sizeof(m1));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m2, sizeof(m2));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  462|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m3, sizeof(m3));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  463|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m4, sizeof(m4));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  464|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m5, sizeof(m5));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  465|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m6, sizeof(m6));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|       |
  467|       |    /* Reduce 385 bits into 258. */
  468|   246k|    __asm__ __volatile__(
  469|       |    /* Preload */
  470|   246k|    "movq %q9, %%r11\n"
  471|   246k|    "movq %q10, %%r12\n"
  472|   246k|    "movq %q11, %%r13\n"
  473|       |    /* Initialize (r8,r9,r10) */
  474|   246k|    "movq %q5, %%r8\n"
  475|   246k|    "xorq %%r9, %%r9\n"
  476|   246k|    "xorq %%r10, %%r10\n"
  477|       |    /* (r8,r9) += m4 * c0 */
  478|   246k|    "movq %12, %%rax\n"
  479|   246k|    "mulq %%r11\n"
  480|   246k|    "addq %%rax, %%r8\n"
  481|   246k|    "adcq %%rdx, %%r9\n"
  482|       |    /* extract p0 */
  483|   246k|    "movq %%r8, %q0\n"
  484|   246k|    "xorq %%r8, %%r8\n"
  485|       |    /* (r9,r10) += m1 */
  486|   246k|    "addq %q6, %%r9\n"
  487|   246k|    "adcq $0, %%r10\n"
  488|       |    /* (r9,r10,r8) += m5 * c0 */
  489|   246k|    "movq %12, %%rax\n"
  490|   246k|    "mulq %%r12\n"
  491|   246k|    "addq %%rax, %%r9\n"
  492|   246k|    "adcq %%rdx, %%r10\n"
  493|   246k|    "adcq $0, %%r8\n"
  494|       |    /* (r9,r10,r8) += m4 * c1 */
  495|   246k|    "movq %13, %%rax\n"
  496|   246k|    "mulq %%r11\n"
  497|   246k|    "addq %%rax, %%r9\n"
  498|   246k|    "adcq %%rdx, %%r10\n"
  499|   246k|    "adcq $0, %%r8\n"
  500|       |    /* extract p1 */
  501|   246k|    "movq %%r9, %q1\n"
  502|   246k|    "xorq %%r9, %%r9\n"
  503|       |    /* (r10,r8,r9) += m2 */
  504|   246k|    "addq %q7, %%r10\n"
  505|   246k|    "adcq $0, %%r8\n"
  506|   246k|    "adcq $0, %%r9\n"
  507|       |    /* (r10,r8,r9) += m6 * c0 */
  508|   246k|    "movq %12, %%rax\n"
  509|   246k|    "mulq %%r13\n"
  510|   246k|    "addq %%rax, %%r10\n"
  511|   246k|    "adcq %%rdx, %%r8\n"
  512|   246k|    "adcq $0, %%r9\n"
  513|       |    /* (r10,r8,r9) += m5 * c1 */
  514|   246k|    "movq %13, %%rax\n"
  515|   246k|    "mulq %%r12\n"
  516|   246k|    "addq %%rax, %%r10\n"
  517|   246k|    "adcq %%rdx, %%r8\n"
  518|   246k|    "adcq $0, %%r9\n"
  519|       |    /* (r10,r8,r9) += m4 */
  520|   246k|    "addq %%r11, %%r10\n"
  521|   246k|    "adcq $0, %%r8\n"
  522|   246k|    "adcq $0, %%r9\n"
  523|       |    /* extract p2 */
  524|   246k|    "movq %%r10, %q2\n"
  525|       |    /* (r8,r9) += m3 */
  526|   246k|    "addq %q8, %%r8\n"
  527|   246k|    "adcq $0, %%r9\n"
  528|       |    /* (r8,r9) += m6 * c1 */
  529|   246k|    "movq %13, %%rax\n"
  530|   246k|    "mulq %%r13\n"
  531|   246k|    "addq %%rax, %%r8\n"
  532|   246k|    "adcq %%rdx, %%r9\n"
  533|       |    /* (r8,r9) += m5 */
  534|   246k|    "addq %%r12, %%r8\n"
  535|   246k|    "adcq $0, %%r9\n"
  536|       |    /* extract p3 */
  537|   246k|    "movq %%r8, %q3\n"
  538|       |    /* (r9) += m6 */
  539|   246k|    "addq %%r13, %%r9\n"
  540|       |    /* extract p4 */
  541|   246k|    "movq %%r9, %q4\n"
  542|   246k|    : "=&g"(p0), "=&g"(p1), "=&g"(p2), "=g"(p3), "=g"(p4)
  543|   246k|    : "g"(m0), "g"(m1), "g"(m2), "g"(m3), "g"(m4), "g"(m5), "g"(m6), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   22|   246k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|   246k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
                  : "g"(m0), "g"(m1), "g"(m2), "g"(m3), "g"(m4), "g"(m5), "g"(m6), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   23|   246k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|   246k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  544|   246k|    : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc");
  545|       |
  546|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p0, sizeof(p0));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  547|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p1, sizeof(p1));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p2, sizeof(p2));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  549|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p3, sizeof(p3));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p4, sizeof(p4));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|       |
  552|       |    /* Reduce 258 bits into 256. */
  553|   246k|    __asm__ __volatile__(
  554|       |    /* Preload */
  555|   246k|    "movq %q5, %%r10\n"
  556|       |    /* (rax,rdx) = p4 * c0 */
  557|   246k|    "movq %7, %%rax\n"
  558|   246k|    "mulq %%r10\n"
  559|       |    /* (rax,rdx) += p0 */
  560|   246k|    "addq %q1, %%rax\n"
  561|   246k|    "adcq $0, %%rdx\n"
  562|       |    /* extract r0 */
  563|   246k|    "movq %%rax, 0(%q6)\n"
  564|       |    /* Move to (r8,r9) */
  565|   246k|    "movq %%rdx, %%r8\n"
  566|   246k|    "xorq %%r9, %%r9\n"
  567|       |    /* (r8,r9) += p1 */
  568|   246k|    "addq %q2, %%r8\n"
  569|   246k|    "adcq $0, %%r9\n"
  570|       |    /* (r8,r9) += p4 * c1 */
  571|   246k|    "movq %8, %%rax\n"
  572|   246k|    "mulq %%r10\n"
  573|   246k|    "addq %%rax, %%r8\n"
  574|   246k|    "adcq %%rdx, %%r9\n"
  575|       |    /* Extract r1 */
  576|   246k|    "movq %%r8, 8(%q6)\n"
  577|   246k|    "xorq %%r8, %%r8\n"
  578|       |    /* (r9,r8) += p4 */
  579|   246k|    "addq %%r10, %%r9\n"
  580|   246k|    "adcq $0, %%r8\n"
  581|       |    /* (r9,r8) += p2 */
  582|   246k|    "addq %q3, %%r9\n"
  583|   246k|    "adcq $0, %%r8\n"
  584|       |    /* Extract r2 */
  585|   246k|    "movq %%r9, 16(%q6)\n"
  586|   246k|    "xorq %%r9, %%r9\n"
  587|       |    /* (r8,r9) += p3 */
  588|   246k|    "addq %q4, %%r8\n"
  589|   246k|    "adcq $0, %%r9\n"
  590|       |    /* Extract r3 */
  591|   246k|    "movq %%r8, 24(%q6)\n"
  592|       |    /* Extract c */
  593|   246k|    "movq %%r9, %q0\n"
  594|   246k|    : "=g"(c)
  595|   246k|    : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   22|   246k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|   246k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
                  : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   23|   246k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|   246k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  596|   246k|    : "rax", "rdx", "r8", "r9", "r10", "cc", "memory");
  597|       |
  598|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(r, sizeof(*r));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  599|   246k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&c, sizeof(c));
  ------------------
  |  |   60|   246k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   246k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|       |
  601|       |#else
  602|       |    secp256k1_uint128 c128;
  603|       |    uint64_t c, c0, c1, c2;
  604|       |    uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7];
  605|       |    uint64_t m0, m1, m2, m3, m4, m5;
  606|       |    uint32_t m6;
  607|       |    uint64_t p0, p1, p2, p3;
  608|       |    uint32_t p4;
  609|       |
  610|       |    /* Reduce 512 bits into 385. */
  611|       |    /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */
  612|       |    c0 = l[0]; c1 = 0; c2 = 0;
  613|       |    muladd_fast(n0, SECP256K1_N_C_0);
  614|       |    extract_fast(m0);
  615|       |    sumadd_fast(l[1]);
  616|       |    muladd(n1, SECP256K1_N_C_0);
  617|       |    muladd(n0, SECP256K1_N_C_1);
  618|       |    extract(m1);
  619|       |    sumadd(l[2]);
  620|       |    muladd(n2, SECP256K1_N_C_0);
  621|       |    muladd(n1, SECP256K1_N_C_1);
  622|       |    sumadd(n0);
  623|       |    extract(m2);
  624|       |    sumadd(l[3]);
  625|       |    muladd(n3, SECP256K1_N_C_0);
  626|       |    muladd(n2, SECP256K1_N_C_1);
  627|       |    sumadd(n1);
  628|       |    extract(m3);
  629|       |    muladd(n3, SECP256K1_N_C_1);
  630|       |    sumadd(n2);
  631|       |    extract(m4);
  632|       |    sumadd_fast(n3);
  633|       |    extract_fast(m5);
  634|       |    VERIFY_CHECK(c0 <= 1);
  635|       |    m6 = c0;
  636|       |
  637|       |    /* Reduce 385 bits into 258. */
  638|       |    /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */
  639|       |    c0 = m0; c1 = 0; c2 = 0;
  640|       |    muladd_fast(m4, SECP256K1_N_C_0);
  641|       |    extract_fast(p0);
  642|       |    sumadd_fast(m1);
  643|       |    muladd(m5, SECP256K1_N_C_0);
  644|       |    muladd(m4, SECP256K1_N_C_1);
  645|       |    extract(p1);
  646|       |    sumadd(m2);
  647|       |    muladd(m6, SECP256K1_N_C_0);
  648|       |    muladd(m5, SECP256K1_N_C_1);
  649|       |    sumadd(m4);
  650|       |    extract(p2);
  651|       |    sumadd_fast(m3);
  652|       |    muladd_fast(m6, SECP256K1_N_C_1);
  653|       |    sumadd_fast(m5);
  654|       |    extract_fast(p3);
  655|       |    p4 = c0 + m6;
  656|       |    VERIFY_CHECK(p4 <= 2);
  657|       |
  658|       |    /* Reduce 258 bits into 256. */
  659|       |    /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */
  660|       |    secp256k1_u128_from_u64(&c128, p0);
  661|       |    secp256k1_u128_accum_mul(&c128, SECP256K1_N_C_0, p4);
  662|       |    r->d[0] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  663|       |    secp256k1_u128_accum_u64(&c128, p1);
  664|       |    secp256k1_u128_accum_mul(&c128, SECP256K1_N_C_1, p4);
  665|       |    r->d[1] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  666|       |    secp256k1_u128_accum_u64(&c128, p2);
  667|       |    secp256k1_u128_accum_u64(&c128, p4);
  668|       |    r->d[2] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  669|       |    secp256k1_u128_accum_u64(&c128, p3);
  670|       |    r->d[3] = secp256k1_u128_to_u64(&c128);
  671|       |    c = secp256k1_u128_hi_u64(&c128);
  672|       |#endif
  673|       |
  674|       |    /* Final reduction of r. */
  675|   246k|    secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
  676|   246k|}
secp256k1.c:secp256k1_scalar_get_bits_limb32:
   41|  19.7M|SECP256K1_INLINE static uint32_t secp256k1_scalar_get_bits_limb32(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
   42|  19.7M|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  19.7M|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   43|  19.7M|    VERIFY_CHECK(count > 0 && count <= 32);
   44|  19.7M|    VERIFY_CHECK((offset + count - 1) >> 6 == offset >> 6);
   45|       |
   46|  19.7M|    return (a->d[offset >> 6] >> (offset & 0x3F)) & (0xFFFFFFFF >> (32 - count));
   47|  19.7M|}
secp256k1.c:secp256k1_scalar_add:
   94|   500k|static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
   95|   500k|    int overflow;
   96|   500k|    secp256k1_uint128 t;
   97|   500k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   500k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   98|   500k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|   500k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   99|       |
  100|   500k|    secp256k1_u128_from_u64(&t, a->d[0]);
  101|   500k|    secp256k1_u128_accum_u64(&t, b->d[0]);
  102|   500k|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  103|   500k|    secp256k1_u128_accum_u64(&t, a->d[1]);
  104|   500k|    secp256k1_u128_accum_u64(&t, b->d[1]);
  105|   500k|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  106|   500k|    secp256k1_u128_accum_u64(&t, a->d[2]);
  107|   500k|    secp256k1_u128_accum_u64(&t, b->d[2]);
  108|   500k|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  109|   500k|    secp256k1_u128_accum_u64(&t, a->d[3]);
  110|   500k|    secp256k1_u128_accum_u64(&t, b->d[3]);
  111|   500k|    r->d[3] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  112|   500k|    overflow = secp256k1_u128_to_u64(&t) + secp256k1_scalar_check_overflow(r);
  113|   500k|    VERIFY_CHECK(overflow == 0 || overflow == 1);
  114|   500k|    secp256k1_scalar_reduce(r, overflow);
  115|       |
  116|   500k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   500k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  117|   500k|    return overflow;
  118|   500k|}
secp256k1.c:secp256k1_scalar_inverse:
  964|  14.7k|static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) {
  965|  14.7k|    secp256k1_modinv64_signed62 s;
  966|       |#ifdef VERIFY
  967|       |    int zero_in = secp256k1_scalar_is_zero(x);
  968|       |#endif
  969|  14.7k|    SECP256K1_SCALAR_VERIFY(x);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  970|       |
  971|  14.7k|    secp256k1_scalar_to_signed62(&s, x);
  972|  14.7k|    secp256k1_modinv64(&s, &secp256k1_const_modinfo_scalar);
  973|  14.7k|    secp256k1_scalar_from_signed62(r, &s);
  974|       |
  975|  14.7k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  976|  14.7k|    VERIFY_CHECK(secp256k1_scalar_is_zero(r) == zero_in);
  977|  14.7k|}
secp256k1.c:secp256k1_scalar_cond_negate:
  255|  14.7k|static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
  256|       |    /* If we are flag = 0, mask = 00...00 and this is a no-op;
  257|       |     * if we are flag = 1, mask = 11...11 and this is identical to secp256k1_scalar_negate */
  258|  14.7k|    volatile int vflag = flag;
  259|  14.7k|    uint64_t mask = -vflag;
  260|  14.7k|    uint64_t nonzero = (secp256k1_scalar_is_zero(r) != 0) - 1;
  261|  14.7k|    secp256k1_uint128 t;
  262|  14.7k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  263|       |
  264|  14.7k|    secp256k1_u128_from_u64(&t, r->d[0] ^ mask);
  265|  14.7k|    secp256k1_u128_accum_u64(&t, (SECP256K1_N_0 + 1) & mask);
  ------------------
  |  |   16|  14.7k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  ------------------
  266|  14.7k|    r->d[0] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  267|  14.7k|    secp256k1_u128_accum_u64(&t, r->d[1] ^ mask);
  268|  14.7k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_1 & mask);
  ------------------
  |  |   17|  14.7k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
  269|  14.7k|    r->d[1] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  270|  14.7k|    secp256k1_u128_accum_u64(&t, r->d[2] ^ mask);
  271|  14.7k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_2 & mask);
  ------------------
  |  |   18|  14.7k|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
  272|  14.7k|    r->d[2] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  273|  14.7k|    secp256k1_u128_accum_u64(&t, r->d[3] ^ mask);
  274|  14.7k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_3 & mask);
  ------------------
  |  |   19|  14.7k|#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
  275|  14.7k|    r->d[3] = secp256k1_u128_to_u64(&t) & nonzero;
  276|       |
  277|  14.7k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  14.7k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  278|  14.7k|    return 2 * (mask == 0) - 1;
  279|  14.7k|}
secp256k1.c:secp256k1_scalar_cmov:
  911|   390k|static SECP256K1_INLINE void secp256k1_scalar_cmov(secp256k1_scalar *r, const secp256k1_scalar *a, int flag) {
  912|   390k|    uint64_t mask0, mask1;
  913|   390k|    volatile int vflag = flag;
  914|   390k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   390k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  915|   390k|    SECP256K1_CHECKMEM_CHECK_VERIFY(r->d, sizeof(r->d));
  ------------------
  |  |   99|   390k|#define SECP256K1_CHECKMEM_CHECK_VERIFY(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   390k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  916|       |
  917|   390k|    mask0 = vflag + ~((uint64_t)0);
  918|   390k|    mask1 = ~mask0;
  919|   390k|    r->d[0] = (r->d[0] & mask0) | (a->d[0] & mask1);
  920|   390k|    r->d[1] = (r->d[1] & mask0) | (a->d[1] & mask1);
  921|   390k|    r->d[2] = (r->d[2] & mask0) | (a->d[2] & mask1);
  922|   390k|    r->d[3] = (r->d[3] & mask0) | (a->d[3] & mask1);
  923|       |
  924|   390k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   390k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  925|   390k|}
secp256k1.c:secp256k1_scalar_mul_shift_var:
  889|   125k|SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) {
  890|   125k|    uint64_t l[8];
  891|   125k|    unsigned int shiftlimbs;
  892|   125k|    unsigned int shiftlow;
  893|   125k|    unsigned int shifthigh;
  894|   125k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   125k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  895|   125k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|   125k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  896|   125k|    VERIFY_CHECK(shift >= 256);
  897|       |
  898|   125k|    secp256k1_scalar_mul_512(l, a, b);
  899|   125k|    shiftlimbs = shift >> 6;
  900|   125k|    shiftlow = shift & 0x3F;
  901|   125k|    shifthigh = 64 - shiftlow;
  902|   125k|    r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (902:15): [True: 125k, False: 0]
  |  Branch (902:63): [True: 125k, False: 0]
  |  Branch (902:78): [True: 0, False: 125k]
  ------------------
  903|   125k|    r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (903:15): [True: 125k, False: 0]
  |  Branch (903:63): [True: 0, False: 125k]
  |  Branch (903:78): [True: 0, False: 0]
  ------------------
  904|   125k|    r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (904:15): [True: 0, False: 125k]
  |  Branch (904:63): [True: 0, False: 0]
  |  Branch (904:78): [True: 0, False: 0]
  ------------------
  905|   125k|    r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0;
  ------------------
  |  Branch (905:15): [True: 0, False: 125k]
  ------------------
  906|   125k|    secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1);
  907|       |
  908|   125k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   125k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  909|   125k|}
secp256k1.c:secp256k1_scalar_cadd_bit:
  120|   125k|static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) {
  121|   125k|    secp256k1_uint128 t;
  122|   125k|    volatile int vflag = flag;
  123|   125k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   125k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  124|   125k|    VERIFY_CHECK(bit < 256);
  125|       |
  126|   125k|    bit += ((uint32_t) vflag - 1) & 0x100;  /* forcing (bit >> 6) > 3 makes this a noop */
  127|   125k|    secp256k1_u128_from_u64(&t, r->d[0]);
  128|   125k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F));
  129|   125k|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  130|   125k|    secp256k1_u128_accum_u64(&t, r->d[1]);
  131|   125k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F));
  132|   125k|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  133|   125k|    secp256k1_u128_accum_u64(&t, r->d[2]);
  134|   125k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F));
  135|   125k|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  136|   125k|    secp256k1_u128_accum_u64(&t, r->d[3]);
  137|   125k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F));
  138|   125k|    r->d[3] = secp256k1_u128_to_u64(&t);
  139|       |
  140|   125k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   125k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  141|   125k|    VERIFY_CHECK(secp256k1_u128_hi_u64(&t) == 0);
  142|   125k|}
secp256k1.c:secp256k1_scalar_get_bits_var:
   49|  1.74M|SECP256K1_INLINE static uint32_t secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
   50|  1.74M|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  1.74M|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   51|  1.74M|    VERIFY_CHECK(count > 0 && count <= 32);
   52|  1.74M|    VERIFY_CHECK(offset + count <= 256);
   53|       |
   54|  1.74M|    if ((offset + count - 1) >> 6 == offset >> 6) {
  ------------------
  |  Branch (54:9): [True: 1.51M, False: 231k]
  ------------------
   55|  1.51M|        return secp256k1_scalar_get_bits_limb32(a, offset, count);
   56|  1.51M|    } else {
   57|   231k|        VERIFY_CHECK((offset >> 6) + 1 < 4);
   58|   231k|        return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & (0xFFFFFFFF >> (32 - count));
   59|   231k|    }
   60|  1.74M|}
secp256k1.c:secp256k1_scalar_split_128:
  866|  62.6k|static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *k) {
  867|  62.6k|    SECP256K1_SCALAR_VERIFY(k);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  868|       |
  869|  62.6k|    r1->d[0] = k->d[0];
  870|  62.6k|    r1->d[1] = k->d[1];
  871|  62.6k|    r1->d[2] = 0;
  872|  62.6k|    r1->d[3] = 0;
  873|  62.6k|    r2->d[0] = k->d[2];
  874|  62.6k|    r2->d[1] = k->d[3];
  875|  62.6k|    r2->d[2] = 0;
  876|  62.6k|    r2->d[3] = 0;
  877|       |
  878|  62.6k|    SECP256K1_SCALAR_VERIFY(r1);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  879|  62.6k|    SECP256K1_SCALAR_VERIFY(r2);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  880|  62.6k|}
secp256k1.c:secp256k1_scalar_is_zero:
  167|   820k|SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) {
  168|   820k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   820k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  169|       |
  170|   820k|    return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0;
  171|   820k|}

secp256k1.c:secp256k1_scalar_verify:
   42|  29.4M|static void secp256k1_scalar_verify(const secp256k1_scalar *r) {
   43|  29.4M|    VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0);
   44|       |
   45|  29.4M|    (void)r;
   46|  29.4M|}
secp256k1.c:secp256k1_scalar_set_b32_seckey:
   34|   529k|static int secp256k1_scalar_set_b32_seckey(secp256k1_scalar *r, const unsigned char *bin) {
   35|   529k|    int overflow;
   36|   529k|    secp256k1_scalar_set_b32(r, bin, &overflow);
   37|       |
   38|   529k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   529k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   39|   529k|    return (!overflow) & (!secp256k1_scalar_is_zero(r));
   40|   529k|}
secp256k1.c:secp256k1_scalar_clear:
   30|   919k|SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) {
   31|   919k|    secp256k1_memclear(r, sizeof(secp256k1_scalar));
   32|   919k|}
secp256k1.c:secp256k1_scalar_split_lambda:
  142|  62.6k|static void secp256k1_scalar_split_lambda(secp256k1_scalar * SECP256K1_RESTRICT r1, secp256k1_scalar * SECP256K1_RESTRICT r2, const secp256k1_scalar * SECP256K1_RESTRICT k) {
  143|  62.6k|    secp256k1_scalar c1, c2;
  144|  62.6k|    static const secp256k1_scalar minus_b1 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  62.6k|#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}}
  ------------------
  145|  62.6k|        0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
  146|  62.6k|        0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL
  147|  62.6k|    );
  148|  62.6k|    static const secp256k1_scalar minus_b2 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  62.6k|#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}}
  ------------------
  149|  62.6k|        0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL,
  150|  62.6k|        0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL
  151|  62.6k|    );
  152|  62.6k|    static const secp256k1_scalar g1 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  62.6k|#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}}
  ------------------
  153|  62.6k|        0x3086D221UL, 0xA7D46BCDUL, 0xE86C90E4UL, 0x9284EB15UL,
  154|  62.6k|        0x3DAA8A14UL, 0x71E8CA7FUL, 0xE893209AUL, 0x45DBB031UL
  155|  62.6k|    );
  156|  62.6k|    static const secp256k1_scalar g2 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  62.6k|#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}}
  ------------------
  157|  62.6k|        0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C4UL,
  158|  62.6k|        0x221208ACUL, 0x9DF506C6UL, 0x1571B4AEUL, 0x8AC47F71UL
  159|  62.6k|    );
  160|  62.6k|    SECP256K1_SCALAR_VERIFY(k);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  161|  62.6k|    VERIFY_CHECK(r1 != k);
  162|  62.6k|    VERIFY_CHECK(r2 != k);
  163|  62.6k|    VERIFY_CHECK(r1 != r2);
  164|       |
  165|       |    /* these _var calls are constant time since the shift amount is constant */
  166|  62.6k|    secp256k1_scalar_mul_shift_var(&c1, k, &g1, 384);
  167|  62.6k|    secp256k1_scalar_mul_shift_var(&c2, k, &g2, 384);
  168|  62.6k|    secp256k1_scalar_mul(&c1, &c1, &minus_b1);
  169|  62.6k|    secp256k1_scalar_mul(&c2, &c2, &minus_b2);
  170|  62.6k|    secp256k1_scalar_add(r2, &c1, &c2);
  171|  62.6k|    secp256k1_scalar_mul(r1, r2, &secp256k1_const_lambda);
  172|  62.6k|    secp256k1_scalar_negate(r1, r1);
  173|  62.6k|    secp256k1_scalar_add(r1, r1, k);
  174|       |
  175|  62.6k|    SECP256K1_SCALAR_VERIFY(r1);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  176|  62.6k|    SECP256K1_SCALAR_VERIFY(r2);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  177|       |#ifdef VERIFY
  178|       |    secp256k1_scalar_split_lambda_verify(r1, r2, k);
  179|       |#endif
  180|  62.6k|}

secp256k1_context_preallocated_destroy:
  176|      2|void secp256k1_context_preallocated_destroy(secp256k1_context* ctx) {
  177|      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)) { \
  |  |  ------------------
  |  |  |  |  136|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (136: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 - Ignored]
  |  |  ------------------
  ------------------
  178|       |
  179|       |    /* Defined as noop */
  180|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (180:9): [True: 0, False: 2]
  ------------------
  181|      0|        return;
  182|      0|    }
  183|       |
  184|      2|    secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx);
  185|      2|}
secp256k1_context_destroy:
  187|      2|void secp256k1_context_destroy(secp256k1_context* ctx) {
  188|      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)) { \
  |  |  ------------------
  |  |  |  |  136|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (136: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 - Ignored]
  |  |  ------------------
  ------------------
  189|       |
  190|       |    /* Defined as noop */
  191|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (191:9): [True: 0, False: 2]
  ------------------
  192|      0|        return;
  193|      0|    }
  194|       |
  195|      2|    secp256k1_context_preallocated_destroy(ctx);
  196|      2|    free(ctx);
  197|      2|}
secp256k1_ec_pubkey_parse:
  250|  60.5k|int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) {
  251|  60.5k|    secp256k1_ge Q;
  252|       |
  253|  60.5k|    VERIFY_CHECK(ctx != NULL);
  254|  60.5k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  60.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  60.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  60.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 60.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  60.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  255|  60.5k|    memset(pubkey, 0, sizeof(*pubkey));
  256|  60.5k|    ARG_CHECK(input != NULL);
  ------------------
  |  |   45|  60.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  60.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  60.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 60.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  60.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  257|  60.5k|    if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) {
  ------------------
  |  Branch (257:9): [True: 1.87k, False: 58.6k]
  ------------------
  258|  1.87k|        return 0;
  259|  1.87k|    }
  260|  58.6k|    if (!secp256k1_ge_is_in_correct_subgroup(&Q)) {
  ------------------
  |  Branch (260:9): [True: 0, False: 58.6k]
  ------------------
  261|      0|        return 0;
  262|      0|    }
  263|  58.6k|    secp256k1_pubkey_save(pubkey, &Q);
  264|  58.6k|    secp256k1_ge_clear(&Q);
  265|  58.6k|    return 1;
  266|  58.6k|}
secp256k1_ec_pubkey_serialize:
  268|   342k|int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
  269|   342k|    secp256k1_ge Q;
  270|   342k|    size_t len;
  271|   342k|    int ret = 0;
  272|       |
  273|   342k|    VERIFY_CHECK(ctx != NULL);
  274|   342k|    ARG_CHECK(outputlen != NULL);
  ------------------
  |  |   45|   342k|#define ARG_CHECK(cond) do { \
  |  |   46|   342k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   342k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 342k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   342k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|   342k|    ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33u : 65u));
  ------------------
  |  |   45|   342k|#define ARG_CHECK(cond) do { \
  |  |   46|   342k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   685k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 342k]
  |  |  |  |  |  Branch (136:39): [True: 341k, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   342k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  276|   342k|    len = *outputlen;
  277|   342k|    *outputlen = 0;
  278|   342k|    ARG_CHECK(output != NULL);
  ------------------
  |  |   45|   342k|#define ARG_CHECK(cond) do { \
  |  |   46|   342k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   342k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 342k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   342k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  279|   342k|    memset(output, 0, len);
  280|   342k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|   342k|#define ARG_CHECK(cond) do { \
  |  |   46|   342k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   342k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 342k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   342k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  281|   342k|    ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION);
  ------------------
  |  |   45|   342k|#define ARG_CHECK(cond) do { \
  |  |   46|   342k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   342k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 342k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   342k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  282|   342k|    if (secp256k1_pubkey_load(ctx, &Q, pubkey)) {
  ------------------
  |  Branch (282:9): [True: 342k, False: 0]
  ------------------
  283|   342k|        ret = secp256k1_eckey_pubkey_serialize(&Q, output, &len, flags & SECP256K1_FLAGS_BIT_COMPRESSION);
  ------------------
  |  |  198|   342k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  ------------------
  284|   342k|        if (ret) {
  ------------------
  |  Branch (284:13): [True: 342k, False: 0]
  ------------------
  285|   342k|            *outputlen = len;
  286|   342k|        }
  287|   342k|    }
  288|   342k|    return ret;
  289|   342k|}
secp256k1_ec_pubkey_cmp:
  291|  14.7k|int secp256k1_ec_pubkey_cmp(const secp256k1_context* ctx, const secp256k1_pubkey* pubkey0, const secp256k1_pubkey* pubkey1) {
  292|  14.7k|    unsigned char out[2][33];
  293|  14.7k|    const secp256k1_pubkey* pk[2];
  294|  14.7k|    int i;
  295|       |
  296|  14.7k|    VERIFY_CHECK(ctx != NULL);
  297|  14.7k|    pk[0] = pubkey0; pk[1] = pubkey1;
  298|  44.1k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (298:17): [True: 29.4k, False: 14.7k]
  ------------------
  299|  29.4k|        size_t out_size = sizeof(out[i]);
  300|       |        /* If the public key is NULL or invalid, ec_pubkey_serialize will call
  301|       |         * the illegal_callback and return 0. In that case we will serialize the
  302|       |         * key as all zeros which is less than any valid public key. This
  303|       |         * results in consistent comparisons even if NULL or invalid pubkeys are
  304|       |         * involved and prevents edge cases such as sorting algorithms that use
  305|       |         * this function and do not terminate as a result. */
  306|  29.4k|        if (!secp256k1_ec_pubkey_serialize(ctx, out[i], &out_size, pk[i], SECP256K1_EC_COMPRESSED)) {
  ------------------
  |  |  212|  29.4k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|  29.4k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  198|  29.4k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
  |  Branch (306:13): [True: 0, False: 29.4k]
  ------------------
  307|       |            /* Note that ec_pubkey_serialize should already set the output to
  308|       |             * zero in that case, but it's not guaranteed by the API, we can't
  309|       |             * test it and writing a VERIFY_CHECK is more complex than
  310|       |             * explicitly memsetting (again). */
  311|      0|            memset(out[i], 0, sizeof(out[i]));
  312|      0|        }
  313|  29.4k|    }
  314|  14.7k|    return secp256k1_memcmp_var(out[0], out[1], sizeof(out[0]));
  315|  14.7k|}
secp256k1_ec_seckey_verify:
  580|   153k|int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char *seckey) {
  581|   153k|    secp256k1_scalar sec;
  582|   153k|    int ret;
  583|   153k|    VERIFY_CHECK(ctx != NULL);
  584|   153k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|   153k|#define ARG_CHECK(cond) do { \
  |  |   46|   153k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   153k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 153k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   153k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  585|       |
  586|   153k|    ret = secp256k1_scalar_set_b32_seckey(&sec, seckey);
  587|   153k|    secp256k1_scalar_clear(&sec);
  588|   153k|    return ret;
  589|   153k|}
secp256k1_ec_pubkey_create:
  604|   283k|int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) {
  605|   283k|    secp256k1_ge p;
  606|   283k|    secp256k1_scalar seckey_scalar;
  607|   283k|    int ret = 0;
  608|   283k|    VERIFY_CHECK(ctx != NULL);
  609|   283k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|   283k|#define ARG_CHECK(cond) do { \
  |  |   46|   283k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   283k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 283k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   283k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  610|   283k|    memset(pubkey, 0, sizeof(*pubkey));
  611|   283k|    ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
  ------------------
  |  |   45|   283k|#define ARG_CHECK(cond) do { \
  |  |   46|   283k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   283k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 283k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   283k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  612|   283k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|   283k|#define ARG_CHECK(cond) do { \
  |  |   46|   283k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   283k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 283k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   283k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  613|       |
  614|   283k|    ret = secp256k1_ec_pubkey_create_helper(&ctx->ecmult_gen_ctx, &seckey_scalar, &p, seckey);
  615|   283k|    secp256k1_pubkey_save(pubkey, &p);
  616|   283k|    secp256k1_memczero(pubkey, sizeof(*pubkey), !ret);
  617|       |
  618|   283k|    secp256k1_scalar_clear(&seckey_scalar);
  619|   283k|    return ret;
  620|   283k|}
secp256k1_ec_seckey_tweak_add:
  668|  62.9k|int secp256k1_ec_seckey_tweak_add(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak32) {
  669|  62.9k|    secp256k1_scalar sec;
  670|  62.9k|    int ret = 0;
  671|  62.9k|    VERIFY_CHECK(ctx != NULL);
  672|  62.9k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|  62.9k|#define ARG_CHECK(cond) do { \
  |  |   46|  62.9k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  62.9k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 62.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  62.9k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  673|  62.9k|    ARG_CHECK(tweak32 != NULL);
  ------------------
  |  |   45|  62.9k|#define ARG_CHECK(cond) do { \
  |  |   46|  62.9k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  62.9k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 62.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  62.9k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  674|       |
  675|  62.9k|    ret = secp256k1_scalar_set_b32_seckey(&sec, seckey);
  676|  62.9k|    ret &= secp256k1_ec_seckey_tweak_add_helper(&sec, tweak32);
  677|  62.9k|    secp256k1_scalar_cmov(&sec, &secp256k1_scalar_zero, !ret);
  678|  62.9k|    secp256k1_scalar_get_b32(seckey, &sec);
  679|       |
  680|  62.9k|    secp256k1_scalar_clear(&sec);
  681|  62.9k|    return ret;
  682|  62.9k|}
secp256k1_ec_pubkey_tweak_add:
  695|  43.0k|int secp256k1_ec_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak32) {
  696|  43.0k|    secp256k1_ge p;
  697|  43.0k|    int ret = 0;
  698|  43.0k|    VERIFY_CHECK(ctx != NULL);
  699|  43.0k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  43.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  43.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  43.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 43.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  43.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  700|  43.0k|    ARG_CHECK(tweak32 != NULL);
  ------------------
  |  |   45|  43.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  43.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|  43.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 43.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  43.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  701|       |
  702|  43.0k|    ret = secp256k1_pubkey_load(ctx, &p, pubkey);
  703|  43.0k|    memset(pubkey, 0, sizeof(*pubkey));
  704|  43.0k|    ret = ret && secp256k1_ec_pubkey_tweak_add_helper(&p, tweak32);
  ------------------
  |  Branch (704:11): [True: 43.0k, False: 0]
  |  Branch (704:18): [True: 43.0k, False: 0]
  ------------------
  705|  43.0k|    if (ret) {
  ------------------
  |  Branch (705:9): [True: 43.0k, False: 0]
  ------------------
  706|  43.0k|        secp256k1_pubkey_save(pubkey, &p);
  707|  43.0k|    }
  708|       |
  709|  43.0k|    return ret;
  710|  43.0k|}
secp256k1.c:secp256k1_context_is_proper:
   82|      4|static int secp256k1_context_is_proper(const secp256k1_context* ctx) {
   83|      4|    return secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx);
   84|      4|}
secp256k1.c:secp256k1_pubkey_save:
  246|   421k|static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) {
  247|   421k|    secp256k1_ge_to_bytes(pubkey->data, ge);
  248|   421k|}
secp256k1.c:secp256k1_pubkey_load:
  240|   400k|static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) {
  241|   400k|    secp256k1_ge_from_bytes(ge, pubkey->data);
  242|   400k|    ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));
  ------------------
  |  |   45|   400k|#define ARG_CHECK(cond) do { \
  |  |   46|   400k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|   400k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 400k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   400k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  243|   400k|    return 1;
  244|   400k|}
secp256k1.c:nonce_function_rfc6979:
  471|  14.7k|static int nonce_function_rfc6979(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) {
  472|  14.7k|   unsigned char keydata[112];
  473|  14.7k|   unsigned int offset = 0;
  474|  14.7k|   secp256k1_rfc6979_hmac_sha256 rng;
  475|  14.7k|   unsigned int i;
  476|  14.7k|   secp256k1_scalar msg;
  477|  14.7k|   unsigned char msgmod32[32];
  478|  14.7k|   secp256k1_scalar_set_b32(&msg, msg32, NULL);
  479|  14.7k|   secp256k1_scalar_get_b32(msgmod32, &msg);
  480|       |   /* We feed a byte array to the PRNG as input, consisting of:
  481|       |    * - the private key (32 bytes) and reduced message (32 bytes), see RFC 6979 3.2d.
  482|       |    * - optionally 32 extra bytes of data, see RFC 6979 3.6 Additional Data.
  483|       |    * - optionally 16 extra bytes with the algorithm name.
  484|       |    * Because the arguments have distinct fixed lengths it is not possible for
  485|       |    *  different argument mixtures to emulate each other and result in the same
  486|       |    *  nonces.
  487|       |    */
  488|  14.7k|   buffer_append(keydata, &offset, key32, 32);
  489|  14.7k|   buffer_append(keydata, &offset, msgmod32, 32);
  490|  14.7k|   if (data != NULL) {
  ------------------
  |  Branch (490:8): [True: 0, False: 14.7k]
  ------------------
  491|      0|       buffer_append(keydata, &offset, data, 32);
  492|      0|   }
  493|  14.7k|   if (algo16 != NULL) {
  ------------------
  |  Branch (493:8): [True: 0, False: 14.7k]
  ------------------
  494|      0|       buffer_append(keydata, &offset, algo16, 16);
  495|      0|   }
  496|  14.7k|   secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, offset);
  497|  29.4k|   for (i = 0; i <= counter; i++) {
  ------------------
  |  Branch (497:16): [True: 14.7k, False: 14.7k]
  ------------------
  498|  14.7k|       secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32);
  499|  14.7k|   }
  500|  14.7k|   secp256k1_rfc6979_hmac_sha256_finalize(&rng);
  501|       |
  502|  14.7k|   secp256k1_memclear(keydata, sizeof(keydata));
  503|  14.7k|   secp256k1_rfc6979_hmac_sha256_clear(&rng);
  504|  14.7k|   return 1;
  505|  14.7k|}
secp256k1.c:buffer_append:
  466|  29.4k|static SECP256K1_INLINE void buffer_append(unsigned char *buf, unsigned int *offset, const void *data, unsigned int len) {
  467|  29.4k|    memcpy(buf + *offset, data, len);
  468|  29.4k|    *offset += len;
  469|  29.4k|}
secp256k1.c:secp256k1_ecdsa_sign_inner:
  510|  14.7k|static int secp256k1_ecdsa_sign_inner(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) {
  511|  14.7k|    secp256k1_scalar sec, non, msg;
  512|  14.7k|    int ret = 0;
  513|  14.7k|    int is_sec_valid;
  514|  14.7k|    unsigned char nonce32[32];
  515|  14.7k|    unsigned int count = 0;
  516|       |    /* Default initialization here is important so we won't pass uninit values to the cmov in the end */
  517|  14.7k|    *r = secp256k1_scalar_zero;
  518|  14.7k|    *s = secp256k1_scalar_zero;
  519|  14.7k|    if (recid) {
  ------------------
  |  Branch (519:9): [True: 14.7k, False: 0]
  ------------------
  520|  14.7k|        *recid = 0;
  521|  14.7k|    }
  522|  14.7k|    if (noncefp == NULL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 14.7k]
  ------------------
  523|      0|        noncefp = secp256k1_nonce_function_default;
  524|      0|    }
  525|       |
  526|       |    /* Fail if the secret key is invalid. */
  527|  14.7k|    is_sec_valid = secp256k1_scalar_set_b32_seckey(&sec, seckey);
  528|  14.7k|    secp256k1_scalar_cmov(&sec, &secp256k1_scalar_one, !is_sec_valid);
  529|  14.7k|    secp256k1_scalar_set_b32(&msg, msg32, NULL);
  530|  14.7k|    while (1) {
  ------------------
  |  Branch (530:12): [Folded - Ignored]
  ------------------
  531|  14.7k|        int is_nonce_valid;
  532|  14.7k|        ret = !!noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count);
  533|  14.7k|        if (!ret) {
  ------------------
  |  Branch (533:13): [True: 0, False: 14.7k]
  ------------------
  534|      0|            break;
  535|      0|        }
  536|  14.7k|        is_nonce_valid = secp256k1_scalar_set_b32_seckey(&non, nonce32);
  537|       |        /* The nonce is still secret here, but it being invalid is less likely than 1:2^255. */
  538|  14.7k|        secp256k1_declassify(ctx, &is_nonce_valid, sizeof(is_nonce_valid));
  539|  14.7k|        if (is_nonce_valid) {
  ------------------
  |  Branch (539:13): [True: 14.7k, False: 0]
  ------------------
  540|  14.7k|            ret = secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, r, s, &sec, &msg, &non, recid);
  541|       |            /* The final signature is no longer a secret, nor is the fact that we were successful or not. */
  542|  14.7k|            secp256k1_declassify(ctx, &ret, sizeof(ret));
  543|  14.7k|            if (ret) {
  ------------------
  |  Branch (543:17): [True: 14.7k, False: 0]
  ------------------
  544|  14.7k|                break;
  545|  14.7k|            }
  546|  14.7k|        }
  547|      0|        count++;
  548|      0|    }
  549|       |    /* We don't want to declassify is_sec_valid and therefore the range of
  550|       |     * seckey. As a result is_sec_valid is included in ret only after ret was
  551|       |     * used as a branching variable. */
  552|  14.7k|    ret &= is_sec_valid;
  553|  14.7k|    secp256k1_memclear(nonce32, sizeof(nonce32));
  554|  14.7k|    secp256k1_scalar_clear(&msg);
  555|  14.7k|    secp256k1_scalar_clear(&non);
  556|  14.7k|    secp256k1_scalar_clear(&sec);
  557|  14.7k|    secp256k1_scalar_cmov(r, &secp256k1_scalar_zero, !ret);
  558|  14.7k|    secp256k1_scalar_cmov(s, &secp256k1_scalar_zero, !ret);
  559|  14.7k|    if (recid) {
  ------------------
  |  Branch (559:9): [True: 14.7k, False: 0]
  ------------------
  560|  14.7k|        const int zero = 0;
  561|  14.7k|        secp256k1_int_cmov(recid, &zero, !ret);
  562|  14.7k|    }
  563|  14.7k|    return ret;
  564|  14.7k|}
secp256k1.c:secp256k1_ec_pubkey_create_helper:
  591|   283k|static int secp256k1_ec_pubkey_create_helper(const secp256k1_ecmult_gen_context *ecmult_gen_ctx, secp256k1_scalar *seckey_scalar, secp256k1_ge *p, const unsigned char *seckey) {
  592|   283k|    secp256k1_gej pj;
  593|   283k|    int ret;
  594|       |
  595|   283k|    ret = secp256k1_scalar_set_b32_seckey(seckey_scalar, seckey);
  596|   283k|    secp256k1_scalar_cmov(seckey_scalar, &secp256k1_scalar_one, !ret);
  597|       |
  598|   283k|    secp256k1_ecmult_gen(ecmult_gen_ctx, &pj, seckey_scalar);
  599|   283k|    secp256k1_ge_set_gej(p, &pj);
  600|   283k|    secp256k1_gej_clear(&pj);
  601|   283k|    return ret;
  602|   283k|}
secp256k1.c:secp256k1_ec_seckey_tweak_add_helper:
  657|  62.9k|static int secp256k1_ec_seckey_tweak_add_helper(secp256k1_scalar *sec, const unsigned char *tweak32) {
  658|  62.9k|    secp256k1_scalar term;
  659|  62.9k|    int overflow = 0;
  660|  62.9k|    int ret = 0;
  661|       |
  662|  62.9k|    secp256k1_scalar_set_b32(&term, tweak32, &overflow);
  663|  62.9k|    ret = (!overflow) & secp256k1_eckey_privkey_tweak_add(sec, &term);
  664|  62.9k|    secp256k1_scalar_clear(&term);
  665|  62.9k|    return ret;
  666|  62.9k|}
secp256k1.c:secp256k1_ec_pubkey_tweak_add_helper:
  688|  47.9k|static int secp256k1_ec_pubkey_tweak_add_helper(secp256k1_ge *p, const unsigned char *tweak32) {
  689|  47.9k|    secp256k1_scalar term;
  690|  47.9k|    int overflow = 0;
  691|  47.9k|    secp256k1_scalar_set_b32(&term, tweak32, &overflow);
  692|  47.9k|    return !overflow && secp256k1_eckey_pubkey_tweak_add(p, &term);
  ------------------
  |  Branch (692:12): [True: 47.9k, False: 0]
  |  Branch (692:25): [True: 47.9k, False: 0]
  ------------------
  693|  47.9k|}
secp256k1.c:secp256k1_declassify:
  236|  29.4k|static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
  237|  29.4k|    if (EXPECT(ctx->declassify, 0)) SECP256K1_CHECKMEM_DEFINE(p, len);
  ------------------
  |  |  136|  29.4k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  ------------------
  |  |  |  Branch (136:21): [True: 0, False: 29.4k]
  |  |  ------------------
  ------------------
                  if (EXPECT(ctx->declassify, 0)) SECP256K1_CHECKMEM_DEFINE(p, len);
  ------------------
  |  |   91|      0|#  define SECP256K1_CHECKMEM_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|      0|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|  29.4k|}

secp256k1.c:secp256k1_memcmp_var:
  255|  14.7k|static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2, size_t n) {
  256|  14.7k|    const unsigned char *p1 = s1, *p2 = s2;
  257|  14.7k|    size_t i;
  258|       |
  259|   500k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (259:17): [True: 485k, False: 14.7k]
  ------------------
  260|   485k|        int diff = p1[i] - p2[i];
  261|   485k|        if (diff != 0) {
  ------------------
  |  Branch (261:13): [True: 0, False: 485k]
  ------------------
  262|      0|            return diff;
  263|      0|        }
  264|   485k|    }
  265|  14.7k|    return 0;
  266|  14.7k|}
secp256k1.c:secp256k1_read_be64:
  416|  2.79M|SECP256K1_INLINE static uint64_t secp256k1_read_be64(const unsigned char* p) {
  417|  2.79M|    return (uint64_t)p[0] << 56 |
  418|  2.79M|           (uint64_t)p[1] << 48 |
  419|  2.79M|           (uint64_t)p[2] << 40 |
  420|  2.79M|           (uint64_t)p[3] << 32 |
  421|  2.79M|           (uint64_t)p[4] << 24 |
  422|  2.79M|           (uint64_t)p[5] << 16 |
  423|  2.79M|           (uint64_t)p[6] << 8  |
  424|  2.79M|           (uint64_t)p[7];
  425|  2.79M|}
secp256k1.c:secp256k1_write_be64:
  428|   487k|SECP256K1_INLINE static void secp256k1_write_be64(unsigned char* p, uint64_t x) {
  429|   487k|    p[7] = x;
  430|   487k|    p[6] = x >>  8;
  431|   487k|    p[5] = x >> 16;
  432|   487k|    p[4] = x >> 24;
  433|   487k|    p[3] = x >> 32;
  434|   487k|    p[2] = x >> 40;
  435|   487k|    p[1] = x >> 48;
  436|   487k|    p[0] = x >> 56;
  437|   487k|}
secp256k1.c:secp256k1_ctz64_var:
  382|  4.33M|static SECP256K1_INLINE int secp256k1_ctz64_var(uint64_t x) {
  383|  4.33M|    VERIFY_CHECK(x != 0);
  384|  4.33M|#if (__has_builtin(__builtin_ctzl) || SECP256K1_GNUC_PREREQ(3,4))
  385|       |    /* If the unsigned long type is sufficient to represent the largest uint64_t, consider __builtin_ctzl. */
  386|  4.33M|    if (((unsigned long)UINT64_MAX) == UINT64_MAX) {
  ------------------
  |  Branch (386:9): [Folded - Ignored]
  ------------------
  387|  4.33M|        return __builtin_ctzl(x);
  388|  4.33M|    }
  389|      0|#endif
  390|      0|#if (__has_builtin(__builtin_ctzll) || SECP256K1_GNUC_PREREQ(3,4))
  391|       |    /* Otherwise consider __builtin_ctzll (the unsigned long long type is always at least 64 bits). */
  392|      0|    return __builtin_ctzll(x);
  393|       |#else
  394|       |    /* If no suitable CTZ builtin is available, use a (variable time) software emulation. */
  395|       |    return secp256k1_ctz64_var_debruijn(x);
  396|       |#endif
  397|  4.33M|}
secp256k1.c:secp256k1_rotr32:
  440|  76.8M|SECP256K1_INLINE static uint32_t secp256k1_rotr32(const uint32_t x, const unsigned int by) {
  441|       |#if defined(_MSC_VER)
  442|       |    return _rotr(x, by);  /* needs <stdlib.h> */
  443|       |#else
  444|       |    /* Reduce rotation amount to avoid UB when shifting. */
  445|  76.8M|    const unsigned int mask = CHAR_BIT * sizeof(x) - 1;
  446|       |    /* Turned into a rot instruction by GCC and clang. */
  447|  76.8M|    return (x >> (by & mask)) | (x << ((-by) & mask));
  448|  76.8M|#endif
  449|  76.8M|}
secp256k1.c:secp256k1_int_cmov:
  285|  14.7k|static SECP256K1_INLINE void secp256k1_int_cmov(int *r, const int *a, int flag) {
  286|  14.7k|    unsigned int mask0, mask1, r_masked, a_masked;
  287|       |    /* Access flag with a volatile-qualified lvalue.
  288|       |       This prevents clang from figuring out (after inlining) that flag can
  289|       |       take only be 0 or 1, which leads to variable time code. */
  290|  14.7k|    volatile int vflag = flag;
  291|       |
  292|       |    /* Casting a negative int to unsigned and back to int is implementation defined behavior */
  293|  14.7k|    VERIFY_CHECK(*r >= 0 && *a >= 0);
  294|       |
  295|  14.7k|    mask0 = (unsigned int)vflag + ~0u;
  296|  14.7k|    mask1 = ~mask0;
  297|  14.7k|    r_masked = ((unsigned int)*r & mask0);
  298|  14.7k|    a_masked = ((unsigned int)*a & mask1);
  299|       |
  300|  14.7k|    *r = (int)(r_masked | a_masked);
  301|  14.7k|}
secp256k1.c:secp256k1_memczero:
  208|   283k|static SECP256K1_INLINE void secp256k1_memczero(void *s, size_t len, int flag) {
  209|   283k|    unsigned char *p = (unsigned char *)s;
  210|       |    /* Access flag with a volatile-qualified lvalue.
  211|       |       This prevents clang from figuring out (after inlining) that flag can
  212|       |       take only be 0 or 1, which leads to variable time code. */
  213|   283k|    volatile int vflag = flag;
  214|   283k|    unsigned char mask = -(unsigned char) vflag;
  215|  18.4M|    while (len) {
  ------------------
  |  Branch (215:12): [True: 18.1M, False: 283k]
  ------------------
  216|  18.1M|        *p &= ~mask;
  217|  18.1M|        p++;
  218|  18.1M|        len--;
  219|  18.1M|    }
  220|   283k|}
secp256k1.c:secp256k1_read_be32:
  400|  5.17M|SECP256K1_INLINE static uint32_t secp256k1_read_be32(const unsigned char* p) {
  401|  5.17M|    return (uint32_t)p[0] << 24 |
  402|  5.17M|           (uint32_t)p[1] << 16 |
  403|  5.17M|           (uint32_t)p[2] << 8  |
  404|  5.17M|           (uint32_t)p[3];
  405|  5.17M|}
secp256k1.c:secp256k1_write_be32:
  408|  1.47M|SECP256K1_INLINE static void secp256k1_write_be32(unsigned char* p, uint32_t x) {
  409|  1.47M|    p[3] = x;
  410|  1.47M|    p[2] = x >>  8;
  411|  1.47M|    p[1] = x >> 16;
  412|  1.47M|    p[0] = x >> 24;
  413|  1.47M|}
secp256k1.c:secp256k1_memclear:
  223|  2.67M|static SECP256K1_INLINE void secp256k1_memclear(void *ptr, size_t len) {
  224|       |#if defined(_MSC_VER)
  225|       |    /* SecureZeroMemory is guaranteed not to be optimized out by MSVC. */
  226|       |    SecureZeroMemory(ptr, len);
  227|       |#elif defined(__GNUC__)
  228|       |    /* We use a memory barrier that scares the compiler away from optimizing out the memset.
  229|       |     *
  230|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
  231|       |     * in BoringSSL (ISC License):
  232|       |     *    As best as we can tell, this is sufficient to break any optimisations that
  233|       |     *    might try to eliminate "superfluous" memsets.
  234|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
  235|       |     * is pretty efficient, because the compiler can still implement the memset() efficently,
  236|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
  237|       |     * Yang et al. (USENIX Security 2017) for more background.
  238|       |     */
  239|  2.67M|    memset(ptr, 0, len);
  240|  2.67M|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
  241|       |#else
  242|       |    void *(*volatile const volatile_memset)(void *, int, size_t) = memset;
  243|       |    volatile_memset(ptr, 0, len);
  244|       |#endif
  245|       |#ifdef VERIFY
  246|       |    SECP256K1_CHECKMEM_UNDEFINE(ptr, len);
  247|       |#endif
  248|  2.67M|}

_Z20GetSizeOfCompactSizem:
  298|   255k|{
  299|   255k|    if (nSize < 253)             return sizeof(unsigned char);
  ------------------
  |  Branch (299:9): [True: 0, False: 255k]
  ------------------
  300|   255k|    else if (nSize <= std::numeric_limits<uint16_t>::max()) return sizeof(unsigned char) + sizeof(uint16_t);
  ------------------
  |  Branch (300:14): [True: 0, False: 255k]
  ------------------
  301|   255k|    else if (nSize <= std::numeric_limits<unsigned int>::max())  return sizeof(unsigned char) + sizeof(unsigned int);
  ------------------
  |  Branch (301:14): [True: 255k, False: 0]
  ------------------
  302|      0|    else                         return sizeof(unsigned char) + sizeof(uint64_t);
  303|   255k|}
_ZN17CompactSizeWriterC2Em:
  615|  8.27k|    explicit CompactSizeWriter(uint64_t n_in) : n(n_in) { }
_ZNK20TransactionSerParamsclIRK12CTransactionEEDaOT_:
 1228|  2.90k|    {                                                                                    \
 1229|  2.90k|        return ParamsWrapper{*this, t};                                                  \
 1230|  2.90k|    }
_Z6AsBaseI9prevectorILj28EhjiE7CScriptERKT_RKT0_:
  151|   133k|{
  152|   133k|    static_assert(std::is_base_of_v<Out, In>);
  153|   133k|    return x;
  154|   133k|}
_ZNK20TransactionSerParamsclIRNSt3__110shared_ptrIK12CTransactionEEEEDaOT_:
 1228|     30|    {                                                                                    \
 1229|     30|        return ParamsWrapper{*this, t};                                                  \
 1230|     30|    }
_ZNK20TransactionSerParamsclIR19CMutableTransactionEEDaOT_:
 1228|  7.11k|    {                                                                                    \
 1229|  7.11k|        return ParamsWrapper{*this, t};                                                  \
 1230|  7.11k|    }
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEEC2ESA_:
  481|  2.99k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEEC2ESA_:
  481|  2.90k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEEC2ESB_:
  481|  1.29k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsEC2ES1_RKS2_:
 1127|  7.14k|    ParamsStream(SubStream&& substream, const Params& params LIFETIMEBOUND) : m_params{params}, m_substream{std::forward<SubStream>(substream)} {}
_Z14ser_readdata32I12ParamsStreamIR10DataStream20TransactionSerParamsEEjRT_:
  102|   232k|{
  103|   232k|    uint32_t obj;
  104|   232k|    s.read(AsWritableBytes(Span{&obj, 1}));
  105|   232k|    return le32toh_internal(obj);
  106|   232k|}
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsE4readE4SpanISt4byteE:
 1136|   577k|    void read(Span<std::byte> dst) { GetStream().read(dst); }
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsE9GetStreamEv:
 1154|   577k|    {
 1155|       |        if constexpr (ContainsStream<SubStream>) {
 1156|       |            return m_substream.GetStream();
 1157|   577k|        } else {
 1158|   577k|            return m_substream;
 1159|   577k|        }
 1160|   577k|    }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEvRT_Rj:
  277|   232k|template<typename Stream> inline void Unserialize(Stream& s, uint32_t& a) { a = ser_readdata32(s); }
_Z15ReadCompactSizeI12ParamsStreamIR10DataStream20TransactionSerParamsEEmRT_b:
  340|   153k|{
  341|   153k|    uint8_t chSize = ser_readdata8(is);
  342|   153k|    uint64_t nSizeRet = 0;
  343|   153k|    if (chSize < 253)
  ------------------
  |  Branch (343:9): [True: 153k, False: 337]
  ------------------
  344|   153k|    {
  345|   153k|        nSizeRet = chSize;
  346|   153k|    }
  347|    337|    else if (chSize == 253)
  ------------------
  |  Branch (347:14): [True: 138, False: 199]
  ------------------
  348|    138|    {
  349|    138|        nSizeRet = ser_readdata16(is);
  350|    138|        if (nSizeRet < 253)
  ------------------
  |  Branch (350:13): [True: 1, False: 137]
  ------------------
  351|      1|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|    138|    }
  353|    199|    else if (chSize == 254)
  ------------------
  |  Branch (353:14): [True: 62, False: 137]
  ------------------
  354|     62|    {
  355|     62|        nSizeRet = ser_readdata32(is);
  356|     62|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (356:13): [True: 2, False: 60]
  ------------------
  357|      2|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|     62|    }
  359|    137|    else
  360|    137|    {
  361|    137|        nSizeRet = ser_readdata64(is);
  362|    137|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (362:13): [True: 19, False: 118]
  ------------------
  363|     19|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  364|    137|    }
  365|   153k|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (365:9): [True: 153k, False: 15]
  |  Branch (365:24): [True: 115, False: 153k]
  ------------------
  366|    115|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  367|    115|    }
  368|   153k|    return nSizeRet;
  369|   153k|}
_Z13ser_readdata8I12ParamsStreamIR10DataStream20TransactionSerParamsEEhRT_:
   84|   153k|{
   85|   153k|    uint8_t obj;
   86|   153k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|   153k|    return obj;
   88|   153k|}
_Z14ser_readdata16I12ParamsStreamIR10DataStream20TransactionSerParamsEEtRT_:
   90|    138|{
   91|    138|    uint16_t obj;
   92|    138|    s.read(AsWritableBytes(Span{&obj, 1}));
   93|    138|    return le16toh_internal(obj);
   94|    138|}
_Z14ser_readdata64I12ParamsStreamIR10DataStream20TransactionSerParamsEEmRT_:
  114|  14.1k|{
  115|  14.1k|    uint64_t obj;
  116|  14.1k|    s.read(AsWritableBytes(Span{&obj, 1}));
  117|  14.1k|    return le64toh_internal(obj);
  118|  14.1k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE12CTransactionEvRT_RNSt3__110shared_ptrIKT0_EE:
  985|     30|{
  986|     30|    p = std::make_shared<const T>(deserialize, is);
  987|     30|}
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsErsIRjEERS3_OT_:
 1134|  13.9k|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsErsIRNSt3__16vectorI5CTxInNS5_9allocatorIS7_EEEEEERS3_OT_:
 1134|  7.28k|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE5CTxInNSt3__19allocatorIS5_EEEvRT_RNS6_6vectorIT0_T1_EE:
  866|  7.28k|{
  867|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|       |        v.clear();
  870|       |        unsigned int nSize = ReadCompactSize(is);
  871|       |        unsigned int i = 0;
  872|       |        while (i < nSize) {
  873|       |            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|       |            v.resize(i + blk);
  875|       |            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|       |            i += blk;
  877|       |        }
  878|  7.28k|    } else {
  879|  7.28k|        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|  7.28k|    }
  881|  7.28k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI5CTxInNS9_9allocatorISB_EEEEEQ14UnserializableIT0_T_EEvRSI_OSH_:
  762|  7.28k|{
  763|  7.28k|    a.Unserialize(is);
  764|  7.28k|}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEE11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  483|  7.28k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsENSt3__16vectorI5CTxInNS8_9allocatorISA_EEEEEEvRT_RT0_:
  672|  7.28k|    {
  673|  7.28k|        Formatter formatter;
  674|  7.28k|        v.clear();
  675|  7.28k|        size_t size = ReadCompactSize(s);
  676|  7.28k|        size_t allocated = 0;
  677|  12.6k|        while (allocated < size) {
  ------------------
  |  Branch (677:16): [True: 5.33k, False: 7.28k]
  ------------------
  678|       |            // For DoS prevention, do not blindly allocate as much as the stream claims to contain.
  679|       |            // Instead, allocate in 5MiB batches, so that an attacker actually needs to provide
  680|       |            // X MiB of data to make us allocate X+5 Mib.
  681|  5.33k|            static_assert(sizeof(typename V::value_type) <= MAX_VECTOR_ALLOCATE, "Vector element size too large");
  682|  5.33k|            allocated = std::min(size, allocated + MAX_VECTOR_ALLOCATE / sizeof(typename V::value_type));
  683|  5.33k|            v.reserve(allocated);
  684|   114k|            while (v.size() < allocated) {
  ------------------
  |  Branch (684:20): [True: 109k, False: 5.33k]
  ------------------
  685|   109k|                v.emplace_back();
  686|   109k|                formatter.Unser(s, v.back());
  687|   109k|            }
  688|  5.33k|        }
  689|  7.28k|    };
_ZN16DefaultFormatter5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsE5CTxInEEvRT_RT0_:
  777|   109k|    static void Unser(Stream& s, T& t) { Unserialize(s, t); }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER5CTxInQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|   109k|{
  763|   109k|    a.Unserialize(is);
  764|   109k|}
_ZN5CTxIn11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  228|   109k|    {                                                                                               \
  229|   109k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|   109k|        Unser(s, *this);                                                                            \
  231|   109k|    }
_ZN5CTxIn5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_RS_:
  180|   109k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR9COutPointR7CScriptRjEEEvRT_DpOT0_:
 1033|   109k|    {
 1034|   109k|        ::UnserializeMany(s, args...);
 1035|   109k|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR9COutPointR7CScriptRjEEvRT_DpOT0_:
 1001|   109k|{
 1002|   109k|    (::Unserialize(s, args), ...);
 1003|   109k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER9COutPointQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|   109k|{
  763|   109k|    a.Unserialize(is);
  764|   109k|}
_ZN9COutPoint11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  228|   109k|    {                                                                                               \
  229|   109k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|   109k|        Unser(s, *this);                                                                            \
  231|   109k|    }
_ZN9COutPoint5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_RS_:
  180|   109k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR22transaction_identifierILb0EERjEEEvRT_DpOT0_:
 1033|   109k|    {
 1034|   109k|        ::UnserializeMany(s, args...);
 1035|   109k|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR22transaction_identifierILb0EERjEEvRT_DpOT0_:
 1001|   109k|{
 1002|   109k|    (::Unserialize(s, args), ...);
 1003|   109k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER22transaction_identifierILb0EEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|   109k|{
  763|   109k|    a.Unserialize(is);
  764|   109k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER7CScriptQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|   123k|{
  763|   123k|    a.Unserialize(is);
  764|   123k|}
_ZN7CScript11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  228|   123k|    {                                                                                               \
  229|   123k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|   123k|        Unser(s, *this);                                                                            \
  231|   123k|    }
_ZN7CScript5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_RS_:
  180|   123k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR9prevectorILj28EhjiEEEEvRT_DpOT0_:
 1033|   123k|    {
 1034|   123k|        ::UnserializeMany(s, args...);
 1035|   123k|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJR9prevectorILj28EhjiEEEvRT_DpOT0_:
 1001|   123k|{
 1002|   123k|    (::Unserialize(s, args), ...);
 1003|   123k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsELj28EhEvRT_R9prevectorIXT0_ET1_jiE:
  823|   123k|{
  824|   123k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  825|       |        // Limit size per read so bogus size value won't cause out of memory
  826|   123k|        v.clear();
  827|   123k|        unsigned int nSize = ReadCompactSize(is);
  828|   123k|        unsigned int i = 0;
  829|   181k|        while (i < nSize) {
  ------------------
  |  Branch (829:16): [True: 57.7k, False: 123k]
  ------------------
  830|  57.7k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  831|  57.7k|            v.resize_uninitialized(i + blk);
  832|  57.7k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  833|  57.7k|            i += blk;
  834|  57.7k|        }
  835|       |    } else {
  836|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  837|       |    }
  838|   123k|}
_Z6AsBaseI9prevectorILj28EhjiE7CScriptERT_RT0_:
  145|   124k|{
  146|   124k|    static_assert(std::is_base_of_v<Out, In>);
  147|   124k|    return x;
  148|   124k|}
block.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEE7WrapperIT_RT0_EOSC_:
  497|  7.28k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEEC2ES9_:
  481|  7.28k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsErsIRhEERS3_OT_:
 1134|    626|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEvRT_Rh:
  273|    626|template<typename Stream> inline void Unserialize(Stream& s, uint8_t& a ) { a = ser_readdata8(s); }
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsErsIRNSt3__16vectorI6CTxOutNS5_9allocatorIS7_EEEEEERS3_OT_:
 1134|  6.41k|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE6CTxOutNSt3__19allocatorIS5_EEEvRT_RNS6_6vectorIT0_T1_EE:
  866|  6.41k|{
  867|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|       |        v.clear();
  870|       |        unsigned int nSize = ReadCompactSize(is);
  871|       |        unsigned int i = 0;
  872|       |        while (i < nSize) {
  873|       |            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|       |            v.resize(i + blk);
  875|       |            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|       |            i += blk;
  877|       |        }
  878|  6.41k|    } else {
  879|  6.41k|        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|  6.41k|    }
  881|  6.41k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI6CTxOutNS9_9allocatorISB_EEEEEQ14UnserializableIT0_T_EEvRSI_OSH_:
  762|  6.41k|{
  763|  6.41k|    a.Unserialize(is);
  764|  6.41k|}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEE11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  483|  6.41k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsENSt3__16vectorI6CTxOutNS8_9allocatorISA_EEEEEEvRT_RT0_:
  672|  6.41k|    {
  673|  6.41k|        Formatter formatter;
  674|  6.41k|        v.clear();
  675|  6.41k|        size_t size = ReadCompactSize(s);
  676|  6.41k|        size_t allocated = 0;
  677|  8.08k|        while (allocated < size) {
  ------------------
  |  Branch (677:16): [True: 1.67k, False: 6.41k]
  ------------------
  678|       |            // For DoS prevention, do not blindly allocate as much as the stream claims to contain.
  679|       |            // Instead, allocate in 5MiB batches, so that an attacker actually needs to provide
  680|       |            // X MiB of data to make us allocate X+5 Mib.
  681|  1.67k|            static_assert(sizeof(typename V::value_type) <= MAX_VECTOR_ALLOCATE, "Vector element size too large");
  682|  1.67k|            allocated = std::min(size, allocated + MAX_VECTOR_ALLOCATE / sizeof(typename V::value_type));
  683|  1.67k|            v.reserve(allocated);
  684|  15.6k|            while (v.size() < allocated) {
  ------------------
  |  Branch (684:20): [True: 14.0k, False: 1.67k]
  ------------------
  685|  14.0k|                v.emplace_back();
  686|  14.0k|                formatter.Unser(s, v.back());
  687|  14.0k|            }
  688|  1.67k|        }
  689|  6.41k|    };
_ZN16DefaultFormatter5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsE6CTxOutEEvRT_RT0_:
  777|  14.0k|    static void Unser(Stream& s, T& t) { Unserialize(s, t); }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER6CTxOutQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  14.0k|{
  763|  14.0k|    a.Unserialize(is);
  764|  14.0k|}
_ZN6CTxOut11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  228|  14.0k|    {                                                                                               \
  229|  14.0k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|  14.0k|        Unser(s, *this);                                                                            \
  231|  14.0k|    }
_ZN6CTxOut5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_RS_:
  180|  14.0k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJRlR7CScriptEEEvRT_DpOT0_:
 1033|  14.0k|    {
 1034|  14.0k|        ::UnserializeMany(s, args...);
 1035|  14.0k|    }
_Z15UnserializeManyI12ParamsStreamIR10DataStream20TransactionSerParamsEJRlR7CScriptEEvRT_DpOT0_:
 1001|  14.0k|{
 1002|  14.0k|    (::Unserialize(s, args), ...);
 1003|  14.0k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEvRT_Rl:
  278|  14.0k|template<typename Stream> inline void Unserialize(Stream& s, int64_t& a ) { a = ser_readdata64(s); }
block.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEE7WrapperIT_RT0_EOSC_:
  497|  6.41k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEEC2ES9_:
  481|  6.41k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN12ParamsStreamIR10DataStream20TransactionSerParamsErsIRNSt3__16vectorINS6_IhNS5_9allocatorIhEEEENS7_IS9_EEEEEERS3_OT_:
 1134|  2.04k|    template <typename U> ParamsStream& operator>>(U&& obj) { ::Unserialize(*this, obj); return *this; }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsENSt3__16vectorIhNS5_9allocatorIhEEEENS7_IS9_EEEvRT_RNS6_IT0_T1_EE:
  866|  2.04k|{
  867|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|       |        v.clear();
  870|       |        unsigned int nSize = ReadCompactSize(is);
  871|       |        unsigned int i = 0;
  872|       |        while (i < nSize) {
  873|       |            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|       |            v.resize(i + blk);
  875|       |            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|       |            i += blk;
  877|       |        }
  878|  2.04k|    } else {
  879|  2.04k|        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|  2.04k|    }
  881|  2.04k|}
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINSA_IhNS9_9allocatorIhEEEENSB_ISD_EEEEEQ14UnserializableIT0_T_EEvRSJ_OSI_:
  762|  2.04k|{
  763|  2.04k|    a.Unserialize(is);
  764|  2.04k|}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  483|  2.04k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsENSt3__16vectorINS9_IhNS8_9allocatorIhEEEENSA_ISC_EEEEEEvRT_RT0_:
  672|  2.04k|    {
  673|  2.04k|        Formatter formatter;
  674|  2.04k|        v.clear();
  675|  2.04k|        size_t size = ReadCompactSize(s);
  676|  2.04k|        size_t allocated = 0;
  677|  3.22k|        while (allocated < size) {
  ------------------
  |  Branch (677:16): [True: 1.17k, False: 2.04k]
  ------------------
  678|       |            // For DoS prevention, do not blindly allocate as much as the stream claims to contain.
  679|       |            // Instead, allocate in 5MiB batches, so that an attacker actually needs to provide
  680|       |            // X MiB of data to make us allocate X+5 Mib.
  681|  1.17k|            static_assert(sizeof(typename V::value_type) <= MAX_VECTOR_ALLOCATE, "Vector element size too large");
  682|  1.17k|            allocated = std::min(size, allocated + MAX_VECTOR_ALLOCATE / sizeof(typename V::value_type));
  683|  1.17k|            v.reserve(allocated);
  684|  15.4k|            while (v.size() < allocated) {
  ------------------
  |  Branch (684:20): [True: 14.2k, False: 1.17k]
  ------------------
  685|  14.2k|                v.emplace_back();
  686|  14.2k|                formatter.Unser(s, v.back());
  687|  14.2k|            }
  688|  1.17k|        }
  689|  2.04k|    };
_ZN16DefaultFormatter5UnserI12ParamsStreamIR10DataStream20TransactionSerParamsENSt3__16vectorIhNS6_9allocatorIhEEEEEEvRT_RT0_:
  777|  14.2k|    static void Unser(Stream& s, T& t) { Unserialize(s, t); }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEhNSt3__19allocatorIhEEEvRT_RNS5_6vectorIT0_T1_EE:
  866|  14.2k|{
  867|  14.2k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|  14.2k|        v.clear();
  870|  14.2k|        unsigned int nSize = ReadCompactSize(is);
  871|  14.2k|        unsigned int i = 0;
  872|  23.6k|        while (i < nSize) {
  ------------------
  |  Branch (872:16): [True: 9.41k, False: 14.2k]
  ------------------
  873|  9.41k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|  9.41k|            v.resize(i + blk);
  875|  9.41k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|  9.41k|            i += blk;
  877|  9.41k|        }
  878|       |    } else {
  879|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|       |    }
  881|  14.2k|}
block.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE7WrapperIT_RT0_EOSD_:
  497|  2.04k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEEC2ESA_:
  481|  2.09k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZNK12ParamsStreamIR10DataStream20TransactionSerParamsE9GetParamsIS2_EERKDav:
 1144|  7.14k|    {
 1145|  7.14k|        if constexpr (std::is_convertible_v<Params, P>) {
 1146|  7.14k|            return m_params;
 1147|       |        } else {
 1148|       |            return m_substream.template GetParams<P>();
 1149|       |        }
 1150|  7.14k|    }
_Z11UnserializeI10DataStreamEvRT_Ri:
  276|      7|template<typename Stream> inline void Unserialize(Stream& s, int32_t& a ) { a = ser_readdata32(s); }
_Z14ser_readdata32I10DataStreamEjRT_:
  102|  43.5k|{
  103|  43.5k|    uint32_t obj;
  104|  43.5k|    s.read(AsWritableBytes(Span{&obj, 1}));
  105|  43.5k|    return le32toh_internal(obj);
  106|  43.5k|}
_Z11UnserializeI10DataStreamR7uint256Q14UnserializableIT0_T_EEvRS4_OS3_:
  762|  7.04k|{
  763|  7.04k|    a.Unserialize(is);
  764|  7.04k|}
_Z11UnserializeI10DataStreamEvRT_Rj:
  277|  43.4k|template<typename Stream> inline void Unserialize(Stream& s, uint32_t& a) { a = ser_readdata32(s); }
_Z15UnserializeManyI10DataStreamJRiEEvRT_DpOT0_:
 1001|      7|{
 1002|      7|    (::Unserialize(s, args), ...);
 1003|      7|}
_Z15ReadCompactSizeI10DataStreamEmRT_b:
  340|  65.1k|{
  341|  65.1k|    uint8_t chSize = ser_readdata8(is);
  342|  65.1k|    uint64_t nSizeRet = 0;
  343|  65.1k|    if (chSize < 253)
  ------------------
  |  Branch (343:9): [True: 64.8k, False: 226]
  ------------------
  344|  64.8k|    {
  345|  64.8k|        nSizeRet = chSize;
  346|  64.8k|    }
  347|    226|    else if (chSize == 253)
  ------------------
  |  Branch (347:14): [True: 59, False: 167]
  ------------------
  348|     59|    {
  349|     59|        nSizeRet = ser_readdata16(is);
  350|     59|        if (nSizeRet < 253)
  ------------------
  |  Branch (350:13): [True: 2, False: 57]
  ------------------
  351|      2|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|     59|    }
  353|    167|    else if (chSize == 254)
  ------------------
  |  Branch (353:14): [True: 40, False: 127]
  ------------------
  354|     40|    {
  355|     40|        nSizeRet = ser_readdata32(is);
  356|     40|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (356:13): [True: 3, False: 37]
  ------------------
  357|      3|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|     40|    }
  359|    127|    else
  360|    127|    {
  361|    127|        nSizeRet = ser_readdata64(is);
  362|    127|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (362:13): [True: 9, False: 118]
  ------------------
  363|      9|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  364|    127|    }
  365|  65.0k|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (365:9): [True: 65.0k, False: 7]
  |  Branch (365:24): [True: 122, False: 64.9k]
  ------------------
  366|    122|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  367|    122|    }
  368|  64.9k|    return nSizeRet;
  369|  65.0k|}
_Z13ser_readdata8I10DataStreamEhRT_:
   84|  93.2k|{
   85|  93.2k|    uint8_t obj;
   86|  93.2k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|  93.2k|    return obj;
   88|  93.2k|}
_Z14ser_readdata16I10DataStreamEtRT_:
   90|     59|{
   91|     59|    uint16_t obj;
   92|     59|    s.read(AsWritableBytes(Span{&obj, 1}));
   93|     59|    return le16toh_internal(obj);
   94|     59|}
_Z14ser_readdata64I10DataStreamEmRT_:
  114|  1.05k|{
  115|  1.05k|    uint64_t obj;
  116|  1.05k|    s.read(AsWritableBytes(Span{&obj, 1}));
  117|  1.05k|    return le64toh_internal(obj);
  118|  1.05k|}
_Z11UnserializeI10DataStreamR7WrapperI15VarIntFormatterIL10VarIntMode0EERjEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  8.48k|{
  763|  8.48k|    a.Unserialize(is);
  764|  8.48k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERjE11UnserializeI10DataStreamEEvRT_:
  483|  17.1k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode0EE5UnserI10DataStreamjEEvRT_RT0_:
  514|  17.1k|    {
  515|  17.1k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  17.1k|    }
_Z10ReadVarIntI10DataStreamL10VarIntMode0EjET1_RT_:
  453|  17.1k|{
  454|  17.1k|    CheckVarIntMode<Mode, I>();
  455|  17.1k|    I n = 0;
  456|  18.1k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  18.1k|        unsigned char chData = ser_readdata8(is);
  458|  18.1k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 27, False: 18.1k]
  ------------------
  459|     27|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|     27|        }
  461|  18.1k|        n = (n << 7) | (chData & 0x7F);
  462|  18.1k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 1.07k, False: 17.0k]
  ------------------
  463|  1.07k|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 0, False: 1.07k]
  ------------------
  464|      0|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|      0|            }
  466|  1.07k|            n++;
  467|  17.0k|        } else {
  468|  17.0k|            return n;
  469|  17.0k|        }
  470|  18.1k|    }
  471|  17.1k|}
_ZN15CheckVarIntModeIL10VarIntMode0EjEC2Ev:
  410|  17.1k|    {
  411|  17.1k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  17.1k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  17.1k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERjEC2ES3_:
  481|  17.1k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z11UnserializeI10DataStreamR7WrapperI15VarIntFormatterIL10VarIntMode0EERmEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  8.51k|{
  763|  8.51k|    a.Unserialize(is);
  764|  8.51k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmE11UnserializeI10DataStreamEEvRT_:
  483|  8.51k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode0EE5UnserI10DataStreammEEvRT_RT0_:
  514|  8.51k|    {
  515|  8.51k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  8.51k|    }
_Z10ReadVarIntI10DataStreamL10VarIntMode0EmET1_RT_:
  453|  8.51k|{
  454|  8.51k|    CheckVarIntMode<Mode, I>();
  455|  8.51k|    I n = 0;
  456|  9.93k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  9.93k|        unsigned char chData = ser_readdata8(is);
  458|  9.93k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 22, False: 9.91k]
  ------------------
  459|     22|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|     22|        }
  461|  9.91k|        n = (n << 7) | (chData & 0x7F);
  462|  9.91k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 1.42k, False: 8.48k]
  ------------------
  463|  1.42k|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 0, False: 1.42k]
  ------------------
  464|      0|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|      0|            }
  466|  1.42k|            n++;
  467|  8.48k|        } else {
  468|  8.48k|            return n;
  469|  8.48k|        }
  470|  9.91k|    }
  471|  8.51k|}
_ZN15CheckVarIntModeIL10VarIntMode0EmEC2Ev:
  410|  8.51k|    {
  411|  8.51k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  8.51k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  8.51k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmEC2ES3_:
  481|  8.51k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z11UnserializeI10DataStreamhNSt3__19allocatorIhEEEvRT_RNS1_6vectorIT0_T1_EE:
  866|  55.2k|{
  867|  55.2k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|  55.2k|        v.clear();
  870|  55.2k|        unsigned int nSize = ReadCompactSize(is);
  871|  55.2k|        unsigned int i = 0;
  872|  99.5k|        while (i < nSize) {
  ------------------
  |  Branch (872:16): [True: 44.3k, False: 55.2k]
  ------------------
  873|  44.3k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|  44.3k|            v.resize(i + blk);
  875|  44.3k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|  44.3k|            i += blk;
  877|  44.3k|        }
  878|       |    } else {
  879|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|       |    }
  881|  55.2k|}
_Z11UnserializeI10DataStreamR9COutPointQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  8.86k|{
  763|  8.86k|    a.Unserialize(is);
  764|  8.86k|}
_ZN9COutPoint11UnserializeI10DataStreamEEvRT_:
  228|  8.86k|    {                                                                                               \
  229|  8.86k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|  8.86k|        Unser(s, *this);                                                                            \
  231|  8.86k|    }
_ZN9COutPoint5UnserI10DataStreamEEvRT_RS_:
  180|  8.86k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJR22transaction_identifierILb0EERjEEEvRT_DpOT0_:
 1033|  8.86k|    {
 1034|  8.86k|        ::UnserializeMany(s, args...);
 1035|  8.86k|    }
_Z15UnserializeManyI10DataStreamJR22transaction_identifierILb0EERjEEvRT_DpOT0_:
 1001|  8.86k|{
 1002|  8.86k|    (::Unserialize(s, args), ...);
 1003|  8.86k|}
_Z11UnserializeI10DataStreamR22transaction_identifierILb0EEQ14UnserializableIT0_T_EEvRS5_OS4_:
  762|  8.86k|{
  763|  8.86k|    a.Unserialize(is);
  764|  8.86k|}
_Z11UnserializeI10DataStreamR13ParamsWrapperI20TransactionSerParams19CMutableTransactionEQ14UnserializableIT0_T_EEvRS7_OS6_:
  762|  7.11k|{
  763|  7.11k|    a.Unserialize(is);
  764|  7.11k|}
_ZN13ParamsWrapperI20TransactionSerParams19CMutableTransactionE11UnserializeI10DataStreamEEvRT_:
 1205|  7.11k|    {
 1206|  7.11k|        ParamsStream ss{s, m_params};
 1207|  7.11k|        ::Unserialize(ss, m_object);
 1208|  7.11k|    }
_Z11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsER19CMutableTransactionQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  7.11k|{
  763|  7.11k|    a.Unserialize(is);
  764|  7.11k|}
_ZN13ParamsWrapperI20TransactionSerParams19CMutableTransactionEC2ERKS0_RS1_:
 1195|  7.11k|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJR7uint256EEEvRT_DpOT0_:
 1033|     22|    {
 1034|     22|        ::UnserializeMany(s, args...);
 1035|     22|    }
_Z15UnserializeManyI10DataStreamJR7uint256EEvRT_DpOT0_:
 1001|     23|{
 1002|     23|    (::Unserialize(s, args), ...);
 1003|     23|}
_Z15UnserializeManyI10DataStreamJRjEEvRT_DpOT0_:
 1001|      5|{
 1002|      5|    (::Unserialize(s, args), ...);
 1003|      5|}
_Z13ser_readdata8I10SpanReaderEhRT_:
   84|  45.4k|{
   85|  45.4k|    uint8_t obj;
   86|  45.4k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|  45.4k|    return obj;
   88|  45.4k|}
_Z14ser_readdata64I10SpanReaderEmRT_:
  114|     69|{
  115|     69|    uint64_t obj;
  116|     69|    s.read(AsWritableBytes(Span{&obj, 1}));
  117|     69|    return le64toh_internal(obj);
  118|     69|}
_Z11UnserializeI10SpanReaderEvRT_Rh:
  273|  9.76k|template<typename Stream> inline void Unserialize(Stream& s, uint8_t& a ) { a = ser_readdata8(s); }
_Z11UnserializeI10DataStreamR4CoinQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  8.63k|{
  763|  8.63k|    a.Unserialize(is);
  764|  8.63k|}
_Z11UnserializeI10DataStream7WrapperI15VarIntFormatterIL10VarIntMode0EERjEQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  8.63k|{
  763|  8.63k|    a.Unserialize(is);
  764|  8.63k|}
coins_view.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERjE7WrapperIT_RT0_EOS6_:
  497|  17.1k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z11UnserializeI10DataStream7WrapperI16TxOutCompressionR6CTxOutEQ14UnserializableIT0_T_EEvRS7_OS6_:
  762|  8.51k|{
  763|  8.51k|    a.Unserialize(is);
  764|  8.51k|}
_ZN7WrapperI16TxOutCompressionR6CTxOutE11UnserializeI10DataStreamEEvRT_:
  483|  8.51k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN16TxOutCompression5UnserI10DataStreamEEvRT_R6CTxOut:
  180|  8.51k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJ7WrapperI17AmountCompressionRlES2_I17ScriptCompressionR7CScriptEEEEvRT_DpOT0_:
 1033|  8.51k|    {
 1034|  8.51k|        ::UnserializeMany(s, args...);
 1035|  8.51k|    }
_Z15UnserializeManyI10DataStreamJR7WrapperI17AmountCompressionRlERS1_I17ScriptCompressionR7CScriptEEEvRT_DpOT0_:
 1001|  8.51k|{
 1002|  8.51k|    (::Unserialize(s, args), ...);
 1003|  8.51k|}
_Z11UnserializeI10DataStreamR7WrapperI17AmountCompressionRlEQ14UnserializableIT0_T_EEvRS7_OS6_:
  762|  8.51k|{
  763|  8.51k|    a.Unserialize(is);
  764|  8.51k|}
_ZN7WrapperI17AmountCompressionRlE11UnserializeI10DataStreamEEvRT_:
  483|  8.51k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
coins_view.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERmE7WrapperIT_RT0_EOS6_:
  497|  8.51k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z11UnserializeI10DataStreamR7WrapperI17ScriptCompressionR7CScriptEQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  8.48k|{
  763|  8.48k|    a.Unserialize(is);
  764|  8.48k|}
_ZN7WrapperI17ScriptCompressionR7CScriptE11UnserializeI10DataStreamEEvRT_:
  483|  8.48k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_Z11UnserializeI10DataStreamTk9BasicBytehEvRT_4SpanIT0_E:
  283|  8.38k|template <typename Stream, BasicByte B> void Unserialize(Stream& s, Span<B> span) { s.read(AsWritableBytes(span)); }
coins_view.cpp:_ZL5UsingI17AmountCompressionRlE7WrapperIT_RT0_EOS4_:
  497|  8.51k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17AmountCompressionRlEC2ES1_:
  481|  8.51k|    explicit Wrapper(T obj) : m_object(obj) {}
coins_view.cpp:_ZL5UsingI17ScriptCompressionR7CScriptE7WrapperIT_RT0_EOS5_:
  497|  8.51k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17ScriptCompressionR7CScriptEC2ES2_:
  481|  8.51k|    explicit Wrapper(T obj) : m_object(obj) {}
coins_view.cpp:_ZL5UsingI16TxOutCompressionR6CTxOutE7WrapperIT_RT0_EOS5_:
  497|  8.51k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI16TxOutCompressionR6CTxOutEC2ES2_:
  481|  8.51k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z14ser_writedata8I10DataStreamEvRT_h:
   55|   200k|{
   56|   200k|    s.write(AsBytes(Span{&obj, 1}));
   57|   200k|}
_Z9SerializeI10DataStream7uint256Q12SerializableIT0_T_EEvRS3_RKS2_:
  753|  93.7k|{
  754|  93.7k|    a.Serialize(os);
  755|  93.7k|}
_Z9SerializeI10DataStreamTk9BasicByteKhEvRT_4SpanIT0_E:
  268|   101k|template <typename Stream, BasicByte B> void Serialize(Stream& s, Span<B> span) { s.write(AsBytes(span)); }
_Z9SerializeI10DataStreamhNSt3__19allocatorIhEEEvRT_RKNS1_6vectorIT0_T1_EE:
  846|  43.9k|{
  847|  43.9k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|  43.9k|        WriteCompactSize(os, v.size());
  849|  43.9k|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (849:13): [True: 43.9k, False: 0]
  ------------------
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|       |    } else {
  859|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|       |    }
  861|  43.9k|}
_Z16WriteCompactSizeI10DataStreamEvRT_m:
  309|   200k|{
  310|   200k|    if (nSize < 253)
  ------------------
  |  Branch (310:9): [True: 188k, False: 11.9k]
  ------------------
  311|   188k|    {
  312|   188k|        ser_writedata8(os, nSize);
  313|   188k|    }
  314|  11.9k|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (314:14): [True: 11.8k, False: 138]
  ------------------
  315|  11.8k|    {
  316|  11.8k|        ser_writedata8(os, 253);
  317|  11.8k|        ser_writedata16(os, nSize);
  318|  11.8k|    }
  319|    138|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (319:14): [True: 138, False: 0]
  ------------------
  320|    138|    {
  321|    138|        ser_writedata8(os, 254);
  322|    138|        ser_writedata32(os, nSize);
  323|    138|    }
  324|      0|    else
  325|      0|    {
  326|      0|        ser_writedata8(os, 255);
  327|      0|        ser_writedata64(os, nSize);
  328|      0|    }
  329|   200k|    return;
  330|   200k|}
_Z15ser_writedata16I10DataStreamEvRT_t:
   59|  11.8k|{
   60|  11.8k|    obj = htole16_internal(obj);
   61|  11.8k|    s.write(AsBytes(Span{&obj, 1}));
   62|  11.8k|}
_Z15ser_writedata32I10DataStreamEvRT_j:
   69|   169k|{
   70|   169k|    obj = htole32_internal(obj);
   71|   169k|    s.write(AsBytes(Span{&obj, 1}));
   72|   169k|}
_Z15ser_writedata64I10DataStreamEvRT_m:
   79|  46.3k|{
   80|  46.3k|    obj = htole64_internal(obj);
   81|  46.3k|    s.write(AsBytes(Span{&obj, 1}));
   82|  46.3k|}
deserialize.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE7WrapperIT_RT0_EOSD_:
  497|     49|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z9SerializeI10DataStreamEvRT_i:
  261|   104k|template<typename Stream> inline void Serialize(Stream& s, int32_t a ) { ser_writedata32(s, a); }
_Z9SerializeI10DataStreamEvRT_j:
  262|  65.4k|template<typename Stream> inline void Serialize(Stream& s, uint32_t a) { ser_writedata32(s, a); }
_Z9SerializeI10DataStreamEvRT_m:
  264|  46.3k|template<typename Stream> inline void Serialize(Stream& s, uint64_t a) { ser_writedata64(s, a); }
_Z11UnserializeI10DataStreamEvRT_Rl:
  278|    932|template<typename Stream> inline void Unserialize(Stream& s, int64_t& a ) { a = ser_readdata64(s); }
_Z9SerializeI10DataStream7CPubKeyQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|  7.55k|{
  754|  7.55k|    a.Serialize(os);
  755|  7.55k|}
_Z11UnserializeI10DataStreamR7CScriptQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  1.49k|{
  763|  1.49k|    a.Unserialize(is);
  764|  1.49k|}
_ZN7CScript11UnserializeI10DataStreamEEvRT_:
  228|  1.49k|    {                                                                                               \
  229|  1.49k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|  1.49k|        Unser(s, *this);                                                                            \
  231|  1.49k|    }
_ZN7CScript5UnserI10DataStreamEEvRT_RS_:
  180|  1.49k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJR9prevectorILj28EhjiEEEEvRT_DpOT0_:
 1033|  1.49k|    {
 1034|  1.49k|        ::UnserializeMany(s, args...);
 1035|  1.49k|    }
_Z15UnserializeManyI10DataStreamJR9prevectorILj28EhjiEEEvRT_DpOT0_:
 1001|  1.49k|{
 1002|  1.49k|    (::Unserialize(s, args), ...);
 1003|  1.49k|}
_Z11UnserializeI10DataStreamLj28EhEvRT_R9prevectorIXT0_ET1_jiE:
  823|  1.49k|{
  824|  1.49k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  825|       |        // Limit size per read so bogus size value won't cause out of memory
  826|  1.49k|        v.clear();
  827|  1.49k|        unsigned int nSize = ReadCompactSize(is);
  828|  1.49k|        unsigned int i = 0;
  829|  2.86k|        while (i < nSize) {
  ------------------
  |  Branch (829:16): [True: 1.37k, False: 1.49k]
  ------------------
  830|  1.37k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  831|  1.37k|            v.resize_uninitialized(i + blk);
  832|  1.37k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  833|  1.37k|            i += blk;
  834|  1.37k|        }
  835|       |    } else {
  836|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  837|       |    }
  838|  1.49k|}
_Z11UnserializeI10DataStreamTk9BasicBytehLi4EEvRT_RAT1__T0_:
  280|  2.01k|template <typename Stream, BasicByte B, int N> void Unserialize(Stream& s, B (&a)[N]) { s.read(MakeWritableByteSpan(a)); }
_Z11UnserializeI10DataStreamR26PartiallySignedTransactionQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  4.60k|{
  763|  4.60k|    a.Unserialize(is);
  764|  4.60k|}
_Z11UnserializeI10DataStreamTk9BasicBytehLi5EEvRT_RAT1__T0_:
  280|  4.60k|template <typename Stream, BasicByte B, int N> void Unserialize(Stream& s, B (&a)[N]) { s.read(MakeWritableByteSpan(a)); }
_Z15ReadCompactSizeI10SpanReaderEmRT_b:
  340|  35.7k|{
  341|  35.7k|    uint8_t chSize = ser_readdata8(is);
  342|  35.7k|    uint64_t nSizeRet = 0;
  343|  35.7k|    if (chSize < 253)
  ------------------
  |  Branch (343:9): [True: 35.5k, False: 144]
  ------------------
  344|  35.5k|    {
  345|  35.5k|        nSizeRet = chSize;
  346|  35.5k|    }
  347|    144|    else if (chSize == 253)
  ------------------
  |  Branch (347:14): [True: 31, False: 113]
  ------------------
  348|     31|    {
  349|     31|        nSizeRet = ser_readdata16(is);
  350|     31|        if (nSizeRet < 253)
  ------------------
  |  Branch (350:13): [True: 1, False: 30]
  ------------------
  351|      1|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|     31|    }
  353|    113|    else if (chSize == 254)
  ------------------
  |  Branch (353:14): [True: 42, False: 71]
  ------------------
  354|     42|    {
  355|     42|        nSizeRet = ser_readdata32(is);
  356|     42|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (356:13): [True: 3, False: 39]
  ------------------
  357|      3|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|     42|    }
  359|     71|    else
  360|     71|    {
  361|     71|        nSizeRet = ser_readdata64(is);
  362|     71|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (362:13): [True: 6, False: 65]
  ------------------
  363|      6|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  364|     71|    }
  365|  35.7k|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (365:9): [True: 35.7k, False: 5]
  |  Branch (365:24): [True: 75, False: 35.6k]
  ------------------
  366|     75|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  367|     75|    }
  368|  35.6k|    return nSizeRet;
  369|  35.7k|}
_Z14ser_readdata16I10SpanReaderEtRT_:
   90|     31|{
   91|     31|    uint16_t obj;
   92|     31|    s.read(AsWritableBytes(Span{&obj, 1}));
   93|     31|    return le16toh_internal(obj);
   94|     31|}
_Z14ser_readdata32I10SpanReaderEjRT_:
  102|     42|{
  103|     42|    uint32_t obj;
  104|     42|    s.read(AsWritableBytes(Span{&obj, 1}));
  105|     42|    return le32toh_internal(obj);
  106|     42|}
_Z15UnserializeManyI10DataStreamJR13ParamsWrapperI20TransactionSerParams19CMutableTransactionEEEvRT_DpOT0_:
 1001|  4.02k|{
 1002|  4.02k|    (::Unserialize(s, args), ...);
 1003|  4.02k|}
_Z11UnserializeI10SpanReaderhNSt3__19allocatorIhEEEvRT_RNS1_6vectorIT0_T1_EE:
  866|  6.41k|{
  867|  6.41k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|  6.41k|        v.clear();
  870|  6.41k|        unsigned int nSize = ReadCompactSize(is);
  871|  6.41k|        unsigned int i = 0;
  872|  11.4k|        while (i < nSize) {
  ------------------
  |  Branch (872:16): [True: 5.02k, False: 6.41k]
  ------------------
  873|  5.02k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|  5.02k|            v.resize(i + blk);
  875|  5.02k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|  5.02k|            i += blk;
  877|  5.02k|        }
  878|       |    } else {
  879|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|       |    }
  881|  6.41k|}
_Z11UnserializeI10DataStreamR9PSBTInputQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  2.69k|{
  763|  2.69k|    a.Unserialize(is);
  764|  2.69k|}
_Z15UnserializeManyI10DataStreamJR13ParamsWrapperI20TransactionSerParamsNSt3__110shared_ptrIK12CTransactionEEEEEvRT_DpOT0_:
 1001|     30|{
 1002|     30|    (::Unserialize(s, args), ...);
 1003|     30|}
_Z11UnserializeI10DataStreamR13ParamsWrapperI20TransactionSerParamsNSt3__110shared_ptrIK12CTransactionEEEQ14UnserializableIT0_T_EEvRSB_OSA_:
  762|     30|{
  763|     30|    a.Unserialize(is);
  764|     30|}
_ZN13ParamsWrapperI20TransactionSerParamsNSt3__110shared_ptrIK12CTransactionEEE11UnserializeI10DataStreamEEvRT_:
 1205|     30|    {
 1206|     30|        ParamsStream ss{s, m_params};
 1207|     30|        ::Unserialize(ss, m_object);
 1208|     30|    }
_ZN13ParamsWrapperI20TransactionSerParamsNSt3__110shared_ptrIK12CTransactionEEEC2ERKS0_RS5_:
 1195|     30|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_Z15UnserializeManyI10DataStreamJR6CTxOutEEvRT_DpOT0_:
 1001|    932|{
 1002|    932|    (::Unserialize(s, args), ...);
 1003|    932|}
_Z11UnserializeI10DataStreamR6CTxOutQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|    932|{
  763|    932|    a.Unserialize(is);
  764|    932|}
_ZN6CTxOut11UnserializeI10DataStreamEEvRT_:
  228|    932|    {                                                                                               \
  229|    932|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|    932|        Unser(s, *this);                                                                            \
  231|    932|    }
_ZN6CTxOut5UnserI10DataStreamEEvRT_RS_:
  180|    932|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJRlR7CScriptEEEvRT_DpOT0_:
 1033|    932|    {
 1034|    932|        ::UnserializeMany(s, args...);
 1035|    932|    }
_Z15UnserializeManyI10DataStreamJRlR7CScriptEEvRT_DpOT0_:
 1001|    932|{
 1002|    932|    (::Unserialize(s, args), ...);
 1003|    932|}
_Z15UnserializeManyI10DataStreamJRNSt3__16vectorINS2_IhNS1_9allocatorIhEEEENS3_IS5_EEEEEEvRT_DpOT0_:
 1001|     49|{
 1002|     49|    (::Unserialize(s, args), ...);
 1003|     49|}
_Z11UnserializeI10DataStreamNSt3__16vectorIhNS1_9allocatorIhEEEENS3_IS5_EEEvRT_RNS2_IT0_T1_EE:
  866|     49|{
  867|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  868|       |        // Limit size per read so bogus size value won't cause out of memory
  869|       |        v.clear();
  870|       |        unsigned int nSize = ReadCompactSize(is);
  871|       |        unsigned int i = 0;
  872|       |        while (i < nSize) {
  873|       |            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  874|       |            v.resize(i + blk);
  875|       |            is.read(AsWritableBytes(Span{&v[i], blk}));
  876|       |            i += blk;
  877|       |        }
  878|     49|    } else {
  879|     49|        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  880|     49|    }
  881|     49|}
_Z11UnserializeI10DataStream7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS6_IhNS5_9allocatorIhEEEENS7_IS9_EEEEEQ14UnserializableIT0_T_EEvRSF_OSE_:
  762|     49|{
  763|     49|    a.Unserialize(is);
  764|     49|}
_ZN7WrapperI15VectorFormatterI16DefaultFormatterERNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE11UnserializeI10DataStreamEEvRT_:
  483|     49|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE5UnserI10DataStreamNSt3__16vectorINS5_IhNS4_9allocatorIhEEEENS6_IS8_EEEEEEvRT_RT0_:
  672|     49|    {
  673|     49|        Formatter formatter;
  674|     49|        v.clear();
  675|     49|        size_t size = ReadCompactSize(s);
  676|     49|        size_t allocated = 0;
  677|     96|        while (allocated < size) {
  ------------------
  |  Branch (677:16): [True: 47, False: 49]
  ------------------
  678|       |            // For DoS prevention, do not blindly allocate as much as the stream claims to contain.
  679|       |            // Instead, allocate in 5MiB batches, so that an attacker actually needs to provide
  680|       |            // X MiB of data to make us allocate X+5 Mib.
  681|     47|            static_assert(sizeof(typename V::value_type) <= MAX_VECTOR_ALLOCATE, "Vector element size too large");
  682|     47|            allocated = std::min(size, allocated + MAX_VECTOR_ALLOCATE / sizeof(typename V::value_type));
  683|     47|            v.reserve(allocated);
  684|    331|            while (v.size() < allocated) {
  ------------------
  |  Branch (684:20): [True: 284, False: 47]
  ------------------
  685|    284|                v.emplace_back();
  686|    284|                formatter.Unser(s, v.back());
  687|    284|            }
  688|     47|        }
  689|     49|    };
_ZN16DefaultFormatter5UnserI10DataStreamNSt3__16vectorIhNS2_9allocatorIhEEEEEEvRT_RT0_:
  777|    284|    static void Unser(Stream& s, T& t) { Unserialize(s, t); }
_Z11UnserializeI10SpanReaderR11XOnlyPubKeyQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  1.78k|{
  763|  1.78k|    a.Unserialize(is);
  764|  1.78k|}
_ZN11XOnlyPubKey11UnserializeI10SpanReaderEEvRT_:
  228|  1.78k|    {                                                                                               \
  229|  1.78k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|  1.78k|        Unser(s, *this);                                                                            \
  231|  1.78k|    }
_ZN11XOnlyPubKey5UnserI10SpanReaderEEvRT_RS_:
  180|  1.78k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10SpanReaderJR7uint256EEEvRT_DpOT0_:
 1033|  1.78k|    {
 1034|  1.78k|        ::UnserializeMany(s, args...);
 1035|  1.78k|    }
_Z15UnserializeManyI10SpanReaderJR7uint256EEvRT_DpOT0_:
 1001|  1.78k|{
 1002|  1.78k|    (::Unserialize(s, args), ...);
 1003|  1.78k|}
_Z11UnserializeI10SpanReaderR7uint256Q14UnserializableIT0_T_EEvRS4_OS3_:
  762|  2.67k|{
  763|  2.67k|    a.Unserialize(is);
  764|  2.67k|}
_Z11UnserializeI10DataStream7uint256NSt3__14lessIS1_EENS2_9allocatorIS1_EEEvRT_RNS2_3setIT0_T1_T2_EE:
  943|  1.06k|{
  944|  1.06k|    m.clear();
  945|  1.06k|    unsigned int nSize = ReadCompactSize(is);
  946|  1.06k|    typename std::set<K, Pred, A>::iterator it = m.begin();
  947|  8.09k|    for (unsigned int i = 0; i < nSize; i++)
  ------------------
  |  Branch (947:30): [True: 7.02k, False: 1.06k]
  ------------------
  948|  7.02k|    {
  949|  7.02k|        K key;
  950|  7.02k|        Unserialize(is, key);
  951|  7.02k|        it = m.insert(it, key);
  952|  7.02k|    }
  953|  1.06k|}
_Z15UnserializeManyI10DataStreamJR11XOnlyPubKeyEEvRT_DpOT0_:
 1001|     22|{
 1002|     22|    (::Unserialize(s, args), ...);
 1003|     22|}
_Z11UnserializeI10DataStreamR11XOnlyPubKeyQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|     22|{
  763|     22|    a.Unserialize(is);
  764|     22|}
_ZN11XOnlyPubKey11UnserializeI10DataStreamEEvRT_:
  228|     22|    {                                                                                               \
  229|     22|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|     22|        Unser(s, *this);                                                                            \
  231|     22|    }
_ZN11XOnlyPubKey5UnserI10DataStreamEEvRT_RS_:
  180|     22|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_Z11UnserializeI10DataStreamR10PSBTOutputQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  1.35k|{
  763|  1.35k|    a.Unserialize(is);
  764|  1.35k|}
_Z9SerializeI10DataStreamcEvRT_RKNSt3__112basic_stringIT0_NS3_11char_traitsIS5_EENS3_9allocatorIS5_EEEE:
  789|   141k|{
  790|   141k|    WriteCompactSize(os, str.size());
  791|   141k|    if (!str.empty())
  ------------------
  |  Branch (791:9): [True: 139k, False: 1.45k]
  ------------------
  792|   139k|        os.write(MakeByteSpan(str));
  793|   141k|}
transaction.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEE7WrapperIT_RT0_EOSD_:
  497|  2.99k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
transaction.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEE7WrapperIT_RT0_EOSD_:
  497|  2.90k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
transaction.cpp:_ZL5UsingI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE7WrapperIT_RT0_EOSE_:
  497|  1.29k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN13ParamsWrapperI20TransactionSerParamsK12CTransactionEC2ERKS0_RS2_:
 1195|  2.90k|    explicit ParamsWrapper(const Params& params, T& obj) : m_params{params}, m_object{obj} {}
_Z9SerializeI10HashWriterEvRT_j:
  262|   212k|template<typename Stream> inline void Serialize(Stream& s, uint32_t a) { ser_writedata32(s, a); }
_Z15ser_writedata32I10HashWriterEvRT_j:
   69|   212k|{
   70|   212k|    obj = htole32_internal(obj);
   71|   212k|    s.write(AsBytes(Span{&obj, 1}));
   72|   212k|}
_Z9SerializeI10HashWritercEvRT_RKNSt3__112basic_stringIT0_NS3_11char_traitsIS5_EENS3_9allocatorIS5_EEEE:
  789|  29.4k|{
  790|  29.4k|    WriteCompactSize(os, str.size());
  791|  29.4k|    if (!str.empty())
  ------------------
  |  Branch (791:9): [True: 28.8k, False: 534]
  ------------------
  792|  28.8k|        os.write(MakeByteSpan(str));
  793|  29.4k|}
_Z16WriteCompactSizeI10HashWriterEvRT_m:
  309|  52.1k|{
  310|  52.1k|    if (nSize < 253)
  ------------------
  |  Branch (310:9): [True: 49.2k, False: 2.95k]
  ------------------
  311|  49.2k|    {
  312|  49.2k|        ser_writedata8(os, nSize);
  313|  49.2k|    }
  314|  2.95k|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (314:14): [True: 2.93k, False: 21]
  ------------------
  315|  2.93k|    {
  316|  2.93k|        ser_writedata8(os, 253);
  317|  2.93k|        ser_writedata16(os, nSize);
  318|  2.93k|    }
  319|     21|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (319:14): [True: 21, False: 0]
  ------------------
  320|     21|    {
  321|     21|        ser_writedata8(os, 254);
  322|     21|        ser_writedata32(os, nSize);
  323|     21|    }
  324|      0|    else
  325|      0|    {
  326|      0|        ser_writedata8(os, 255);
  327|      0|        ser_writedata64(os, nSize);
  328|      0|    }
  329|  52.1k|    return;
  330|  52.1k|}
_Z14ser_writedata8I10HashWriterEvRT_h:
   55|  60.4k|{
   56|  60.4k|    s.write(AsBytes(Span{&obj, 1}));
   57|  60.4k|}
_Z15ser_writedata16I10HashWriterEvRT_t:
   59|  2.93k|{
   60|  2.93k|    obj = htole16_internal(obj);
   61|  2.93k|    s.write(AsBytes(Span{&obj, 1}));
   62|  2.93k|}
_Z15ser_writedata64I10HashWriterEvRT_m:
   79|  14.5k|{
   80|  14.5k|    obj = htole64_internal(obj);
   81|  14.5k|    s.write(AsBytes(Span{&obj, 1}));
   82|  14.5k|}
_Z9SerializeI10DataStreamNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EvRT_RKNS1_4pairIT0_T1_EE:
  889|  2.91k|{
  890|  2.91k|    Serialize(os, item.first);
  891|  2.91k|    Serialize(os, item.second);
  892|  2.91k|}
_Z9SerializeI10DataStreamNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EvRT_RKNS1_4pairIT0_T1_EE:
  889|  78.6k|{
  890|  78.6k|    Serialize(os, item.first);
  891|  78.6k|    Serialize(os, item.second);
  892|  78.6k|}
_Z9SerializeI10DataStreamNSt3__16vectorIh16secure_allocatorIhEEE7uint256EvRT_RKNS1_4pairIT0_T1_EE:
  889|  7.55k|{
  890|  7.55k|    Serialize(os, item.first);
  891|  7.55k|    Serialize(os, item.second);
  892|  7.55k|}
_Z9SerializeI10DataStreamh16secure_allocatorIhEEvRT_RKNSt3__16vectorIT0_T1_EE:
  846|  7.55k|{
  847|  7.55k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|  7.55k|        WriteCompactSize(os, v.size());
  849|  7.55k|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (849:13): [True: 7.55k, False: 0]
  ------------------
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|       |    } else {
  859|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|       |    }
  861|  7.55k|}
_Z9SerializeI10DataStreamNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_4pairI7uint2567CPubKeyEEEvRT_RKNS8_IT0_T1_EE:
  889|  7.55k|{
  890|  7.55k|    Serialize(os, item.first);
  891|  7.55k|    Serialize(os, item.second);
  892|  7.55k|}
_Z9SerializeI10DataStream7uint2567CPubKeyEvRT_RKNSt3__14pairIT0_T1_EE:
  889|  7.55k|{
  890|  7.55k|    Serialize(os, item.first);
  891|  7.55k|    Serialize(os, item.second);
  892|  7.55k|}
_Z9SerializeI10DataStreamN6wallet16WalletDescriptorEQ12SerializableIT0_T_EEvRS4_RKS3_:
  753|  34.6k|{
  754|  34.6k|    a.Serialize(os);
  755|  34.6k|}
_ZNK6wallet16WalletDescriptor9SerializeI10DataStreamEEvRT_:
  222|  34.6k|    {                                                                                               \
  223|  34.6k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|  34.6k|        Ser(s, *this);                                                                              \
  225|  34.6k|    }                                                                                               \
_ZN6wallet16WalletDescriptor3SerI10DataStreamEEvRT_RKS0_:
  178|  34.6k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize8SerWriteI10DataStreamRKN6wallet16WalletDescriptorEZNS3_16SerializationOpsIS1_S4_S_EEvRT0_RT_T1_EUlRS1_S5_E_EEvSA_OS7_OSB_:
 1024|  34.6k|    {
 1025|  34.6k|        fn(s, std::forward<Type>(obj));
 1026|  34.6k|    }
_ZZN6wallet16WalletDescriptor16SerializationOpsI10DataStreamKS0_15ActionSerializeEEvRT0_RT_T1_ENKUlRS2_RS3_E_clESA_SB_:
  158|  34.6k|#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
_ZN15ActionSerialize16SerReadWriteManyI10DataStreamJNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEmiiiEEEvRT_DpRKT0_:
 1013|  34.6k|    {
 1014|  34.6k|        ::SerializeMany(s, args...);
 1015|  34.6k|    }
_Z13SerializeManyI10DataStreamJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmiiiEEvRT_DpRKT0_:
  995|  34.6k|{
  996|  34.6k|    (::Serialize(s, args), ...);
  997|  34.6k|}
_ZN15ActionSerialize7SerReadI10DataStreamRKN6wallet16WalletDescriptorEZNS3_16SerializationOpsIS1_S4_S_EEvRT0_RT_T1_EUlRS1_RS3_E_EEvSA_OS7_OSB_:
 1019|  34.6k|    {
 1020|  34.6k|    }
_Z9SerializeI10DataStreamNSt3__14pairINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EENS2_IjjEEEvRT_RKNS2_IT0_T1_EE:
  889|  21.5k|{
  890|  21.5k|    Serialize(os, item.first);
  891|  21.5k|    Serialize(os, item.second);
  892|  21.5k|}
_Z9SerializeI10DataStreamjjEvRT_RKNSt3__14pairIT0_T1_EE:
  889|  21.5k|{
  890|  21.5k|    Serialize(os, item.first);
  891|  21.5k|    Serialize(os, item.second);
  892|  21.5k|}
_Z9SerializeI10DataStreamNSt3__14pairINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EEjEvRT_RKNS2_IT0_T1_EE:
  889|  22.4k|{
  890|  22.4k|    Serialize(os, item.first);
  891|  22.4k|    Serialize(os, item.second);
  892|  22.4k|}
_Z9SerializeI10HashWriter7uint256Q12SerializableIT0_T_EEvRS3_RKS2_:
  753|  8.53k|{
  754|  8.53k|    a.Serialize(os);
  755|  8.53k|}
_Z9SerializeI10HashWriterTk9BasicByteKhEvRT_4SpanIT0_E:
  268|   131k|template <typename Stream, BasicByte B> void Serialize(Stream& s, Span<B> span) { s.write(AsBytes(span)); }
_Z9SerializeI10HashWriterEvRT_h:
  258|  8.27k|template<typename Stream> inline void Serialize(Stream& s, uint8_t a ) { ser_writedata8(s, a); }
_Z9SerializeI10HashWriter9COutPointQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|   106k|{
  754|   106k|    a.Serialize(os);
  755|   106k|}
_ZNK9COutPoint9SerializeI10HashWriterEEvRT_:
  222|   106k|    {                                                                                               \
  223|   106k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|   106k|        Ser(s, *this);                                                                              \
  225|   106k|    }                                                                                               \
_ZN9COutPoint3SerI10HashWriterEEvRT_RKS_:
  178|   106k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI10HashWriterJ22transaction_identifierILb0EEjEEEvRT_DpRKT0_:
 1013|   106k|    {
 1014|   106k|        ::SerializeMany(s, args...);
 1015|   106k|    }
_Z13SerializeManyI10HashWriterJ22transaction_identifierILb0EEjEEvRT_DpRKT0_:
  995|   106k|{
  996|   106k|    (::Serialize(s, args), ...);
  997|   106k|}
_Z9SerializeI10HashWriter22transaction_identifierILb0EEQ12SerializableIT0_T_EEvRS4_RKS3_:
  753|   106k|{
  754|   106k|    a.Serialize(os);
  755|   106k|}
_Z9SerializeI10HashWriter6CTxOutQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|  12.7k|{
  754|  12.7k|    a.Serialize(os);
  755|  12.7k|}
_ZNK6CTxOut9SerializeI10HashWriterEEvRT_:
  222|  12.7k|    {                                                                                               \
  223|  12.7k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|  12.7k|        Ser(s, *this);                                                                              \
  225|  12.7k|    }                                                                                               \
_ZN6CTxOut3SerI10HashWriterEEvRT_RKS_:
  178|  12.7k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI10HashWriterJl7CScriptEEEvRT_DpRKT0_:
 1013|  12.7k|    {
 1014|  12.7k|        ::SerializeMany(s, args...);
 1015|  12.7k|    }
_Z13SerializeManyI10HashWriterJl7CScriptEEvRT_DpRKT0_:
  995|  12.7k|{
  996|  12.7k|    (::Serialize(s, args), ...);
  997|  12.7k|}
_Z9SerializeI10HashWriterEvRT_l:
  263|  14.5k|template<typename Stream> inline void Serialize(Stream& s, int64_t a ) { ser_writedata64(s, a); }
_Z9SerializeI10HashWriter7CScriptQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|  14.5k|{
  754|  14.5k|    a.Serialize(os);
  755|  14.5k|}
_ZNK7CScript9SerializeI10HashWriterEEvRT_:
  222|  14.5k|    {                                                                                               \
  223|  14.5k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|  14.5k|        Ser(s, *this);                                                                              \
  225|  14.5k|    }                                                                                               \
_ZN7CScript3SerI10HashWriterEEvRT_RKS_:
  178|  14.5k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI10HashWriterJ9prevectorILj28EhjiEEEEvRT_DpRKT0_:
 1013|  14.5k|    {
 1014|  14.5k|        ::SerializeMany(s, args...);
 1015|  14.5k|    }
_Z13SerializeManyI10HashWriterJ9prevectorILj28EhjiEEEvRT_DpRKT0_:
  995|  14.5k|{
  996|  14.5k|    (::Serialize(s, args), ...);
  997|  14.5k|}
_Z9SerializeI10HashWriterLj28EhEvRT_RK9prevectorIXT0_ET1_jiE:
  811|  14.5k|{
  812|  14.5k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  813|  14.5k|        WriteCompactSize(os, v.size());
  814|  14.5k|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (814:13): [True: 10.8k, False: 3.60k]
  ------------------
  815|       |    } else {
  816|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  817|       |    }
  818|  14.5k|}
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsEC2ES1_RKS2_:
 1127|  2.90k|    ParamsStream(SubStream&& substream, const Params& params LIFETIMEBOUND) : m_params{params}, m_substream{std::forward<SubStream>(substream)} {}
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsIjEERS3_RKT_:
 1133|  5.80k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_j:
  262|   217k|template<typename Stream> inline void Serialize(Stream& s, uint32_t a) { ser_writedata32(s, a); }
_Z15ser_writedata32I12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_j:
   69|   217k|{
   70|   217k|    obj = htole32_internal(obj);
   71|   217k|    s.write(AsBytes(Span{&obj, 1}));
   72|   217k|}
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsE5writeE4SpanIKSt4byteE:
 1135|   527k|    void write(Span<const std::byte> src) { GetStream().write(src); }
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsE9GetStreamEv:
 1154|   527k|    {
 1155|       |        if constexpr (ContainsStream<SubStream>) {
 1156|       |            return m_substream.GetStream();
 1157|   527k|        } else {
 1158|   527k|            return m_substream;
 1159|   527k|        }
 1160|   527k|    }
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsINSt3__16vectorI5CTxInNS5_9allocatorIS7_EEEEEERS3_RKT_:
 1133|  2.99k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE5CTxInNSt3__19allocatorIS5_EEEvRT_RKNS6_6vectorIT0_T1_EE:
  846|  2.99k|{
  847|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|       |        WriteCompactSize(os, v.size());
  849|       |        if (!v.empty()) os.write(MakeByteSpan(v));
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|  2.99k|    } else {
  859|  2.99k|        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|  2.99k|    }
  861|  2.99k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI5CTxInNS9_9allocatorISB_EEEEEQ12SerializableIT0_T_EEvRSJ_RKSI_:
  753|  2.99k|{
  754|  2.99k|    a.Serialize(os);
  755|  2.99k|}
_ZNK7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI5CTxInNS3_9allocatorIS5_EEEEE9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  482|  2.99k|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsENSt3__16vectorI5CTxInNS8_9allocatorISA_EEEEEEvRT_RKT0_:
  662|  2.99k|    {
  663|  2.99k|        Formatter formatter;
  664|  2.99k|        WriteCompactSize(s, v.size());
  665|   105k|        for (const typename V::value_type& elem : v) {
  ------------------
  |  Branch (665:49): [True: 105k, False: 2.99k]
  ------------------
  666|   105k|            formatter.Ser(s, elem);
  667|   105k|        }
  668|  2.99k|    }
_Z16WriteCompactSizeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_m:
  309|   131k|{
  310|   131k|    if (nSize < 253)
  ------------------
  |  Branch (310:9): [True: 131k, False: 31]
  ------------------
  311|   131k|    {
  312|   131k|        ser_writedata8(os, nSize);
  313|   131k|    }
  314|     31|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (314:14): [True: 31, False: 0]
  ------------------
  315|     31|    {
  316|     31|        ser_writedata8(os, 253);
  317|     31|        ser_writedata16(os, nSize);
  318|     31|    }
  319|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (319:14): [True: 0, False: 0]
  ------------------
  320|      0|    {
  321|      0|        ser_writedata8(os, 254);
  322|      0|        ser_writedata32(os, nSize);
  323|      0|    }
  324|      0|    else
  325|      0|    {
  326|      0|        ser_writedata8(os, 255);
  327|      0|        ser_writedata64(os, nSize);
  328|      0|    }
  329|   131k|    return;
  330|   131k|}
_Z14ser_writedata8I12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_h:
   55|   131k|{
   56|   131k|    s.write(AsBytes(Span{&obj, 1}));
   57|   131k|}
_Z15ser_writedata16I12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_t:
   59|     31|{
   60|     31|    obj = htole16_internal(obj);
   61|     31|    s.write(AsBytes(Span{&obj, 1}));
   62|     31|}
_Z15ser_writedata64I12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_m:
   79|  13.2k|{
   80|  13.2k|    obj = htole64_internal(obj);
   81|  13.2k|    s.write(AsBytes(Span{&obj, 1}));
   82|  13.2k|}
_ZN16DefaultFormatter3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsE5CTxInEEvRT_RKT0_:
  774|   105k|    static void Ser(Stream& s, const T& t) { Serialize(s, t); }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE5CTxInQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|   105k|{
  754|   105k|    a.Serialize(os);
  755|   105k|}
_ZNK5CTxIn9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  222|   105k|    {                                                                                               \
  223|   105k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|   105k|        Ser(s, *this);                                                                              \
  225|   105k|    }                                                                                               \
_ZN5CTxIn3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_RKS_:
  178|   105k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ9COutPoint7CScriptjEEEvRT_DpRKT0_:
 1013|   105k|    {
 1014|   105k|        ::SerializeMany(s, args...);
 1015|   105k|    }
_Z13SerializeManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ9COutPoint7CScriptjEEvRT_DpRKT0_:
  995|   105k|{
  996|   105k|    (::Serialize(s, args), ...);
  997|   105k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE9COutPointQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|   105k|{
  754|   105k|    a.Serialize(os);
  755|   105k|}
_ZNK9COutPoint9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  222|   105k|    {                                                                                               \
  223|   105k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|   105k|        Ser(s, *this);                                                                              \
  225|   105k|    }                                                                                               \
_ZN9COutPoint3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_RKS_:
  178|   105k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ22transaction_identifierILb0EEjEEEvRT_DpRKT0_:
 1013|   105k|    {
 1014|   105k|        ::SerializeMany(s, args...);
 1015|   105k|    }
_Z13SerializeManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ22transaction_identifierILb0EEjEEvRT_DpRKT0_:
  995|   105k|{
  996|   105k|    (::Serialize(s, args), ...);
  997|   105k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE22transaction_identifierILb0EEQ12SerializableIT0_T_EEvRS8_RKS7_:
  753|   105k|{
  754|   105k|    a.Serialize(os);
  755|   105k|}
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsI4SpanIKhEEERS3_RKT_:
 1133|   105k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsETk9BasicByteKhEvRT_4SpanIT0_E:
  268|   105k|template <typename Stream, BasicByte B> void Serialize(Stream& s, Span<B> span) { s.write(AsBytes(span)); }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE7CScriptQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|   118k|{
  754|   118k|    a.Serialize(os);
  755|   118k|}
_ZNK7CScript9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  222|   118k|    {                                                                                               \
  223|   118k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|   118k|        Ser(s, *this);                                                                              \
  225|   118k|    }                                                                                               \
_ZN7CScript3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_RKS_:
  178|   118k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ9prevectorILj28EhjiEEEEvRT_DpRKT0_:
 1013|   118k|    {
 1014|   118k|        ::SerializeMany(s, args...);
 1015|   118k|    }
_Z13SerializeManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJ9prevectorILj28EhjiEEEvRT_DpRKT0_:
  995|   118k|{
  996|   118k|    (::Serialize(s, args), ...);
  997|   118k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsELj28EhEvRT_RK9prevectorIXT0_ET1_jiE:
  811|   118k|{
  812|   118k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  813|   118k|        WriteCompactSize(os, v.size());
  814|   118k|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (814:13): [True: 56.9k, False: 61.9k]
  ------------------
  815|       |    } else {
  816|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  817|       |    }
  818|   118k|}
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsIhEERS3_RKT_:
 1133|     89|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_h:
  258|     89|template<typename Stream> inline void Serialize(Stream& s, uint8_t a ) { ser_writedata8(s, a); }
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsINSt3__16vectorI6CTxOutNS5_9allocatorIS7_EEEEEERS3_RKT_:
 1133|  2.90k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE6CTxOutNSt3__19allocatorIS5_EEEvRT_RKNS6_6vectorIT0_T1_EE:
  846|  2.90k|{
  847|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|       |        WriteCompactSize(os, v.size());
  849|       |        if (!v.empty()) os.write(MakeByteSpan(v));
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|  2.90k|    } else {
  859|  2.90k|        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|  2.90k|    }
  861|  2.90k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI6CTxOutNS9_9allocatorISB_EEEEEQ12SerializableIT0_T_EEvRSJ_RKSI_:
  753|  2.90k|{
  754|  2.90k|    a.Serialize(os);
  755|  2.90k|}
_ZNK7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorI6CTxOutNS3_9allocatorIS5_EEEEE9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  482|  2.90k|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsENSt3__16vectorI6CTxOutNS8_9allocatorISA_EEEEEEvRT_RKT0_:
  662|  2.90k|    {
  663|  2.90k|        Formatter formatter;
  664|  2.90k|        WriteCompactSize(s, v.size());
  665|  13.2k|        for (const typename V::value_type& elem : v) {
  ------------------
  |  Branch (665:49): [True: 13.2k, False: 2.90k]
  ------------------
  666|  13.2k|            formatter.Ser(s, elem);
  667|  13.2k|        }
  668|  2.90k|    }
_ZN16DefaultFormatter3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsE6CTxOutEEvRT_RKT0_:
  774|  13.2k|    static void Ser(Stream& s, const T& t) { Serialize(s, t); }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE6CTxOutQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|  13.2k|{
  754|  13.2k|    a.Serialize(os);
  755|  13.2k|}
_ZNK6CTxOut9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  222|  13.2k|    {                                                                                               \
  223|  13.2k|        static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
  224|  13.2k|        Ser(s, *this);                                                                              \
  225|  13.2k|    }                                                                                               \
_ZN6CTxOut3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_RKS_:
  178|  13.2k|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJl7CScriptEEEvRT_DpRKT0_:
 1013|  13.2k|    {
 1014|  13.2k|        ::SerializeMany(s, args...);
 1015|  13.2k|    }
_Z13SerializeManyI12ParamsStreamIR10HashWriter20TransactionSerParamsEJl7CScriptEEvRT_DpRKT0_:
  995|  13.2k|{
  996|  13.2k|    (::Serialize(s, args), ...);
  997|  13.2k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEvRT_l:
  263|  13.2k|template<typename Stream> inline void Serialize(Stream& s, int64_t a ) { ser_writedata64(s, a); }
_ZN12ParamsStreamIR10HashWriter20TransactionSerParamsElsINSt3__16vectorINS6_IhNS5_9allocatorIhEEEENS7_IS9_EEEEEERS3_RKT_:
 1133|  1.29k|    template <typename U> ParamsStream& operator<<(const U& obj) { ::Serialize(*this, obj); return *this; }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsENSt3__16vectorIhNS5_9allocatorIhEEEENS7_IS9_EEEvRT_RKNS6_IT0_T1_EE:
  846|  1.29k|{
  847|       |    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|       |        WriteCompactSize(os, v.size());
  849|       |        if (!v.empty()) os.write(MakeByteSpan(v));
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|  1.29k|    } else {
  859|  1.29k|        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|  1.29k|    }
  861|  1.29k|}
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorINSA_IhNS9_9allocatorIhEEEENSB_ISD_EEEEEQ12SerializableIT0_T_EEvRSK_RKSJ_:
  753|  1.29k|{
  754|  1.29k|    a.Serialize(os);
  755|  1.29k|}
_ZNK7WrapperI15VectorFormatterI16DefaultFormatterERKNSt3__16vectorINS4_IhNS3_9allocatorIhEEEENS5_IS7_EEEEE9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  482|  1.29k|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN15VectorFormatterI16DefaultFormatterE3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsENSt3__16vectorINS9_IhNS8_9allocatorIhEEEENSA_ISC_EEEEEEvRT_RKT0_:
  662|  1.29k|    {
  663|  1.29k|        Formatter formatter;
  664|  1.29k|        WriteCompactSize(s, v.size());
  665|  5.27k|        for (const typename V::value_type& elem : v) {
  ------------------
  |  Branch (665:49): [True: 5.27k, False: 1.29k]
  ------------------
  666|  5.27k|            formatter.Ser(s, elem);
  667|  5.27k|        }
  668|  1.29k|    }
_ZN16DefaultFormatter3SerI12ParamsStreamIR10HashWriter20TransactionSerParamsENSt3__16vectorIhNS6_9allocatorIhEEEEEEvRT_RKT0_:
  774|  5.27k|    static void Ser(Stream& s, const T& t) { Serialize(s, t); }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEhNSt3__19allocatorIhEEEvRT_RKNS5_6vectorIT0_T1_EE:
  846|  5.27k|{
  847|  5.27k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  848|  5.27k|        WriteCompactSize(os, v.size());
  849|  5.27k|        if (!v.empty()) os.write(MakeByteSpan(v));
  ------------------
  |  Branch (849:13): [True: 3.74k, False: 1.53k]
  ------------------
  850|       |    } else if constexpr (std::is_same_v<T, bool>) {
  851|       |        // A special case for std::vector<bool>, as dereferencing
  852|       |        // std::vector<bool>::const_iterator does not result in a const bool&
  853|       |        // due to std::vector's special casing for bool arguments.
  854|       |        WriteCompactSize(os, v.size());
  855|       |        for (bool elem : v) {
  856|       |            ::Serialize(os, elem);
  857|       |        }
  858|       |    } else {
  859|       |        Serialize(os, Using<VectorFormatter<DefaultFormatter>>(v));
  860|       |    }
  861|  5.27k|}
_ZNK12ParamsStreamIR10HashWriter20TransactionSerParamsE9GetParamsIS2_EERKDav:
 1144|  2.90k|    {
 1145|  2.90k|        if constexpr (std::is_convertible_v<Params, P>) {
 1146|  2.90k|            return m_params;
 1147|       |        } else {
 1148|       |            return m_substream.template GetParams<P>();
 1149|       |        }
 1150|  2.90k|    }
_Z9SerializeI10HashWriter13ParamsWrapperI20TransactionSerParamsK12CTransactionEQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|  2.90k|{
  754|  2.90k|    a.Serialize(os);
  755|  2.90k|}
_ZNK13ParamsWrapperI20TransactionSerParamsK12CTransactionE9SerializeI10HashWriterEEvRT_:
 1199|  2.90k|    {
 1200|  2.90k|        ParamsStream ss{s, m_params};
 1201|  2.90k|        ::Serialize(ss, m_object);
 1202|  2.90k|    }
_Z9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsE12CTransactionQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|  2.90k|{
  754|  2.90k|    a.Serialize(os);
  755|  2.90k|}
_Z9SerializeI10HashWriter17CompactSizeWriterQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|  8.27k|{
  754|  8.27k|    a.Serialize(os);
  755|  8.27k|}
_ZNK17CompactSizeWriter9SerializeI10HashWriterEEvRT_:
  618|  8.27k|    void Serialize(Stream &s) const {
  619|  8.27k|        WriteCompactSize<Stream>(s, n);
  620|  8.27k|    }

_Z9UCharCastPh:
  281|   190k|inline unsigned char* UCharCast(unsigned char* c) { return c; }
_Z9UCharCastPKh:
  285|  2.17M|inline const unsigned char* UCharCast(const unsigned char* c) { return c; }
_Z9UCharCastPKSt4byte:
  287|  1.38M|inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }
_ZNK4SpanIKSt4byteE4sizeEv:
  187|  1.25M|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKcE4dataEv:
  174|   187k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKcE4sizeEv:
  187|  44.5M|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKSt4byteE4dataEv:
  174|  2.93M|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKcE5beginEv:
  175|  2.25M|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKcE3endEv:
  176|   334M|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZNK4SpanIKhE4sizeEv:
  187|  35.5M|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKhE5beginEv:
  175|  2.55M|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKhE3endEv:
  176|  1.48M|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZNK4SpanIhE4sizeEv:
  187|  2.54M|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIhE4dataEv:
  174|  3.71M|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE4dataEv:
  174|  5.57M|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE5firstEm:
  206|  1.79M|    {
  207|  1.79M|        ASSERT_IF_DEBUG(size() >= count);
  208|  1.79M|        return Span<C>(m_data, count);
  209|  1.79M|    }
_ZNK4SpanIKhE7subspanEmm:
  201|   606k|    {
  202|   606k|        ASSERT_IF_DEBUG(size() >= offset + count);
  203|   606k|        return Span<C>(m_data + offset, count);
  204|   606k|    }
_ZNK4SpanISt4byteE4sizeEv:
  187|  4.05M|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKhE5emptyEv:
  189|  5.74k|    constexpr bool empty() const noexcept { return size() == 0; }
_ZNK4SpanISt4byteE4dataEv:
  174|  1.01M|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE7subspanEm:
  196|  28.3M|    {
  197|  28.3M|        ASSERT_IF_DEBUG(size() >= offset);
  198|  28.3M|        return Span<C>(m_data + offset, m_size - offset);
  199|  28.3M|    }
_ZNK4SpanIKSt4byteE5beginEv:
  175|   720k|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKSt4byteE3endEv:
  176|   720k|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZNK4SpanISt4byteE7subspanEm:
  196|  62.1k|    {
  197|  62.1k|        ASSERT_IF_DEBUG(size() >= offset);
  198|  62.1k|        return Span<C>(m_data + offset, m_size - offset);
  199|  62.1k|    }
_Z13UCharSpanCastIKhE4SpanINSt3__114remove_pointerIDTcl9UCharCastcldtfp_4dataEEEE4typeEES1_IT_E:
  293|  2.13M|template <typename T> constexpr auto UCharSpanCast(Span<T> s) -> Span<typename std::remove_pointer<decltype(UCharCast(s.data()))>::type> { return {UCharCast(s.data()), s.size()}; }
_Z13MakeUCharSpanIRK4SpanIKhEEDTcl13UCharSpanCasttlS0_clsr3stdE7forwardIT_Efp_EEEEOS5_:
  296|  1.79M|template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(Span{std::forward<V>(v)})) { return UCharSpanCast(Span{std::forward<V>(v)}); }
_ZNK4SpanIKhE10size_bytesEv:
  188|   498k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIKhE4SpanIKSt4byteES1_IT_E:
  259|   498k|{
  260|   498k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|   498k|}
_Z12MakeByteSpanIRKNSt3__16vectorIhNS0_9allocatorIhEEEEE4SpanIKSt4byteEOT_:
  270|  47.7k|{
  271|  47.7k|    return AsBytes(Span{std::forward<V>(v)});
  272|  47.7k|}
_ZN4SpanIKhEC2INSt3__16vectorIhNS3_9allocatorIhEEEEEERKT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalISA_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISA_EE4sizeEEmEE5valueEDnE4typeE:
  172|   380k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKSt4byteEC2IS1_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S1_EE5valueEiE4typeELi0EEEPS6_m:
  119|  1.86M|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanIKhEC2INSt3__16vectorIhNS3_9allocatorIhEEEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.23M|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanISt4byteEC2INSt3__15arrayIS0_Lm8EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|   124k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIjE4dataEv:
  174|   875k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIjE10size_bytesEv:
  188|   875k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIjE4SpanIKSt4byteES0_IT_E:
  259|   599k|{
  260|   599k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|   599k|}
_ZNK4SpanIhE10size_bytesEv:
  188|  1.17M|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIhE4SpanIKSt4byteES0_IT_E:
  259|   504k|{
  260|   504k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|   504k|}
_ZNK4SpanItE4dataEv:
  174|  15.0k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanItE10size_bytesEv:
  188|  15.0k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesItE4SpanIKSt4byteES0_IT_E:
  259|  14.8k|{
  260|  14.8k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|  14.8k|}
_ZNK4SpanImE4dataEv:
  174|  89.3k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanImE10size_bytesEv:
  188|  89.3k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesImE4SpanIKSt4byteES0_IT_E:
  259|  74.1k|{
  260|  74.1k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|  74.1k|}
_Z12MakeByteSpanIRK9prevectorILj28EhjiEE4SpanIKSt4byteEOT_:
  270|  67.8k|{
  271|  67.8k|    return AsBytes(Span{std::forward<V>(v)});
  272|  67.8k|}
_ZN4SpanIKhEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  32.9M|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanISt4byteEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  1.01M|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIhE4SpanISt4byteES0_IT_E:
  264|   666k|{
  265|   666k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|   666k|}
_ZN4SpanIhEC2IhTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_hEE5valueEiE4typeELi0EEEPS4_m:
  119|  1.20M|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesItE4SpanISt4byteES0_IT_E:
  264|    228|{
  265|    228|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|    228|}
_ZN4SpanItEC2ItTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_tEE5valueEiE4typeELi0EEEPS4_m:
  119|  15.0k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIjE4SpanISt4byteES0_IT_E:
  264|   276k|{
  265|   276k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|   276k|}
_ZN4SpanIjEC2IjTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_jEE5valueEiE4typeELi0EEEPS4_m:
  119|   875k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesImE4SpanISt4byteES0_IT_E:
  264|  15.2k|{
  265|  15.2k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|  15.2k|}
_ZN4SpanImEC2ImTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_mEE5valueEiE4typeELi0EEEPS4_m:
  119|  89.3k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z12MakeByteSpanIRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEE4SpanIKSt4byteEOT_:
  270|   168k|{
  271|   168k|    return AsBytes(Span{std::forward<V>(v)});
  272|   168k|}
_Z7AsBytesIKcE4SpanIKSt4byteES1_IT_E:
  259|   168k|{
  260|   168k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|   168k|}
_ZNK4SpanIKcE10size_bytesEv:
  188|   168k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZN4SpanIKcEC2INSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEERKT_NS3_9enable_ifIXaaaantsr7is_SpanISA_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalISC_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISC_EE4sizeEEmEE5valueEDnE4typeE:
  172|   238k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2INSt3__14spanIS0_Lm18446744073709551615EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|   607k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIhE7subspanEm:
  196|  1.78k|    {
  197|  1.78k|        ASSERT_IF_DEBUG(size() >= offset);
  198|  1.78k|        return Span<C>(m_data + offset, m_size - offset);
  199|  1.78k|    }
_ZNK4SpanIhE4lastEm:
  211|    191|    {
  212|    191|         ASSERT_IF_DEBUG(size() >= count);
  213|    191|         return Span<C>(m_data + m_size - count, count);
  214|    191|    }
_ZN4SpanIKSt4byteEC2INSt3__15arrayIS0_Lm32EEEEERKT_NS4_9enable_ifIXaaaantsr7is_SpanIS7_EE5valuesr3std14is_convertibleIPA_NS4_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S1_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  172|   112k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2INSt3__15arrayIhLm32EEEEERKT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS8_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS8_EE4sizeEEmEE5valueEDnE4typeE:
  172|   314k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I9prevectorILj28EhjiEEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS5_EE5valuesr3std14is_convertibleIPA_NS8_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  172|  67.8k|        : m_data(other.data()), m_size(other.size()){}
_Z20MakeWritableByteSpanIRNSt3__15arrayIhLm32EEEE4SpanISt4byteEOT_:
  275|   127k|{
  276|   127k|    return AsWritableBytes(Span{std::forward<V>(v)});
  277|   127k|}
_ZN4SpanIhEC2INSt3__15arrayIhLm32EEEEERT_NS2_9enable_ifIXaaaantsr7is_SpanIS5_EE5valuesr3std14is_convertibleIPA_NS2_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  165|   127k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I7uint256EERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  11.6k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2I9prevectorILj33EhjiEEERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS6_14remove_pointerIDTcldtclsr3stdE7declvalIS5_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS5_EE4sizeEEmEE5valueEDnE4typeE:
  165|  5.53k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2I7CScriptEERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS3_EE5valuesr3std14is_convertibleIPA_NS5_14remove_pointerIDTcldtclsr3stdE7declvalIS4_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS4_EE4sizeEEmEE5valueEDnE4typeE:
  165|  2.85k|        : m_data(other.data()), m_size(other.size()){}
_Z13MakeUCharSpanIRKNSt3__16vectorIhNS0_9allocatorIhEEEEEDTcl13UCharSpanCasttl4Spanclsr3stdE7forwardIT_Efp_EEEEOS8_:
  296|   300k|template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(Span{std::forward<V>(v)})) { return UCharSpanCast(Span{std::forward<V>(v)}); }
_ZN4SpanIhEC2I7uint256EERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS3_EE5valuesr3std14is_convertibleIPA_NS5_14remove_pointerIDTcldtclsr3stdE7declvalIS4_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS4_EE4sizeEEmEE5valueEDnE4typeE:
  165|   671k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2I7uint160EERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS3_EE5valuesr3std14is_convertibleIPA_NS5_14remove_pointerIDTcldtclsr3stdE7declvalIS4_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS4_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.83M|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2INSt3__16vectorIhNS2_9allocatorIhEEEEEERT_NS2_9enable_ifIXaaaantsr7is_SpanIS7_EE5valuesr3std14is_convertibleIPA_NS2_14remove_pointerIDTcldtclsr3stdE7declvalIS8_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS8_EE4sizeEEmEE5valueEDnE4typeE:
  165|   153k|        : m_data(other.data()), m_size(other.size()){}
_Z20MakeWritableByteSpanIRA4_hE4SpanISt4byteEOT_:
  275|  2.01k|{
  276|  2.01k|    return AsWritableBytes(Span{std::forward<V>(v)});
  277|  2.01k|}
_ZN4SpanIhEC2ILi4EEERAT__h:
  151|  2.01k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZN4SpanIKhEC2ILi4EEERAT__S0_:
  151|  1.63k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_Z20MakeWritableByteSpanIRA5_hE4SpanISt4byteEOT_:
  275|  4.60k|{
  276|  4.60k|    return AsWritableBytes(Span{std::forward<V>(v)});
  277|  4.60k|}
_ZN4SpanIhEC2ILi5EEERAT__h:
  151|  4.60k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZN4SpanIKhEC2ILi65EEERAT__S0_:
  151|  1.79M|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZN4SpanIKhEC2IhTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEERKS_IS5_E:
  141|   147k|    constexpr Span(const Span<O>& other) noexcept : m_data(other.m_data), m_size(other.m_size) {}
_ZN4SpanIKhEC2I7CPubKeyEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  1.03M|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I7CScriptEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|   112k|        : m_data(other.data()), m_size(other.size()){}
_Z13MakeUCharSpanIRK11XOnlyPubKeyEDTcl13UCharSpanCasttl4Spanclsr3stdE7forwardIT_Efp_EEEEOS4_:
  296|  1.95k|template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(Span{std::forward<V>(v)})) { return UCharSpanCast(Span{std::forward<V>(v)}); }
_ZN4SpanIKhEC2I11XOnlyPubKeyEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  1.95k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2ILi32EEERAT__S0_:
  151|  11.6k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZNK4SpanI7CScriptEixEm:
  191|  53.0k|    {
  192|  53.0k|        ASSERT_IF_DEBUG(size() > pos);
  193|  53.0k|        return m_data[pos];
  194|  53.0k|    }
_ZNK4SpanI7CScriptE4sizeEv:
  187|    143|    constexpr std::size_t size() const noexcept { return m_size; }
_ZN4SpanI7CScriptEC2INSt3__16vectorIS0_NS3_9allocatorIS0_EEEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  165|   109k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanI7CScriptE4lastEm:
  211|  56.7k|    {
  212|  56.7k|         ASSERT_IF_DEBUG(size() >= count);
  213|  56.7k|         return Span<C>(m_data + m_size - count, count);
  214|  56.7k|    }
_ZN4SpanI7CScriptEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  56.7k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEixEm:
  191|   196k|    {
  192|   196k|        ASSERT_IF_DEBUG(size() > pos);
  193|   196k|        return m_data[pos];
  194|   196k|    }
_ZNK4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEE5beginEv:
  175|    602|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEE3endEv:
  176|    602|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZN4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEC2INS0_6vectorIS6_NS4_IS6_EEEEEERT_NS0_9enable_ifIXaaaantsr7is_SpanISC_EE5valuesr3std14is_convertibleIPA_NS0_14remove_pointerIDTcldtclsr3stdE7declvalISD_EE4dataEEE4typeEPA_S6_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISD_EE4sizeEEmEE5valueEDnE4typeE:
  165|   338k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEE4lastEm:
  211|   338k|    {
  212|   338k|         ASSERT_IF_DEBUG(size() >= count);
  213|   338k|         return Span<C>(m_data + m_size - count, count);
  214|   338k|    }
_ZN4SpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEC2IS6_TnNS0_9enable_ifIXsr3std14is_convertibleIPA_T_PA_S6_EE5valueEiE4typeELi0EEEPSA_m:
  119|   338k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanIKcEixEm:
  191|   170M|    {
  192|   170M|        ASSERT_IF_DEBUG(size() > pos);
  193|   170M|        return m_data[pos];
  194|   170M|    }
_ZNK4SpanIKcE7subspanEm:
  196|   504k|    {
  197|   504k|        ASSERT_IF_DEBUG(size() >= offset);
  198|   504k|        return Span<C>(m_data + offset, m_size - offset);
  199|   504k|    }
_ZN4SpanIKcEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|   751k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanIhE5firstEm:
  206|   145k|    {
  207|   145k|        ASSERT_IF_DEBUG(size() >= count);
  208|   145k|        return Span<C>(m_data, count);
  209|   145k|    }
_ZNK4SpanISt4byteE5beginEv:
  175|   236k|    constexpr C* begin() const noexcept { return m_data; }
_ZN4SpanIKcEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_SC_:
  127|  1.33M|    CONSTEXPR_IF_NOT_DEBUG Span(T* begin, T* end) noexcept : m_data(begin), m_size(end - begin)
  128|  1.33M|    {
  129|  1.33M|        ASSERT_IF_DEBUG(end >= begin);
  130|  1.33M|    }
_ZNK4SpanIKcE5firstEm:
  206|   234k|    {
  207|   234k|        ASSERT_IF_DEBUG(size() >= count);
  208|   234k|        return Span<C>(m_data, count);
  209|   234k|    }
_ZNK4SpanIKcE7subspanEmm:
  201|  12.7k|    {
  202|  12.7k|        ASSERT_IF_DEBUG(size() >= offset + count);
  203|  12.7k|        return Span<C>(m_data + offset, count);
  204|  12.7k|    }
_ZN4SpanIKhEC2I6PKHashEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  33.2k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I16WitnessV0KeyHashEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  4.34k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I10ScriptHashEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|  4.19k|        : m_data(other.data()), m_size(other.size()){}
_Z13MakeUCharSpanIRK7CScriptEDTcl13UCharSpanCasttl4Spanclsr3stdE7forwardIT_Efp_EEEEOS4_:
  296|  35.5k|template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(Span{std::forward<V>(v)})) { return UCharSpanCast(Span{std::forward<V>(v)}); }
_ZNK4SpanIKhEixEm:
  191|  24.1M|    {
  192|  24.1M|        ASSERT_IF_DEBUG(size() > pos);
  193|  24.1M|        return m_data[pos];
  194|  24.1M|    }
_Z13MakeUCharSpanIRK4SpanIhEEDTcl13UCharSpanCasttlS0_clsr3stdE7forwardIT_Efp_EEEEOS4_:
  296|   145k|template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(Span{std::forward<V>(v)})) { return UCharSpanCast(Span{std::forward<V>(v)}); }
_Z13UCharSpanCastIhE4SpanINSt3__114remove_pointerIDTcl9UCharCastcldtfp_4dataEEEE4typeEES0_IT_E:
  293|   145k|template <typename T> constexpr auto UCharSpanCast(Span<T> s) -> Span<typename std::remove_pointer<decltype(UCharCast(s.data()))>::type> { return {UCharCast(s.data()), s.size()}; }
_ZN4SpanIKhEC2ILi33EEERAT__S0_:
  151|  3.65k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZN4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEEC2INS1_IS4_NS2_IS4_EEEEEERKT_NS0_9enable_ifIXaaaantsr7is_SpanISA_EE5valuesr3std14is_convertibleIPA_NS0_14remove_pointerIDTcldtclsr3stdE7declvalISC_EE4dataEEE4typeEPA_S5_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISC_EE4sizeEEmEE5valueEDnE4typeE:
  172|  4.39k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEE4sizeEv:
  187|  1.40k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEE4backEv:
  183|     55|    {
  184|     55|        ASSERT_IF_DEBUG(size() > 0);
  185|     55|        return m_data[m_size - 1];
  186|     55|    }
_ZNK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEE5beginEv:
  175|     49|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEE3endEv:
  176|     49|    constexpr C* end() const noexcept { return m_data + m_size; }
_Z11SpanPopBackIKNSt3__16vectorIhNS0_9allocatorIhEEEEERT_R4SpanIS6_E:
  249|     55|{
  250|     55|    size_t size = span.size();
  251|     55|    T& back = span.back();
  252|     55|    span = span.first(size - 1);
  253|     55|    return back;
  254|     55|}
_ZNK4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEE5firstEm:
  206|     55|    {
  207|     55|        ASSERT_IF_DEBUG(size() >= count);
  208|     55|        return Span<C>(m_data, count);
  209|     55|    }
_ZN4SpanIKNSt3__16vectorIhNS0_9allocatorIhEEEEEC2IS5_TnNS0_9enable_ifIXsr3std14is_convertibleIPA_T_PA_S5_EE5valueEiE4typeELi0EEEPS9_m:
  119|     55|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanIKcEC2ILi2EEERAT__S0_:
  151|  50.0k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZN4SpanIKcEC2ILi3EEERAT__S0_:
  151|  88.8k|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}
_ZNK4SpanIKcE5emptyEv:
  189|  32.6k|    constexpr bool empty() const noexcept { return size() == 0; }
_ZNK4SpanIKcE5frontEv:
  178|  31.9k|    {
  179|  31.9k|        ASSERT_IF_DEBUG(size() > 0);
  180|  31.9k|        return m_data[0];
  181|  31.9k|    }
_ZNK4SpanIKcE4backEv:
  183|    855|    {
  184|    855|        ASSERT_IF_DEBUG(size() > 0);
  185|    855|        return m_data[m_size - 1];
  186|    855|    }
_ZN4SpanIK7CScriptEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S1_EE5valueEiE4typeELi0EEERKS_IS6_E:
  141|  52.4k|    constexpr Span(const Span<O>& other) noexcept : m_data(other.m_data), m_size(other.m_size) {}
_ZNK4SpanIK7CScriptEixEm:
  191|  38.8k|    {
  192|  38.8k|        ASSERT_IF_DEBUG(size() > pos);
  193|  38.8k|        return m_data[pos];
  194|  38.8k|    }
_ZNK4SpanIK7CScriptE4sizeEv:
  187|  4.84k|    constexpr std::size_t size() const noexcept { return m_size; }
descriptor.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIjZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS0_9allocatorIjEEEEEEE5beginEv:
  175|  3.32M|    constexpr C* begin() const noexcept { return m_data; }
descriptor.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIjZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS0_9allocatorIjEEEEEEE3endEv:
  176|  3.32M|    constexpr C* end() const noexcept { return m_data + m_size; }
descriptor.cpp:_ZN4SpanINSt3__18optionalINS0_3setIjZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS0_9allocatorIjEEEEEEEC2INS0_6vectorISG_NSD_ISG_EEEEEERS9_NS0_9enable_ifIXaaaantsr7is_SpanIS9_EE5valuesr3std14is_convertibleIPA_NS0_14remove_pointerIDTcldtclsr3stdE7declvalISM_EE4dataEEE4typeEPA_SG_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISM_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.66M|        : m_data(other.data()), m_size(other.size()){}
descriptor.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIjZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS0_9allocatorIjEEEEEEE4lastEm:
  211|  1.66M|    {
  212|  1.66M|         ASSERT_IF_DEBUG(size() >= count);
  213|  1.66M|         return Span<C>(m_data + m_size - count, count);
  214|  1.66M|    }
descriptor.cpp:_ZN4SpanINSt3__18optionalINS0_3setIjZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS0_9allocatorIjEEEEEEEC2ISG_TnNS0_9enable_ifIXsr3std14is_convertibleIPA_S9_PA_SG_EE5valueEiE4typeELi0EEEPS9_m:
  119|  1.66M|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanIPKN10miniscript4NodeIjEEE5beginEv:
  175|   325k|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIPKN10miniscript4NodeIjEEE3endEv:
  176|   325k|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZN4SpanIPKN10miniscript4NodeIjEEEC2INSt3__16vectorIS4_NS7_9allocatorIS4_EEEEEERT_NS7_9enable_ifIXaaaantsr7is_SpanISC_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalISD_EE4dataEEE4typeEPA_S4_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISD_EE4sizeEEmEE5valueEDnE4typeE:
  165|   325k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIPKN10miniscript4NodeIjEEE4lastEm:
  211|   325k|    {
  212|   325k|         ASSERT_IF_DEBUG(size() >= count);
  213|   325k|         return Span<C>(m_data + m_size - count, count);
  214|   325k|    }
_ZN4SpanIPKN10miniscript4NodeIjEEEC2IS4_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S4_EE5valueEiE4typeELi0EEEPS9_m:
  119|   325k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanINSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEE5beginEv:
  175|  80.8k|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanINSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEE3endEv:
  176|   160k|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZN4SpanINSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEEC2INS0_6vectorIS8_NS0_9allocatorIS8_EEEEEERT_NS0_9enable_ifIXaaaantsr7is_SpanISF_EE5valuesr3std14is_convertibleIPA_NS0_14remove_pointerIDTcldtclsr3stdE7declvalISG_EE4dataEEE4typeEPA_S8_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISG_EE4sizeEEmEE5valueEDnE4typeE:
  165|  80.8k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanINSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEE4lastEm:
  211|  80.8k|    {
  212|  80.8k|         ASSERT_IF_DEBUG(size() >= count);
  213|  80.8k|         return Span<C>(m_data + m_size - count, count);
  214|  80.8k|    }
_ZN4SpanINSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEEC2IS8_TnNS0_9enable_ifIXsr3std14is_convertibleIPA_T_PA_S8_EE5valueEiE4typeELi0EEEPSC_m:
  119|  80.8k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanIKhEC2I7uint256EERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS6_14remove_pointerIDTcldtclsr3stdE7declvalIS5_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS5_EE4sizeEEmEE5valueEDnE4typeE:
  165|  8.05k|        : m_data(other.data()), m_size(other.size()){}
_Z12MakeByteSpanIRK7uint256E4SpanIKSt4byteEOT_:
  270|  11.6k|{
  271|  11.6k|    return AsBytes(Span{std::forward<V>(v)});
  272|  11.6k|}
_Z12MakeByteSpanIR7uint256E4SpanIKSt4byteEOT_:
  270|   112k|{
  271|   112k|    return AsBytes(Span{std::forward<V>(v)});
  272|   112k|}
_Z12MakeByteSpanIRKNSt3__16vectorIh16secure_allocatorIhEEEE4SpanIKSt4byteEOT_:
  270|  7.55k|{
  271|  7.55k|    return AsBytes(Span{std::forward<V>(v)});
  272|  7.55k|}
_ZN4SpanIKhEC2INSt3__16vectorIh16secure_allocatorIhEEEEERKT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalISA_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISA_EE4sizeEEmEE5valueEDnE4typeE:
  172|  7.55k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanISt4byteE5emptyEv:
  189|   473k|    constexpr bool empty() const noexcept { return size() == 0; }
_ZN4SpanISt4byteEC2INSt3__15arrayIS0_Lm64EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|   174k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanIKhE5frontEv:
  178|  4.45M|    {
  179|  4.45M|        ASSERT_IF_DEBUG(size() > 0);
  180|  4.45M|        return m_data[0];
  181|  4.45M|    }

_ZN10SpanReaderC2E4SpanIKhE:
  109|  30.0k|    explicit SpanReader(Span<const unsigned char> data) : m_data{data} {}
_ZNK10SpanReader5emptyEv:
  119|  5.74k|    bool empty() const { return m_data.empty(); }
_ZN10SpanReader4readE4SpanISt4byteE:
  122|  53.3k|    {
  123|  53.3k|        if (dst.size() == 0) {
  ------------------
  |  Branch (123:13): [True: 0, False: 53.3k]
  ------------------
  124|      0|            return;
  125|      0|        }
  126|       |
  127|       |        // Read from the beginning of the buffer
  128|  53.3k|        if (dst.size() > m_data.size()) {
  ------------------
  |  Branch (128:13): [True: 45, False: 53.2k]
  ------------------
  129|     45|            throw std::ios_base::failure("SpanReader::read(): end of data");
  130|     45|        }
  131|  53.2k|        memcpy(dst.data(), m_data.data(), dst.size());
  132|  53.2k|        m_data = m_data.subspan(dst.size());
  133|  53.2k|    }
_ZN10DataStreamC2E4SpanIKhE:
  165|  25.1k|    explicit DataStream(Span<const uint8_t> sp) : DataStream{AsBytes(sp)} {}
_ZN10DataStreamC2E4SpanIKSt4byteE:
  166|  25.1k|    explicit DataStream(Span<const value_type> sp) : vch(sp.data(), sp.data() + sp.size()) {}
_ZN10DataStream5beginEv:
  178|   201k|    iterator begin()                                 { return vch.begin() + m_read_pos; }
_ZN10DataStream3endEv:
  180|   201k|    iterator end()                                   { return vch.end(); }
_ZNK10DataStream4sizeEv:
  181|  12.0k|    size_type size() const                           { return vch.size() - m_read_pos; }
_ZNK10DataStream5emptyEv:
  182|  45.9k|    bool empty() const                               { return vch.size() == m_read_pos; }
_ZN10DataStream7reserveEm:
  184|   201k|    void reserve(size_type n)                        { vch.reserve(n + m_read_pos); }
_ZN10DataStream4readE4SpanISt4byteE:
  219|   791k|    {
  220|   791k|        if (dst.size() == 0) return;
  ------------------
  |  Branch (220:13): [True: 57, False: 791k]
  ------------------
  221|       |
  222|       |        // Read from the beginning of the buffer
  223|   791k|        auto next_read_pos{CheckedAdd(m_read_pos, dst.size())};
  224|   791k|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (224:13): [True: 0, False: 791k]
  |  Branch (224:43): [True: 1.20k, False: 790k]
  ------------------
  225|  1.20k|            throw std::ios_base::failure("DataStream::read(): end of data");
  226|  1.20k|        }
  227|   790k|        memcpy(dst.data(), &vch[m_read_pos], dst.size());
  228|   790k|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (228:13): [True: 286, False: 790k]
  ------------------
  229|    286|            m_read_pos = 0;
  230|    286|            vch.clear();
  231|    286|            return;
  232|    286|        }
  233|   790k|        m_read_pos = next_read_pos.value();
  234|   790k|    }
_ZN10DataStream6ignoreEm:
  237|     66|    {
  238|       |        // Ignore from the beginning of the buffer
  239|     66|        auto next_read_pos{CheckedAdd(m_read_pos, num_ignore)};
  240|     66|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (240:13): [True: 0, False: 66]
  |  Branch (240:43): [True: 39, False: 27]
  ------------------
  241|     39|            throw std::ios_base::failure("DataStream::ignore(): end of data");
  242|     39|        }
  243|     27|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (243:13): [True: 1, False: 26]
  ------------------
  244|      1|            m_read_pos = 0;
  245|      1|            vch.clear();
  246|      1|            return;
  247|      1|        }
  248|     26|        m_read_pos = next_read_pos.value();
  249|     26|    }
_ZN10DataStream5writeE4SpanIKSt4byteE:
  252|   720k|    {
  253|       |        // Write to the end of the buffer
  254|   720k|        vch.insert(vch.end(), src.begin(), src.end());
  255|   720k|    }
_ZN10DataStreamC2Ev:
  164|   201k|    explicit DataStream() = default;
_ZN10DataStreamrsIRNSt3__16vectorIhNS1_9allocatorIhEEEEEERS_OT_:
  266|  54.9k|    {
  267|  54.9k|        ::Unserialize(*this, obj);
  268|  54.9k|        return (*this);
  269|  54.9k|    }
_ZN10DataStreamrsIR9COutPointEERS_OT_:
  266|  8.86k|    {
  267|  8.86k|        ::Unserialize(*this, obj);
  268|  8.86k|        return (*this);
  269|  8.86k|    }
_ZN10DataStreamrsI13ParamsWrapperI20TransactionSerParams19CMutableTransactionEEERS_OT_:
  266|  3.09k|    {
  267|  3.09k|        ::Unserialize(*this, obj);
  268|  3.09k|        return (*this);
  269|  3.09k|    }
_ZN10SpanReaderrsIRhEERS_OT_:
  113|  9.76k|    {
  114|  9.76k|        ::Unserialize(*this, obj);
  115|  9.76k|        return (*this);
  116|  9.76k|    }
_ZN10DataStreamrsIR4CoinEERS_OT_:
  266|  8.63k|    {
  267|  8.63k|        ::Unserialize(*this, obj);
  268|  8.63k|        return (*this);
  269|  8.63k|    }
_ZN10DataStreamrsI7WrapperI15VarIntFormatterIL10VarIntMode0EERmEEERS_OT_:
  266|  8.51k|    {
  267|  8.51k|        ::Unserialize(*this, obj);
  268|  8.51k|        return (*this);
  269|  8.51k|    }
_ZN10DataStreamrsI7WrapperI15VarIntFormatterIL10VarIntMode0EERjEEERS_OT_:
  266|  8.48k|    {
  267|  8.48k|        ::Unserialize(*this, obj);
  268|  8.48k|        return (*this);
  269|  8.48k|    }
_ZN10DataStreamrsI4SpanIhEEERS_OT_:
  266|  8.38k|    {
  267|  8.38k|        ::Unserialize(*this, obj);
  268|  8.38k|        return (*this);
  269|  8.38k|    }
_ZN10DataStreamlsI4SpanIKhEEERS_RKT_:
  259|   101k|    {
  260|   101k|        ::Serialize(*this, obj);
  261|   101k|        return (*this);
  262|   101k|    }
_ZN10DataStreamlsINSt3__16vectorIhNS1_9allocatorIhEEEEEERS_RKT_:
  259|  43.9k|    {
  260|  43.9k|        ::Serialize(*this, obj);
  261|  43.9k|        return (*this);
  262|  43.9k|    }
_ZN10DataStreamrsIR7CScriptEERS_OT_:
  266|    561|    {
  267|    561|        ::Unserialize(*this, obj);
  268|    561|        return (*this);
  269|    561|    }
_ZN10DataStreamrsIR26PartiallySignedTransactionEERS_OT_:
  266|  4.60k|    {
  267|  4.60k|        ::Unserialize(*this, obj);
  268|  4.60k|        return (*this);
  269|  4.60k|    }
_ZN10DataStreamrsIRA5_hEERS_OT_:
  266|  4.60k|    {
  267|  4.60k|        ::Unserialize(*this, obj);
  268|  4.60k|        return (*this);
  269|  4.60k|    }
_ZN10DataStreamrsIRA4_hEERS_OT_:
  266|  2.01k|    {
  267|  2.01k|        ::Unserialize(*this, obj);
  268|  2.01k|        return (*this);
  269|  2.01k|    }
_ZN10DataStreamrsIRjEERS_OT_:
  266|  34.8k|    {
  267|  34.8k|        ::Unserialize(*this, obj);
  268|  34.8k|        return (*this);
  269|  34.8k|    }
_ZN10SpanReaderrsIRNSt3__16vectorIhNS1_9allocatorIhEEEEEERS_OT_:
  113|  6.41k|    {
  114|  6.41k|        ::Unserialize(*this, obj);
  115|  6.41k|        return (*this);
  116|  6.41k|    }
_ZN10DataStreamrsIR9PSBTInputEERS_OT_:
  266|  2.69k|    {
  267|  2.69k|        ::Unserialize(*this, obj);
  268|  2.69k|        return (*this);
  269|  2.69k|    }
_ZN10SpanReaderrsIR11XOnlyPubKeyEERS_OT_:
  113|  1.78k|    {
  114|  1.78k|        ::Unserialize(*this, obj);
  115|  1.78k|        return (*this);
  116|  1.78k|    }
_ZN10SpanReaderrsIR7uint256EERS_OT_:
  113|    890|    {
  114|    890|        ::Unserialize(*this, obj);
  115|    890|        return (*this);
  116|    890|    }
_ZN10DataStreamrsIRNSt3__13setI7uint256NS1_4lessIS3_EENS1_9allocatorIS3_EEEEEERS_OT_:
  266|  1.06k|    {
  267|  1.06k|        ::Unserialize(*this, obj);
  268|  1.06k|        return (*this);
  269|  1.06k|    }
_ZN10DataStreamrsIR10PSBTOutputEERS_OT_:
  266|  1.35k|    {
  267|  1.35k|        ::Unserialize(*this, obj);
  268|  1.35k|        return (*this);
  269|  1.35k|    }
_ZN10DataStreamlsImEERS_RKT_:
  259|  11.6k|    {
  260|  11.6k|        ::Serialize(*this, obj);
  261|  11.6k|        return (*this);
  262|  11.6k|    }
_ZN10DataStreamlsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEERS_RKT_:
  259|  14.5k|    {
  260|  14.5k|        ::Serialize(*this, obj);
  261|  14.5k|        return (*this);
  262|  14.5k|    }
_ZN10DataStreamlsINSt3__14pairINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_EEEERS_RKT_:
  259|  2.91k|    {
  260|  2.91k|        ::Serialize(*this, obj);
  261|  2.91k|        return (*this);
  262|  2.91k|    }
_ZN10DataStreamlsINSt3__14pairINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EEEERS_RKT_:
  259|  34.6k|    {
  260|  34.6k|        ::Serialize(*this, obj);
  261|  34.6k|        return (*this);
  262|  34.6k|    }
_ZN10DataStreamlsINSt3__14pairINS1_6vectorIh16secure_allocatorIhEEE7uint256EEEERS_RKT_:
  259|  7.55k|    {
  260|  7.55k|        ::Serialize(*this, obj);
  261|  7.55k|        return (*this);
  262|  7.55k|    }
_ZN10DataStreamlsINSt3__14pairINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS2_I7uint2567CPubKeyEEEEEERS_RKT_:
  259|  7.55k|    {
  260|  7.55k|        ::Serialize(*this, obj);
  261|  7.55k|        return (*this);
  262|  7.55k|    }
_ZN10DataStreamlsIN6wallet16WalletDescriptorEEERS_RKT_:
  259|  34.6k|    {
  260|  34.6k|        ::Serialize(*this, obj);
  261|  34.6k|        return (*this);
  262|  34.6k|    }
_ZN10DataStreamlsINSt3__14pairINS2_INS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EENS2_IjjEEEEEERS_RKT_:
  259|  21.5k|    {
  260|  21.5k|        ::Serialize(*this, obj);
  261|  21.5k|        return (*this);
  262|  21.5k|    }
_ZN10DataStreamlsINSt3__14pairINS2_INS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE7uint256EEjEEEERS_RKT_:
  259|  22.4k|    {
  260|  22.4k|        ::Serialize(*this, obj);
  261|  22.4k|        return (*this);
  262|  22.4k|    }

_ZN12PoolResourceILm144ELm8EED2Ev:
  201|      2|    {
  202|      2|        for (std::byte* chunk : m_allocated_chunks) {
  ------------------
  |  Branch (202:31): [True: 2, False: 2]
  ------------------
  203|      2|            std::destroy(chunk, chunk + m_chunk_size_bytes);
  204|      2|            ::operator delete ((void*)chunk, std::align_val_t{ELEM_ALIGN_BYTES});
  205|      2|        }
  206|      2|    }

_Z18make_secure_uniqueINSt3__15arrayIhLm32EEEJEENS0_10unique_ptrIT_19SecureUniqueDeleterIS4_EEEDpOT0_:
   72|   306k|{
   73|   306k|    T* p = secure_allocator<T>().allocate(1);
   74|       |
   75|       |    // initialize in place, and return as secure_unique_ptr
   76|   306k|    try {
   77|   306k|        return secure_unique_ptr<T>(new (p) T(std::forward<Args>(as)...));
   78|   306k|    } catch (...) {
   79|      0|        secure_allocator<T>().deallocate(p, 1);
   80|      0|        throw;
   81|      0|    }
   82|   306k|}
_ZN16secure_allocatorINSt3__15arrayIhLm32EEEE8allocateEm:
   28|   306k|    {
   29|   306k|        T* allocation = static_cast<T*>(LockedPoolManager::Instance().alloc(sizeof(T) * n));
   30|   306k|        if (!allocation) {
  ------------------
  |  Branch (30:13): [True: 0, False: 306k]
  ------------------
   31|      0|            throw std::bad_alloc();
   32|      0|        }
   33|   306k|        return allocation;
   34|   306k|    }
_ZN16secure_allocatorINSt3__15arrayIhLm32EEEE10deallocateEPS2_m:
   37|   306k|    {
   38|   306k|        if (p != nullptr) {
  ------------------
  |  Branch (38:13): [True: 306k, False: 0]
  ------------------
   39|   306k|            memory_cleanse(p, sizeof(T) * n);
   40|   306k|        }
   41|   306k|        LockedPoolManager::Instance().free(p);
   42|   306k|    }
_ZN19SecureUniqueDeleterINSt3__15arrayIhLm32EEEEclEPS2_:
   62|   306k|    void operator()(T* t) noexcept {
   63|   306k|        secure_allocator<T>().deallocate(t, 1);
   64|   306k|    }
_ZN16secure_allocatorIhE10deallocateEPhm:
   37|  78.1k|    {
   38|  78.1k|        if (p != nullptr) {
  ------------------
  |  Branch (38:13): [True: 78.1k, False: 0]
  ------------------
   39|  78.1k|            memory_cleanse(p, sizeof(T) * n);
   40|  78.1k|        }
   41|  78.1k|        LockedPoolManager::Instance().free(p);
   42|  78.1k|    }
_ZN16secure_allocatorIhE8allocateEm:
   28|  78.1k|    {
   29|  78.1k|        T* allocation = static_cast<T*>(LockedPoolManager::Instance().alloc(sizeof(T) * n));
   30|  78.1k|        if (!allocation) {
  ------------------
  |  Branch (30:13): [True: 0, False: 78.1k]
  ------------------
   31|      0|            throw std::bad_alloc();
   32|      0|        }
   33|  78.1k|        return allocation;
   34|  78.1k|    }

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

_Z14memory_cleansePvm:
   15|  1.53M|{
   16|       |#if defined(WIN32)
   17|       |    /* SecureZeroMemory is guaranteed not to be optimized out. */
   18|       |    SecureZeroMemory(ptr, len);
   19|       |#else
   20|  1.53M|    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|  1.53M|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
   34|  1.53M|#endif
   35|  1.53M|}

_ZN5Arena5allocEm:
   52|   384k|{
   53|       |    // Round to next multiple of alignment
   54|   384k|    size = align_up(size, alignment);
   55|       |
   56|       |    // Don't handle zero-sized chunks
   57|   384k|    if (size == 0)
  ------------------
  |  Branch (57:9): [True: 0, False: 384k]
  ------------------
   58|      0|        return nullptr;
   59|       |
   60|       |    // Pick a large enough free-chunk. Returns an iterator pointing to the first element that is not less than key.
   61|       |    // This allocation strategy is best-fit. According to "Dynamic Storage Allocation: A Survey and Critical Review",
   62|       |    // Wilson et. al. 1995, https://www.scs.stanford.edu/14wi-cs140/sched/readings/wilson.pdf, best-fit and first-fit
   63|       |    // policies seem to work well in practice.
   64|   384k|    auto size_ptr_it = size_to_free_chunk.lower_bound(size);
   65|   384k|    if (size_ptr_it == size_to_free_chunk.end())
  ------------------
  |  Branch (65:9): [True: 0, False: 384k]
  ------------------
   66|      0|        return nullptr;
   67|       |
   68|       |    // Create the used-chunk, taking its space from the end of the free-chunk
   69|   384k|    const size_t size_remaining = size_ptr_it->first - size;
   70|   384k|    char* const free_chunk = static_cast<char*>(size_ptr_it->second);
   71|   384k|    auto allocated = chunks_used.emplace(free_chunk + size_remaining, size).first;
   72|   384k|    chunks_free_end.erase(free_chunk + size_ptr_it->first);
   73|   384k|    if (size_ptr_it->first == size) {
  ------------------
  |  Branch (73:9): [True: 109k, False: 274k]
  ------------------
   74|       |        // whole chunk is used up
   75|   109k|        chunks_free.erase(size_ptr_it->second);
   76|   274k|    } else {
   77|       |        // still some memory left in the chunk
   78|   274k|        auto it_remaining = size_to_free_chunk.emplace(size_remaining, size_ptr_it->second);
   79|   274k|        chunks_free[size_ptr_it->second] = it_remaining;
   80|   274k|        chunks_free_end.emplace(free_chunk + size_remaining, it_remaining);
   81|   274k|    }
   82|   384k|    size_to_free_chunk.erase(size_ptr_it);
   83|       |
   84|   384k|    return allocated->first;
   85|   384k|}
_ZN5Arena4freeEPv:
   88|   384k|{
   89|       |    // Freeing the nullptr pointer is OK.
   90|   384k|    if (ptr == nullptr) {
  ------------------
  |  Branch (90:9): [True: 0, False: 384k]
  ------------------
   91|      0|        return;
   92|      0|    }
   93|       |
   94|       |    // Remove chunk from used map
   95|   384k|    auto i = chunks_used.find(ptr);
   96|   384k|    if (i == chunks_used.end()) {
  ------------------
  |  Branch (96:9): [True: 0, False: 384k]
  ------------------
   97|      0|        throw std::runtime_error("Arena: invalid or double free");
   98|      0|    }
   99|   384k|    auto freed = std::make_pair(static_cast<char*>(i->first), i->second);
  100|   384k|    chunks_used.erase(i);
  101|       |
  102|       |    // coalesce freed with previous chunk
  103|   384k|    auto prev = chunks_free_end.find(freed.first);
  104|   384k|    if (prev != chunks_free_end.end()) {
  ------------------
  |  Branch (104:9): [True: 212k, False: 171k]
  ------------------
  105|   212k|        freed.first -= prev->second->first;
  106|   212k|        freed.second += prev->second->first;
  107|   212k|        size_to_free_chunk.erase(prev->second);
  108|   212k|        chunks_free_end.erase(prev);
  109|   212k|    }
  110|       |
  111|       |    // coalesce freed with chunk after freed
  112|   384k|    auto next = chunks_free.find(freed.first + freed.second);
  113|   384k|    if (next != chunks_free.end()) {
  ------------------
  |  Branch (113:9): [True: 62.0k, False: 322k]
  ------------------
  114|  62.0k|        freed.second += next->second->first;
  115|  62.0k|        size_to_free_chunk.erase(next->second);
  116|  62.0k|        chunks_free.erase(next);
  117|  62.0k|    }
  118|       |
  119|       |    // Add/set space with coalesced free chunk
  120|   384k|    auto it = size_to_free_chunk.emplace(freed.second, freed.first);
  121|   384k|    chunks_free[freed.first] = it;
  122|   384k|    chunks_free_end[freed.first + freed.second] = it;
  123|   384k|}
_ZN10LockedPool5allocEm:
  286|   384k|{
  287|   384k|    std::lock_guard<std::mutex> lock(mutex);
  288|       |
  289|       |    // Don't handle impossible sizes
  290|   384k|    if (size == 0 || size > ARENA_SIZE)
  ------------------
  |  Branch (290:9): [True: 0, False: 384k]
  |  Branch (290:22): [True: 0, False: 384k]
  ------------------
  291|      0|        return nullptr;
  292|       |
  293|       |    // Try allocating from each current arena
  294|   384k|    for (auto &arena: arenas) {
  ------------------
  |  Branch (294:21): [True: 384k, False: 0]
  ------------------
  295|   384k|        void *addr = arena.alloc(size);
  296|   384k|        if (addr) {
  ------------------
  |  Branch (296:13): [True: 384k, False: 0]
  ------------------
  297|   384k|            return addr;
  298|   384k|        }
  299|   384k|    }
  300|       |    // If that fails, create a new one
  301|      0|    if (new_arena(ARENA_SIZE, ARENA_ALIGN)) {
  ------------------
  |  Branch (301:9): [True: 0, False: 0]
  ------------------
  302|      0|        return arenas.back().alloc(size);
  303|      0|    }
  304|      0|    return nullptr;
  305|      0|}
_ZN10LockedPool4freeEPv:
  308|   384k|{
  309|   384k|    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|   384k|    for (auto &arena: arenas) {
  ------------------
  |  Branch (312:21): [True: 384k, False: 0]
  ------------------
  313|   384k|        if (arena.addressInArena(ptr)) {
  ------------------
  |  Branch (313:13): [True: 384k, False: 0]
  ------------------
  314|   384k|            arena.free(ptr);
  315|   384k|            return;
  316|   384k|        }
  317|   384k|    }
  318|      0|    throw std::runtime_error("LockedPool: invalid address not pointing to any arena");
  319|   384k|}
lockedpool.cpp:_ZL8align_upmm:
   33|   384k|{
   34|   384k|    return (x + align - 1) & ~(align - 1);
   35|   384k|}

_ZNK5Arena14addressInArenaEPv:
   90|   384k|    bool addressInArena(void *ptr) const { return ptr >= base && ptr < end; }
  ------------------
  |  Branch (90:51): [True: 384k, False: 0]
  |  Branch (90:66): [True: 384k, False: 0]
  ------------------
_ZN17LockedPoolManager8InstanceEv:
  223|   768k|    {
  224|   768k|        static std::once_flag init_flag;
  225|   768k|        std::call_once(init_flag, LockedPoolManager::CreateInstance);
  226|   768k|        return *LockedPoolManager::_instance;
  227|   768k|    }

_Z17MaybeCheckNotHeldR14AnnotatedMixinINSt3__15mutexEE:
  247|   124k|inline Mutex& MaybeCheckNotHeld(Mutex& cs) EXCLUSIVE_LOCKS_REQUIRED(!cs) LOCK_RETURNED(cs) { return cs; }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEEC2ERS3_PKcS7_ib:
  177|   124k|    UniqueLock(MutexType& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)
  178|   124k|    {
  179|   124k|        if (fTry)
  ------------------
  |  Branch (179:13): [True: 0, False: 124k]
  ------------------
  180|      0|            TryEnter(pszName, pszFile, nLine);
  181|   124k|        else
  182|   124k|            Enter(pszName, pszFile, nLine);
  183|   124k|    }
_Z13EnterCriticalINSt3__15mutexEEvPKcS3_iPT_b:
   75|   124k|inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, MutexType* cs, bool fTry = false) {}
_Z13LeaveCriticalv:
   76|   552k|inline void LeaveCritical() {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEE5EnterEPKcS6_i:
  157|   124k|    {
  158|   124k|        EnterCritical(pszName, pszFile, nLine, Base::mutex());
  159|       |#ifdef DEBUG_LOCKCONTENTION
  160|       |        if (Base::try_lock()) return;
  161|       |        LOG_TIME_MICROS_WITH_CATEGORY(strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine), BCLog::LOCK);
  162|       |#endif
  163|   124k|        Base::lock();
  164|   124k|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEED2Ev:
  197|   124k|    {
  198|   124k|        if (Base::owns_lock())
  ------------------
  |  Branch (198:13): [True: 124k, False: 0]
  ------------------
  199|   124k|            LeaveCritical();
  200|   124k|    }
_Z10DeleteLockPv:
   82|  43.6k|inline void DeleteLock(void* cs) {}
_Z17MaybeCheckNotHeldI14AnnotatedMixinINSt3__115recursive_mutexEEERT_S5_:
  253|   428k|inline MutexType& MaybeCheckNotHeld(MutexType& m) LOCKS_EXCLUDED(m) LOCK_RETURNED(m) { return m; }
_Z13EnterCriticalINSt3__115recursive_mutexEEvPKcS3_iPT_b:
   75|   428k|inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, MutexType* cs, bool fTry = false) {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEE5EnterEPKcS6_i:
  157|   428k|    {
  158|   428k|        EnterCritical(pszName, pszFile, nLine, Base::mutex());
  159|       |#ifdef DEBUG_LOCKCONTENTION
  160|       |        if (Base::try_lock()) return;
  161|       |        LOG_TIME_MICROS_WITH_CATEGORY(strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine), BCLog::LOCK);
  162|       |#endif
  163|   428k|        Base::lock();
  164|   428k|    }
_Z22AssertLockHeldInternalI14AnnotatedMixinINSt3__15mutexEEEvPKcS5_iPT_:
   79|      2|inline void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs) {}
_Z22AssertLockHeldInternalI14AnnotatedMixinINSt3__115recursive_mutexEEEvPKcS5_iPT_:
   79|   116k|inline void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs) {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEEC2ERS3_PKcS7_ib:
  177|   428k|    UniqueLock(MutexType& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)
  178|   428k|    {
  179|   428k|        if (fTry)
  ------------------
  |  Branch (179:13): [True: 0, False: 428k]
  ------------------
  180|      0|            TryEnter(pszName, pszFile, nLine);
  181|   428k|        else
  182|   428k|            Enter(pszName, pszFile, nLine);
  183|   428k|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEED2Ev:
  197|   428k|    {
  198|   428k|        if (Base::owns_lock())
  ------------------
  |  Branch (198:13): [True: 428k, False: 0]
  ------------------
  199|   428k|            LeaveCritical();
  200|   428k|    }
_ZN14AnnotatedMixinINSt3__15mutexEED2Ev:
   94|  11.7k|    ~AnnotatedMixin() {
   95|  11.7k|        DeleteLock((void*)this);
   96|  11.7k|    }
_ZN14AnnotatedMixinINSt3__115recursive_mutexEED2Ev:
   94|  31.8k|    ~AnnotatedMixin() {
   95|  31.8k|        DeleteLock((void*)this);
   96|  31.8k|    }
_ZZN10CScheduler4stopEvENKUlvE_clEv:
  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
net.cpp:_ZZN8CConnman9StopNodesEvENK3$_0clEv:
  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
_ZZN11CCheckQueueI12CScriptCheckNSt3__14pairI13ScriptError_tNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEED1EvENKUlvE_clEv:
  301|      2|#define WITH_LOCK(cs, code) (MaybeCheckNotHeld(cs), [&]() -> decltype(auto) { LOCK(cs); code; }())
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------

_ZN18FuzzedDataProviderC2EPKhm:
   37|  11.6k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider15ConsumeIntegralIlEET_v:
  195|   462k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|   462k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|   462k|                                std::numeric_limits<T>::max());
  198|   462k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIlEET_S1_S1_:
  205|   603k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|   603k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|   603k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|   603k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 603k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|   603k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|   603k|  uint64_t result = 0;
  215|   603k|  size_t offset = 0;
  216|       |
  217|  4.48M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 4.01M, False: 462k]
  |  Branch (217:43): [True: 3.87M, False: 140k]
  ------------------
  218|  4.48M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 3.87M, False: 158]
  ------------------
  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|  3.87M|    --remaining_bytes_;
  226|  3.87M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  3.87M|    offset += CHAR_BIT;
  228|  3.87M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|   603k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 140k, False: 462k]
  ------------------
  232|   140k|    result = result % (range + 1);
  233|       |
  234|   603k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|   603k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeImEET_S1_S1_:
  205|  3.71M|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  3.71M|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  3.71M|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  3.71M|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 3.71M]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  3.71M|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  3.71M|  uint64_t result = 0;
  215|  3.71M|  size_t offset = 0;
  216|       |
  217|  7.41M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 7.41M, False: 0]
  |  Branch (217:43): [True: 3.70M, False: 3.70M]
  ------------------
  218|  7.41M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 3.70M, False: 660]
  ------------------
  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|  3.70M|    --remaining_bytes_;
  226|  3.70M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  3.70M|    offset += CHAR_BIT;
  228|  3.70M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  3.71M|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 3.71M, False: 0]
  ------------------
  232|  3.71M|    result = result % (range + 1);
  233|       |
  234|  3.71M|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  3.71M|}
_ZN18FuzzedDataProvider15ConsumeIntegralIiEET_v:
  195|  2.78k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.78k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.78k|                                std::numeric_limits<T>::max());
  198|  2.78k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIiEET_S1_S1_:
  205|  70.4k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  70.4k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  70.4k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  70.4k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 70.4k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  70.4k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  70.4k|  uint64_t result = 0;
  215|  70.4k|  size_t offset = 0;
  216|       |
  217|   144k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 142k, False: 1.50k]
  |  Branch (217:43): [True: 75.3k, False: 67.3k]
  ------------------
  218|   144k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 73.6k, False: 1.63k]
  ------------------
  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|  73.6k|    --remaining_bytes_;
  226|  73.6k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  73.6k|    offset += CHAR_BIT;
  228|  73.6k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  70.4k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 70.4k, False: 0]
  ------------------
  232|  70.4k|    result = result % (range + 1);
  233|       |
  234|  70.4k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  70.4k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIjEET_S1_S1_:
  205|  2.59M|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.59M|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.59M|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.59M|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.59M]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.59M|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.59M|  uint64_t result = 0;
  215|  2.59M|  size_t offset = 0;
  216|       |
  217|  5.18M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 5.18M, False: 0]
  |  Branch (217:43): [True: 2.59M, False: 2.59M]
  ------------------
  218|  5.18M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 2.59M, False: 45]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  2.59M|    --remaining_bytes_;
  226|  2.59M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  2.59M|    offset += CHAR_BIT;
  228|  2.59M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.59M|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.59M, False: 0]
  ------------------
  232|  2.59M|    result = result % (range + 1);
  233|       |
  234|  2.59M|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.59M|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  4.30M|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  4.30M|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  4.30M|                                std::numeric_limits<T>::max());
  198|  4.30M|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  4.30M|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  4.30M|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  4.30M|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  4.30M|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 4.30M]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  4.30M|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  4.30M|  uint64_t result = 0;
  215|  4.30M|  size_t offset = 0;
  216|       |
  217|  8.59M|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 4.30M, False: 4.29M]
  |  Branch (217:43): [True: 4.30M, False: 0]
  ------------------
  218|  8.59M|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 4.29M, False: 15.3k]
  ------------------
  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|  4.29M|    --remaining_bytes_;
  226|  4.29M|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  4.29M|    offset += CHAR_BIT;
  228|  4.29M|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  4.30M|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 4.30M, False: 0]
  ------------------
  232|  4.30M|    result = result % (range + 1);
  233|       |
  234|  4.30M|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  4.30M|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  82.3k|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|  82.3k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  82.3k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|  90.1M|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 90.1M, False: 25.5k]
  |  Branch (164:40): [True: 90.1M, False: 130]
  ------------------
  165|  90.1M|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|  90.1M|    Advance(1);
  167|  90.1M|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 64.9k, False: 90.0M]
  |  Branch (167:25): [True: 64.8k, False: 89]
  ------------------
  168|  64.8k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  64.8k|      Advance(1);
  170|  64.8k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 56.6k, False: 8.25k]
  ------------------
  171|  56.6k|        break;
  172|  64.8k|    }
  173|  90.0M|    result += next;
  174|  90.0M|  }
  175|       |
  176|  82.3k|  result.shrink_to_fit();
  177|  82.3k|  return result;
  178|  82.3k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEv:
  181|  66.5k|inline std::string FuzzedDataProvider::ConsumeRandomLengthString() {
  182|  66.5k|  return ConsumeRandomLengthString(remaining_bytes_);
  183|  66.5k|}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|  4.30M|inline bool FuzzedDataProvider::ConsumeBool() {
  290|  4.30M|  return 1 & ConsumeIntegral<uint8_t>();
  291|  4.30M|}
_ZN18FuzzedDataProvider14CopyAndAdvanceEPvm:
  339|  6.19k|                                               size_t num_bytes) {
  340|  6.19k|  std::memcpy(destination, data_ptr_, num_bytes);
  341|  6.19k|  Advance(num_bytes);
  342|  6.19k|}
_ZN18FuzzedDataProvider7AdvanceEm:
  344|  90.2M|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  345|  90.2M|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (345:7): [True: 0, False: 90.2M]
  ------------------
  346|      0|    abort();
  347|       |
  348|  90.2M|  data_ptr_ += num_bytes;
  349|  90.2M|  remaining_bytes_ -= num_bytes;
  350|  90.2M|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  379|  90.2M|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  380|  90.2M|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  381|  90.2M|  static_assert(!std::numeric_limits<TU>::is_signed,
  382|  90.2M|                "Source type must be unsigned.");
  383|       |
  384|       |  // TODO(Dor1s): change to `if constexpr` once C++17 becomes mainstream.
  385|  90.2M|  if (std::numeric_limits<TS>::is_modulo)
  ------------------
  |  Branch (385:7): [Folded - Ignored]
  ------------------
  386|      0|    return static_cast<TS>(value);
  387|       |
  388|       |  // Avoid using implementation-defined unsigned to signed conversions.
  389|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  390|  90.2M|  if (value <= std::numeric_limits<TS>::max()) {
  ------------------
  |  Branch (390:7): [True: 85.9M, False: 4.27M]
  ------------------
  391|  85.9M|    return static_cast<TS>(value);
  392|  85.9M|  } else {
  393|  4.27M|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  394|  4.27M|    return TS_min + static_cast<TS>(value - TS_min);
  395|  4.27M|  }
  396|  90.2M|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEm:
  109|  12.6k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t num_bytes) {
  110|  12.6k|  num_bytes = std::min(num_bytes, remaining_bytes_);
  111|  12.6k|  return ConsumeBytes<T>(num_bytes, num_bytes);
  112|  12.6k|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEmm:
  353|  12.6k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t size, size_t num_bytes) {
  354|  12.6k|  static_assert(sizeof(T) == sizeof(uint8_t), "Incompatible data type.");
  355|       |
  356|       |  // The point of using the size-based constructor below is to increase the
  357|       |  // odds of having a vector object with capacity being equal to the length.
  358|       |  // That part is always implementation specific, but at least both libc++ and
  359|       |  // libstdc++ allocate the requested number of bytes in that constructor,
  360|       |  // which seems to be a natural choice for other implementations as well.
  361|       |  // To increase the odds even more, we also call |shrink_to_fit| below.
  362|  12.6k|  std::vector<T> result(size);
  363|  12.6k|  if (size == 0) {
  ------------------
  |  Branch (363:7): [True: 6.46k, False: 6.19k]
  ------------------
  364|  6.46k|    if (num_bytes != 0)
  ------------------
  |  Branch (364:9): [True: 0, False: 6.46k]
  ------------------
  365|      0|      abort();
  366|  6.46k|    return result;
  367|  6.46k|  }
  368|       |
  369|  6.19k|  CopyAndAdvance(result.data(), num_bytes);
  370|       |
  371|       |  // Even though |shrink_to_fit| is also implementation specific, we expect it
  372|       |  // to provide an additional assurance in case vector's constructor allocated
  373|       |  // a buffer which is larger than the actual amount of data we put inside it.
  374|  6.19k|  result.shrink_to_fit();
  375|  6.19k|  return result;
  376|  12.6k|}
_ZN18FuzzedDataProvider16PickValueInArrayIiEET_St16initializer_listIKS1_E:
  316|   535k|T FuzzedDataProvider::PickValueInArray(std::initializer_list<const T> list) {
  317|       |  // TODO(Dor1s): switch to static_assert once C++14 is allowed.
  318|   535k|  if (!list.size())
  ------------------
  |  Branch (318:7): [True: 0, False: 535k]
  ------------------
  319|      0|    abort();
  320|       |
  321|   535k|  return *(list.begin() + ConsumeIntegralInRange<size_t>(0, list.size() - 1));
  322|   535k|}

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

_Z20ConstructPubKeyBytesR18FuzzedDataProvider4SpanIKhEb:
   17|   535k|{
   18|   535k|    uint8_t pk_type;
   19|   535k|    if (compressed) {
  ------------------
  |  Branch (19:9): [True: 478k, False: 56.9k]
  ------------------
   20|   478k|        pk_type = fuzzed_data_provider.PickValueInArray({0x02, 0x03});
   21|   478k|    } else {
   22|  56.9k|        pk_type = fuzzed_data_provider.PickValueInArray({0x04, 0x06, 0x07});
   23|  56.9k|    }
   24|   535k|    std::vector<uint8_t> pk_data{byte_data.begin(), byte_data.begin() + (compressed ? CPubKey::COMPRESSED_SIZE : CPubKey::SIZE)};
  ------------------
  |  Branch (24:74): [True: 478k, False: 56.9k]
  ------------------
   25|   535k|    pk_data[0] = pk_type;
   26|   535k|    return pk_data;
   27|   535k|}
_Z11ConsumeTimeR18FuzzedDataProviderRKNSt3__18optionalIlEES5_:
   35|  11.6k|{
   36|       |    // Avoid t=0 (1970-01-01T00:00:00Z) since SetMockTime(0) disables mocktime.
   37|  11.6k|    static const int64_t time_min{ParseISO8601DateTime("2000-01-01T00:00:01Z").value()};
   38|  11.6k|    static const int64_t time_max{ParseISO8601DateTime("2100-12-31T23:59:59Z").value()};
   39|  11.6k|    return fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(min.value_or(time_min), max.value_or(time_max));
   40|  11.6k|}
_Z13ConsumeScriptR18FuzzedDataProviderb:
   94|  1.81k|{
   95|  1.81k|    CScript r_script{};
   96|  1.81k|    {
   97|       |        // Keep a buffer of bytes to allow the fuzz engine to produce smaller
   98|       |        // inputs to generate CScripts with repeated data.
   99|  1.81k|        static constexpr unsigned MAX_BUFFER_SZ{128};
  100|  1.81k|        std::vector<uint8_t> buffer(MAX_BUFFER_SZ, uint8_t{'a'});
  101|  3.13M|        while (fuzzed_data_provider.ConsumeBool()) {
  ------------------
  |  Branch (101:16): [True: 3.13M, False: 1.81k]
  ------------------
  102|  3.13M|            CallOneOf(
  103|  3.13M|                fuzzed_data_provider,
  104|  3.13M|                [&] {
  105|       |                    // Insert byte vector directly to allow malformed or unparsable scripts
  106|  3.13M|                    r_script.insert(r_script.end(), buffer.begin(), buffer.begin() + fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BUFFER_SZ));
  107|  3.13M|                },
  108|  3.13M|                [&] {
  109|       |                    // Push a byte vector from the buffer
  110|  3.13M|                    r_script << std::vector<uint8_t>{buffer.begin(), buffer.begin() + fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BUFFER_SZ)};
  111|  3.13M|                },
  112|  3.13M|                [&] {
  113|       |                    // Push multisig
  114|       |                    // There is a special case for this to aid the fuzz engine
  115|       |                    // navigate the highly structured multisig format.
  116|  3.13M|                    r_script << fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, 22);
  117|  3.13M|                    int num_data{fuzzed_data_provider.ConsumeIntegralInRange(1, 22)};
  118|  3.13M|                    while (num_data--) {
  119|  3.13M|                        auto pubkey_bytes{ConstructPubKeyBytes(fuzzed_data_provider, buffer, fuzzed_data_provider.ConsumeBool())};
  120|  3.13M|                        if (fuzzed_data_provider.ConsumeBool()) {
  121|  3.13M|                            pubkey_bytes.back() = num_data; // Make each pubkey different
  122|  3.13M|                        }
  123|  3.13M|                        r_script << pubkey_bytes;
  124|  3.13M|                    }
  125|  3.13M|                    r_script << fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, 22);
  126|  3.13M|                },
  127|  3.13M|                [&] {
  128|       |                    // Mutate the buffer
  129|  3.13M|                    const auto vec{ConsumeRandomLengthByteVector(fuzzed_data_provider, /*max_length=*/MAX_BUFFER_SZ)};
  130|  3.13M|                    std::copy(vec.begin(), vec.end(), buffer.begin());
  131|  3.13M|                },
  132|  3.13M|                [&] {
  133|       |                    // Push an integral
  134|  3.13M|                    r_script << fuzzed_data_provider.ConsumeIntegral<int64_t>();
  135|  3.13M|                },
  136|  3.13M|                [&] {
  137|       |                    // Push an opcode
  138|  3.13M|                    r_script << ConsumeOpcodeType(fuzzed_data_provider);
  139|  3.13M|                },
  140|  3.13M|                [&] {
  141|       |                    // Push a scriptnum
  142|  3.13M|                    r_script << ConsumeScriptNum(fuzzed_data_provider);
  143|  3.13M|                });
  144|  3.13M|        }
  145|  1.81k|    }
  146|  1.81k|    if (maybe_p2wsh && fuzzed_data_provider.ConsumeBool()) {
  ------------------
  |  Branch (146:9): [True: 0, False: 1.81k]
  |  Branch (146:24): [True: 0, False: 0]
  ------------------
  147|      0|        uint256 script_hash;
  148|      0|        CSHA256().Write(r_script.data(), r_script.size()).Finalize(script_hash.begin());
  149|      0|        r_script.clear();
  150|      0|        r_script << OP_0 << ToByteVector(script_hash);
  151|      0|    }
  152|  1.81k|    return r_script;
  153|  1.81k|}
_Z12ConsumeCoinsR18FuzzedDataProvider:
  167|  2.78k|{
  168|  2.78k|    std::map<COutPoint, Coin> coins;
  169|  8.86k|    LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000) {
  ------------------
  |  |   23|  11.1k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 8.86k, False: 2.24k]
  |  |  |  Branch (23:49): [True: 8.86k, False: 0]
  |  |  ------------------
  ------------------
  170|  8.86k|        const std::optional<COutPoint> outpoint{ConsumeDeserializable<COutPoint>(fuzzed_data_provider)};
  171|  8.86k|        if (!outpoint) {
  ------------------
  |  Branch (171:13): [True: 233, False: 8.63k]
  ------------------
  172|    233|            break;
  173|    233|        }
  174|  8.63k|        const std::optional<Coin> coin{ConsumeDeserializable<Coin>(fuzzed_data_provider)};
  175|  8.63k|        if (!coin) {
  ------------------
  |  Branch (175:13): [True: 311, False: 8.32k]
  ------------------
  176|    311|            break;
  177|    311|        }
  178|  8.32k|        coins[*outpoint] = *coin;
  179|  8.32k|    }
  180|       |
  181|  2.78k|    return coins;
  182|  2.78k|}
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_0clEv:
  104|  1.89M|                [&] {
  105|       |                    // Insert byte vector directly to allow malformed or unparsable scripts
  106|  1.89M|                    r_script.insert(r_script.end(), buffer.begin(), buffer.begin() + fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BUFFER_SZ));
  107|  1.89M|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_1clEv:
  108|   692k|                [&] {
  109|       |                    // Push a byte vector from the buffer
  110|   692k|                    r_script << std::vector<uint8_t>{buffer.begin(), buffer.begin() + fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BUFFER_SZ)};
  111|   692k|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_2clEv:
  112|  64.5k|                [&] {
  113|       |                    // Push multisig
  114|       |                    // There is a special case for this to aid the fuzz engine
  115|       |                    // navigate the highly structured multisig format.
  116|  64.5k|                    r_script << fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, 22);
  117|  64.5k|                    int num_data{fuzzed_data_provider.ConsumeIntegralInRange(1, 22)};
  118|   600k|                    while (num_data--) {
  ------------------
  |  Branch (118:28): [True: 535k, False: 64.5k]
  ------------------
  119|   535k|                        auto pubkey_bytes{ConstructPubKeyBytes(fuzzed_data_provider, buffer, fuzzed_data_provider.ConsumeBool())};
  120|   535k|                        if (fuzzed_data_provider.ConsumeBool()) {
  ------------------
  |  Branch (120:29): [True: 477k, False: 58.5k]
  ------------------
  121|   477k|                            pubkey_bytes.back() = num_data; // Make each pubkey different
  122|   477k|                        }
  123|   535k|                        r_script << pubkey_bytes;
  124|   535k|                    }
  125|  64.5k|                    r_script << fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, 22);
  126|  64.5k|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_3clEv:
  127|  15.7k|                [&] {
  128|       |                    // Mutate the buffer
  129|  15.7k|                    const auto vec{ConsumeRandomLengthByteVector(fuzzed_data_provider, /*max_length=*/MAX_BUFFER_SZ)};
  130|  15.7k|                    std::copy(vec.begin(), vec.end(), buffer.begin());
  131|  15.7k|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_4clEv:
  132|  2.06k|                [&] {
  133|       |                    // Push an integral
  134|  2.06k|                    r_script << fuzzed_data_provider.ConsumeIntegral<int64_t>();
  135|  2.06k|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_5clEv:
  136|  3.64k|                [&] {
  137|       |                    // Push an opcode
  138|  3.64k|                    r_script << ConsumeOpcodeType(fuzzed_data_provider);
  139|  3.64k|                },
util.cpp:_ZZ13ConsumeScriptR18FuzzedDataProviderbENK3$_6clEv:
  140|   460k|                [&] {
  141|       |                    // Push a scriptnum
  142|   460k|                    r_script << ConsumeScriptNum(fuzzed_data_provider);
  143|   460k|                });

_Z17ConsumeOpcodeTypeR18FuzzedDataProvider:
  141|  3.64k|{
  142|  3.64k|    return static_cast<opcodetype>(fuzzed_data_provider.ConsumeIntegralInRange<uint32_t>(0, MAX_OPCODE));
  143|  3.64k|}
_Z16ConsumeScriptNumR18FuzzedDataProvider:
  158|   460k|{
  159|   460k|    return CScriptNum{fuzzed_data_provider.ConsumeIntegral<int64_t>()};
  160|   460k|}
_Z14ConsumeUInt160R18FuzzedDataProvider:
  163|  12.6k|{
  164|  12.6k|    const std::vector<uint8_t> v160 = fuzzed_data_provider.ConsumeBytes<uint8_t>(160 / 8);
  165|  12.6k|    if (v160.size() != 160 / 8) {
  ------------------
  |  Branch (165:9): [True: 6.57k, False: 6.07k]
  ------------------
  166|  6.57k|        return {};
  167|  6.57k|    }
  168|  6.07k|    return uint160{v160};
  169|  12.6k|}
_Z29ConsumeRandomLengthByteVectorIhENSt3__16vectorIT_NS0_9allocatorIS2_EEEER18FuzzedDataProviderRKNS0_8optionalImEE:
   58|  40.9k|{
   59|  40.9k|    static_assert(sizeof(B) == 1);
   60|  40.9k|    const std::string s = max_length ?
  ------------------
  |  Branch (60:27): [True: 15.7k, False: 25.1k]
  ------------------
   61|  15.7k|                              fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
   62|  40.9k|                              fuzzed_data_provider.ConsumeRandomLengthString();
   63|  40.9k|    std::vector<B> ret(s.size());
   64|  40.9k|    std::copy(s.begin(), s.end(), reinterpret_cast<char*>(ret.data()));
   65|  40.9k|    return ret;
   66|  40.9k|}
_Z21ConsumeDeserializableI9COutPointENSt3__18optionalIT_EER18FuzzedDataProviderRKNS2_ImEE:
  120|  8.86k|{
  121|  8.86k|    const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
  122|  8.86k|    DataStream ds{buffer};
  123|  8.86k|    T obj;
  124|  8.86k|    try {
  125|  8.86k|        ds >> obj;
  126|  8.86k|    } catch (const std::ios_base::failure&) {
  127|    233|        return std::nullopt;
  128|    233|    }
  129|  8.63k|    return obj;
  130|  8.86k|}
_Z21ConsumeDeserializableI19CMutableTransaction20TransactionSerParamsENSt3__18optionalIT_EER18FuzzedDataProviderRKT0_RKNS3_ImEE:
  106|  3.09k|{
  107|  3.09k|    const std::vector<uint8_t> buffer{ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length)};
  108|  3.09k|    DataStream ds{buffer};
  109|  3.09k|    T obj;
  110|  3.09k|    try {
  111|  3.09k|        ds >> params(obj);
  112|  3.09k|    } catch (const std::ios_base::failure&) {
  113|    311|        return std::nullopt;
  114|    311|    }
  115|  2.78k|    return obj;
  116|  3.09k|}
_Z21ConsumeDeserializableI4CoinENSt3__18optionalIT_EER18FuzzedDataProviderRKNS2_ImEE:
  120|  8.63k|{
  121|  8.63k|    const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
  122|  8.63k|    DataStream ds{buffer};
  123|  8.63k|    T obj;
  124|  8.63k|    try {
  125|  8.63k|        ds >> obj;
  126|  8.63k|    } catch (const std::ios_base::failure&) {
  127|    311|        return std::nullopt;
  128|    311|    }
  129|  8.32k|    return obj;
  130|  8.63k|}
_Z21ConsumeDeserializableI26PartiallySignedTransactionENSt3__18optionalIT_EER18FuzzedDataProviderRKNS2_ImEE:
  120|  4.60k|{
  121|  4.60k|    const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
  122|  4.60k|    DataStream ds{buffer};
  123|  4.60k|    T obj;
  124|  4.60k|    try {
  125|  4.60k|        ds >> obj;
  126|  4.60k|    } catch (const std::ios_base::failure&) {
  127|  1.44k|        return std::nullopt;
  128|  1.44k|    }
  129|  3.15k|    return obj;
  130|  4.60k|}
scriptpubkeyman.cpp:_Z9CallOneOfIJZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEE3$_0ZNS1_27scriptpubkeyman_fuzz_targetES5_E3$_1ZNS1_27scriptpubkeyman_fuzz_targetES5_E3$_2ZNS1_27scriptpubkeyman_fuzz_targetES5_E3$_3ZNS1_27scriptpubkeyman_fuzz_targetES5_E3$_4ZNS1_27scriptpubkeyman_fuzz_targetES5_E3$_5EEmR18FuzzedDataProviderDpT_:
   36|  34.8k|{
   37|  34.8k|    constexpr size_t call_size{sizeof...(callables)};
   38|  34.8k|    static_assert(call_size >= 1);
   39|  34.8k|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|  34.8k|    size_t i{0};
   42|   209k|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 1.81k, False: 33.0k]
  |  Branch (42:7): [True: 9.39k, False: 25.4k]
  |  Branch (42:7): [True: 2.13k, False: 32.7k]
  |  Branch (42:7): [True: 13.8k, False: 21.0k]
  |  Branch (42:7): [True: 3.09k, False: 31.7k]
  |  Branch (42:7): [True: 4.60k, False: 30.2k]
  ------------------
   43|  34.8k|    return call_size;
   44|  34.8k|}
_Z9PickValueINSt3__113unordered_setI7CScript15SaltedSipHasherNS0_8equal_toIS2_EENS0_9allocatorIS2_EEEEERDaR18FuzzedDataProviderRT_:
   48|  2.05k|{
   49|  2.05k|    auto sz{col.size()};
   50|  2.05k|    assert(sz >= 1);
   51|  2.05k|    auto it = col.begin();
   52|  2.05k|    std::advance(it, fuzzed_data_provider.ConsumeIntegralInRange<decltype(sz)>(0, sz - 1));
   53|  2.05k|    return *it;
   54|  2.05k|}
util.cpp:_Z9CallOneOfIJZ13ConsumeScriptR18FuzzedDataProviderbE3$_0Z13ConsumeScriptS1_bE3$_1Z13ConsumeScriptS1_bE3$_2Z13ConsumeScriptS1_bE3$_3Z13ConsumeScriptS1_bE3$_4Z13ConsumeScriptS1_bE3$_5Z13ConsumeScriptS1_bE3$_6EEmS1_DpT_:
   36|  3.13M|{
   37|  3.13M|    constexpr size_t call_size{sizeof...(callables)};
   38|  3.13M|    static_assert(call_size >= 1);
   39|  3.13M|    const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
   40|       |
   41|  3.13M|    size_t i{0};
   42|  21.9M|    ((i++ == call_index ? callables() : void()), ...);
  ------------------
  |  Branch (42:7): [True: 1.89M, False: 1.23M]
  |  Branch (42:7): [True: 692k, False: 2.44M]
  |  Branch (42:7): [True: 64.5k, False: 3.07M]
  |  Branch (42:7): [True: 15.7k, False: 3.12M]
  |  Branch (42:7): [True: 2.06k, False: 3.13M]
  |  Branch (42:7): [True: 3.64k, False: 3.13M]
  |  Branch (42:7): [True: 460k, False: 2.67M]
  ------------------
   43|  3.13M|    return call_size;
   44|  3.13M|}

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

_ZNK25MockedDescriptorConverter10IdxFromHexENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   44|   947k|std::optional<uint8_t> MockedDescriptorConverter::IdxFromHex(std::string_view hex_characters) const {
   45|   947k|    if (hex_characters.size() != 2) return {};
  ------------------
  |  Branch (45:9): [True: 0, False: 947k]
  ------------------
   46|   947k|    auto idx = ParseHex(hex_characters);
   47|   947k|    if (idx.size() != 1) return {};
  ------------------
  |  Branch (47:9): [True: 62, False: 947k]
  ------------------
   48|   947k|    return idx[0];
   49|   947k|}
_ZNK25MockedDescriptorConverter13GetDescriptorENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   51|  13.7k|std::optional<std::string> MockedDescriptorConverter::GetDescriptor(std::string_view mocked_desc) const {
   52|       |    // The smallest fragment would be "pk(%00)"
   53|  13.7k|    if (mocked_desc.size() < 7) return {};
  ------------------
  |  Branch (53:9): [True: 310, False: 13.4k]
  ------------------
   54|       |
   55|       |    // The actual descriptor string to be returned.
   56|  13.4k|    std::string desc;
   57|  13.4k|    desc.reserve(mocked_desc.size());
   58|       |
   59|       |    // Replace all occurrences of '%' followed by two hex characters with the corresponding key.
   60|  45.8M|    for (size_t i = 0; i < mocked_desc.size();) {
  ------------------
  |  Branch (60:24): [True: 45.8M, False: 13.3k]
  ------------------
   61|  45.8M|        if (mocked_desc[i] == '%') {
  ------------------
  |  Branch (61:13): [True: 947k, False: 44.8M]
  ------------------
   62|   947k|            if (i + 3 >= mocked_desc.size()) return {};
  ------------------
  |  Branch (62:17): [True: 8, False: 947k]
  ------------------
   63|   947k|            if (const auto idx = IdxFromHex(mocked_desc.substr(i + 1, 2))) {
  ------------------
  |  Branch (63:28): [True: 947k, False: 62]
  ------------------
   64|   947k|                desc += keys_str[*idx];
   65|   947k|                i += 3;
   66|   947k|            } else {
   67|     62|                return {};
   68|     62|            }
   69|  44.8M|        } else {
   70|  44.8M|            desc += mocked_desc[i++];
   71|  44.8M|        }
   72|  45.8M|    }
   73|       |
   74|  13.3k|    return desc;
   75|  13.4k|}
_Z16HasDeepDerivPathRKNSt3__14spanIKhLm18446744073709551615EEEi:
   78|  13.7k|{
   79|  13.7k|    auto depth{0};
   80|  50.0M|    for (const auto& ch: buff) {
  ------------------
  |  Branch (80:24): [True: 50.0M, False: 13.7k]
  ------------------
   81|  50.0M|        if (ch == ',') {
  ------------------
  |  Branch (81:13): [True: 186k, False: 49.8M]
  ------------------
   82|       |            // A comma is always present between two key expressions, so we use that as a delimiter.
   83|   186k|            depth = 0;
   84|  49.8M|        } else if (ch == '/') {
  ------------------
  |  Branch (84:20): [True: 45.9k, False: 49.8M]
  ------------------
   85|  45.9k|            if (++depth > max_depth) return true;
  ------------------
  |  Branch (85:17): [True: 8, False: 45.9k]
  ------------------
   86|  45.9k|        }
   87|  50.0M|    }
   88|  13.7k|    return false;
   89|  13.7k|}

_Z22SeedRandomStateForTest8SeedRand:
   20|  11.6k|{
   21|  11.6k|    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|  11.6k|    static const auto g_ctx_seed = []() -> std::optional<uint256> {
   28|  11.6k|        if constexpr (G_FUZZING) return {};
   29|       |        // If RANDOM_CTX_SEED is set, use that as seed.
   30|  11.6k|        if (const char* num{std::getenv(RANDOM_CTX_SEED)}) {
   31|  11.6k|            if (auto num_parsed{uint256::FromUserHex(num)}) {
   32|  11.6k|                return *num_parsed;
   33|  11.6k|            } else {
   34|  11.6k|                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|  11.6k|                std::abort();
   36|  11.6k|            }
   37|  11.6k|        }
   38|       |        // Otherwise use a (truly) random value.
   39|  11.6k|        return GetRandHash();
   40|  11.6k|    }();
   41|       |
   42|  11.6k|    g_seeded_g_prng_zero = seedtype == SeedRand::ZEROS;
   43|  11.6k|    if constexpr (G_FUZZING) {
   44|  11.6k|        Assert(g_seeded_g_prng_zero); // Only SeedRandomStateForTest(SeedRand::ZEROS) is allowed in fuzz tests
  ------------------
  |  |   85|  11.6k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   45|  11.6k|        Assert(!g_used_g_prng);       // The global PRNG must not have been used before SeedRandomStateForTest(SeedRand::ZEROS)
  ------------------
  |  |   85|  11.6k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   46|  11.6k|    }
   47|  11.6k|    const uint256& seed{seedtype == SeedRand::FIXED_SEED ? g_ctx_seed.value() : uint256::ZERO};
  ------------------
  |  Branch (47:25): [True: 0, False: 11.6k]
  ------------------
   48|  11.6k|    LogInfo("Setting random seed for current tests to %s=%s\n", RANDOM_CTX_SEED, seed.GetHex());
  ------------------
  |  |  261|  11.6k|#define LogInfo(...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  255|  11.6k|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
   49|  11.6k|    MakeRandDeterministicDANGEROUS(seed);
   50|  11.6k|}

_ZN17BasicTestingSetupD2Ev:
  199|      2|{
  200|      2|    m_node.ecc_context.reset();
  201|      2|    m_node.kernel.reset();
  202|       |    if constexpr (!G_FUZZING) {
  203|       |        SetMockTime(0s); // Reset mocktime for following tests
  204|       |    }
  205|      2|    LogInstance().DisconnectTestLogger();
  206|      2|    if (m_has_custom_datadir) {
  ------------------
  |  Branch (206:9): [True: 0, False: 2]
  ------------------
  207|       |        // Only remove the lock file, preserve the data directory.
  208|      0|        UnlockDirectory(m_path_lock, ".lock");
  209|      0|        fs::remove(m_path_lock / ".lock");
  210|      2|    } else {
  211|      2|        fs::remove_all(m_path_root);
  212|      2|    }
  213|      2|    gArgs.ClearArgs();
  214|      2|}
_ZN17ChainTestingSetupD2Ev:
  267|      2|{
  268|      2|    if (m_node.scheduler) m_node.scheduler->stop();
  ------------------
  |  Branch (268:9): [True: 2, False: 0]
  ------------------
  269|      2|    if (m_node.validation_signals) m_node.validation_signals->FlushBackgroundCallbacks();
  ------------------
  |  Branch (269:9): [True: 2, False: 0]
  ------------------
  270|      2|    m_node.connman.reset();
  271|      2|    m_node.banman.reset();
  272|      2|    m_node.addrman.reset();
  273|      2|    m_node.netgroupman.reset();
  274|      2|    m_node.args = nullptr;
  275|      2|    m_node.mempool.reset();
  276|      2|    Assert(!m_node.fee_estimator); // Each test must create a local object, if they wish to use the fee_estimator
  ------------------
  |  |   85|      2|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
  277|      2|    m_node.chainman.reset();
  278|      2|    m_node.validation_signals.reset();
  279|      2|    m_node.scheduler.reset();
  280|      2|}

_ZN12StdLockGuardC2ER8StdMutex:
   73|  14.2k|    explicit StdLockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard<StdMutex>(cs) {}

_ZNK10tinyformat6detail9FormatArg6formatERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEPKcS9_i:
  541|  89.0k|        {
  542|  89.0k|            TINYFORMAT_ASSERT(m_value);
  ------------------
  |  |  153|  89.0k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  543|  89.0k|            TINYFORMAT_ASSERT(m_formatImpl);
  ------------------
  |  |  153|  89.0k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  544|  89.0k|            m_formatImpl(out, fmtBegin, fmtEnd, ntrunc, m_value);
  545|  89.0k|        }
_ZN10tinyformat10FormatListC2EPNS_6detail9FormatArgEi:
  966|  90.5k|            : m_args(args), m_N(N) { }
_ZN10tinyformat6detail11FormatListNILi0EEC2Ev:
 1025|  2.07k|    FormatListN() : FormatList(nullptr, 0) {}
_ZN10tinyformat11formatValueERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcS7_ic:
  385|     14|                        const char* fmtEnd, int /**/, charType value) \
  386|     14|{                                                                     \
  387|     14|    switch (*(fmtEnd-1)) {                                            \
  388|      0|        case 'u': case 'd': case 'i': case 'o': case 'X': case 'x':   \
  ------------------
  |  Branch (388:9): [True: 0, False: 14]
  |  Branch (388:19): [True: 0, False: 14]
  |  Branch (388:29): [True: 0, False: 14]
  |  Branch (388:39): [True: 0, False: 14]
  |  Branch (388:49): [True: 0, False: 14]
  |  Branch (388:59): [True: 0, False: 14]
  ------------------
  389|      0|            out << static_cast<int>(value); break;                    \
  390|     14|        default:                                                      \
  ------------------
  |  Branch (390:9): [True: 14, False: 0]
  ------------------
  391|     14|            out << value;                   break;                    \
  392|     14|    }                                                                 \
  393|     14|}
_ZN10tinyformat6detail21parseWidthOrPrecisionERiRPKcbPKNS0_9FormatArgES1_i:
  593|  89.0k|{
  594|  89.0k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (594:9): [True: 89.0k, False: 0]
  |  Branch (594:22): [True: 0, False: 89.0k]
  ------------------
  595|      0|        n = parseIntAndAdvance(c);
  596|      0|    }
  597|  89.0k|    else if (*c == '*') {
  ------------------
  |  Branch (597:14): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|    else {
  618|  89.0k|        return false;
  619|  89.0k|    }
  620|      0|    return true;
  621|  89.0k|}
_ZN10tinyformat6detail24printFormatStringLiteralERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKc:
  629|   179k|{
  630|   179k|    const char* c = fmt;
  631|   434k|    for (;; ++c) {
  632|   434k|        if (*c == '\0') {
  ------------------
  |  Branch (632:13): [True: 90.5k, False: 343k]
  ------------------
  633|  90.5k|            out.write(fmt, c - fmt);
  634|  90.5k|            return c;
  635|  90.5k|        }
  636|   343k|        else if (*c == '%') {
  ------------------
  |  Branch (636:18): [True: 89.0k, False: 254k]
  ------------------
  637|  89.0k|            out.write(fmt, c - fmt);
  638|  89.0k|            if (*(c+1) != '%')
  ------------------
  |  Branch (638:17): [True: 89.0k, False: 0]
  ------------------
  639|  89.0k|                return c;
  640|       |            // for "%%", tack trailing % onto next literal section.
  641|      0|            fmt = ++c;
  642|      0|        }
  643|   434k|    }
  644|   179k|}
_ZN10tinyformat6detail21streamStateFromFormatERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERbS7_RiPKcPKNS0_9FormatArgES8_i:
  685|  89.0k|{
  686|  89.0k|    TINYFORMAT_ASSERT(*fmtStart == '%');
  ------------------
  |  |  153|  89.0k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  687|       |    // Reset stream state to defaults.
  688|  89.0k|    out.width(0);
  689|  89.0k|    out.precision(6);
  690|  89.0k|    out.fill(' ');
  691|       |    // Reset most flags; ignore irrelevant unitbuf & skipws.
  692|  89.0k|    out.unsetf(std::ios::adjustfield | std::ios::basefield |
  693|  89.0k|               std::ios::floatfield | std::ios::showbase | std::ios::boolalpha |
  694|  89.0k|               std::ios::showpoint | std::ios::showpos | std::ios::uppercase);
  695|  89.0k|    bool precisionSet = false;
  696|  89.0k|    bool widthSet = false;
  697|  89.0k|    int widthExtra = 0;
  698|  89.0k|    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|  89.0k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (702:9): [True: 89.0k, False: 0]
  |  Branch (702:22): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|    else if (positionalMode) {
  ------------------
  |  Branch (731:14): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|    if (!widthSet) {
  ------------------
  |  Branch (735:9): [True: 89.0k, False: 0]
  ------------------
  736|       |        // Parse flags
  737|  89.0k|        for (;; ++c) {
  738|  89.0k|            switch (*c) {
  739|      0|                case '#':
  ------------------
  |  Branch (739:17): [True: 0, False: 89.0k]
  ------------------
  740|      0|                    out.setf(std::ios::showpoint | std::ios::showbase);
  741|      0|                    continue;
  742|      0|                case '0':
  ------------------
  |  Branch (742:17): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  761|      0|                    out.setf(std::ios::showpos);
  762|      0|                    spacePadPositive = false;
  763|      0|                    widthExtra = 1;
  764|      0|                    continue;
  765|  89.0k|                default:
  ------------------
  |  Branch (765:17): [True: 89.0k, False: 0]
  ------------------
  766|  89.0k|                    break;
  767|  89.0k|            }
  768|  89.0k|            break;
  769|  89.0k|        }
  770|       |        // Parse width
  771|  89.0k|        int width = 0;
  772|  89.0k|        widthSet = parseWidthOrPrecision(width, c, positionalMode,
  773|  89.0k|                                         args, argIndex, numArgs);
  774|  89.0k|        if (widthSet) {
  ------------------
  |  Branch (774:13): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|    }
  784|       |    // 3) Parse precision
  785|  89.0k|    if (*c == '.') {
  ------------------
  |  Branch (785:9): [True: 0, False: 89.0k]
  ------------------
  786|      0|        ++c;
  787|      0|        int precision = 0;
  788|      0|        parseWidthOrPrecision(precision, c, positionalMode,
  789|      0|                              args, argIndex, numArgs);
  790|       |        // Presence of `.` indicates precision set, unless the inferred value
  791|       |        // was negative in which case the default is used.
  792|      0|        precisionSet = precision >= 0;
  793|      0|        if (precisionSet)
  ------------------
  |  Branch (793:13): [True: 0, False: 0]
  ------------------
  794|      0|            out.precision(precision);
  795|      0|    }
  796|       |    // 4) Ignore any C99 length modifier
  797|  89.0k|    while (*c == 'l' || *c == 'h' || *c == 'L' ||
  ------------------
  |  Branch (797:12): [True: 0, False: 89.0k]
  |  Branch (797:25): [True: 0, False: 89.0k]
  |  Branch (797:38): [True: 0, False: 89.0k]
  ------------------
  798|  89.0k|           *c == 'j' || *c == 'z' || *c == 't') {
  ------------------
  |  Branch (798:12): [True: 0, False: 89.0k]
  |  Branch (798:25): [True: 0, False: 89.0k]
  |  Branch (798:38): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|    bool intConversion = false;
  805|  89.0k|    switch (*c) {
  806|  83.8k|        case 'u': case 'd': case 'i':
  ------------------
  |  Branch (806:9): [True: 51, False: 88.9k]
  |  Branch (806:19): [True: 621, False: 88.4k]
  |  Branch (806:29): [True: 83.1k, False: 5.88k]
  ------------------
  807|  83.8k|            out.setf(std::ios::dec, std::ios::basefield);
  808|  83.8k|            intConversion = true;
  809|  83.8k|            break;
  810|      0|        case 'o':
  ------------------
  |  Branch (810:9): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  815|      0|            out.setf(std::ios::uppercase);
  816|      0|            [[fallthrough]];
  817|      0|        case 'x': case 'p':
  ------------------
  |  Branch (817:9): [True: 0, False: 89.0k]
  |  Branch (817:19): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  822|      0|            out.setf(std::ios::uppercase);
  823|      0|            [[fallthrough]];
  824|      0|        case 'e':
  ------------------
  |  Branch (824:9): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  829|      0|            out.setf(std::ios::uppercase);
  830|      0|            [[fallthrough]];
  831|      0|        case 'f':
  ------------------
  |  Branch (831:9): [True: 0, False: 89.0k]
  ------------------
  832|      0|            out.setf(std::ios::fixed, std::ios::floatfield);
  833|      0|            break;
  834|      0|        case 'A':
  ------------------
  |  Branch (834:9): [True: 0, False: 89.0k]
  ------------------
  835|      0|            out.setf(std::ios::uppercase);
  836|      0|            [[fallthrough]];
  837|      0|        case 'a':
  ------------------
  |  Branch (837:9): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  847|      0|            out.setf(std::ios::uppercase);
  848|      0|            [[fallthrough]];
  849|      0|        case 'g':
  ------------------
  |  Branch (849:9): [True: 0, False: 89.0k]
  ------------------
  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|     14|        case 'c':
  ------------------
  |  Branch (854:9): [True: 14, False: 89.0k]
  ------------------
  855|       |            // Handled as special case inside formatValue()
  856|     14|            break;
  857|  5.19k|        case 's':
  ------------------
  |  Branch (857:9): [True: 5.19k, False: 83.8k]
  ------------------
  858|  5.19k|            if (precisionSet)
  ------------------
  |  Branch (858:17): [True: 0, False: 5.19k]
  ------------------
  859|      0|                ntrunc = static_cast<int>(out.precision());
  860|       |            // Make %s print Booleans as "true" and "false"
  861|  5.19k|            out.setf(std::ios::boolalpha);
  862|  5.19k|            break;
  863|      0|        case 'n':
  ------------------
  |  Branch (863:9): [True: 0, False: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  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: 89.0k]
  ------------------
  872|      0|            break;
  873|  89.0k|    }
  874|  89.0k|    if (intConversion && precisionSet && !widthSet) {
  ------------------
  |  Branch (874:9): [True: 83.8k, False: 5.21k]
  |  Branch (874:26): [True: 0, False: 83.8k]
  |  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|  89.0k|    return c+1;
  884|  89.0k|}
_ZN10tinyformat6detail10formatImplERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcPKNS0_9FormatArgEi:
  891|  90.5k|{
  892|       |    // Saved stream state
  893|  90.5k|    std::streamsize origWidth = out.width();
  894|  90.5k|    std::streamsize origPrecision = out.precision();
  895|  90.5k|    std::ios::fmtflags origFlags = out.flags();
  896|  90.5k|    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|  90.5k|    bool positionalMode = false;
  901|  90.5k|    int argIndex = 0;
  902|   179k|    while (true) {
  ------------------
  |  Branch (902:12): [Folded - Ignored]
  ------------------
  903|   179k|        fmt = printFormatStringLiteral(out, fmt);
  904|   179k|        if (*fmt == '\0') {
  ------------------
  |  Branch (904:13): [True: 90.5k, False: 89.0k]
  ------------------
  905|  90.5k|            if (!positionalMode && argIndex < numArgs) {
  ------------------
  |  Branch (905:17): [True: 90.5k, False: 0]
  |  Branch (905:36): [True: 0, False: 90.5k]
  ------------------
  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|  90.5k|            break;
  909|  90.5k|        }
  910|  89.0k|        bool spacePadPositive = false;
  911|  89.0k|        int ntrunc = -1;
  912|  89.0k|        const char* fmtEnd = streamStateFromFormat(out, positionalMode, spacePadPositive, ntrunc, fmt,
  913|  89.0k|                                                   args, argIndex, numArgs);
  914|       |        // NB: argIndex may be incremented by reading variable width/precision
  915|       |        // in `streamStateFromFormat`, so do the bounds check here.
  916|  89.0k|        if (argIndex >= numArgs) {
  ------------------
  |  Branch (916:13): [True: 0, False: 89.0k]
  ------------------
  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|  89.0k|        const FormatArg& arg = args[argIndex];
  921|       |        // Format the arg into the stream.
  922|  89.0k|        if (!spacePadPositive) {
  ------------------
  |  Branch (922:13): [True: 89.0k, False: 0]
  ------------------
  923|  89.0k|            arg.format(out, fmt, fmtEnd, ntrunc);
  924|  89.0k|        }
  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|  89.0k|        if (!positionalMode)
  ------------------
  |  Branch (941:13): [True: 89.0k, False: 0]
  ------------------
  942|  89.0k|            ++argIndex;
  943|  89.0k|        fmt = fmtEnd;
  944|  89.0k|    }
  945|       |
  946|       |    // Restore stream state
  947|  90.5k|    out.width(origWidth);
  948|  90.5k|    out.precision(origPrecision);
  949|  90.5k|    out.flags(origFlags);
  950|  90.5k|    out.fill(origFill);
  951|  90.5k|}
_ZN10tinyformat7vformatERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcRKNS_10FormatListE:
 1070|  90.5k|{
 1071|  90.5k|    detail::formatImpl(out, fmt, list.m_args, list.m_N);
 1072|  90.5k|}
_ZN10tinyformat6formatIJiEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  12.7k|{
 1089|  12.7k|    std::ostringstream oss;
 1090|  12.7k|    format(oss, fmt, args...);
 1091|  12.7k|    return oss.str();
 1092|  12.7k|}
_ZN10tinyformat6formatIJiEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  12.7k|{
 1081|  12.7k|    vformat(out, fmt, makeFormatList(args...));
 1082|  12.7k|}
_ZN10tinyformat17FormatStringCheckILj1EEcvPKcEv:
  197|  88.0k|    operator const char*() { return fmt; }
_ZN10tinyformat14makeFormatListIJiEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  12.7k|{
 1045|  12.7k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  12.7k|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJiEEEDpRKT_:
  990|  12.7k|            : FormatList(&m_formatterStore[0], N),
  991|  12.7k|            m_formatterStore { FormatArg(args)... }
  992|  12.7k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2IiEERKT_:
  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|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIiEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  13.3k|        {
  559|  13.3k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  13.3k|        }
_ZN10tinyformat11formatValueIiEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_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 - Ignored]
  |  Branch (365:29): [True: 0, False: 13.3k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  13.3k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded - Ignored]
  |  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|}
_ZN10tinyformat17FormatStringCheckILj1EEC2EN4util21ConstevalFormatStringILj1EEE:
  196|    130|    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
_ZN10tinyformat17FormatStringCheckILj2EEcvPKcEv:
  197|    515|    operator const char*() { return fmt; }
_ZN10tinyformat6detail9FormatArgC2ImEERKT_:
  534|     48|            : m_value(static_cast<const void*>(&value)),
  535|     48|            m_formatImpl(&formatImpl<T>),
  536|     48|            m_toIntImpl(&toIntImpl<T>)
  537|     48|        { }
_ZN10tinyformat6detail9FormatArg10formatImplImEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|     48|        {
  559|     48|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     48|        }
_ZN10tinyformat11formatValueImEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|     48|{
  352|     48|#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|     48|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|     48|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|     48|#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|     48|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|     48|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|     48|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded - Ignored]
  |  Branch (365:29): [True: 0, False: 48]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|     48|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded - Ignored]
  |  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|     48|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 48]
  ------------------
  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|     48|    else
  378|     48|        out << value;
  379|     48|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|      5|{
 1089|      5|    std::ostringstream oss;
 1090|      5|    format(oss, fmt, args...);
 1091|      5|    return oss.str();
 1092|      5|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|      5|{
 1081|      5|    vformat(out, fmt, makeFormatList(args...));
 1082|      5|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|      5|{
 1045|      5|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|      5|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEDpRKT_:
  990|      5|            : FormatList(&m_formatterStore[0], N),
  991|      5|            m_formatterStore { FormatArg(args)... }
  992|      5|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2INSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEERKT_:
  534|  4.81k|            : m_value(static_cast<const void*>(&value)),
  535|  4.81k|            m_formatImpl(&formatImpl<T>),
  536|  4.81k|            m_toIntImpl(&toIntImpl<T>)
  537|  4.81k|        { }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSE_iPKv:
  558|  4.81k|        {
  559|  4.81k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  4.81k|        }
_ZN10tinyformat11formatValueINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSC_iRKT_:
  351|  4.81k|{
  352|  4.81k|#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.81k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  4.81k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  4.81k|#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.81k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  4.81k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  4.81k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded - Ignored]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  4.81k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded - Ignored]
  |  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.81k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 4.81k]
  ------------------
  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.81k|    else
  378|  4.81k|        out << value;
  379|  4.81k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  4.80k|{
 1089|  4.80k|    std::ostringstream oss;
 1090|  4.80k|    format(oss, fmt, args...);
 1091|  4.80k|    return oss.str();
 1092|  4.80k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  4.80k|{
 1081|  4.80k|    vformat(out, fmt, makeFormatList(args...));
 1082|  4.80k|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  4.80k|{
 1045|  4.80k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  4.80k|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEDpRKT_:
  990|  4.80k|            : FormatList(&m_formatterStore[0], N),
  991|  4.80k|            m_formatterStore { FormatArg(args)... }
  992|  4.80k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJcEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     14|{
 1089|     14|    std::ostringstream oss;
 1090|     14|    format(oss, fmt, args...);
 1091|     14|    return oss.str();
 1092|     14|}
_ZN10tinyformat6formatIJcEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     14|{
 1081|     14|    vformat(out, fmt, makeFormatList(args...));
 1082|     14|}
_ZN10tinyformat14makeFormatListIJcEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     14|{
 1045|     14|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     14|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJcEEEDpRKT_:
  990|     14|            : FormatList(&m_formatterStore[0], N),
  991|     14|            m_formatterStore { FormatArg(args)... }
  992|     14|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2IcEERKT_:
  534|     14|            : m_value(static_cast<const void*>(&value)),
  535|     14|            m_formatImpl(&formatImpl<T>),
  536|     14|            m_toIntImpl(&toIntImpl<T>)
  537|     14|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIcEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|     14|        {
  559|     14|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     14|        }
_ZN10tinyformat6formatIJjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  70.3k|{
 1089|  70.3k|    std::ostringstream oss;
 1090|  70.3k|    format(oss, fmt, args...);
 1091|  70.3k|    return oss.str();
 1092|  70.3k|}
_ZN10tinyformat6formatIJjEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  70.3k|{
 1081|  70.3k|    vformat(out, fmt, makeFormatList(args...));
 1082|  70.3k|}
_ZN10tinyformat14makeFormatListIJjEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  70.3k|{
 1045|  70.3k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  70.3k|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJjEEEDpRKT_:
  990|  70.3k|            : FormatList(&m_formatterStore[0], N),
  991|  70.3k|            m_formatterStore { FormatArg(args)... }
  992|  70.3k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2IjEERKT_:
  534|  70.3k|            : m_value(static_cast<const void*>(&value)),
  535|  70.3k|            m_formatImpl(&formatImpl<T>),
  536|  70.3k|            m_toIntImpl(&toIntImpl<T>)
  537|  70.3k|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIjEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  70.3k|        {
  559|  70.3k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  70.3k|        }
_ZN10tinyformat11formatValueIjEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  70.3k|{
  352|  70.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|  70.3k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  70.3k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  70.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|  70.3k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  70.3k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  70.3k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded - Ignored]
  |  Branch (365:29): [True: 0, False: 70.3k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  70.3k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded - Ignored]
  |  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|  70.3k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 70.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|  70.3k|    else
  378|  70.3k|        out << value;
  379|  70.3k|}
_ZN10tinyformat6formatIJmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     23|{
 1089|     23|    std::ostringstream oss;
 1090|     23|    format(oss, fmt, args...);
 1091|     23|    return oss.str();
 1092|     23|}
_ZN10tinyformat6formatIJmEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     23|{
 1081|     23|    vformat(out, fmt, makeFormatList(args...));
 1082|     23|}
_ZN10tinyformat14makeFormatListIJmEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     23|{
 1045|     23|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     23|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJmEEEDpRKT_:
  990|     23|            : FormatList(&m_formatterStore[0], N),
  991|     23|            m_formatterStore { FormatArg(args)... }
  992|     23|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  2.07k|{
 1089|  2.07k|    std::ostringstream oss;
 1090|  2.07k|    format(oss, fmt, args...);
 1091|  2.07k|    return oss.str();
 1092|  2.07k|}
_ZN10tinyformat6formatIJEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  2.07k|{
 1081|  2.07k|    vformat(out, fmt, makeFormatList(args...));
 1082|  2.07k|}
_ZN10tinyformat14makeFormatListIJEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  2.07k|{
 1045|  2.07k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  2.07k|}
_ZN10tinyformat17FormatStringCheckILj0EEcvPKcEv:
  197|  2.07k|    operator const char*() { return fmt; }
_ZN10tinyformat17FormatStringCheckILj2EEC2EN4util21ConstevalFormatStringILj2EEE:
  196|    380|    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
_ZN10tinyformat17FormatStringCheckILj0EEC2EN4util21ConstevalFormatStringILj0EEE:
  196|  2.04k|    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
_ZN10tinyformat6formatIJmiEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     11|{
 1089|     11|    std::ostringstream oss;
 1090|     11|    format(oss, fmt, args...);
 1091|     11|    return oss.str();
 1092|     11|}
_ZN10tinyformat6formatIJmiEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     11|{
 1081|     11|    vformat(out, fmt, makeFormatList(args...));
 1082|     11|}
_ZN10tinyformat14makeFormatListIJmiEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     11|{
 1045|     11|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     11|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJmiEEEDpRKT_:
  990|     11|            : FormatList(&m_formatterStore[0], N),
  991|     11|            m_formatterStore { FormatArg(args)... }
  992|     11|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJmjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|      6|{
 1089|      6|    std::ostringstream oss;
 1090|      6|    format(oss, fmt, args...);
 1091|      6|    return oss.str();
 1092|      6|}
_ZN10tinyformat6formatIJmjEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|      6|{
 1081|      6|    vformat(out, fmt, makeFormatList(args...));
 1082|      6|}
_ZN10tinyformat14makeFormatListIJmjEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|      6|{
 1045|      6|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|      6|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJmjEEEDpRKT_:
  990|      6|            : FormatList(&m_formatterStore[0], N),
  991|      6|            m_formatterStore { FormatArg(args)... }
  992|      6|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJjmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|      8|{
 1089|      8|    std::ostringstream oss;
 1090|      8|    format(oss, fmt, args...);
 1091|      8|    return oss.str();
 1092|      8|}
_ZN10tinyformat6formatIJjmEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|      8|{
 1081|      8|    vformat(out, fmt, makeFormatList(args...));
 1082|      8|}
_ZN10tinyformat14makeFormatListIJjmEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|      8|{
 1045|      8|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|      8|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJjmEEEDpRKT_:
  990|      8|            : FormatList(&m_formatterStore[0], N),
  991|      8|            m_formatterStore { FormatArg(args)... }
  992|      8|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJiiEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|    105|{
 1089|    105|    std::ostringstream oss;
 1090|    105|    format(oss, fmt, args...);
 1091|    105|    return oss.str();
 1092|    105|}
_ZN10tinyformat6formatIJiiEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|    105|{
 1081|    105|    vformat(out, fmt, makeFormatList(args...));
 1082|    105|}
_ZN10tinyformat14makeFormatListIJiiEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|    105|{
 1045|    105|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|    105|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJiiEEEDpRKT_:
  990|    105|            : FormatList(&m_formatterStore[0], N),
  991|    105|            m_formatterStore { FormatArg(args)... }
  992|    105|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2IA20_cEERKT_:
  534|    380|            : m_value(static_cast<const void*>(&value)),
  535|    380|            m_formatImpl(&formatImpl<T>),
  536|    380|            m_toIntImpl(&toIntImpl<T>)
  537|    380|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIA20_cEEvRNSt3__113basic_ostreamIcNS4_11char_traitsIcEEEEPKcSB_iPKv:
  558|    380|        {
  559|    380|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|    380|        }
_ZN10tinyformat11formatValueIA20_cEEvRNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEPKcS9_iRKT_:
  351|    380|{
  352|    380|#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|    380|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|    380|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|    380|#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|    380|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|    380|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|    380|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded - Ignored]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|    380|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded - Ignored]
  |  Branch (367:37): [True: 0, False: 380]
  ------------------
  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|    380|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 380]
  ------------------
  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|    380|    else
  378|    380|        out << value;
  379|    380|}
_ZN10tinyformat6formatIJA20_ciEEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|    380|{
 1089|    380|    std::ostringstream oss;
 1090|    380|    format(oss, fmt, args...);
 1091|    380|    return oss.str();
 1092|    380|}
_ZN10tinyformat6formatIJA20_ciEEEvRNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|    380|{
 1081|    380|    vformat(out, fmt, makeFormatList(args...));
 1082|    380|}
_ZN10tinyformat14makeFormatListIJA20_ciEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|    380|{
 1045|    380|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|    380|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJA20_ciEEEDpRKT_:
  990|    380|            : FormatList(&m_formatterStore[0], N),
  991|    380|            m_formatterStore { FormatArg(args)... }
  992|    380|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }

_ZN16TxRequestTrackerD2Ev:
  725|      2|TxRequestTracker::~TxRequestTracker() = default;

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

_ZN7uint160C2E4SpanIKhE:
  193|  86.0k|    constexpr explicit uint160(Span<const unsigned char> vch) : base_blob<160>(vch) {}
_ZN7uint256C2E4SpanIKhE:
  208|   609k|    constexpr explicit uint256(Span<const unsigned char> vch) : base_blob<256>(vch) {}
_ZN9base_blobILj256EE5beginEv:
  115|   289k|    constexpr unsigned char* begin() { return m_data.data(); }
_ZN9base_blobILj160EE5beginEv:
  115|  1.55M|    constexpr unsigned char* begin() { return m_data.data(); }
_ZNK9base_blobILj256EE6IsNullEv:
   49|  26.2k|    {
   50|  26.2k|        return std::all_of(m_data.begin(), m_data.end(), [](uint8_t val) {
   51|  26.2k|            return val == 0;
   52|  26.2k|        });
   53|  26.2k|    }
_ZNK9base_blobILj256EE5beginEv:
  118|  1.11M|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZN9base_blobILj256EE4sizeEv:
  121|   799k|    static constexpr unsigned int size() { return WIDTH; }
_ZNK9base_blobILj256EE3endEv:
  119|   617k|    constexpr const unsigned char* end() const { return m_data.data() + WIDTH; }
_ZNK9base_blobILj256EE7CompareERKS0_:
   64|   532k|    constexpr int Compare(const base_blob& other) const { return std::memcmp(m_data.data(), other.m_data.data(), WIDTH); }
_ZeqRK9base_blobILj256EES2_:
   66|  86.7k|    friend constexpr bool operator==(const base_blob& a, const base_blob& b) { return a.Compare(b) == 0; }
_ZltRK9base_blobILj256EES2_:
   68|  68.3k|    friend constexpr bool operator<(const base_blob& a, const base_blob& b) { return a.Compare(b) < 0; }
_ZN9base_blobILj256EE7SetNullEv:
   56|      2|    {
   57|      2|        std::fill(m_data.begin(), m_data.end(), 0);
   58|      2|    }
_ZNK9base_blobILj256EE4dataEv:
  112|  18.5k|    constexpr const unsigned char* data() const { return m_data.data(); }
_ZN9base_blobILj160EE4sizeEv:
  121|  1.87M|    static constexpr unsigned int size() { return WIDTH; }
_ZN9base_blobILj160EE4dataEv:
  113|  1.83M|    constexpr unsigned char* data() { return m_data.data(); }
_ZN9base_blobILj256EE4dataEv:
  113|  1.26M|    constexpr unsigned char* data() { return m_data.data(); }
_ZN7uint256C2Ev:
  205|  2.53M|    constexpr uint256() = default;
_ZN9base_blobILj256EEC2Ev:
   35|  2.53M|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj256EEC2E4SpanIKhE:
   41|   609k|    {
   42|   609k|        assert(vch.size() == WIDTH);
   43|   609k|        std::copy(vch.begin(), vch.end(), m_data.begin());
   44|   609k|    }
_ZNK9base_blobILj160EE4dataEv:
  112|  41.8k|    constexpr const unsigned char* data() const { return m_data.data(); }
_ZNK9base_blobILj160EE7CompareERKS0_:
   64|  4.12M|    constexpr int Compare(const base_blob& other) const { return std::memcmp(m_data.data(), other.m_data.data(), WIDTH); }
_ZltRK9base_blobILj160EES2_:
   68|  4.11M|    friend constexpr bool operator<(const base_blob& a, const base_blob& b) { return a.Compare(b) < 0; }
_ZN9base_blobILj256EE11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
  133|   109k|    {
  134|   109k|        s.read(MakeWritableByteSpan(m_data));
  135|   109k|    }
_ZN9base_blobILj256EE11UnserializeI10DataStreamEEvRT_:
  133|  15.9k|    {
  134|  15.9k|        s.read(MakeWritableByteSpan(m_data));
  135|  15.9k|    }
_ZZNK9base_blobILj256EE6IsNullEvENKUlhE_clEh:
   50|   100k|        return std::all_of(m_data.begin(), m_data.end(), [](uint8_t val) {
   51|   100k|            return val == 0;
   52|   100k|        });
_ZN7uint160C2Ev:
  192|  1.92M|    constexpr uint160() = default;
_ZN9base_blobILj160EEC2Ev:
   35|  1.92M|    constexpr base_blob() : m_data() {}
_ZNK9base_blobILj256EE9SerializeI10DataStreamEEvRT_:
  127|  93.7k|    {
  128|  93.7k|        s << Span(m_data);
  129|  93.7k|    }
_ZN9base_blobILj160EEC2E4SpanIKhE:
   41|  86.0k|    {
   42|  86.0k|        assert(vch.size() == WIDTH);
   43|  86.0k|        std::copy(vch.begin(), vch.end(), m_data.begin());
   44|  86.0k|    }
_ZN9base_blobILj256EE11UnserializeI10SpanReaderEEvRT_:
  133|  2.67k|    {
  134|  2.67k|        s.read(MakeWritableByteSpan(m_data));
  135|  2.67k|    }
_ZeqRK9base_blobILj160EES2_:
   66|  11.0k|    friend constexpr bool operator==(const base_blob& a, const base_blob& b) { return a.Compare(b) == 0; }
_ZNK9base_blobILj160EE5beginEv:
  118|  84.6k|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZNK9base_blobILj160EE3endEv:
  119|  84.6k|    constexpr const unsigned char* end() const { return m_data.data() + WIDTH; }
_ZN9base_blobILj160EE7SetNullEv:
   56|  23.2k|    {
   57|  23.2k|        std::fill(m_data.begin(), m_data.end(), 0);
   58|  23.2k|    }
_ZN9base_blobILj160EE3endEv:
  116|  1.26k|    constexpr unsigned char* end() { return m_data.data() + WIDTH; }
_ZNK9base_blobILj256EE9SerializeI10HashWriterEEvRT_:
  127|   114k|    {
  128|   114k|        s << Span(m_data);
  129|   114k|    }
_ZNK9base_blobILj256EE9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
  127|   105k|    {
  128|   105k|        s << Span(m_data);
  129|   105k|    }

_Z15FormatHDKeypathRKNSt3__16vectorIjNS_9allocatorIjEEEEb:
   55|   291k|{
   56|   291k|    std::string ret;
   57|   291k|    for (auto i : path) {
  ------------------
  |  Branch (57:17): [True: 70.3k, False: 291k]
  ------------------
   58|  70.3k|        ret += strprintf("/%i", (i << 1) >> 1);
  ------------------
  |  | 1172|  70.3k|#define strprintf tfm::format
  ------------------
   59|  70.3k|        if (i >> 31) ret += apostrophe ? '\'' : 'h';
  ------------------
  |  Branch (59:13): [True: 12.0k, False: 58.2k]
  |  Branch (59:29): [True: 8.53k, False: 3.55k]
  ------------------
   60|  70.3k|    }
   61|   291k|    return ret;
   62|   291k|}

_Z22inline_assertion_checkILb0EbEOT0_S1_PKciS3_S3_:
   52|  64.8k|{
   53|  64.8k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  64.8k|    ) {
   58|  64.8k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 64.8k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  64.8k|    }
   62|  64.8k|    return std::forward<T>(val);
   63|  64.8k|}
_Z22inline_assertion_checkILb1ERKNSt3__110unique_ptrI14LevelDBContextNS0_14default_deleteIS2_EEEEEOT0_S9_PKciSB_SB_:
   52|     40|{
   53|     40|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|     40|    ) {
   58|     40|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 40]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|     40|    }
   62|     40|    return std::forward<T>(val);
   63|     40|}
_Z22inline_check_non_fatalIbEOT_S1_PKciS3_S3_:
   35|  4.81k|{
   36|  4.81k|    if (!val) {
  ------------------
  |  Branch (36:9): [True: 0, False: 4.81k]
  ------------------
   37|      0|        throw NonFatalCheckError{assertion, file, line, func};
   38|      0|    }
   39|  4.81k|    return std::forward<T>(val);
   40|  4.81k|}
_Z22inline_check_non_fatalIRKbEOT_S3_PKciS5_S5_:
   35|     14|{
   36|     14|    if (!val) {
  ------------------
  |  Branch (36:9): [True: 0, False: 14]
  ------------------
   37|      0|        throw NonFatalCheckError{assertion, file, line, func};
   38|      0|    }
   39|     14|    return std::forward<T>(val);
   40|     14|}
_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|  35.0k|{
   53|  35.0k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  35.0k|    ) {
   58|  35.0k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 35.0k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  35.0k|    }
   62|  35.0k|    return std::forward<T>(val);
   63|  35.0k|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|  11.6k|{
   53|  11.6k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  11.6k|    ) {
   58|  11.6k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 11.6k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  11.6k|    }
   62|  11.6k|    return std::forward<T>(val);
   63|  11.6k|}
_Z22inline_assertion_checkILb1ERNSt3__16atomicIbEEEOT0_S5_PKciS7_S7_:
   52|  11.6k|{
   53|  11.6k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  11.6k|    ) {
   58|  11.6k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 11.6k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  11.6k|    }
   62|  11.6k|    return std::forward<T>(val);
   63|  11.6k|}

_ZN8BaseHashI7uint160EC2ERKS0_:
   16|   108k|    explicit BaseHash(const HashType& in) : m_hash(in) {}
_ZNK8BaseHashI7uint160EeqERKS1_:
   49|  11.0k|    {
   50|  11.0k|        return m_hash == other.m_hash;
   51|  11.0k|    }
_ZN8BaseHashI7uint256E5beginEv:
   19|  6.03k|    {
   20|  6.03k|        return m_hash.begin();
   21|  6.03k|    }
_ZNK8BaseHashI7uint160EltERKS1_:
   59|  8.72k|    {
   60|  8.72k|        return m_hash < other.m_hash;
   61|  8.72k|    }
_ZNK8BaseHashI7uint256EltERKS1_:
   59|      8|    {
   60|      8|        return m_hash < other.m_hash;
   61|      8|    }
_ZNK8BaseHashI7uint160E4dataEv:
   69|  41.8k|    const unsigned char* data() const { return m_hash.data(); }
_ZNK8BaseHashI7uint160E4sizeEv:
   64|  41.8k|    {
   65|  41.8k|        return m_hash.size();
   66|  41.8k|    }
_ZN8BaseHashI7uint160EC2Ev:
   15|  4.63k|    BaseHash() : m_hash() {}
_ZNK8BaseHashI7uint160E5beginEv:
   24|  83.7k|    {
   25|  83.7k|        return m_hash.begin();
   26|  83.7k|    }
_ZNK8BaseHashI7uint160E3endEv:
   34|  83.7k|    {
   35|  83.7k|        return m_hash.end();
   36|  83.7k|    }
_ZNK8BaseHashI7uint256E5beginEv:
   24|  4.87k|    {
   25|  4.87k|        return m_hash.begin();
   26|  4.87k|    }
_ZNK8BaseHashI7uint256E3endEv:
   34|  4.87k|    {
   35|  4.87k|        return m_hash.end();
   36|  4.87k|    }
_ZN8BaseHashI7uint256EC2Ev:
   15|  6.03k|    BaseHash() : m_hash() {}
_ZN8BaseHashI7uint160E5beginEv:
   19|  4.63k|    {
   20|  4.63k|        return m_hash.begin();
   21|  4.63k|    }

_ZN16SaltedTxidHasherC2Ev:
   11|  11.6k|    k0{FastRandomContext().rand64()},
   12|  11.6k|    k1{FastRandomContext().rand64()} {}
_ZN20SaltedOutpointHasherC2Eb:
   15|  11.6k|    k0{deterministic ? 0x8e819f2607a18de6 : FastRandomContext().rand64()},
  ------------------
  |  Branch (15:8): [True: 0, False: 11.6k]
  ------------------
   16|  11.6k|    k1{deterministic ? 0xf4020d2e3983b0eb : FastRandomContext().rand64()}
  ------------------
  |  Branch (16:8): [True: 0, False: 11.6k]
  ------------------
   17|  11.6k|{}
_ZN15SaltedSipHasherC2Ev:
   20|  27.1k|    m_k0{FastRandomContext().rand64()},
   21|  27.1k|    m_k1{FastRandomContext().rand64()} {}
_ZNK15SaltedSipHasherclERK4SpanIKhE:
   24|  69.0k|{
   25|  69.0k|    return CSipHasher(m_k0, m_k1).Write(script).Finalize();
   26|  69.0k|}

_Z16AdditionOverflowImEbT_S0_:
   16|   791k|{
   17|   791k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   19|       |        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
   20|       |               (i < 0 && j < std::numeric_limits<T>::min() - i);
   21|       |    }
   22|   791k|    return std::numeric_limits<T>::max() - i < j;
   23|   791k|}
_Z10CheckedAddImENSt3__18optionalIT_EES2_S2_:
   27|   791k|{
   28|   791k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 0, False: 791k]
  ------------------
   29|      0|        return std::nullopt;
   30|      0|    }
   31|   791k|    return i + j;
   32|   791k|}

_ZNK4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEEcvbEv:
   85|  11.2k|    explicit operator bool() const noexcept { return has_value(); }
_ZNK4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEE9has_valueEv:
   64|  20.9k|    bool has_value() const noexcept { return m_variant.index() == 1; }
_ZN4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEEdeEv:
   89|  9.70k|    T& operator*() LIFETIMEBOUND { return value(); }
_ZN4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEE5valueEv:
   71|  9.70k|    {
   72|  9.70k|        assert(has_value());
   73|  9.70k|        return std::get<1>(m_variant);
   74|  9.70k|    }
_ZN4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEED2Ev:
   60|  11.2k|    ~Result() = default;
_ZN4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEEC2ENS_5ErrorE:
   58|  1.52k|    Result(Error error) : m_variant{std::in_place_index_t<0>{}, std::move(error.message)} {}
_ZN4util6ResultINSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEEEC2ESC_:
   57|  9.70k|    Result(T obj) : m_variant{std::in_place_index_t<1>{}, std::move(obj)} {}

_Z5IsHexNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
   42|  77.5k|{
   43|  4.43M|    for (char c : str) {
  ------------------
  |  Branch (43:17): [True: 4.43M, False: 9.01k]
  ------------------
   44|  4.43M|        if (HexDigit(c) < 0) return false;
  ------------------
  |  Branch (44:13): [True: 68.5k, False: 4.36M]
  ------------------
   45|  4.43M|    }
   46|  9.01k|    return (str.size() > 0) && (str.size()%2 == 0);
  ------------------
  |  Branch (46:12): [True: 9.01k, False: 1]
  |  Branch (46:32): [True: 8.98k, False: 24]
  ------------------
   47|  77.5k|}
_Z11TryParseHexIhENSt3__18optionalINS0_6vectorIT_NS0_9allocatorIS3_EEEEEENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   51|   956k|{
   52|   956k|    std::vector<Byte> vch;
   53|   956k|    vch.reserve(str.size() / 2); // two hex characters form a single byte
   54|       |
   55|   956k|    auto it = str.begin();
   56|  3.76M|    while (it != str.end()) {
  ------------------
  |  Branch (56:12): [True: 2.81M, False: 956k]
  ------------------
   57|  2.81M|        if (IsSpace(*it)) {
  ------------------
  |  Branch (57:13): [True: 18, False: 2.81M]
  ------------------
   58|     18|            ++it;
   59|     18|            continue;
   60|     18|        }
   61|  2.81M|        auto c1 = HexDigit(*(it++));
   62|  2.81M|        if (it == str.end()) return std::nullopt;
  ------------------
  |  Branch (62:13): [True: 6, False: 2.81M]
  ------------------
   63|  2.81M|        auto c2 = HexDigit(*(it++));
   64|  2.81M|        if (c1 < 0 || c2 < 0) return std::nullopt;
  ------------------
  |  Branch (64:13): [True: 43, False: 2.81M]
  |  Branch (64:23): [True: 7, False: 2.81M]
  ------------------
   65|  2.81M|        vch.push_back(Byte(c1 << 4) | Byte(c2));
   66|  2.81M|    }
   67|   956k|    return vch;
   68|   956k|}
_Z12EncodeBase644SpanIKhE:
  100|  14.7k|{
  101|  14.7k|    static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  102|       |
  103|  14.7k|    std::string str;
  104|  14.7k|    str.reserve(((input.size() + 2) / 3) * 4);
  105|  14.7k|    ConvertBits<8, 6, true>([&](int v) { str += pbase64[v]; }, input.begin(), input.end());
  106|  29.4k|    while (str.size() % 4) str += '=';
  ------------------
  |  Branch (106:12): [True: 14.7k, False: 14.7k]
  ------------------
  107|  14.7k|    return str;
  108|  14.7k|}
_Z11ParseUInt32NSt3__117basic_string_viewIcNS_11char_traitsIcEEEEPj:
  245|  36.2k|{
  246|  36.2k|    return ParseIntegral<uint32_t>(str, out);
  247|  36.2k|}
_Z7ToLowerNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
  416|    253|{
  417|    253|    std::string r;
  418|    253|    r.reserve(str.size());
  419|    502|    for (auto ch : str) r += ToLower(ch);
  ------------------
  |  Branch (419:18): [True: 502, False: 253]
  ------------------
  420|    253|    return r;
  421|    253|}
strencodings.cpp:_ZZ12EncodeBase644SpanIKhEENK3$_0clEi:
  105|  1.27M|    ConvertBits<8, 6, true>([&](int v) { str += pbase64[v]; }, input.begin(), input.end());
strencodings.cpp:_ZN12_GLOBAL__N_113ParseIntegralIjEEbNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPT_:
  206|  36.2k|{
  207|  36.2k|    static_assert(std::is_integral<T>::value);
  208|       |    // Replicate the exact behavior of strtol/strtoll/strtoul/strtoull when
  209|       |    // handling leading +/- for backwards compatibility.
  210|  36.2k|    if (str.length() >= 2 && str[0] == '+' && str[1] == '-') {
  ------------------
  |  Branch (210:9): [True: 25.4k, False: 10.8k]
  |  Branch (210:30): [True: 115, False: 25.3k]
  |  Branch (210:47): [True: 1, False: 114]
  ------------------
  211|      1|        return false;
  212|      1|    }
  213|  36.2k|    const std::optional<T> opt_int = ToIntegral<T>((!str.empty() && str[0] == '+') ? str.substr(1) : str);
  ------------------
  |  Branch (213:53): [True: 36.2k, False: 9]
  |  Branch (213:69): [True: 114, False: 36.1k]
  ------------------
  214|  36.2k|    if (!opt_int) {
  ------------------
  |  Branch (214:9): [True: 140, False: 36.1k]
  ------------------
  215|    140|        return false;
  216|    140|    }
  217|  36.1k|    if (out != nullptr) {
  ------------------
  |  Branch (217:9): [True: 36.1k, False: 0]
  ------------------
  218|  36.1k|        *out = *opt_int;
  219|  36.1k|    }
  220|  36.1k|    return true;
  221|  36.2k|}

_Z7IsSpacec:
  166|  17.8M|constexpr inline bool IsSpace(char c) noexcept {
  167|  17.8M|    return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v';
  ------------------
  |  Branch (167:12): [True: 3.27k, False: 17.8M]
  |  Branch (167:24): [True: 4, False: 17.8M]
  |  Branch (167:37): [True: 3, False: 17.8M]
  |  Branch (167:50): [True: 3, False: 17.8M]
  |  Branch (167:63): [True: 3, False: 17.8M]
  |  Branch (167:76): [True: 1, False: 17.8M]
  ------------------
  168|  17.8M|}
_Z7ToLowerc:
  305|    502|{
  306|    502|    return (c >= 'A' && c <= 'Z' ? (c - 'A') + 'a' : c);
  ------------------
  |  Branch (306:13): [True: 458, False: 44]
  |  Branch (306:25): [True: 103, False: 355]
  ------------------
  307|    502|}
_Z8ParseHexIhENSt3__16vectorIT_NS0_9allocatorIS2_EEEENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   69|   956k|{
   70|   956k|    return TryParseHex<Byte>(hex_str).value_or(std::vector<Byte>{});
   71|   956k|}
key_io.cpp:_ZNK12_GLOBAL__N_111IntIdentityclEi:
  263|  26.1k|    [[maybe_unused]] int operator()(int x) const { return x; }
_Z10ToIntegralIlENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
  180|  18.7k|{
  181|  18.7k|    static_assert(std::is_integral<T>::value);
  182|  18.7k|    T result;
  183|  18.7k|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
  184|  18.7k|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (184:9): [True: 57, False: 18.7k]
  |  Branch (184:57): [True: 13, False: 18.6k]
  ------------------
  185|     70|        return std::nullopt;
  186|     70|    }
  187|  18.6k|    return result;
  188|  18.7k|}
key_io.cpp:_Z11ConvertBitsILi8ELi5ELb1EZNK12_GLOBAL__N_118DestinationEncoderclERK19WitnessV0ScriptHashEUlhE_PKhNS0_11IntIdentityEEbT2_T3_SA_T4_:
  270|    224|bool ConvertBits(O outfn, It it, It end, I infn = {}) {
  271|    224|    size_t acc = 0;
  272|    224|    size_t bits = 0;
  273|    224|    constexpr size_t maxv = (1 << tobits) - 1;
  274|    224|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  275|  7.39k|    while (it != end) {
  ------------------
  |  Branch (275:12): [True: 7.16k, False: 224]
  ------------------
  276|  7.16k|        int v = infn(*it);
  277|  7.16k|        if (v < 0) return false;
  ------------------
  |  Branch (277:13): [True: 0, False: 7.16k]
  ------------------
  278|  7.16k|        acc = ((acc << frombits) | v) & max_acc;
  279|  7.16k|        bits += frombits;
  280|  18.5k|        while (bits >= tobits) {
  ------------------
  |  Branch (280:16): [True: 11.4k, False: 7.16k]
  ------------------
  281|  11.4k|            bits -= tobits;
  282|  11.4k|            outfn((acc >> bits) & maxv);
  283|  11.4k|        }
  284|  7.16k|        ++it;
  285|  7.16k|    }
  286|    224|    if (pad) {
  ------------------
  |  Branch (286:9): [Folded - Ignored]
  ------------------
  287|    224|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (287:13): [True: 224, False: 0]
  ------------------
  288|    224|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (288:16): [True: 0, False: 0]
  |  Branch (288:36): [True: 0, False: 0]
  ------------------
  289|      0|        return false;
  290|      0|    }
  291|    224|    return true;
  292|    224|}
key_io.cpp:_Z11ConvertBitsILi8ELi5ELb1EZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV0KeyHashEUlhE_PKhNS0_11IntIdentityEEbT2_T3_SA_T4_:
  270|    135|bool ConvertBits(O outfn, It it, It end, I infn = {}) {
  271|    135|    size_t acc = 0;
  272|    135|    size_t bits = 0;
  273|    135|    constexpr size_t maxv = (1 << tobits) - 1;
  274|    135|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  275|  2.83k|    while (it != end) {
  ------------------
  |  Branch (275:12): [True: 2.70k, False: 135]
  ------------------
  276|  2.70k|        int v = infn(*it);
  277|  2.70k|        if (v < 0) return false;
  ------------------
  |  Branch (277:13): [True: 0, False: 2.70k]
  ------------------
  278|  2.70k|        acc = ((acc << frombits) | v) & max_acc;
  279|  2.70k|        bits += frombits;
  280|  7.02k|        while (bits >= tobits) {
  ------------------
  |  Branch (280:16): [True: 4.32k, False: 2.70k]
  ------------------
  281|  4.32k|            bits -= tobits;
  282|  4.32k|            outfn((acc >> bits) & maxv);
  283|  4.32k|        }
  284|  2.70k|        ++it;
  285|  2.70k|    }
  286|    135|    if (pad) {
  ------------------
  |  Branch (286:9): [Folded - Ignored]
  ------------------
  287|    135|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (287:13): [True: 0, False: 135]
  ------------------
  288|    135|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (288:16): [True: 0, False: 0]
  |  Branch (288:36): [True: 0, False: 0]
  ------------------
  289|      0|        return false;
  290|      0|    }
  291|    135|    return true;
  292|    135|}
key_io.cpp:_Z11ConvertBitsILi8ELi5ELb1EZNK12_GLOBAL__N_118DestinationEncoderclERK16WitnessV1TaprootEUlhE_PKhNS0_11IntIdentityEEbT2_T3_SA_T4_:
  270|    321|bool ConvertBits(O outfn, It it, It end, I infn = {}) {
  271|    321|    size_t acc = 0;
  272|    321|    size_t bits = 0;
  273|    321|    constexpr size_t maxv = (1 << tobits) - 1;
  274|    321|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  275|  10.5k|    while (it != end) {
  ------------------
  |  Branch (275:12): [True: 10.2k, False: 321]
  ------------------
  276|  10.2k|        int v = infn(*it);
  277|  10.2k|        if (v < 0) return false;
  ------------------
  |  Branch (277:13): [True: 0, False: 10.2k]
  ------------------
  278|  10.2k|        acc = ((acc << frombits) | v) & max_acc;
  279|  10.2k|        bits += frombits;
  280|  26.6k|        while (bits >= tobits) {
  ------------------
  |  Branch (280:16): [True: 16.3k, False: 10.2k]
  ------------------
  281|  16.3k|            bits -= tobits;
  282|  16.3k|            outfn((acc >> bits) & maxv);
  283|  16.3k|        }
  284|  10.2k|        ++it;
  285|  10.2k|    }
  286|    321|    if (pad) {
  ------------------
  |  Branch (286:9): [Folded - Ignored]
  ------------------
  287|    321|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (287:13): [True: 321, False: 0]
  ------------------
  288|    321|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (288:16): [True: 0, False: 0]
  |  Branch (288:36): [True: 0, False: 0]
  ------------------
  289|      0|        return false;
  290|      0|    }
  291|    321|    return true;
  292|    321|}
key_io.cpp:_Z11ConvertBitsILi8ELi5ELb1EZNK12_GLOBAL__N_118DestinationEncoderclERK14WitnessUnknownEUlhE_NSt3__111__wrap_iterIPKhEENS0_11IntIdentityEEbT2_T3_SD_T4_:
  270|    222|bool ConvertBits(O outfn, It it, It end, I infn = {}) {
  271|    222|    size_t acc = 0;
  272|    222|    size_t bits = 0;
  273|    222|    constexpr size_t maxv = (1 << tobits) - 1;
  274|    222|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  275|  6.25k|    while (it != end) {
  ------------------
  |  Branch (275:12): [True: 6.03k, False: 222]
  ------------------
  276|  6.03k|        int v = infn(*it);
  277|  6.03k|        if (v < 0) return false;
  ------------------
  |  Branch (277:13): [True: 0, False: 6.03k]
  ------------------
  278|  6.03k|        acc = ((acc << frombits) | v) & max_acc;
  279|  6.03k|        bits += frombits;
  280|  15.5k|        while (bits >= tobits) {
  ------------------
  |  Branch (280:16): [True: 9.49k, False: 6.03k]
  ------------------
  281|  9.49k|            bits -= tobits;
  282|  9.49k|            outfn((acc >> bits) & maxv);
  283|  9.49k|        }
  284|  6.03k|        ++it;
  285|  6.03k|    }
  286|    222|    if (pad) {
  ------------------
  |  Branch (286:9): [Folded - Ignored]
  ------------------
  287|    222|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (287:13): [True: 221, False: 1]
  ------------------
  288|    222|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (288:16): [True: 0, False: 0]
  |  Branch (288:36): [True: 0, False: 0]
  ------------------
  289|      0|        return false;
  290|      0|    }
  291|    222|    return true;
  292|    222|}
strencodings.cpp:_Z11ConvertBitsILi8ELi6ELb1EZ12EncodeBase644SpanIKhEE3$_0PS1_N12_GLOBAL__N_111IntIdentityEEbT2_T3_S8_T4_:
  270|  14.7k|bool ConvertBits(O outfn, It it, It end, I infn = {}) {
  271|  14.7k|    size_t acc = 0;
  272|  14.7k|    size_t bits = 0;
  273|  14.7k|    constexpr size_t maxv = (1 << tobits) - 1;
  274|  14.7k|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  275|   970k|    while (it != end) {
  ------------------
  |  Branch (275:12): [True: 955k, False: 14.7k]
  ------------------
  276|   955k|        int v = infn(*it);
  277|   955k|        if (v < 0) return false;
  ------------------
  |  Branch (277:13): [True: 0, False: 955k]
  ------------------
  278|   955k|        acc = ((acc << frombits) | v) & max_acc;
  279|   955k|        bits += frombits;
  280|  2.22M|        while (bits >= tobits) {
  ------------------
  |  Branch (280:16): [True: 1.26M, False: 955k]
  ------------------
  281|  1.26M|            bits -= tobits;
  282|  1.26M|            outfn((acc >> bits) & maxv);
  283|  1.26M|        }
  284|   955k|        ++it;
  285|   955k|    }
  286|  14.7k|    if (pad) {
  ------------------
  |  Branch (286:9): [Folded - Ignored]
  ------------------
  287|  14.7k|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (287:13): [True: 14.7k, False: 0]
  ------------------
  288|  14.7k|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (288:16): [True: 0, False: 0]
  |  Branch (288:36): [True: 0, False: 0]
  ------------------
  289|      0|        return false;
  290|      0|    }
  291|  14.7k|    return true;
  292|  14.7k|}
strencodings.cpp:_ZNK12_GLOBAL__N_111IntIdentityclEi:
  263|   955k|    [[maybe_unused]] int operator()(int x) const { return x; }
_Z10ToIntegralIhENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
  180|     10|{
  181|     10|    static_assert(std::is_integral<T>::value);
  182|     10|    T result;
  183|     10|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
  184|     10|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (184:9): [True: 0, False: 10]
  |  Branch (184:57): [True: 0, False: 10]
  ------------------
  185|      0|        return std::nullopt;
  186|      0|    }
  187|     10|    return result;
  188|     10|}
_Z10ToIntegralItENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
  180|      2|{
  181|      2|    static_assert(std::is_integral<T>::value);
  182|      2|    T result;
  183|      2|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
  184|      2|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (184:9): [True: 0, False: 2]
  |  Branch (184:57): [True: 0, False: 2]
  ------------------
  185|      0|        return std::nullopt;
  186|      0|    }
  187|      2|    return result;
  188|      2|}
_Z10ToIntegralIjENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
  180|  36.2k|{
  181|  36.2k|    static_assert(std::is_integral<T>::value);
  182|  36.2k|    T result;
  183|  36.2k|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
  184|  36.2k|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (184:9): [True: 123, False: 36.1k]
  |  Branch (184:57): [True: 17, False: 36.1k]
  ------------------
  185|    140|        return std::nullopt;
  186|    140|    }
  187|  36.1k|    return result;
  188|  36.2k|}

_ZN4util13ContainsNoNULENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  222|   168k|{
  223|  34.2M|    for (auto c : str) {
  ------------------
  |  Branch (223:17): [True: 34.2M, False: 168k]
  ------------------
  224|  34.2M|        if (c == 0) return false;
  ------------------
  |  Branch (224:13): [True: 0, False: 34.2M]
  ------------------
  225|  34.2M|    }
  226|   168k|    return true;
  227|   168k|}
_ZN4util8ToStringIjEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKT_:
  234|  2.76k|{
  235|  2.76k|    std::ostringstream oss;
  236|  2.76k|    oss.imbue(std::locale::classic());
  237|  2.76k|    oss << t;
  238|  2.76k|    return oss.str();
  239|  2.76k|}
_ZN4util5SplitI4SpanIKcEEENSt3__16vectorIT_NS4_9allocatorIS6_EEEERKS3_c:
  132|   218k|{
  133|   218k|    return Split<T>(sp, std::string_view{&sep, 1});
  134|   218k|}
_ZN4util5SplitI4SpanIKcEEENSt3__16vectorIT_NS4_9allocatorIS6_EEEERKS3_NS4_17basic_string_viewIcNS4_11char_traitsIcEEEE:
  108|   218k|{
  109|   218k|    std::vector<T> ret;
  110|   218k|    auto it = sp.begin();
  111|   218k|    auto start = it;
  112|   179M|    while (it != sp.end()) {
  ------------------
  |  Branch (112:12): [True: 179M, False: 218k]
  ------------------
  113|   179M|        if (separators.find(*it) != std::string::npos) {
  ------------------
  |  Branch (113:13): [True: 1.09M, False: 178M]
  ------------------
  114|  1.09M|            ret.emplace_back(start, it);
  115|  1.09M|            start = it + 1;
  116|  1.09M|        }
  117|   179M|        ++it;
  118|   179M|    }
  119|   218k|    ret.emplace_back(start, it);
  120|   218k|    return ret;
  121|   218k|}

_ZN4util19TaskRunnerInterfaceD2Ev:
   22|      2|    virtual ~TaskRunnerInterface() = default;

_ZN16CThreadInterruptclEv:
   23|      4|{
   24|      4|    {
   25|      4|        LOCK(mut);
  ------------------
  |  |  257|      4|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      4|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      4|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      4|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   26|      4|        flag.store(true, std::memory_order_release);
   27|      4|    }
   28|      4|    cond.notify_all();
   29|      4|}

_ZN9NodeClock3nowEv:
   27|  11.6k|{
   28|  11.6k|    const auto mocktime{g_mock_time.load(std::memory_order_relaxed)};
   29|  11.6k|    if (!mocktime.count()) {
  ------------------
  |  Branch (29:9): [True: 1, False: 11.6k]
  ------------------
   30|      1|        g_used_system_time = true;
   31|      1|    }
   32|  11.6k|    const auto ret{
   33|  11.6k|        mocktime.count() ?
  ------------------
  |  Branch (33:9): [True: 11.6k, False: 1]
  ------------------
   34|  11.6k|            mocktime :
   35|  11.6k|            std::chrono::system_clock::now().time_since_epoch()};
   36|  11.6k|    assert(ret > 0s);
   37|  11.6k|    return time_point{ret};
   38|  11.6k|};
_Z11SetMockTimel:
   40|  11.6k|void SetMockTime(int64_t nMockTimeIn) { SetMockTime(std::chrono::seconds{nMockTimeIn}); }
_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   42|  23.3k|{
   43|  23.3k|    Assert(mock_time_in >= 0s);
  ------------------
  |  |   85|  23.3k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   44|  23.3k|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   45|  23.3k|}
_Z7GetTimev:
   76|      2|int64_t GetTime() { return GetTime<std::chrono::seconds>().count(); }
_Z20ParseISO8601DateTimeNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
   96|      2|{
   97|      2|    constexpr auto FMT_SIZE{std::string_view{"2000-01-01T01:01:01Z"}.size()};
   98|      2|    if (str.size() != FMT_SIZE || str[4] != '-' || str[7] != '-' || str[10] != 'T' || str[13] != ':' || str[16] != ':' || str[19] != 'Z') {
  ------------------
  |  Branch (98:9): [True: 0, False: 2]
  |  Branch (98:35): [True: 0, False: 2]
  |  Branch (98:52): [True: 0, False: 2]
  |  Branch (98:69): [True: 0, False: 2]
  |  Branch (98:87): [True: 0, False: 2]
  |  Branch (98:105): [True: 0, False: 2]
  |  Branch (98:123): [True: 0, False: 2]
  ------------------
   99|      0|        return {};
  100|      0|    }
  101|      2|    const auto year{ToIntegral<uint16_t>(str.substr(0, 4))};
  102|      2|    const auto month{ToIntegral<uint8_t>(str.substr(5, 2))};
  103|      2|    const auto day{ToIntegral<uint8_t>(str.substr(8, 2))};
  104|      2|    const auto hour{ToIntegral<uint8_t>(str.substr(11, 2))};
  105|      2|    const auto min{ToIntegral<uint8_t>(str.substr(14, 2))};
  106|      2|    const auto sec{ToIntegral<uint8_t>(str.substr(17, 2))};
  107|      2|    if (!year || !month || !day || !hour || !min || !sec) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2]
  |  Branch (107:18): [True: 0, False: 2]
  |  Branch (107:28): [True: 0, False: 2]
  |  Branch (107:36): [True: 0, False: 2]
  |  Branch (107:45): [True: 0, False: 2]
  |  Branch (107:53): [True: 0, False: 2]
  ------------------
  108|      0|        return {};
  109|      0|    }
  110|      2|    const std::chrono::year_month_day ymd{std::chrono::year{*year}, std::chrono::month{*month}, std::chrono::day{*day}};
  111|      2|    if (!ymd.ok()) {
  ------------------
  |  Branch (111:9): [True: 0, False: 2]
  ------------------
  112|      0|        return {};
  113|      0|    }
  114|      2|    const auto time{std::chrono::hours{*hour} + std::chrono::minutes{*min} + std::chrono::seconds{*sec}};
  115|      2|    const auto tp{std::chrono::sys_days{ymd} + time};
  116|      2|    return int64_t{TicksSinceEpoch<std::chrono::seconds>(tp)};
  117|      2|}

_Z5TicksINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEES5_EDaT0_:
   73|      2|{
   74|      2|    return std::chrono::duration_cast<Dur1>(d).count();
   75|      2|}
_Z3NowINSt3__16chrono10time_pointI9NodeClockNS1_8durationIxNS0_5ratioILl1ELl1EEEEEEEET_v:
  119|      2|{
  120|      2|    return std::chrono::time_point_cast<typename T::duration>(T::clock::now());
  121|      2|}
_Z15TicksSinceEpochINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEENS1_10time_pointINS1_12system_clockES5_EEEDaT0_:
   78|      2|{
   79|      2|    return Ticks<Duration>(t.time_since_epoch());
   80|      2|}
_Z7GetTimeINSt3__16chrono8durationIxNS0_5ratioILl1ELl1EEEEEET_v:
  125|      2|{
  126|      2|    return Now<std::chrono::time_point<NodeClock, T>>().time_since_epoch();
  127|      2|}

_ZN12TokenPipeEndD2Ev:
   34|      4|{
   35|      4|    Close();
   36|      4|}
_ZN12TokenPipeEnd5CloseEv:
   77|      4|{
   78|      4|    if (m_fd != -1) close(m_fd);
  ------------------
  |  Branch (78:9): [True: 4, False: 0]
  ------------------
   79|      4|    m_fd = -1;
   80|      4|}

_ZNK22transaction_identifierILb0EE7CompareERKS0_:
   21|   377k|    constexpr int Compare(const transaction_identifier<has_witness>& other) const { return m_wrapped.Compare(other.m_wrapped); }
_ZNK22transaction_identifierILb0EEltIS0_EEbRKT_:
   37|   377k|    bool operator<(const Other& other) const { return Compare(other) < 0; }
_ZNK22transaction_identifierILb0EEneIS0_EEbRKT_:
   35|     13|    bool operator!=(const Other& other) const { return Compare(other) != 0; }
_ZN22transaction_identifierILb0EEC2Ev:
   30|   118k|    transaction_identifier() : m_wrapped{} {}
_ZN22transaction_identifierILb0EE11UnserializeI12ParamsStreamIR10DataStream20TransactionSerParamsEEEvRT_:
   58|   109k|    template <typename Stream> void Unserialize(Stream& s) { m_wrapped.Unserialize(s); }
_ZN22transaction_identifierILb0EE11UnserializeI10DataStreamEEvRT_:
   58|  8.86k|    template <typename Stream> void Unserialize(Stream& s) { m_wrapped.Unserialize(s); }
_ZN22transaction_identifierILb0EE11FromUint256ERK7uint256:
   40|  2.81k|    static transaction_identifier FromUint256(const uint256& id) { return {id}; }
_ZN22transaction_identifierILb0EEC2ERK7uint256:
   16|  2.81k|    transaction_identifier(const uint256& wrapped) : m_wrapped{wrapped} {}
_ZN22transaction_identifierILb1EE11FromUint256ERK7uint256:
   40|  2.81k|    static transaction_identifier FromUint256(const uint256& id) { return {id}; }
_ZN22transaction_identifierILb1EEC2ERK7uint256:
   16|  2.81k|    transaction_identifier(const uint256& wrapped) : m_wrapped{wrapped} {}
_ZNK22transaction_identifierILb0EE9ToUint256Ev:
   39|  2.72k|    const uint256& ToUint256() const LIFETIMEBOUND { return m_wrapped; }
_ZNK22transaction_identifierILb0EE9SerializeI10HashWriterEEvRT_:
   57|   106k|    template <typename Stream> void Serialize(Stream& s) const { m_wrapped.Serialize(s); }
_ZNK22transaction_identifierILb0EE9SerializeI12ParamsStreamIR10HashWriter20TransactionSerParamsEEEvRT_:
   57|   105k|    template <typename Stream> void Serialize(Stream& s) const { m_wrapped.Serialize(s); }

_ZNK4util17TranslatedLiteralcvNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEv:
   60|  52.5k|    operator std::string() const { return translate_fn && *translate_fn ? (*translate_fn)(original) : original; }
  ------------------
  |  Branch (60:43): [True: 52.5k, False: 0]
  |  Branch (60:59): [True: 0, False: 52.5k]
  ------------------
_ZNK4util17TranslatedLiteralcv13bilingual_strEv:
   61|  52.5k|    operator bilingual_str() const { return {original, std::string{*this}}; }
_Z12UntranslatedNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   82|  51.5k|inline bilingual_str Untranslated(std::string original) { return {original, original}; }

_Z6VectorIJN10miniscript8internal6MaxIntIjEEEENSt3__16vectorINS4_11common_typeIJDpT_EE4typeENS4_9allocatorISA_EEEEDpOS7_:
   24|  57.7k|{
   25|  57.7k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  57.7k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  57.7k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  57.7k|    return ret;
   30|  57.7k|}
_Z6VectorIJN10miniscript8internal7SatInfoEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  28.8k|{
   25|  28.8k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  28.8k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  28.8k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  28.8k|    return ret;
   30|  28.8k|}
descriptor.cpp:_Z6VectorIJNSt3__110unique_ptrIN12_GLOBAL__N_114PubkeyProviderENS0_14default_deleteIS3_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISC_EEEEDpOS9_:
   24|  8.54k|{
   25|  8.54k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  8.54k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  8.54k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  8.54k|    return ret;
   30|  8.54k|}
_Z6VectorIJ7CScriptEENSt3__16vectorINS1_11common_typeIJDpT_EE4typeENS1_9allocatorIS7_EEEEDpOS4_:
   24|  48.8k|{
   25|  48.8k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  48.8k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  48.8k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  48.8k|    return ret;
   30|  48.8k|}
descriptor.cpp:_Z6VectorIJNSt3__110unique_ptrIN12_GLOBAL__N_114DescriptorImplENS0_14default_deleteIS3_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISC_EEEEDpOS9_:
   24|  1.31k|{
   25|  1.31k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  1.31k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  1.31k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  1.31k|    return ret;
   30|  1.31k|}
_Z6VectorIJRK7CScriptEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  1.20k|{
   25|  1.20k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  1.20k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  1.20k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  1.20k|    return ret;
   30|  1.20k|}
_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISE_EEEEDpOSB_:
   24|  2.28M|{
   25|  2.28M|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  2.28M|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  2.28M|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  2.28M|    return ret;
   30|  2.28M|}
_Z6VectorIJjEENSt3__16vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorIS6_EEEEDpOS3_:
   24|  3.71k|{
   25|  3.71k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  3.71k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  3.71k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  3.71k|    return ret;
   30|  3.71k|}
_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEES8_EENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISE_EEEEDpOSB_:
   24|  6.54M|{
   25|  6.54M|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  6.54M|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  6.54M|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  6.54M|    return ret;
   30|  6.54M|}
_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIjEENS0_14default_deleteIS5_EEEES8_S8_EENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISE_EEEEDpOSB_:
   24|  4.36k|{
   25|  4.36k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  4.36k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  4.36k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  4.36k|    return ret;
   30|  4.36k|}

_ZNK17ChainstateManager16ActiveChainstateEv:
 6241|  11.6k|{
 6242|  11.6k|    LOCK(::cs_main);
  ------------------
  |  |  257|  11.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  11.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  11.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  11.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6243|  11.6k|    assert(m_active_chainstate);
 6244|  11.6k|    return *m_active_chainstate;
 6245|  11.6k|}
_ZN17ChainstateManagerD2Ev:
 6319|      2|{
 6320|      2|    LOCK(::cs_main);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6321|       |
 6322|      2|    m_versionbitscache.Clear();
 6323|      2|}

_ZN17ValidationSignalsD2Ev:
   97|      2|ValidationSignals::~ValidationSignals() = default;
_ZN17ValidationSignals24FlushBackgroundCallbacksEv:
  100|      2|{
  101|      2|    m_internals->m_task_runner->flush();
  102|      2|}

_ZN16VersionBitsCache5ClearEv:
  242|      2|{
  243|      2|    LOCK(m_mutex);
  ------------------
  |  |  257|      2|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|      2|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|      2|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|      2|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|      6|    for (unsigned int d = 0; d < Consensus::MAX_VERSION_BITS_DEPLOYMENTS; d++) {
  ------------------
  |  Branch (244:30): [True: 4, False: 2]
  ------------------
  245|      4|        m_caches[d].clear();
  246|      4|    }
  247|      2|}

_ZN6wallet14WalletDatabaseC2Ev:
  134|  11.6k|    WalletDatabase() : nUpdateCounter(0) {}
_ZN6wallet14WalletDatabaseD2Ev:
  135|  11.6k|    virtual ~WalletDatabase() = default;
_ZN6wallet13DatabaseBatchD2Ev:
   60|  57.7k|    virtual ~DatabaseBatch() = default;
_ZN6wallet13DatabaseBatchC2Ev:
   59|  57.7k|    explicit DatabaseBatch() = default;
_ZN6wallet13DatabaseBatch5WriteINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_EES9_EEbRKT_RKT0_b:
   87|  2.91k|    {
   88|  2.91k|        DataStream ssKey{};
   89|  2.91k|        ssKey.reserve(1000);
   90|  2.91k|        ssKey << key;
   91|       |
   92|  2.91k|        DataStream ssValue{};
   93|  2.91k|        ssValue.reserve(10000);
   94|  2.91k|        ssValue << value;
   95|       |
   96|  2.91k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  2.91k|    }
_ZN6wallet13DatabaseBatch5WriteINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS3_I7uint2567CPubKeyEEEENS3_INS2_6vectorIh16secure_allocatorIhEEESA_EEEEbRKT_RKT0_b:
   87|  7.55k|    {
   88|  7.55k|        DataStream ssKey{};
   89|  7.55k|        ssKey.reserve(1000);
   90|  7.55k|        ssKey << key;
   91|       |
   92|  7.55k|        DataStream ssValue{};
   93|  7.55k|        ssValue.reserve(10000);
   94|  7.55k|        ssValue << value;
   95|       |
   96|  7.55k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  7.55k|    }
_ZN6wallet13DatabaseBatch5WriteINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EENS_16WalletDescriptorEEEbRKT_RKT0_b:
   87|  34.6k|    {
   88|  34.6k|        DataStream ssKey{};
   89|  34.6k|        ssKey.reserve(1000);
   90|  34.6k|        ssKey << key;
   91|       |
   92|  34.6k|        DataStream ssValue{};
   93|  34.6k|        ssValue.reserve(10000);
   94|  34.6k|        ssValue << value;
   95|       |
   96|  34.6k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  34.6k|    }
_ZN6wallet13DatabaseBatch5WriteINSt3__14pairINS3_INS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EENS3_IjjEEEENS2_6vectorIhNS7_IhEEEEEEbRKT_RKT0_b:
   87|  21.5k|    {
   88|  21.5k|        DataStream ssKey{};
   89|  21.5k|        ssKey.reserve(1000);
   90|  21.5k|        ssKey << key;
   91|       |
   92|  21.5k|        DataStream ssValue{};
   93|  21.5k|        ssValue.reserve(10000);
   94|  21.5k|        ssValue << value;
   95|       |
   96|  21.5k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  21.5k|    }
_ZN6wallet13DatabaseBatch5WriteINSt3__14pairINS3_INS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EEjEENS2_6vectorIhNS7_IhEEEEEEbRKT_RKT0_b:
   87|  22.4k|    {
   88|  22.4k|        DataStream ssKey{};
   89|  22.4k|        ssKey.reserve(1000);
   90|  22.4k|        ssKey << key;
   91|       |
   92|  22.4k|        DataStream ssValue{};
   93|  22.4k|        ssValue.reserve(10000);
   94|  22.4k|        ssValue << value;
   95|       |
   96|  22.4k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  22.4k|    }
_ZN6wallet13DatabaseBatch5WriteINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEmEEbRKT_RKT0_b:
   87|  11.6k|    {
   88|  11.6k|        DataStream ssKey{};
   89|  11.6k|        ssKey.reserve(1000);
   90|  11.6k|        ssKey << key;
   91|       |
   92|  11.6k|        DataStream ssValue{};
   93|  11.6k|        ssValue.reserve(10000);
   94|  11.6k|        ssValue << value;
   95|       |
   96|  11.6k|        return WriteKey(std::move(ssKey), std::move(ssValue), fOverwrite);
   97|  11.6k|    }

_ZN6wallet25DescriptorScriptPubKeyMan17GetNewDestinationE10OutputType:
 2078|  11.2k|{
 2079|       |    // Returns true if this descriptor supports getting new addresses. Conditions where we may be unable to fetch them (e.g. locked) are caught later
 2080|  11.2k|    if (!CanGetAddresses()) {
  ------------------
  |  Branch (2080:9): [True: 1.31k, False: 9.90k]
  ------------------
 2081|  1.31k|        return util::Error{_("No addresses available")};
 2082|  1.31k|    }
 2083|  9.90k|    {
 2084|  9.90k|        LOCK(cs_desc_man);
  ------------------
  |  |  257|  9.90k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  9.90k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  9.90k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  9.90k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2085|  9.90k|        assert(m_wallet_descriptor.descriptor->IsSingleType()); // This is a combo descriptor which should not be an active descriptor
 2086|  9.90k|        std::optional<OutputType> desc_addr_type = m_wallet_descriptor.descriptor->GetOutputType();
 2087|  9.90k|        assert(desc_addr_type);
 2088|  9.90k|        if (type != *desc_addr_type) {
  ------------------
  |  Branch (2088:13): [True: 0, False: 9.90k]
  ------------------
 2089|      0|            throw std::runtime_error(std::string(__func__) + ": Types are inconsistent. Stored type does not match type of newly generated address");
 2090|      0|        }
 2091|       |
 2092|  9.90k|        TopUp();
 2093|       |
 2094|       |        // Get the scriptPubKey from the descriptor
 2095|  9.90k|        FlatSigningProvider out_keys;
 2096|  9.90k|        std::vector<CScript> scripts_temp;
 2097|  9.90k|        if (m_wallet_descriptor.range_end <= m_max_cached_index && !TopUp(1)) {
  ------------------
  |  Branch (2097:13): [True: 0, False: 9.90k]
  |  Branch (2097:68): [True: 0, False: 0]
  ------------------
 2098|       |            // We can't generate anymore keys
 2099|      0|            return util::Error{_("Error: Keypool ran out, please call keypoolrefill first")};
 2100|      0|        }
 2101|  9.90k|        if (!m_wallet_descriptor.descriptor->ExpandFromCache(m_wallet_descriptor.next_index, m_wallet_descriptor.cache, scripts_temp, out_keys)) {
  ------------------
  |  Branch (2101:13): [True: 205, False: 9.70k]
  ------------------
 2102|       |            // We can't generate anymore keys
 2103|    205|            return util::Error{_("Error: Keypool ran out, please call keypoolrefill first")};
 2104|    205|        }
 2105|       |
 2106|  9.70k|        CTxDestination dest;
 2107|  9.70k|        if (!ExtractDestination(scripts_temp[0], dest)) {
  ------------------
  |  Branch (2107:13): [True: 0, False: 9.70k]
  ------------------
 2108|      0|            return util::Error{_("Error: Cannot extract destination from the generated scriptpubkey")}; // shouldn't happen
 2109|      0|        }
 2110|  9.70k|        m_wallet_descriptor.next_index++;
 2111|  9.70k|        WalletBatch(m_storage.GetDatabase()).WriteDescriptor(GetID(), m_wallet_descriptor);
 2112|  9.70k|        return dest;
 2113|  9.70k|    }
 2114|  9.70k|}
_ZNK6wallet25DescriptorScriptPubKeyMan6IsMineERK7CScript:
 2117|  38.8k|{
 2118|  38.8k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  38.8k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  38.8k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  38.8k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  38.8k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2119|  38.8k|    if (m_map_script_pub_keys.count(script) > 0) {
  ------------------
  |  Branch (2119:9): [True: 36.9k, False: 1.80k]
  ------------------
 2120|  36.9k|        return ISMINE_SPENDABLE;
 2121|  36.9k|    }
 2122|  1.80k|    return ISMINE_NO;
 2123|  38.8k|}
_ZNK6wallet25DescriptorScriptPubKeyMan7GetKeysEv:
 2200|  43.3k|{
 2201|  43.3k|    AssertLockHeld(cs_desc_man);
  ------------------
  |  |  142|  43.3k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 2202|  43.3k|    if (m_storage.HasEncryptionKeys() && !m_storage.IsLocked()) {
  ------------------
  |  Branch (2202:9): [True: 0, False: 43.3k]
  |  Branch (2202:42): [True: 0, False: 0]
  ------------------
 2203|      0|        KeyMap keys;
 2204|      0|        for (const auto& key_pair : m_map_crypted_keys) {
  ------------------
  |  Branch (2204:35): [True: 0, False: 0]
  ------------------
 2205|      0|            const CPubKey& pubkey = key_pair.second.first;
 2206|      0|            const std::vector<unsigned char>& crypted_secret = key_pair.second.second;
 2207|      0|            CKey key;
 2208|      0|            m_storage.WithEncryptionKey([&](const CKeyingMaterial& encryption_key) {
 2209|      0|                return DecryptKey(encryption_key, crypted_secret, pubkey, key);
 2210|      0|            });
 2211|      0|            keys[pubkey.GetID()] = key;
 2212|      0|        }
 2213|      0|        return keys;
 2214|      0|    }
 2215|  43.3k|    return m_map_keys;
 2216|  43.3k|}
_ZN6wallet25DescriptorScriptPubKeyMan5TopUpEj:
 2249|  20.6k|{
 2250|  20.6k|    WalletBatch batch(m_storage.GetDatabase());
 2251|  20.6k|    if (!batch.TxnBegin()) return false;
  ------------------
  |  Branch (2251:9): [True: 0, False: 20.6k]
  ------------------
 2252|  20.6k|    bool res = TopUpWithDB(batch, size);
 2253|  20.6k|    if (!batch.TxnCommit()) throw std::runtime_error(strprintf("Error during descriptors keypool top up. Cannot commit changes for wallet %s", m_storage.GetDisplayName()));
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  |  Branch (2253:9): [True: 0, False: 20.6k]
  ------------------
 2254|  20.6k|    return res;
 2255|  20.6k|}
_ZN6wallet25DescriptorScriptPubKeyMan11TopUpWithDBERNS_11WalletBatchEj:
 2258|  20.6k|{
 2259|  20.6k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  20.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  20.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  20.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  20.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|  20.6k|    std::set<CScript> new_spks;
 2261|  20.6k|    unsigned int target_size;
 2262|  20.6k|    if (size > 0) {
  ------------------
  |  Branch (2262:9): [True: 0, False: 20.6k]
  ------------------
 2263|      0|        target_size = size;
 2264|  20.6k|    } else {
 2265|  20.6k|        target_size = m_keypool_size;
 2266|  20.6k|    }
 2267|       |
 2268|       |    // Calculate the new range_end
 2269|  20.6k|    int32_t new_range_end = std::max(m_wallet_descriptor.next_index + (int32_t)target_size, m_wallet_descriptor.range_end);
 2270|       |
 2271|       |    // If the descriptor is not ranged, we actually just want to fill the first cache item
 2272|  20.6k|    if (!m_wallet_descriptor.descriptor->IsRange()) {
  ------------------
  |  Branch (2272:9): [True: 7.00k, False: 13.6k]
  ------------------
 2273|  7.00k|        new_range_end = 1;
 2274|  7.00k|        m_wallet_descriptor.range_end = 1;
 2275|  7.00k|        m_wallet_descriptor.range_start = 0;
 2276|  7.00k|    }
 2277|       |
 2278|  20.6k|    FlatSigningProvider provider;
 2279|  20.6k|    provider.keys = GetKeys();
 2280|       |
 2281|  20.6k|    uint256 id = GetID();
 2282|  38.9k|    for (int32_t i = m_max_cached_index + 1; i < new_range_end; ++i) {
  ------------------
  |  Branch (2282:46): [True: 20.5k, False: 18.3k]
  ------------------
 2283|  20.5k|        FlatSigningProvider out_keys;
 2284|  20.5k|        std::vector<CScript> scripts_temp;
 2285|  20.5k|        DescriptorCache temp_cache;
 2286|       |        // Maybe we have a cached xpub and we can expand from the cache first
 2287|  20.5k|        if (!m_wallet_descriptor.descriptor->ExpandFromCache(i, m_wallet_descriptor.cache, scripts_temp, out_keys)) {
  ------------------
  |  Branch (2287:13): [True: 12.0k, False: 8.51k]
  ------------------
 2288|  12.0k|            if (!m_wallet_descriptor.descriptor->Expand(i, provider, scripts_temp, out_keys, &temp_cache)) return false;
  ------------------
  |  Branch (2288:17): [True: 2.24k, False: 9.78k]
  ------------------
 2289|  12.0k|        }
 2290|       |        // Add all of the scriptPubKeys to the scriptPubKey set
 2291|  18.3k|        new_spks.insert(scripts_temp.begin(), scripts_temp.end());
 2292|  23.0k|        for (const CScript& script : scripts_temp) {
  ------------------
  |  Branch (2292:36): [True: 23.0k, False: 18.3k]
  ------------------
 2293|  23.0k|            m_map_script_pub_keys[script] = i;
 2294|  23.0k|        }
 2295|  18.3k|        for (const auto& pk_pair : out_keys.pubkeys) {
  ------------------
  |  Branch (2295:34): [True: 15.8k, False: 18.3k]
  ------------------
 2296|  15.8k|            const CPubKey& pubkey = pk_pair.second;
 2297|  15.8k|            if (m_map_pubkeys.count(pubkey) != 0) {
  ------------------
  |  Branch (2297:17): [True: 4.17k, False: 11.6k]
  ------------------
 2298|       |                // We don't need to give an error here.
 2299|       |                // It doesn't matter which of many valid indexes the pubkey has, we just need an index where we can derive it and it's private key
 2300|  4.17k|                continue;
 2301|  4.17k|            }
 2302|  11.6k|            m_map_pubkeys[pubkey] = i;
 2303|  11.6k|        }
 2304|       |        // Merge and write the cache
 2305|  18.3k|        DescriptorCache new_items = m_wallet_descriptor.cache.MergeAndDiff(temp_cache);
 2306|  18.3k|        if (!batch.WriteDescriptorCacheItems(id, new_items)) {
  ------------------
  |  Branch (2306:13): [True: 0, False: 18.3k]
  ------------------
 2307|      0|            throw std::runtime_error(std::string(__func__) + ": writing cache items failed");
 2308|      0|        }
 2309|  18.3k|        m_max_cached_index++;
 2310|  18.3k|    }
 2311|  18.3k|    m_wallet_descriptor.range_end = new_range_end;
 2312|  18.3k|    batch.WriteDescriptor(GetID(), m_wallet_descriptor);
 2313|       |
 2314|       |    // By this point, the cache size should be the size of the entire range
 2315|  18.3k|    assert(m_wallet_descriptor.range_end - 1 == m_max_cached_index);
 2316|       |
 2317|  18.3k|    m_storage.TopUpCallback(new_spks, this);
 2318|  18.3k|    NotifyCanGetAddressesChanged();
 2319|  18.3k|    return true;
 2320|  18.3k|}
_ZN6wallet25DescriptorScriptPubKeyMan19MarkUnusedAddressesERK7CScript:
 2323|  2.05k|{
 2324|  2.05k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  2.05k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  2.05k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  2.05k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  2.05k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2325|  2.05k|    std::vector<WalletDestination> result;
 2326|  2.05k|    if (IsMine(script)) {
  ------------------
  |  Branch (2326:9): [True: 2.05k, False: 0]
  ------------------
 2327|  2.05k|        int32_t index = m_map_script_pub_keys[script];
 2328|  2.05k|        if (index >= m_wallet_descriptor.next_index) {
  ------------------
  |  Branch (2328:13): [True: 380, False: 1.67k]
  ------------------
 2329|    380|            WalletLogPrintf("%s: Detected a used keypool item at index %d, mark all keypool items up to this item as used\n", __func__, index);
 2330|    380|            auto out_keys = std::make_unique<FlatSigningProvider>();
 2331|    380|            std::vector<CScript> scripts_temp;
 2332|    760|            while (index >= m_wallet_descriptor.next_index) {
  ------------------
  |  Branch (2332:20): [True: 380, False: 380]
  ------------------
 2333|    380|                if (!m_wallet_descriptor.descriptor->ExpandFromCache(m_wallet_descriptor.next_index, m_wallet_descriptor.cache, scripts_temp, *out_keys)) {
  ------------------
  |  Branch (2333:21): [True: 0, False: 380]
  ------------------
 2334|      0|                    throw std::runtime_error(std::string(__func__) + ": Unable to expand descriptor from cache");
 2335|      0|                }
 2336|    380|                CTxDestination dest;
 2337|    380|                ExtractDestination(scripts_temp[0], dest);
 2338|    380|                result.push_back({dest, std::nullopt});
 2339|    380|                m_wallet_descriptor.next_index++;
 2340|    380|            }
 2341|    380|        }
 2342|  2.05k|        if (!TopUp()) {
  ------------------
  |  Branch (2342:13): [True: 0, False: 2.05k]
  ------------------
 2343|      0|            WalletLogPrintf("%s: Topping up keypool failed (locked wallet)\n", __func__);
 2344|      0|        }
 2345|  2.05k|    }
 2346|       |
 2347|  2.05k|    return result;
 2348|  2.05k|}
_ZN6wallet25DescriptorScriptPubKeyMan16AddDescriptorKeyERK4CKeyRK7CPubKey:
 2351|  7.64k|{
 2352|  7.64k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  7.64k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  7.64k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  7.64k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  7.64k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2353|  7.64k|    WalletBatch batch(m_storage.GetDatabase());
 2354|  7.64k|    if (!AddDescriptorKeyWithDB(batch, key, pubkey)) {
  ------------------
  |  Branch (2354:9): [True: 0, False: 7.64k]
  ------------------
 2355|      0|        throw std::runtime_error(std::string(__func__) + ": writing descriptor private key failed");
 2356|      0|    }
 2357|  7.64k|}
_ZN6wallet25DescriptorScriptPubKeyMan22AddDescriptorKeyWithDBERNS_11WalletBatchERK4CKeyRK7CPubKey:
 2360|  7.64k|{
 2361|  7.64k|    AssertLockHeld(cs_desc_man);
  ------------------
  |  |  142|  7.64k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 2362|  7.64k|    assert(!m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));
 2363|       |
 2364|       |    // Check if provided key already exists
 2365|  7.64k|    if (m_map_keys.find(pubkey.GetID()) != m_map_keys.end() ||
  ------------------
  |  Branch (2365:9): [True: 88, False: 7.55k]
  |  Branch (2365:9): [True: 88, False: 7.55k]
  ------------------
 2366|  7.64k|        m_map_crypted_keys.find(pubkey.GetID()) != m_map_crypted_keys.end()) {
  ------------------
  |  Branch (2366:9): [True: 0, False: 7.55k]
  ------------------
 2367|     88|        return true;
 2368|     88|    }
 2369|       |
 2370|  7.55k|    if (m_storage.HasEncryptionKeys()) {
  ------------------
  |  Branch (2370:9): [True: 0, False: 7.55k]
  ------------------
 2371|      0|        if (m_storage.IsLocked()) {
  ------------------
  |  Branch (2371:13): [True: 0, False: 0]
  ------------------
 2372|      0|            return false;
 2373|      0|        }
 2374|       |
 2375|      0|        std::vector<unsigned char> crypted_secret;
 2376|      0|        CKeyingMaterial secret{UCharCast(key.begin()), UCharCast(key.end())};
 2377|      0|        if (!m_storage.WithEncryptionKey([&](const CKeyingMaterial& encryption_key) {
  ------------------
  |  Branch (2377:13): [True: 0, False: 0]
  ------------------
 2378|      0|                return EncryptSecret(encryption_key, secret, pubkey.GetHash(), crypted_secret);
 2379|      0|            })) {
 2380|      0|            return false;
 2381|      0|        }
 2382|       |
 2383|      0|        m_map_crypted_keys[pubkey.GetID()] = make_pair(pubkey, crypted_secret);
 2384|      0|        return batch.WriteCryptedDescriptorKey(GetID(), pubkey, crypted_secret);
 2385|  7.55k|    } else {
 2386|  7.55k|        m_map_keys[pubkey.GetID()] = key;
 2387|  7.55k|        return batch.WriteDescriptorKey(GetID(), pubkey, key.GetPrivKey());
 2388|  7.55k|    }
 2389|  7.55k|}
_ZNK6wallet25DescriptorScriptPubKeyMan11IsHDEnabledEv:
 2419|  9.70k|{
 2420|  9.70k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  9.70k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  9.70k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  9.70k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  9.70k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2421|  9.70k|    return m_wallet_descriptor.descriptor->IsRange();
 2422|  9.70k|}
_ZNK6wallet25DescriptorScriptPubKeyMan15CanGetAddressesEb:
 2425|  11.2k|{
 2426|       |    // We can only give out addresses from descriptors that are single type (not combo), ranged,
 2427|       |    // and either have cached keys or can generate more keys (ignoring encryption)
 2428|  11.2k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  11.2k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  11.2k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  11.2k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  11.2k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2429|  11.2k|    return m_wallet_descriptor.descriptor->IsSingleType() &&
  ------------------
  |  Branch (2429:12): [True: 11.2k, False: 0]
  ------------------
 2430|  11.2k|           m_wallet_descriptor.descriptor->IsRange() &&
  ------------------
  |  Branch (2430:12): [True: 10.0k, False: 1.22k]
  ------------------
 2431|  11.2k|           (HavePrivateKeys() || m_wallet_descriptor.next_index < m_wallet_descriptor.range_end);
  ------------------
  |  Branch (2431:13): [True: 9.88k, False: 116]
  |  Branch (2431:34): [True: 24, False: 92]
  ------------------
 2432|  11.2k|}
_ZNK6wallet25DescriptorScriptPubKeyMan15HavePrivateKeysEv:
 2435|  52.6k|{
 2436|  52.6k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  52.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  52.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  52.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  52.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2437|  52.6k|    return m_map_keys.size() > 0 || m_map_crypted_keys.size() > 0;
  ------------------
  |  Branch (2437:12): [True: 50.9k, False: 1.73k]
  |  Branch (2437:37): [True: 0, False: 1.73k]
  ------------------
 2438|  52.6k|}
_ZNK6wallet25DescriptorScriptPubKeyMan14GetKeyPoolSizeEv:
 2454|  8.02k|{
 2455|  8.02k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  8.02k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  8.02k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  8.02k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  8.02k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2456|  8.02k|    return m_wallet_descriptor.range_end - m_wallet_descriptor.next_index;
 2457|  8.02k|}
_ZNK6wallet25DescriptorScriptPubKeyMan15GetTimeFirstKeyEv:
 2460|  8.52k|{
 2461|  8.52k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  8.52k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  8.52k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  8.52k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  8.52k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2462|  8.52k|    return m_wallet_descriptor.creation_time;
 2463|  8.52k|}
_ZNK6wallet25DescriptorScriptPubKeyMan18GetSigningProviderERK7CScriptb:
 2466|  61.9k|{
 2467|  61.9k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  61.9k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  61.9k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  61.9k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  61.9k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2468|       |
 2469|       |    // Find the index of the script
 2470|  61.9k|    auto it = m_map_script_pub_keys.find(script);
 2471|  61.9k|    if (it == m_map_script_pub_keys.end()) {
  ------------------
  |  Branch (2471:9): [True: 19.2k, False: 42.6k]
  ------------------
 2472|  19.2k|        return nullptr;
 2473|  19.2k|    }
 2474|  42.6k|    int32_t index = it->second;
 2475|       |
 2476|  42.6k|    return GetSigningProvider(index, include_private);
 2477|  61.9k|}
_ZNK6wallet25DescriptorScriptPubKeyMan18GetSigningProviderERK7CPubKey:
 2480|  1.20k|{
 2481|  1.20k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  1.20k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  1.20k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  1.20k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  1.20k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2482|       |
 2483|       |    // Find index of the pubkey
 2484|  1.20k|    auto it = m_map_pubkeys.find(pubkey);
 2485|  1.20k|    if (it == m_map_pubkeys.end()) {
  ------------------
  |  Branch (2485:9): [True: 1.20k, False: 0]
  ------------------
 2486|  1.20k|        return nullptr;
 2487|  1.20k|    }
 2488|      0|    int32_t index = it->second;
 2489|       |
 2490|       |    // Always try to get the signing provider with private keys. This function should only be called during signing anyways
 2491|      0|    std::unique_ptr<FlatSigningProvider> out = GetSigningProvider(index, true);
 2492|      0|    if (!out->HaveKey(pubkey.GetID())) {
  ------------------
  |  Branch (2492:9): [True: 0, False: 0]
  ------------------
 2493|      0|        return nullptr;
 2494|      0|    }
 2495|      0|    return out;
 2496|      0|}
_ZNK6wallet25DescriptorScriptPubKeyMan18GetSigningProviderEib:
 2499|  42.6k|{
 2500|  42.6k|    AssertLockHeld(cs_desc_man);
  ------------------
  |  |  142|  42.6k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 2501|       |
 2502|  42.6k|    std::unique_ptr<FlatSigningProvider> out_keys = std::make_unique<FlatSigningProvider>();
 2503|       |
 2504|       |    // Fetch SigningProvider from cache to avoid re-deriving
 2505|  42.6k|    auto it = m_map_signing_providers.find(index);
 2506|  42.6k|    if (it != m_map_signing_providers.end()) {
  ------------------
  |  Branch (2506:9): [True: 34.1k, False: 8.53k]
  ------------------
 2507|  34.1k|        out_keys->Merge(FlatSigningProvider{it->second});
 2508|  34.1k|    } else {
 2509|       |        // Get the scripts, keys, and key origins for this script
 2510|  8.53k|        std::vector<CScript> scripts_temp;
 2511|  8.53k|        if (!m_wallet_descriptor.descriptor->ExpandFromCache(index, m_wallet_descriptor.cache, scripts_temp, *out_keys)) return nullptr;
  ------------------
  |  Branch (2511:13): [True: 0, False: 8.53k]
  ------------------
 2512|       |
 2513|       |        // Cache SigningProvider so we don't need to re-derive if we need this SigningProvider again
 2514|  8.53k|        m_map_signing_providers[index] = *out_keys;
 2515|  8.53k|    }
 2516|       |
 2517|  42.6k|    if (HavePrivateKeys() && include_private) {
  ------------------
  |  Branch (2517:9): [True: 41.0k, False: 1.61k]
  |  Branch (2517:30): [True: 14.7k, False: 26.3k]
  ------------------
 2518|  14.7k|        FlatSigningProvider master_provider;
 2519|  14.7k|        master_provider.keys = GetKeys();
 2520|  14.7k|        m_wallet_descriptor.descriptor->ExpandPrivate(index, master_provider, *out_keys);
 2521|  14.7k|    }
 2522|       |
 2523|  42.6k|    return out_keys;
 2524|  42.6k|}
_ZNK6wallet25DescriptorScriptPubKeyMan18GetSolvingProviderERK7CScript:
 2527|    994|{
 2528|    994|    return GetSigningProvider(script, false);
 2529|    994|}
_ZNK6wallet25DescriptorScriptPubKeyMan15SignTransactionER19CMutableTransactionRKNSt3__13mapI9COutPoint4CoinNS3_4lessIS5_EENS3_9allocatorINS3_4pairIKS5_S6_EEEEEEiRNS4_Ii13bilingual_strNS7_IiEENS9_INSA_IKiSH_EEEEEE:
 2537|  2.78k|{
 2538|  2.78k|    std::unique_ptr<FlatSigningProvider> keys = std::make_unique<FlatSigningProvider>();
 2539|  4.67k|    for (const auto& coin_pair : coins) {
  ------------------
  |  Branch (2539:32): [True: 4.67k, False: 2.78k]
  ------------------
 2540|  4.67k|        std::unique_ptr<FlatSigningProvider> coin_keys = GetSigningProvider(coin_pair.second.out.scriptPubKey, true);
 2541|  4.67k|        if (!coin_keys) {
  ------------------
  |  Branch (2541:13): [True: 4.67k, False: 0]
  ------------------
 2542|  4.67k|            continue;
 2543|  4.67k|        }
 2544|      0|        keys->Merge(std::move(*coin_keys));
 2545|      0|    }
 2546|       |
 2547|  2.78k|    return ::SignTransaction(tx, keys.get(), coins, sighash, input_errors);
 2548|  2.78k|}
_ZNK6wallet25DescriptorScriptPubKeyMan11SignMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERK6PKHashRS7_:
 2551|  27.6k|{
 2552|  27.6k|    std::unique_ptr<FlatSigningProvider> keys = GetSigningProvider(GetScriptForDestination(pkhash), true);
 2553|  27.6k|    if (!keys) {
  ------------------
  |  Branch (2553:9): [True: 12.6k, False: 15.0k]
  ------------------
 2554|  12.6k|        return SigningResult::PRIVATE_KEY_NOT_AVAILABLE;
 2555|  12.6k|    }
 2556|       |
 2557|  15.0k|    CKey key;
 2558|  15.0k|    if (!keys->GetKey(ToKeyID(pkhash), key)) {
  ------------------
  |  Branch (2558:9): [True: 313, False: 14.7k]
  ------------------
 2559|    313|        return SigningResult::PRIVATE_KEY_NOT_AVAILABLE;
 2560|    313|    }
 2561|       |
 2562|  14.7k|    if (!MessageSign(key, message, str_sig)) {
  ------------------
  |  Branch (2562:9): [True: 0, False: 14.7k]
  ------------------
 2563|      0|        return SigningResult::SIGNING_FAILED;
 2564|      0|    }
 2565|  14.7k|    return SigningResult::OK;
 2566|  14.7k|}
_ZNK6wallet25DescriptorScriptPubKeyMan8FillPSBTER26PartiallySignedTransactionRK26PrecomputedTransactionDataibbPib:
 2569|  3.15k|{
 2570|  3.15k|    if (n_signed) {
  ------------------
  |  Branch (2570:9): [True: 0, False: 3.15k]
  ------------------
 2571|      0|        *n_signed = 0;
 2572|      0|    }
 2573|  5.43k|    for (unsigned int i = 0; i < psbtx.tx->vin.size(); ++i) {
  ------------------
  |  Branch (2573:30): [True: 2.28k, False: 3.15k]
  ------------------
 2574|  2.28k|        const CTxIn& txin = psbtx.tx->vin[i];
 2575|  2.28k|        PSBTInput& input = psbtx.inputs.at(i);
 2576|       |
 2577|  2.28k|        if (PSBTInputSigned(input)) {
  ------------------
  |  Branch (2577:13): [True: 83, False: 2.19k]
  ------------------
 2578|     83|            continue;
 2579|     83|        }
 2580|       |
 2581|       |        // Get the Sighash type
 2582|  2.19k|        if (sign && input.sighash_type != std::nullopt && *input.sighash_type != sighash_type) {
  ------------------
  |  Branch (2582:13): [True: 1.92k, False: 275]
  |  Branch (2582:21): [True: 3, False: 1.92k]
  |  Branch (2582:59): [True: 3, False: 0]
  ------------------
 2583|      3|            return PSBTError::SIGHASH_MISMATCH;
 2584|      3|        }
 2585|       |
 2586|       |        // Get the scriptPubKey to know which SigningProvider to use
 2587|  2.19k|        CScript script;
 2588|  2.19k|        if (!input.witness_utxo.IsNull()) {
  ------------------
  |  Branch (2588:13): [True: 903, False: 1.29k]
  ------------------
 2589|    903|            script = input.witness_utxo.scriptPubKey;
 2590|  1.29k|        } else if (input.non_witness_utxo) {
  ------------------
  |  Branch (2590:20): [True: 0, False: 1.29k]
  ------------------
 2591|      0|            if (txin.prevout.n >= input.non_witness_utxo->vout.size()) {
  ------------------
  |  Branch (2591:17): [True: 0, False: 0]
  ------------------
 2592|      0|                return PSBTError::MISSING_INPUTS;
 2593|      0|            }
 2594|      0|            script = input.non_witness_utxo->vout[txin.prevout.n].scriptPubKey;
 2595|  1.29k|        } else {
 2596|       |            // There's no UTXO so we can just skip this now
 2597|  1.29k|            continue;
 2598|  1.29k|        }
 2599|       |
 2600|    903|        std::unique_ptr<FlatSigningProvider> keys = std::make_unique<FlatSigningProvider>();
 2601|    903|        std::unique_ptr<FlatSigningProvider> script_keys = GetSigningProvider(script, /*include_private=*/sign);
 2602|    903|        if (script_keys) {
  ------------------
  |  Branch (2602:13): [True: 0, False: 903]
  ------------------
 2603|      0|            keys->Merge(std::move(*script_keys));
 2604|    903|        } else {
 2605|       |            // Maybe there are pubkeys listed that we can sign for
 2606|    903|            std::vector<CPubKey> pubkeys;
 2607|    903|            pubkeys.reserve(input.hd_keypaths.size() + 2);
 2608|       |
 2609|       |            // ECDSA Pubkeys
 2610|    903|            for (const auto& [pk, _] : input.hd_keypaths) {
  ------------------
  |  Branch (2610:38): [True: 8, False: 903]
  ------------------
 2611|      8|                pubkeys.push_back(pk);
 2612|      8|            }
 2613|       |
 2614|       |            // Taproot output pubkey
 2615|    903|            std::vector<std::vector<unsigned char>> sols;
 2616|    903|            if (Solver(script, sols) == TxoutType::WITNESS_V1_TAPROOT) {
  ------------------
  |  Branch (2616:17): [True: 0, False: 903]
  ------------------
 2617|      0|                sols[0].insert(sols[0].begin(), 0x02);
 2618|      0|                pubkeys.emplace_back(sols[0]);
 2619|      0|                sols[0][0] = 0x03;
 2620|      0|                pubkeys.emplace_back(sols[0]);
 2621|      0|            }
 2622|       |
 2623|       |            // Taproot pubkeys
 2624|    903|            for (const auto& pk_pair : input.m_tap_bip32_paths) {
  ------------------
  |  Branch (2624:38): [True: 600, False: 903]
  ------------------
 2625|    600|                const XOnlyPubKey& pubkey = pk_pair.first;
 2626|  1.20k|                for (unsigned char prefix : {0x02, 0x03}) {
  ------------------
  |  Branch (2626:43): [True: 1.20k, False: 600]
  ------------------
 2627|  1.20k|                    unsigned char b[33] = {prefix};
 2628|  1.20k|                    std::copy(pubkey.begin(), pubkey.end(), b + 1);
 2629|  1.20k|                    CPubKey fullpubkey;
 2630|  1.20k|                    fullpubkey.Set(b, b + 33);
 2631|  1.20k|                    pubkeys.push_back(fullpubkey);
 2632|  1.20k|                }
 2633|    600|            }
 2634|       |
 2635|  1.20k|            for (const auto& pubkey : pubkeys) {
  ------------------
  |  Branch (2635:37): [True: 1.20k, False: 903]
  ------------------
 2636|  1.20k|                std::unique_ptr<FlatSigningProvider> pk_keys = GetSigningProvider(pubkey);
 2637|  1.20k|                if (pk_keys) {
  ------------------
  |  Branch (2637:21): [True: 0, False: 1.20k]
  ------------------
 2638|      0|                    keys->Merge(std::move(*pk_keys));
 2639|      0|                }
 2640|  1.20k|            }
 2641|    903|        }
 2642|       |
 2643|    903|        SignPSBTInput(HidingSigningProvider(keys.get(), /*hide_secret=*/!sign, /*hide_origin=*/!bip32derivs), psbtx, i, &txdata, sighash_type, nullptr, finalize);
 2644|       |
 2645|    903|        bool signed_one = PSBTInputSigned(input);
 2646|    903|        if (n_signed && (signed_one || !sign)) {
  ------------------
  |  Branch (2646:13): [True: 0, False: 903]
  |  Branch (2646:26): [True: 0, False: 0]
  |  Branch (2646:40): [True: 0, False: 0]
  ------------------
 2647|       |            // If sign is false, we assume that we _could_ sign if we get here. This
 2648|       |            // will never have false negatives; it is hard to tell under what i
 2649|       |            // circumstances it could have false positives.
 2650|      0|            (*n_signed)++;
 2651|      0|        }
 2652|    903|    }
 2653|       |
 2654|       |    // Fill in the bip32 keypaths and redeemscripts for the outputs so that hardware wallets can identify change
 2655|  4.14k|    for (unsigned int i = 0; i < psbtx.tx->vout.size(); ++i) {
  ------------------
  |  Branch (2655:30): [True: 994, False: 3.15k]
  ------------------
 2656|    994|        std::unique_ptr<SigningProvider> keys = GetSolvingProvider(psbtx.tx->vout.at(i).scriptPubKey);
 2657|    994|        if (!keys) {
  ------------------
  |  Branch (2657:13): [True: 994, False: 0]
  ------------------
 2658|    994|            continue;
 2659|    994|        }
 2660|      0|        UpdatePSBTOutput(HidingSigningProvider(keys.get(), /*hide_secret=*/true, /*hide_origin=*/!bip32derivs), psbtx, i);
 2661|      0|    }
 2662|       |
 2663|  3.15k|    return {};
 2664|  3.15k|}
_ZNK6wallet25DescriptorScriptPubKeyMan11GetMetadataERKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
 2667|  27.6k|{
 2668|  27.6k|    std::unique_ptr<SigningProvider> provider = GetSigningProvider(GetScriptForDestination(dest));
 2669|  27.6k|    if (provider) {
  ------------------
  |  Branch (2669:9): [True: 27.6k, False: 0]
  ------------------
 2670|  27.6k|        KeyOriginInfo orig;
 2671|  27.6k|        CKeyID key_id = GetKeyForDestination(*provider, dest);
 2672|  27.6k|        if (provider->GetKeyOrigin(key_id, orig)) {
  ------------------
  |  Branch (2672:13): [True: 23.2k, False: 4.46k]
  ------------------
 2673|  23.2k|            LOCK(cs_desc_man);
  ------------------
  |  |  257|  23.2k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  23.2k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  23.2k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  23.2k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2674|  23.2k|            std::unique_ptr<CKeyMetadata> meta = std::make_unique<CKeyMetadata>();
 2675|  23.2k|            meta->key_origin = orig;
 2676|  23.2k|            meta->has_key_origin = true;
 2677|  23.2k|            meta->nCreateTime = m_wallet_descriptor.creation_time;
 2678|  23.2k|            return meta;
 2679|  23.2k|        }
 2680|  27.6k|    }
 2681|  4.46k|    return nullptr;
 2682|  27.6k|}
_ZNK6wallet25DescriptorScriptPubKeyMan5GetIDEv:
 2685|  71.3k|{
 2686|  71.3k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  71.3k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  71.3k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  71.3k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  71.3k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2687|  71.3k|    return m_wallet_descriptor.id;
 2688|  71.3k|}
_ZNK6wallet25DescriptorScriptPubKeyMan19HasWalletDescriptorERKNS_16WalletDescriptorE:
 2743|  10.4k|{
 2744|  10.4k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  10.4k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  10.4k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  10.4k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  10.4k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2745|  10.4k|    return !m_wallet_descriptor.id.IsNull() && !desc.id.IsNull() && m_wallet_descriptor.id == desc.id;
  ------------------
  |  Branch (2745:12): [True: 10.4k, False: 0]
  |  Branch (2745:48): [True: 10.4k, False: 0]
  |  Branch (2745:69): [True: 9.14k, False: 1.31k]
  ------------------
 2746|  10.4k|}
_ZN6wallet25DescriptorScriptPubKeyMan15WriteDescriptorEv:
 2749|  6.61k|{
 2750|  6.61k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  6.61k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  6.61k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  6.61k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  6.61k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2751|  6.61k|    WalletBatch batch(m_storage.GetDatabase());
 2752|  6.61k|    if (!batch.WriteDescriptor(GetID(), m_wallet_descriptor)) {
  ------------------
  |  Branch (2752:9): [True: 0, False: 6.61k]
  ------------------
 2753|      0|        throw std::runtime_error(std::string(__func__) + ": writing descriptor failed");
 2754|      0|    }
 2755|  6.61k|}
_ZNK6wallet25DescriptorScriptPubKeyMan19GetWalletDescriptorEv:
 2758|  13.8k|{
 2759|  13.8k|    return m_wallet_descriptor;
 2760|  13.8k|}
_ZNK6wallet25DescriptorScriptPubKeyMan16GetScriptPubKeysEv:
 2763|  15.4k|{
 2764|  15.4k|    return GetScriptPubKeys(0);
 2765|  15.4k|}
_ZNK6wallet25DescriptorScriptPubKeyMan16GetScriptPubKeysEi:
 2768|  15.4k|{
 2769|  15.4k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  15.4k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  15.4k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  15.4k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  15.4k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2770|  15.4k|    std::unordered_set<CScript, SaltedSipHasher> script_pub_keys;
 2771|  15.4k|    script_pub_keys.reserve(m_map_script_pub_keys.size());
 2772|       |
 2773|  44.4k|    for (auto const& [script_pub_key, index] : m_map_script_pub_keys) {
  ------------------
  |  Branch (2773:46): [True: 44.4k, False: 15.4k]
  ------------------
 2774|  44.4k|        if (index >= minimum_index) script_pub_keys.insert(script_pub_key);
  ------------------
  |  Branch (2774:13): [True: 44.4k, False: 0]
  ------------------
 2775|  44.4k|    }
 2776|  15.4k|    return script_pub_keys;
 2777|  15.4k|}
_ZNK6wallet25DescriptorScriptPubKeyMan11GetEndRangeEv:
 2780|  8.02k|{
 2781|  8.02k|    return m_max_cached_index + 1;
 2782|  8.02k|}
_ZNK6wallet25DescriptorScriptPubKeyMan19GetDescriptorStringERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 2785|  8.02k|{
 2786|  8.02k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  8.02k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  8.02k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  8.02k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  8.02k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2787|       |
 2788|  8.02k|    FlatSigningProvider provider;
 2789|  8.02k|    provider.keys = GetKeys();
 2790|       |
 2791|  8.02k|    if (priv) {
  ------------------
  |  Branch (2791:9): [True: 1.00k, False: 7.02k]
  ------------------
 2792|       |        // For the private version, always return the master key to avoid
 2793|       |        // exposing child private keys. The risk implications of exposing child
 2794|       |        // private keys together with the parent xpub may be non-obvious for users.
 2795|  1.00k|        return m_wallet_descriptor.descriptor->ToPrivateString(provider, out);
 2796|  1.00k|    }
 2797|       |
 2798|  7.02k|    return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out, &m_wallet_descriptor.cache);
 2799|  8.02k|}
_ZN6wallet25DescriptorScriptPubKeyMan22UpdateWalletDescriptorERNS_16WalletDescriptorE:
 2831|    130|{
 2832|    130|    LOCK(cs_desc_man);
  ------------------
  |  |  257|    130|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|    130|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|    130|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|    130|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2833|    130|    std::string error;
 2834|    130|    if (!CanUpdateToWalletDescriptor(descriptor, error)) {
  ------------------
  |  Branch (2834:9): [True: 0, False: 130]
  ------------------
 2835|      0|        throw std::runtime_error(std::string(__func__) + ": " + error);
 2836|      0|    }
 2837|       |
 2838|    130|    m_map_pubkeys.clear();
 2839|    130|    m_map_script_pub_keys.clear();
 2840|    130|    m_max_cached_index = -1;
 2841|    130|    m_wallet_descriptor = descriptor;
 2842|       |
 2843|    130|    NotifyFirstKeyTimeChanged(this, m_wallet_descriptor.creation_time);
 2844|    130|}
_ZN6wallet25DescriptorScriptPubKeyMan27CanUpdateToWalletDescriptorERKNS_16WalletDescriptorERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
 2847|  1.68k|{
 2848|  1.68k|    LOCK(cs_desc_man);
  ------------------
  |  |  257|  1.68k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  1.68k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  1.68k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  1.68k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2849|  1.68k|    if (!HasWalletDescriptor(descriptor)) {
  ------------------
  |  Branch (2849:9): [True: 1.31k, False: 365]
  ------------------
 2850|  1.31k|        error = "can only update matching descriptor";
 2851|  1.31k|        return false;
 2852|  1.31k|    }
 2853|       |
 2854|    365|    if (descriptor.range_start > m_wallet_descriptor.range_start ||
  ------------------
  |  Branch (2854:9): [True: 0, False: 365]
  ------------------
 2855|    365|        descriptor.range_end < m_wallet_descriptor.range_end) {
  ------------------
  |  Branch (2855:9): [True: 105, False: 260]
  ------------------
 2856|       |        // Use inclusive range for error
 2857|    105|        error = strprintf("new range must include current range = [%d,%d]",
  ------------------
  |  | 1172|    105|#define strprintf tfm::format
  ------------------
 2858|    105|                          m_wallet_descriptor.range_start,
 2859|    105|                          m_wallet_descriptor.range_end - 1);
 2860|    105|        return false;
 2861|    105|    }
 2862|       |
 2863|    260|    return true;
 2864|    365|}

_ZN6wallet15ScriptPubKeyManC2ERNS_13WalletStorageE:
  180|  8.52k|    explicit ScriptPubKeyMan(WalletStorage& storage) : m_storage(storage) {}
_ZN6wallet25DescriptorScriptPubKeyManC2ERNS_13WalletStorageERNS_16WalletDescriptorEl:
  630|  8.52k|        :   ScriptPubKeyMan(storage),
  631|  8.52k|            m_keypool_size(keypool_size),
  632|  8.52k|            m_wallet_descriptor(descriptor)
  633|  8.52k|        {}
_ZN6wallet13WalletStorageD2Ev:
   45|  11.6k|    virtual ~WalletStorage() = default;
_ZN6wallet15ScriptPubKeyManD2Ev:
  181|  8.52k|    virtual ~ScriptPubKeyMan() = default;
_ZNK6wallet15ScriptPubKeyMan15WalletLogPrintfIJA20_ciEEEvN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  259|    380|    {
  260|    380|        LogInfo("%s %s", m_storage.GetDisplayName(), tfm::format(wallet_fmt, params...));
  ------------------
  |  |  261|    380|#define LogInfo(...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  255|    380|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
  261|    380|    };

scriptpubkeyman.cpp:_ZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEE:
   88|  11.6k|{
   89|  11.6k|    SeedRandomStateForTest(SeedRand::ZEROS);
   90|  11.6k|    FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
   91|  11.6k|    SetMockTime(ConsumeTime(fuzzed_data_provider));
   92|  11.6k|    const auto& node{g_setup->m_node};
   93|  11.6k|    Chainstate& chainstate{node.chainman->ActiveChainstate()};
   94|  11.6k|    std::unique_ptr<CWallet> wallet_ptr{std::make_unique<CWallet>(node.chain.get(), "", CreateMockableWalletDatabase())};
   95|  11.6k|    CWallet& wallet{*wallet_ptr};
   96|  11.6k|    {
   97|  11.6k|        LOCK(wallet.cs_wallet);
  ------------------
  |  |  257|  11.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  11.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  11.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  11.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|  11.6k|        wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
   99|  11.6k|        wallet.SetLastBlockProcessed(chainstate.m_chain.Height(), chainstate.m_chain.Tip()->GetBlockHash());
  100|  11.6k|        wallet.m_keypool_size = 1;
  101|  11.6k|    }
  102|       |
  103|  11.6k|    auto wallet_desc{CreateWalletDescriptor(fuzzed_data_provider)};
  104|  11.6k|    if (!wallet_desc.has_value()) return;
  ------------------
  |  Branch (104:9): [True: 3.15k, False: 8.52k]
  ------------------
  105|  8.52k|    auto spk_manager{CreateDescriptor(wallet_desc->first, wallet_desc->second, wallet)};
  106|  8.52k|    if (spk_manager == nullptr) return;
  ------------------
  |  Branch (106:9): [True: 0, False: 8.52k]
  ------------------
  107|       |
  108|  8.52k|    if (fuzzed_data_provider.ConsumeBool()) {
  ------------------
  |  Branch (108:9): [True: 2.05k, False: 6.47k]
  ------------------
  109|  2.05k|        auto wallet_desc{CreateWalletDescriptor(fuzzed_data_provider)};
  110|  2.05k|        if (!wallet_desc.has_value()) {
  ------------------
  |  Branch (110:13): [True: 498, False: 1.55k]
  ------------------
  111|    498|            return;
  112|    498|        }
  113|  1.55k|        std::string error;
  114|  1.55k|        if (spk_manager->CanUpdateToWalletDescriptor(wallet_desc->first, error)) {
  ------------------
  |  Branch (114:13): [True: 130, False: 1.42k]
  ------------------
  115|    130|            auto new_spk_manager{CreateDescriptor(wallet_desc->first, wallet_desc->second, wallet)};
  116|    130|            if (new_spk_manager != nullptr) spk_manager = new_spk_manager;
  ------------------
  |  Branch (116:17): [True: 130, False: 0]
  ------------------
  117|    130|        }
  118|  1.55k|    }
  119|       |
  120|  8.02k|    bool good_data{true};
  121|  34.8k|    LIMITED_WHILE(good_data && fuzzed_data_provider.ConsumeBool(), 20) {
  ------------------
  |  |   23|  84.0k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:35): [True: 41.1k, False: 1.75k]
  |  |  |  Branch (23:35): [True: 35.0k, False: 6.08k]
  |  |  |  Branch (23:49): [True: 34.8k, False: 185]
  |  |  ------------------
  ------------------
  122|  34.8k|        CallOneOf(
  123|  34.8k|            fuzzed_data_provider,
  124|  34.8k|            [&] {
  125|  34.8k|                const CScript script{ConsumeScript(fuzzed_data_provider)};
  126|  34.8k|                auto is_mine{spk_manager->IsMine(script)};
  127|  34.8k|                if (is_mine == isminetype::ISMINE_SPENDABLE) {
  128|  34.8k|                    assert(spk_manager->GetScriptPubKeys().count(script));
  129|  34.8k|                }
  130|  34.8k|            },
  131|  34.8k|            [&] {
  132|  34.8k|                auto spks{spk_manager->GetScriptPubKeys()};
  133|  34.8k|                for (const CScript& spk : spks) {
  134|  34.8k|                    assert(spk_manager->IsMine(spk) == ISMINE_SPENDABLE);
  135|  34.8k|                    CTxDestination dest;
  136|  34.8k|                    bool extract_dest{ExtractDestination(spk, dest)};
  137|  34.8k|                    if (extract_dest) {
  138|  34.8k|                        const std::string msg{fuzzed_data_provider.ConsumeRandomLengthString()};
  139|  34.8k|                        PKHash pk_hash{std::get_if<PKHash>(&dest) && fuzzed_data_provider.ConsumeBool() ?
  140|  34.8k|                                           *std::get_if<PKHash>(&dest) :
  141|  34.8k|                                           PKHash{ConsumeUInt160(fuzzed_data_provider)}};
  142|  34.8k|                        std::string str_sig;
  143|  34.8k|                        (void)spk_manager->SignMessage(msg, pk_hash, str_sig);
  144|  34.8k|                        (void)spk_manager->GetMetadata(dest);
  145|  34.8k|                    }
  146|  34.8k|                }
  147|  34.8k|            },
  148|  34.8k|            [&] {
  149|  34.8k|                auto spks{spk_manager->GetScriptPubKeys()};
  150|  34.8k|                if (!spks.empty()) {
  151|  34.8k|                    auto& spk{PickValue(fuzzed_data_provider, spks)};
  152|  34.8k|                    (void)spk_manager->MarkUnusedAddresses(spk);
  153|  34.8k|                }
  154|  34.8k|            },
  155|  34.8k|            [&] {
  156|  34.8k|                LOCK(spk_manager->cs_desc_man);
  157|  34.8k|                auto wallet_desc{spk_manager->GetWalletDescriptor()};
  158|  34.8k|                if (wallet_desc.descriptor->IsSingleType()) {
  159|  34.8k|                    auto output_type{wallet_desc.descriptor->GetOutputType()};
  160|  34.8k|                    if (output_type.has_value()) {
  161|  34.8k|                        auto dest{spk_manager->GetNewDestination(*output_type)};
  162|  34.8k|                        if (dest) {
  163|  34.8k|                            assert(IsValidDestination(*dest));
  164|  34.8k|                            assert(spk_manager->IsHDEnabled());
  165|  34.8k|                        }
  166|  34.8k|                    }
  167|  34.8k|                }
  168|  34.8k|            },
  169|  34.8k|            [&] {
  170|  34.8k|                CMutableTransaction tx_to;
  171|  34.8k|                const std::optional<CMutableTransaction> opt_tx_to{ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider, TX_WITH_WITNESS)};
  172|  34.8k|                if (!opt_tx_to) {
  173|  34.8k|                    good_data = false;
  174|  34.8k|                    return;
  175|  34.8k|                }
  176|  34.8k|                tx_to = *opt_tx_to;
  177|       |
  178|  34.8k|                std::map<COutPoint, Coin> coins{ConsumeCoins(fuzzed_data_provider)};
  179|  34.8k|                const int sighash{fuzzed_data_provider.ConsumeIntegral<int>()};
  180|  34.8k|                std::map<int, bilingual_str> input_errors;
  181|  34.8k|                (void)spk_manager->SignTransaction(tx_to, coins, sighash, input_errors);
  182|  34.8k|            },
  183|  34.8k|            [&] {
  184|  34.8k|                std::optional<PartiallySignedTransaction> opt_psbt{ConsumeDeserializable<PartiallySignedTransaction>(fuzzed_data_provider)};
  185|  34.8k|                if (!opt_psbt) {
  186|  34.8k|                    good_data = false;
  187|  34.8k|                    return;
  188|  34.8k|                }
  189|  34.8k|                auto psbt{*opt_psbt};
  190|  34.8k|                const PrecomputedTransactionData txdata{PrecomputePSBTData(psbt)};
  191|  34.8k|                const int sighash_type{fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 150)};
  192|  34.8k|                auto sign  = fuzzed_data_provider.ConsumeBool();
  193|  34.8k|                auto bip32derivs = fuzzed_data_provider.ConsumeBool();
  194|  34.8k|                auto finalize = fuzzed_data_provider.ConsumeBool();
  195|  34.8k|                (void)spk_manager->FillPSBT(psbt, txdata, sighash_type, sign, bip32derivs, nullptr, finalize);
  196|  34.8k|            }
  197|  34.8k|        );
  198|  34.8k|    }
  199|       |
  200|  8.02k|    std::string descriptor;
  201|  8.02k|    (void)spk_manager->GetDescriptorString(descriptor, /*priv=*/fuzzed_data_provider.ConsumeBool());
  202|  8.02k|    (void)spk_manager->GetEndRange();
  203|  8.02k|    (void)spk_manager->GetKeyPoolSize();
  204|  8.02k|}
scriptpubkeyman.cpp:_ZN6wallet12_GLOBAL__N_122CreateWalletDescriptorER18FuzzedDataProvider:
   65|  13.7k|{
   66|  13.7k|    const std::string mocked_descriptor{fuzzed_data_provider.ConsumeRandomLengthString()};
   67|  13.7k|    if (TooDeepDerivPath(mocked_descriptor)) return {};
  ------------------
  |  Branch (67:9): [True: 8, False: 13.7k]
  ------------------
   68|  13.7k|    const auto desc_str{MOCKED_DESC_CONVERTER.GetDescriptor(mocked_descriptor)};
   69|  13.7k|    if (!desc_str.has_value()) return std::nullopt;
  ------------------
  |  Branch (69:9): [True: 380, False: 13.3k]
  ------------------
   70|       |
   71|  13.3k|    FlatSigningProvider keys;
   72|  13.3k|    std::string error;
   73|  13.3k|    std::vector<std::unique_ptr<Descriptor>> parsed_descs = Parse(desc_str.value(), keys, error, false);
   74|  13.3k|    if (parsed_descs.empty()) return std::nullopt;
  ------------------
  |  Branch (74:9): [True: 3.26k, False: 10.0k]
  ------------------
   75|       |
   76|  10.0k|    WalletDescriptor w_desc{std::move(parsed_descs.at(0)), /*creation_time=*/0, /*range_start=*/0, /*range_end=*/1, /*next_index=*/1};
   77|  10.0k|    return std::make_pair(w_desc, keys);
   78|  13.3k|}
scriptpubkeyman.cpp:_ZN6wallet12_GLOBAL__N_116TooDeepDerivPathENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   59|  13.7k|{
   60|  13.7k|    const FuzzBufferType desc_buf{reinterpret_cast<const unsigned char *>(desc.data()), desc.size()};
   61|  13.7k|    return HasDeepDerivPath(desc_buf);
   62|  13.7k|}
scriptpubkeyman.cpp:_ZN6wallet12_GLOBAL__N_116CreateDescriptorERNS_16WalletDescriptorER19FlatSigningProviderRNS_7CWalletE:
   81|  8.65k|{
   82|  8.65k|    LOCK(keystore.cs_wallet);
  ------------------
  |  |  257|  8.65k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  8.65k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  8.65k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  8.65k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  8.65k|    keystore.AddWalletDescriptor(wallet_desc, keys, /*label=*/"", /*internal=*/false);
   84|  8.65k|    return keystore.GetDescriptorScriptPubKeyMan(wallet_desc);
   85|  8.65k|};
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEv:
  124|  1.81k|            [&] {
  125|  1.81k|                const CScript script{ConsumeScript(fuzzed_data_provider)};
  126|  1.81k|                auto is_mine{spk_manager->IsMine(script)};
  127|  1.81k|                if (is_mine == isminetype::ISMINE_SPENDABLE) {
  ------------------
  |  Branch (127:21): [True: 10, False: 1.80k]
  ------------------
  128|     10|                    assert(spk_manager->GetScriptPubKeys().count(script));
  129|     10|                }
  130|  1.81k|            },
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_1clEv:
  131|  9.39k|            [&] {
  132|  9.39k|                auto spks{spk_manager->GetScriptPubKeys()};
  133|  33.3k|                for (const CScript& spk : spks) {
  ------------------
  |  Branch (133:41): [True: 33.3k, False: 9.39k]
  ------------------
  134|  33.3k|                    assert(spk_manager->IsMine(spk) == ISMINE_SPENDABLE);
  135|  33.3k|                    CTxDestination dest;
  136|  33.3k|                    bool extract_dest{ExtractDestination(spk, dest)};
  137|  33.3k|                    if (extract_dest) {
  ------------------
  |  Branch (137:25): [True: 27.6k, False: 5.68k]
  ------------------
  138|  27.6k|                        const std::string msg{fuzzed_data_provider.ConsumeRandomLengthString()};
  139|  27.6k|                        PKHash pk_hash{std::get_if<PKHash>(&dest) && fuzzed_data_provider.ConsumeBool() ?
  ------------------
  |  Branch (139:40): [True: 18.2k, False: 9.41k]
  |  Branch (139:70): [True: 15.0k, False: 3.23k]
  ------------------
  140|  15.0k|                                           *std::get_if<PKHash>(&dest) :
  141|  27.6k|                                           PKHash{ConsumeUInt160(fuzzed_data_provider)}};
  142|  27.6k|                        std::string str_sig;
  143|  27.6k|                        (void)spk_manager->SignMessage(msg, pk_hash, str_sig);
  144|  27.6k|                        (void)spk_manager->GetMetadata(dest);
  145|  27.6k|                    }
  146|  33.3k|                }
  147|  9.39k|            },
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_2clEv:
  148|  2.13k|            [&] {
  149|  2.13k|                auto spks{spk_manager->GetScriptPubKeys()};
  150|  2.13k|                if (!spks.empty()) {
  ------------------
  |  Branch (150:21): [True: 2.05k, False: 78]
  ------------------
  151|  2.05k|                    auto& spk{PickValue(fuzzed_data_provider, spks)};
  152|  2.05k|                    (void)spk_manager->MarkUnusedAddresses(spk);
  153|  2.05k|                }
  154|  2.13k|            },
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_3clEv:
  155|  13.8k|            [&] {
  156|  13.8k|                LOCK(spk_manager->cs_desc_man);
  ------------------
  |  |  257|  13.8k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  13.8k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  13.8k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  13.8k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|  13.8k|                auto wallet_desc{spk_manager->GetWalletDescriptor()};
  158|  13.8k|                if (wallet_desc.descriptor->IsSingleType()) {
  ------------------
  |  Branch (158:21): [True: 13.5k, False: 252]
  ------------------
  159|  13.5k|                    auto output_type{wallet_desc.descriptor->GetOutputType()};
  160|  13.5k|                    if (output_type.has_value()) {
  ------------------
  |  Branch (160:25): [True: 11.2k, False: 2.35k]
  ------------------
  161|  11.2k|                        auto dest{spk_manager->GetNewDestination(*output_type)};
  162|  11.2k|                        if (dest) {
  ------------------
  |  Branch (162:29): [True: 9.70k, False: 1.52k]
  ------------------
  163|  9.70k|                            assert(IsValidDestination(*dest));
  164|  9.70k|                            assert(spk_manager->IsHDEnabled());
  165|  9.70k|                        }
  166|  11.2k|                    }
  167|  13.5k|                }
  168|  13.8k|            },
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_4clEv:
  169|  3.09k|            [&] {
  170|  3.09k|                CMutableTransaction tx_to;
  171|  3.09k|                const std::optional<CMutableTransaction> opt_tx_to{ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider, TX_WITH_WITNESS)};
  172|  3.09k|                if (!opt_tx_to) {
  ------------------
  |  Branch (172:21): [True: 311, False: 2.78k]
  ------------------
  173|    311|                    good_data = false;
  174|    311|                    return;
  175|    311|                }
  176|  2.78k|                tx_to = *opt_tx_to;
  177|       |
  178|  2.78k|                std::map<COutPoint, Coin> coins{ConsumeCoins(fuzzed_data_provider)};
  179|  2.78k|                const int sighash{fuzzed_data_provider.ConsumeIntegral<int>()};
  180|  2.78k|                std::map<int, bilingual_str> input_errors;
  181|  2.78k|                (void)spk_manager->SignTransaction(tx_to, coins, sighash, input_errors);
  182|  2.78k|            },
scriptpubkeyman.cpp:_ZZN6wallet12_GLOBAL__N_127scriptpubkeyman_fuzz_targetENSt3__14spanIKhLm18446744073709551615EEEENK3$_5clEv:
  183|  4.60k|            [&] {
  184|  4.60k|                std::optional<PartiallySignedTransaction> opt_psbt{ConsumeDeserializable<PartiallySignedTransaction>(fuzzed_data_provider)};
  185|  4.60k|                if (!opt_psbt) {
  ------------------
  |  Branch (185:21): [True: 1.44k, False: 3.15k]
  ------------------
  186|  1.44k|                    good_data = false;
  187|  1.44k|                    return;
  188|  1.44k|                }
  189|  3.15k|                auto psbt{*opt_psbt};
  190|  3.15k|                const PrecomputedTransactionData txdata{PrecomputePSBTData(psbt)};
  191|  3.15k|                const int sighash_type{fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 150)};
  192|  3.15k|                auto sign  = fuzzed_data_provider.ConsumeBool();
  193|  3.15k|                auto bip32derivs = fuzzed_data_provider.ConsumeBool();
  194|  3.15k|                auto finalize = fuzzed_data_provider.ConsumeBool();
  195|  3.15k|                (void)spk_manager->FillPSBT(psbt, txdata, sighash_type, sign, bip32derivs, nullptr, finalize);
  196|  3.15k|            }

_ZN6wallet13MockableBatch8WriteKeyEO10DataStreamS2_b:
  136|   100k|{
  137|   100k|    if (!m_pass) {
  ------------------
  |  Branch (137:9): [True: 0, False: 100k]
  ------------------
  138|      0|        return false;
  139|      0|    }
  140|   100k|    SerializeData key_data{key.begin(), key.end()};
  141|   100k|    SerializeData value_data{value.begin(), value.end()};
  142|   100k|    auto [it, inserted] = m_records.emplace(key_data, value_data);
  143|   100k|    if (!inserted && overwrite) { // Overwrite if requested
  ------------------
  |  Branch (143:9): [True: 28.5k, False: 72.2k]
  |  Branch (143:22): [True: 28.5k, False: 0]
  ------------------
  144|  28.5k|        it->second = value_data;
  145|  28.5k|        inserted = true;
  146|  28.5k|    }
  147|   100k|    return inserted;
  148|   100k|}
_ZN6wallet28CreateMockableWalletDatabaseENSt3__13mapINS0_6vectorISt4byte25zero_after_free_allocatorIS3_EEES6_NS0_4lessIvEENS0_9allocatorINS0_4pairIKS6_S6_EEEEEE:
  187|  11.6k|{
  188|  11.6k|    return std::make_unique<MockableDatabase>(records);
  189|  11.6k|}

_ZN6wallet13MockableBatchC2ERNSt3__13mapINS1_6vectorISt4byte25zero_after_free_allocatorIS4_EEES7_NS1_4lessIvEENS1_9allocatorINS1_4pairIKS7_S7_EEEEEEb:
   83|  57.7k|    explicit MockableBatch(MockableData& records, bool pass) : m_records(records), m_pass(pass) {}
_ZN6wallet13MockableBatch5FlushEv:
   86|   100k|    void Flush() override {}
_ZN6wallet13MockableBatch8TxnBeginEv:
   96|  20.6k|    bool TxnBegin() override { return m_pass; }
_ZN6wallet13MockableBatch9TxnCommitEv:
   97|  20.6k|    bool TxnCommit() override { return m_pass; }
_ZN6wallet16MockableDatabaseC2ENSt3__13mapINS1_6vectorISt4byte25zero_after_free_allocatorIS4_EEES7_NS1_4lessIvEENS1_9allocatorINS1_4pairIKS7_S7_EEEEEE:
  110|  11.6k|    MockableDatabase(MockableData records = {}) : WalletDatabase(), m_records(records) {}
_ZN6wallet16MockableDatabase22IncrementUpdateCounterEv:
  122|   100k|    void IncrementUpdateCounter() override {}
_ZN6wallet16MockableDatabase9MakeBatchEb:
  127|  57.7k|    std::unique_ptr<DatabaseBatch> MakeBatch(bool flush_on_close = true) override { return std::make_unique<MockableBatch>(m_records, m_pass); }
_ZN6wallet16MockableDatabaseD2Ev:
  111|  11.6k|    ~MockableDatabase() = default;

_ZNK6wallet7CWallet6IsMineERKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
 1618|  1.45k|{
 1619|  1.45k|    AssertLockHeld(cs_wallet);
  ------------------
  |  |  142|  1.45k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 1620|  1.45k|    return IsMine(GetScriptForDestination(dest));
 1621|  1.45k|}
_ZNK6wallet7CWallet6IsMineERK7CScript:
 1624|  1.45k|{
 1625|  1.45k|    AssertLockHeld(cs_wallet);
  ------------------
  |  |  142|  1.45k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 1626|       |
 1627|       |    // Search the cache so that IsMine is called only on the relevant SPKMs instead of on everything in m_spk_managers
 1628|  1.45k|    const auto& it = m_cached_spks.find(script);
 1629|  1.45k|    if (it != m_cached_spks.end()) {
  ------------------
  |  Branch (1629:9): [True: 1.45k, False: 0]
  ------------------
 1630|  1.45k|        isminetype res = ISMINE_NO;
 1631|  1.57k|        for (const auto& spkm : it->second) {
  ------------------
  |  Branch (1631:31): [True: 1.57k, False: 1.45k]
  ------------------
 1632|  1.57k|            res = std::max(res, spkm->IsMine(script));
 1633|  1.57k|        }
 1634|  1.45k|        Assume(res == ISMINE_SPENDABLE);
  ------------------
  |  |   97|  1.45k|#define Assume(val) inline_assertion_check<false>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
 1635|  1.45k|        return res;
 1636|  1.45k|    }
 1637|       |
 1638|       |    // Legacy wallet
 1639|      0|    if (LegacyScriptPubKeyMan* spkm = GetLegacyScriptPubKeyMan()) {
  ------------------
  |  Branch (1639:32): [True: 0, False: 0]
  ------------------
 1640|      0|        return spkm->IsMine(script);
 1641|      0|    }
 1642|       |
 1643|      0|    return ISMINE_NO;
 1644|      0|}
_ZN6wallet7CWallet13SetWalletFlagEm:
 1710|  11.6k|{
 1711|  11.6k|    WalletBatch batch(GetDatabase());
 1712|  11.6k|    return SetWalletFlagWithDB(batch, flags);
 1713|  11.6k|}
_ZN6wallet7CWallet19SetWalletFlagWithDBERNS_11WalletBatchEm:
 1716|  11.6k|{
 1717|  11.6k|    LOCK(cs_wallet);
  ------------------
  |  |  257|  11.6k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  11.6k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  11.6k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  11.6k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1718|  11.6k|    m_wallet_flags |= flags;
 1719|  11.6k|    if (!batch.WriteWalletFlags(m_wallet_flags))
  ------------------
  |  Branch (1719:9): [True: 0, False: 11.6k]
  ------------------
 1720|      0|        throw std::runtime_error(std::string(__func__) + ": writing wallet flags failed");
 1721|  11.6k|}
_ZNK6wallet7CWallet15IsWalletFlagSetEm:
 1743|  16.2k|{
 1744|  16.2k|    return (m_wallet_flags & flag);
 1745|  16.2k|}
_ZN6wallet7CWallet20MaybeUpdateBirthTimeEl:
 1829|  8.52k|{
 1830|  8.52k|    int64_t birthtime = m_birth_time.load();
 1831|  8.52k|    if (time < birthtime) {
  ------------------
  |  Branch (1831:9): [True: 8.52k, False: 0]
  ------------------
 1832|  8.52k|        m_birth_time = time;
 1833|  8.52k|    }
 1834|  8.52k|}
_ZN6wallet7CWallet20GetDefaultNextResendEv:
 2096|  11.6k|NodeClock::time_point CWallet::GetDefaultNextResend() { return FastRandomContext{}.rand_uniform_delay(NodeClock::now() + 12h, 24h); }
_ZN6wallet7CWallet20SetAddressBookWithDBERNS_11WalletBatchERKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKNS3_8optionalINS_14AddressPurposeEEE:
 2455|  1.45k|{
 2456|  1.45k|    bool fUpdated = false;
 2457|  1.45k|    bool is_mine;
 2458|  1.45k|    std::optional<AddressPurpose> purpose;
 2459|  1.45k|    {
 2460|  1.45k|        LOCK(cs_wallet);
  ------------------
  |  |  257|  1.45k|#define LOCK(cs) UniqueLock UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |   11|  1.45k|#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__)
  |  |  |  |  ------------------
  |  |  |  |  |  |    9|  1.45k|#define PASTE2(x, y) PASTE(x, y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |    8|  1.45k|#define PASTE(x, y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2461|  1.45k|        std::map<CTxDestination, CAddressBookData>::iterator mi = m_address_book.find(address);
 2462|  1.45k|        fUpdated = mi != m_address_book.end() && !mi->second.IsChange();
  ------------------
  |  Branch (2462:20): [True: 118, False: 1.34k]
  |  Branch (2462:50): [True: 118, False: 0]
  ------------------
 2463|       |
 2464|  1.45k|        CAddressBookData& record = mi != m_address_book.end() ? mi->second : m_address_book[address];
  ------------------
  |  Branch (2464:36): [True: 118, False: 1.34k]
  ------------------
 2465|  1.45k|        record.SetLabel(strName);
 2466|  1.45k|        is_mine = IsMine(address) != ISMINE_NO;
 2467|  1.45k|        if (new_purpose) { /* update purpose only if requested */
  ------------------
  |  Branch (2467:13): [True: 1.45k, False: 0]
  ------------------
 2468|  1.45k|            record.purpose = new_purpose;
 2469|  1.45k|        }
 2470|  1.45k|        purpose = record.purpose;
 2471|  1.45k|    }
 2472|       |
 2473|  1.45k|    const std::string& encoded_dest = EncodeDestination(address);
 2474|  1.45k|    if (new_purpose && !batch.WritePurpose(encoded_dest, PurposeToString(*new_purpose))) {
  ------------------
  |  Branch (2474:9): [True: 1.45k, False: 0]
  |  Branch (2474:9): [True: 0, False: 1.45k]
  |  Branch (2474:24): [True: 0, False: 1.45k]
  ------------------
 2475|      0|        WalletLogPrintf("Error: fail to write address book 'purpose' entry\n");
 2476|      0|        return false;
 2477|      0|    }
 2478|  1.45k|    if (!batch.WriteName(encoded_dest, strName)) {
  ------------------
  |  Branch (2478:9): [True: 0, False: 1.45k]
  ------------------
 2479|      0|        WalletLogPrintf("Error: fail to write address book 'name' entry\n");
 2480|      0|        return false;
 2481|      0|    }
 2482|       |
 2483|       |    // In very old wallets, address purpose may not be recorded so we derive it from IsMine
 2484|  1.45k|    NotifyAddressBookChanged(address, strName, is_mine,
 2485|  1.45k|                             purpose.value_or(is_mine ? AddressPurpose::RECEIVE : AddressPurpose::SEND),
  ------------------
  |  Branch (2485:47): [True: 1.45k, False: 0]
  ------------------
 2486|  1.45k|                             (fUpdated ? CT_UPDATED : CT_NEW));
  ------------------
  |  Branch (2486:31): [True: 118, False: 1.34k]
  ------------------
 2487|  1.45k|    return true;
 2488|  1.45k|}
_ZN6wallet7CWallet14SetAddressBookERKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_8optionalINS_14AddressPurposeEEE:
 2491|  1.45k|{
 2492|  1.45k|    WalletBatch batch(GetDatabase());
 2493|  1.45k|    return SetAddressBookWithDB(batch, address, strName, purpose);
 2494|  1.45k|}
_ZN6wallet7CWallet18AddScriptPubKeyManERK7uint256NSt3__110unique_ptrINS_15ScriptPubKeyManENS4_14default_deleteIS6_EEEE:
 3679|  8.52k|{
 3680|       |    // Add spkm_man to m_spk_managers before calling any method
 3681|       |    // that might access it.
 3682|  8.52k|    const auto& spkm = m_spk_managers[id] = std::move(spkm_man);
 3683|       |
 3684|       |    // Update birth time if needed
 3685|  8.52k|    MaybeUpdateBirthTime(spkm->GetTimeFirstKey());
 3686|  8.52k|}
_ZNK6wallet7CWallet17HasEncryptionKeysEv:
 3719|  50.9k|{
 3720|  50.9k|    return !mapMasterKeys.empty();
 3721|  50.9k|}
_ZNK6wallet7CWallet28GetDescriptorScriptPubKeyManERKNS_16WalletDescriptorE:
 3905|  17.3k|{
 3906|  17.3k|    for (auto& spk_man_pair : m_spk_managers) {
  ------------------
  |  Branch (3906:29): [True: 8.78k, False: 8.52k]
  ------------------
 3907|       |        // Try to downcast to DescriptorScriptPubKeyMan then check if the descriptors match
 3908|  8.78k|        DescriptorScriptPubKeyMan* spk_manager = dynamic_cast<DescriptorScriptPubKeyMan*>(spk_man_pair.second.get());
 3909|  8.78k|        if (spk_manager != nullptr && spk_manager->HasWalletDescriptor(desc)) {
  ------------------
  |  Branch (3909:13): [True: 8.78k, False: 0]
  |  Branch (3909:39): [True: 8.78k, False: 0]
  ------------------
 3910|  8.78k|            return spk_manager;
 3911|  8.78k|        }
 3912|  8.78k|    }
 3913|       |
 3914|  8.52k|    return nullptr;
 3915|  17.3k|}
_ZN6wallet7CWallet19AddWalletDescriptorERNS_16WalletDescriptorERK19FlatSigningProviderRKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
 3942|  8.65k|{
 3943|  8.65k|    AssertLockHeld(cs_wallet);
  ------------------
  |  |  142|  8.65k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
 3944|       |
 3945|  8.65k|    if (!IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
  ------------------
  |  Branch (3945:9): [True: 0, False: 8.65k]
  ------------------
 3946|      0|        WalletLogPrintf("Cannot add WalletDescriptor to a non-descriptor wallet\n");
 3947|      0|        return nullptr;
 3948|      0|    }
 3949|       |
 3950|  8.65k|    auto spk_man = GetDescriptorScriptPubKeyMan(desc);
 3951|  8.65k|    if (spk_man) {
  ------------------
  |  Branch (3951:9): [True: 130, False: 8.52k]
  ------------------
 3952|    130|        WalletLogPrintf("Update existing descriptor: %s\n", desc.descriptor->ToString());
 3953|    130|        spk_man->UpdateWalletDescriptor(desc);
 3954|  8.52k|    } else {
 3955|  8.52k|        auto new_spk_man = std::unique_ptr<DescriptorScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this, desc, m_keypool_size));
 3956|  8.52k|        spk_man = new_spk_man.get();
 3957|       |
 3958|       |        // Save the descriptor to memory
 3959|  8.52k|        uint256 id = new_spk_man->GetID();
 3960|  8.52k|        AddScriptPubKeyMan(id, std::move(new_spk_man));
 3961|  8.52k|    }
 3962|       |
 3963|       |    // Add the private keys to the descriptor
 3964|  8.65k|    for (const auto& entry : signing_provider.keys) {
  ------------------
  |  Branch (3964:28): [True: 7.64k, False: 8.65k]
  ------------------
 3965|  7.64k|        const CKey& key = entry.second;
 3966|  7.64k|        spk_man->AddDescriptorKey(key, key.GetPubKey());
 3967|  7.64k|    }
 3968|       |
 3969|       |    // Top up key pool, the manager will generate new scriptPubKeys internally
 3970|  8.65k|    if (!spk_man->TopUp()) {
  ------------------
  |  Branch (3970:9): [True: 2.04k, False: 6.61k]
  ------------------
 3971|  2.04k|        WalletLogPrintf("Could not top up scriptPubKeys\n");
 3972|  2.04k|        return nullptr;
 3973|  2.04k|    }
 3974|       |
 3975|       |    // Apply the label if necessary
 3976|       |    // Note: we disable labels for ranged descriptors
 3977|  6.61k|    if (!desc.descriptor->IsRange()) {
  ------------------
  |  Branch (3977:9): [True: 3.90k, False: 2.70k]
  ------------------
 3978|  3.90k|        auto script_pub_keys = spk_man->GetScriptPubKeys();
 3979|  3.90k|        if (script_pub_keys.empty()) {
  ------------------
  |  Branch (3979:13): [True: 0, False: 3.90k]
  ------------------
 3980|      0|            WalletLogPrintf("Could not generate scriptPubKeys (cache is empty)\n");
 3981|      0|            return nullptr;
 3982|      0|        }
 3983|       |
 3984|  3.90k|        if (!internal) {
  ------------------
  |  Branch (3984:13): [True: 3.90k, False: 0]
  ------------------
 3985|  4.27k|            for (const auto& script : script_pub_keys) {
  ------------------
  |  Branch (3985:37): [True: 4.27k, False: 3.90k]
  ------------------
 3986|  4.27k|                CTxDestination dest;
 3987|  4.27k|                if (ExtractDestination(script, dest)) {
  ------------------
  |  Branch (3987:21): [True: 1.45k, False: 2.81k]
  ------------------
 3988|  1.45k|                    SetAddressBook(dest, label, AddressPurpose::RECEIVE);
 3989|  1.45k|                }
 3990|  4.27k|            }
 3991|  3.90k|        }
 3992|  3.90k|    }
 3993|       |
 3994|       |    // Save the descriptor to DB
 3995|  6.61k|    spk_man->WriteDescriptor();
 3996|       |
 3997|  6.61k|    return spk_man;
 3998|  6.61k|}
_ZN6wallet7CWallet21CacheNewScriptPubKeysERKNSt3__13setI7CScriptNS1_4lessIS3_EENS1_9allocatorIS3_EEEEPNS_15ScriptPubKeyManE:
 4625|  18.3k|{
 4626|  23.0k|    for (const auto& script : spks) {
  ------------------
  |  Branch (4626:29): [True: 23.0k, False: 18.3k]
  ------------------
 4627|  23.0k|        m_cached_spks[script].push_back(spkm);
 4628|  23.0k|    }
 4629|  18.3k|}
_ZN6wallet7CWallet13TopUpCallbackERKNSt3__13setI7CScriptNS1_4lessIS3_EENS1_9allocatorIS3_EEEEPNS_15ScriptPubKeyManE:
 4632|  18.3k|{
 4633|       |    // Update scriptPubKey cache
 4634|  18.3k|    CacheNewScriptPubKeys(spks, spkm);
 4635|  18.3k|}

_ZN6wallet7CWallet21SetLastBlockProcessedEi7uint256:
  993|  11.6k|    {
  994|  11.6k|        AssertLockHeld(cs_wallet);
  ------------------
  |  |  142|  11.6k|#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
  ------------------
  995|  11.6k|        m_last_block_processed_height = block_height;
  996|  11.6k|        m_last_block_processed = block_hash;
  997|  11.6k|    };
_ZN6wallet7CWalletC2EPN10interfaces5ChainERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrINS_14WalletDatabaseENS4_14default_deleteISE_EEEE:
  463|  11.6k|        : m_chain(chain),
  464|  11.6k|          m_name(name),
  465|  11.6k|          m_database(std::move(database))
  466|  11.6k|    {
  467|  11.6k|    }
_ZN6wallet7CWalletD2Ev:
  470|  11.6k|    {
  471|       |        // Should not have slots connected at this point.
  472|  11.6k|        assert(NotifyUnload.empty());
  473|  11.6k|    }
_ZNK6wallet16CAddressBookData8IsChangeEv:
  265|    118|    bool IsChange() const { return !label.has_value(); }
_ZN6wallet16CAddressBookData8SetLabelENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  267|  1.45k|    void SetLabel(std::string name) { label = std::move(name); }
_ZNK6wallet7CWallet11GetDatabaseEv:
  448|  57.7k|    {
  449|  57.7k|        assert(static_cast<bool>(m_database));
  450|  57.7k|        return *m_database;
  451|  57.7k|    }
_ZNK6wallet7CWallet7GetNameEv:
  455|  2.55k|    const std::string& GetName() const { return m_name; }
_ZNK6wallet7CWallet14GetDisplayNameEv:
  927|  2.55k|    {
  928|  2.55k|        std::string wallet_name = GetName().length() == 0 ? "default wallet" : GetName();
  ------------------
  |  Branch (928:35): [True: 2.55k, False: 0]
  ------------------
  929|  2.55k|        return strprintf("[%s]", wallet_name);
  ------------------
  |  | 1172|  2.55k|#define strprintf tfm::format
  ------------------
  930|  2.55k|    };
_ZN6wallet15PurposeToStringENS_14AddressPurposeE:
  271|  1.45k|{
  272|  1.45k|    switch(p) {
  ------------------
  |  Branch (272:12): [True: 0, False: 1.45k]
  ------------------
  273|  1.45k|    case AddressPurpose::RECEIVE: return "receive";
  ------------------
  |  Branch (273:5): [True: 1.45k, False: 0]
  ------------------
  274|      0|    case AddressPurpose::SEND: return "send";
  ------------------
  |  Branch (274:5): [True: 0, False: 1.45k]
  ------------------
  275|      0|    case AddressPurpose::REFUND: return "refund";
  ------------------
  |  Branch (275:5): [True: 0, False: 1.45k]
  ------------------
  276|  1.45k|    } // no default case so the compiler will warn when a new enum as added
  277|      0|    assert(false);
  278|      0|}
_ZNK6wallet7CWallet15WalletLogPrintfIJEEEvN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  935|  2.04k|    {
  936|  2.04k|        LogInfo("%s %s", GetDisplayName(), tfm::format(wallet_fmt, params...));
  ------------------
  |  |  261|  2.04k|#define LogInfo(...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  255|  2.04k|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
  937|  2.04k|    };
_ZNK6wallet7CWallet15WalletLogPrintfIJNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEvN4util21ConstevalFormatStringIXsZT_EEEDpRKT_:
  935|    130|    {
  936|    130|        LogInfo("%s %s", GetDisplayName(), tfm::format(wallet_fmt, params...));
  ------------------
  |  |  261|    130|#define LogInfo(...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Info, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  255|    130|#define LogPrintLevel_(category, level, ...) LogPrintFormatInternal(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
  |  |  ------------------
  ------------------
  937|    130|    };

_ZN6wallet11WalletBatch9WriteNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   75|  1.45k|{
   76|  1.45k|    return WriteIC(std::make_pair(DBKeys::NAME, strAddress), strName);
   77|  1.45k|}
_ZN6wallet11WalletBatch12WritePurposeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   87|  1.45k|{
   88|  1.45k|    return WriteIC(std::make_pair(DBKeys::PURPOSE, strAddress), strPurpose);
   89|  1.45k|}
_ZN6wallet11WalletBatch18WriteDescriptorKeyERK7uint256RK7CPubKeyRKNSt3__16vectorIh16secure_allocatorIhEEE:
  244|  7.55k|{
  245|       |    // hash pubkey/privkey to accelerate wallet load
  246|  7.55k|    std::vector<unsigned char> key;
  247|  7.55k|    key.reserve(pubkey.size() + privkey.size());
  248|  7.55k|    key.insert(key.end(), pubkey.begin(), pubkey.end());
  249|  7.55k|    key.insert(key.end(), privkey.begin(), privkey.end());
  250|       |
  251|  7.55k|    return WriteIC(std::make_pair(DBKeys::WALLETDESCRIPTORKEY, std::make_pair(desc_id, pubkey)), std::make_pair(privkey, Hash(key)), false);
  252|  7.55k|}
_ZN6wallet11WalletBatch15WriteDescriptorERK7uint256RKNS_16WalletDescriptorE:
  264|  34.6k|{
  265|  34.6k|    return WriteIC(make_pair(DBKeys::WALLETDESCRIPTOR, desc_id), descriptor);
  266|  34.6k|}
_ZN6wallet11WalletBatch27WriteDescriptorDerivedCacheERK10CExtPubKeyRK7uint256jj:
  269|  21.5k|{
  270|  21.5k|    std::vector<unsigned char> ser_xpub(BIP32_EXTKEY_SIZE);
  271|  21.5k|    xpub.Encode(ser_xpub.data());
  272|  21.5k|    return WriteIC(std::make_pair(std::make_pair(DBKeys::WALLETDESCRIPTORCACHE, desc_id), std::make_pair(key_exp_index, der_index)), ser_xpub);
  273|  21.5k|}
_ZN6wallet11WalletBatch26WriteDescriptorParentCacheERK10CExtPubKeyRK7uint256j:
  276|  21.5k|{
  277|  21.5k|    std::vector<unsigned char> ser_xpub(BIP32_EXTKEY_SIZE);
  278|  21.5k|    xpub.Encode(ser_xpub.data());
  279|  21.5k|    return WriteIC(std::make_pair(std::make_pair(DBKeys::WALLETDESCRIPTORCACHE, desc_id), key_exp_index), ser_xpub);
  280|  21.5k|}
_ZN6wallet11WalletBatch32WriteDescriptorLastHardenedCacheERK10CExtPubKeyRK7uint256j:
  283|    895|{
  284|    895|    std::vector<unsigned char> ser_xpub(BIP32_EXTKEY_SIZE);
  285|    895|    xpub.Encode(ser_xpub.data());
  286|    895|    return WriteIC(std::make_pair(std::make_pair(DBKeys::WALLETDESCRIPTORLHCACHE, desc_id), key_exp_index), ser_xpub);
  287|    895|}
_ZN6wallet11WalletBatch25WriteDescriptorCacheItemsERK7uint256RK15DescriptorCache:
  290|  18.3k|{
  291|  21.5k|    for (const auto& parent_xpub_pair : cache.GetCachedParentExtPubKeys()) {
  ------------------
  |  Branch (291:39): [True: 21.5k, False: 18.3k]
  ------------------
  292|  21.5k|        if (!WriteDescriptorParentCache(parent_xpub_pair.second, desc_id, parent_xpub_pair.first)) {
  ------------------
  |  Branch (292:13): [True: 0, False: 21.5k]
  ------------------
  293|      0|            return false;
  294|      0|        }
  295|  21.5k|    }
  296|  21.5k|    for (const auto& derived_xpub_map_pair : cache.GetCachedDerivedExtPubKeys()) {
  ------------------
  |  Branch (296:44): [True: 21.5k, False: 18.3k]
  ------------------
  297|  21.5k|        for (const auto& derived_xpub_pair : derived_xpub_map_pair.second) {
  ------------------
  |  Branch (297:44): [True: 21.5k, False: 21.5k]
  ------------------
  298|  21.5k|            if (!WriteDescriptorDerivedCache(derived_xpub_pair.second, desc_id, derived_xpub_map_pair.first, derived_xpub_pair.first)) {
  ------------------
  |  Branch (298:17): [True: 0, False: 21.5k]
  ------------------
  299|      0|                return false;
  300|      0|            }
  301|  21.5k|        }
  302|  21.5k|    }
  303|  18.3k|    for (const auto& lh_xpub_pair : cache.GetCachedLastHardenedExtPubKeys()) {
  ------------------
  |  Branch (303:35): [True: 895, False: 18.3k]
  ------------------
  304|    895|        if (!WriteDescriptorLastHardenedCache(lh_xpub_pair.second, desc_id, lh_xpub_pair.first)) {
  ------------------
  |  Branch (304:13): [True: 0, False: 895]
  ------------------
  305|      0|            return false;
  306|      0|        }
  307|    895|    }
  308|  18.3k|    return true;
  309|  18.3k|}
_ZN6wallet11WalletBatch16WriteWalletFlagsEm:
 1352|  11.6k|{
 1353|  11.6k|    return WriteIC(DBKeys::FLAGS, flags);
 1354|  11.6k|}
_ZN6wallet11WalletBatch8TxnBeginEv:
 1364|  20.6k|{
 1365|  20.6k|    return m_batch->TxnBegin();
 1366|  20.6k|}
_ZN6wallet11WalletBatch9TxnCommitEv:
 1369|  20.6k|{
 1370|  20.6k|    bool res = m_batch->TxnCommit();
 1371|  20.6k|    if (res) {
  ------------------
  |  Branch (1371:9): [True: 20.6k, False: 0]
  ------------------
 1372|  20.6k|        for (const auto& listener : m_txn_listeners) {
  ------------------
  |  Branch (1372:35): [True: 0, False: 20.6k]
  ------------------
 1373|      0|            listener.on_commit();
 1374|      0|        }
 1375|       |        // txn finished, clear listeners
 1376|  20.6k|        m_txn_listeners.clear();
 1377|  20.6k|    }
 1378|  20.6k|    return res;
 1379|  20.6k|}

_ZN6wallet12CKeyMetadataC2Ev:
  150|  23.2k|    {
  151|  23.2k|        SetNull();
  152|  23.2k|    }
_ZN6wallet12CKeyMetadata7SetNullEv:
  173|  23.2k|    {
  174|  23.2k|        nVersion = CKeyMetadata::CURRENT_VERSION;
  175|  23.2k|        nCreateTime = 0;
  176|  23.2k|        hdKeypath.clear();
  177|  23.2k|        hd_seed_id.SetNull();
  178|  23.2k|        key_origin.clear();
  179|  23.2k|        has_key_origin = false;
  180|  23.2k|    }
_ZN6wallet11WalletBatchC2ERNS_14WalletDatabaseEb:
  226|  57.7k|        m_batch(database.MakeBatch(_fFlushOnClose)),
  227|  57.7k|        m_database(database)
  228|  57.7k|    {
  229|  57.7k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_EES9_EEbRKT_RKT0_b:
  200|  2.91k|    {
  201|  2.91k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 2.91k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  2.91k|        m_database.IncrementUpdateCounter();
  205|  2.91k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 2.91k, False: 0]
  ------------------
  206|  2.91k|            m_batch->Flush();
  207|  2.91k|        }
  208|  2.91k|        return true;
  209|  2.91k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS3_I7uint2567CPubKeyEEEENS3_INS2_6vectorIh16secure_allocatorIhEEESA_EEEEbRKT_RKT0_b:
  200|  7.55k|    {
  201|  7.55k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 7.55k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  7.55k|        m_database.IncrementUpdateCounter();
  205|  7.55k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 7.55k, False: 0]
  ------------------
  206|  7.55k|            m_batch->Flush();
  207|  7.55k|        }
  208|  7.55k|        return true;
  209|  7.55k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__14pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EENS_16WalletDescriptorEEEbRKT_RKT0_b:
  200|  34.6k|    {
  201|  34.6k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 34.6k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  34.6k|        m_database.IncrementUpdateCounter();
  205|  34.6k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 34.6k, False: 0]
  ------------------
  206|  34.6k|            m_batch->Flush();
  207|  34.6k|        }
  208|  34.6k|        return true;
  209|  34.6k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__14pairINS3_INS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EENS3_IjjEEEENS2_6vectorIhNS7_IhEEEEEEbRKT_RKT0_b:
  200|  21.5k|    {
  201|  21.5k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 21.5k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  21.5k|        m_database.IncrementUpdateCounter();
  205|  21.5k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 21.5k, False: 0]
  ------------------
  206|  21.5k|            m_batch->Flush();
  207|  21.5k|        }
  208|  21.5k|        return true;
  209|  21.5k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__14pairINS3_INS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE7uint256EEjEENS2_6vectorIhNS7_IhEEEEEEbRKT_RKT0_b:
  200|  22.4k|    {
  201|  22.4k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 22.4k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  22.4k|        m_database.IncrementUpdateCounter();
  205|  22.4k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 22.4k, False: 0]
  ------------------
  206|  22.4k|            m_batch->Flush();
  207|  22.4k|        }
  208|  22.4k|        return true;
  209|  22.4k|    }
_ZN6wallet11WalletBatch7WriteICINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEmEEbRKT_RKT0_b:
  200|  11.6k|    {
  201|  11.6k|        if (!m_batch->Write(key, value, fOverwrite)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 11.6k]
  ------------------
  202|      0|            return false;
  203|      0|        }
  204|  11.6k|        m_database.IncrementUpdateCounter();
  205|  11.6k|        if (m_database.nUpdateCounter % 1000 == 0) {
  ------------------
  |  Branch (205:13): [True: 11.6k, False: 0]
  ------------------
  206|  11.6k|            m_batch->Flush();
  207|  11.6k|        }
  208|  11.6k|        return true;
  209|  11.6k|    }

_ZN6wallet16WalletDescriptorC2ENSt3__110shared_ptrI10DescriptorEEmiii:
  119|  10.0k|    WalletDescriptor(std::shared_ptr<Descriptor> descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index) : descriptor(descriptor), id(DescriptorID(*descriptor)), creation_time(creation_time), range_start(range_start), range_end(range_end), next_index(next_index) { }
_ZN6wallet16WalletDescriptor16SerializationOpsI10DataStreamKS0_15ActionSerializeEEvRT0_RT_T1_:
  111|  34.6k|    {
  112|  34.6k|        std::string descriptor_str;
  113|  34.6k|        SER_WRITE(obj, descriptor_str = obj.descriptor->ToString());
  ------------------
  |  |  158|  34.6k|#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
  ------------------
  114|  34.6k|        READWRITE(descriptor_str, obj.creation_time, obj.next_index, obj.range_start, obj.range_end);
  ------------------
  |  |  156|  34.6k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
  115|  34.6k|        SER_READ(obj, obj.DeserializeDescriptor(descriptor_str));
  ------------------
  |  |  157|  34.6k|#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, typename std::remove_const<Type>::type& obj) { code; })
  ------------------
  116|  34.6k|    }

