_ZN10ScriptHashC2ERK7CScript:
   20|    130|ScriptHash::ScriptHash(const CScript& in) : BaseHash(Hash160(in)) {}
_ZN6PKHashC2ERK6CKeyID:
   24|      8|PKHash::PKHash(const CKeyID& pubkey_id) : BaseHash(pubkey_id) {}
_ZN19WitnessV0ScriptHashC2ERK7CScript:
   45|    311|{
   46|    311|    CSHA256().Write(in.data(), in.size()).Finalize(begin());
   47|    311|}
_Z23GetScriptForDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  167|  3.12k|{
  168|  3.12k|    return std::visit(CScriptVisitor(), dest);
  169|  3.12k|}
_Z18IsValidDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  171|    371|bool IsValidDestination(const CTxDestination& dest) {
  172|    371|    return std::visit(ValidDestinationVisitor(), dest);
  173|    371|}
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK6PKHash:
  122|      8|    {
  123|      8|        return CScript() << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
  124|      8|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK10ScriptHash:
  127|    130|    {
  128|    130|        return CScript() << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
  129|    130|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK19WitnessV0ScriptHash:
  137|    311|    {
  138|    311|        return CScript() << OP_0 << ToByteVector(id);
  139|    311|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK16WitnessV0KeyHash:
  132|      4|    {
  133|      4|        return CScript() << OP_0 << ToByteVector(id);
  134|      4|    }
addresstype.cpp:_ZNK12_GLOBAL__N_114CScriptVisitorclERK16WitnessV1Taproot:
  142|  2.67k|    {
  143|  2.67k|        return CScript() << OP_1 << ToByteVector(tap);
  144|  2.67k|    }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK14CNoDestination:
  155|    371|    bool operator()(const CNoDestination& dest) const { return false; }

_ZN16WitnessV1TaprootC2ERK11XOnlyPubKey:
   91|  2.67k|    explicit WitnessV1Taproot(const XOnlyPubKey& xpk) : XOnlyPubKey(xpk) {}
_ZN14CNoDestinationC2Ev:
   25|    371|    CNoDestination() = default;
_ZN16WitnessV0KeyHashC2ERK7uint160:
   82|      4|    explicit WitnessV0KeyHash(const uint160& hash) : BaseHash(hash) {}

_Z12DecodeBase58RKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  130|     41|{
  131|     41|    if (ContainsNUL(str)) {
  ------------------
  |  Branch (131:9): [True: 0, False: 41]
  ------------------
  132|      0|        return false;
  133|      0|    }
  134|     41|    return DecodeBase58(str.c_str(), vchRet, max_ret_len);
  135|     41|}
_Z17DecodeBase58CheckRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  164|    749|{
  165|    749|    if (ContainsNUL(str)) {
  ------------------
  |  Branch (165:9): [True: 0, False: 749]
  ------------------
  166|      0|        return false;
  167|      0|    }
  168|    749|    return DecodeBase58Check(str.c_str(), vchRet, max_ret);
  169|    749|}
base58.cpp:_ZL12DecodeBase58PKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
   41|    790|{
   42|       |    // Skip leading spaces.
   43|  1.11k|    while (*psz && IsSpace(*psz))
  ------------------
  |  Branch (43:12): [True: 1.09k, False: 16]
  |  Branch (43:20): [True: 324, False: 774]
  ------------------
   44|    324|        psz++;
   45|       |    // Skip and count leading '1's.
   46|    790|    int zeroes = 0;
   47|    790|    int length = 0;
   48|  3.16k|    while (*psz == '1') {
  ------------------
  |  Branch (48:12): [True: 2.39k, False: 775]
  ------------------
   49|  2.39k|        zeroes++;
   50|  2.39k|        if (zeroes > max_ret_len) return false;
  ------------------
  |  Branch (50:13): [True: 15, False: 2.37k]
  ------------------
   51|  2.37k|        psz++;
   52|  2.37k|    }
   53|       |    // Allocate enough space in big-endian base256 representation.
   54|    775|    int size = strlen(psz) * 733 /1000 + 1; // log(58) / log(256), rounded up.
   55|    775|    std::vector<unsigned char> b256(size);
   56|       |    // Process the characters.
   57|    775|    static_assert(std::size(mapBase58) == 256, "mapBase58.size() should be 256"); // guarantee not out of range
   58|  6.73k|    while (*psz && !IsSpace(*psz)) {
  ------------------
  |  Branch (58:12): [True: 6.39k, False: 334]
  |  Branch (58:20): [True: 6.34k, False: 54]
  ------------------
   59|       |        // Decode base58 character
   60|  6.34k|        int carry = mapBase58[(uint8_t)*psz];
   61|  6.34k|        if (carry == -1)  // Invalid b58 character
  ------------------
  |  Branch (61:13): [True: 353, False: 5.99k]
  ------------------
   62|    353|            return false;
   63|  5.99k|        int i = 0;
   64|   122k|        for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
  ------------------
  |  Branch (64:79): [True: 116k, False: 5.99k]
  |  Branch (64:80): [True: 113k, False: 8.79k]
  |  Branch (64:94): [True: 2.80k, False: 5.99k]
  |  Branch (64:109): [True: 116k, False: 0]
  ------------------
   65|   116k|            carry += 58 * (*it);
   66|   116k|            *it = carry % 256;
   67|   116k|            carry /= 256;
   68|   116k|        }
   69|  5.99k|        assert(carry == 0);
  ------------------
  |  Branch (69:9): [True: 5.99k, False: 0]
  ------------------
   70|  5.99k|        length = i;
   71|  5.99k|        if (length + zeroes > max_ret_len) return false;
  ------------------
  |  Branch (71:13): [True: 34, False: 5.95k]
  ------------------
   72|  5.95k|        psz++;
   73|  5.95k|    }
   74|       |    // Skip trailing spaces.
   75|    866|    while (IsSpace(*psz))
  ------------------
  |  Branch (75:12): [True: 478, False: 388]
  ------------------
   76|    478|        psz++;
   77|    388|    if (*psz != 0)
  ------------------
  |  Branch (77:9): [True: 51, False: 337]
  ------------------
   78|     51|        return false;
   79|       |    // Skip leading zeroes in b256.
   80|    337|    std::vector<unsigned char>::iterator it = b256.begin() + (size - length);
   81|       |    // Copy result into output vector.
   82|    337|    vch.reserve(zeroes + (b256.end() - it));
   83|    337|    vch.assign(zeroes, 0x00);
   84|  2.40k|    while (it != b256.end())
  ------------------
  |  Branch (84:12): [True: 2.07k, False: 337]
  ------------------
   85|  2.07k|        vch.push_back(*(it++));
   86|    337|    return true;
   87|    388|}
base58.cpp:_ZL17DecodeBase58CheckPKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
  147|    749|{
  148|    749|    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: 441, False: 308]
  |  Branch (148:36): [True: 0, False: 749]
  ------------------
  149|    623|        (vchRet.size() < 4)) {
  ------------------
  |  Branch (149:9): [True: 182, False: 126]
  ------------------
  150|    623|        vchRet.clear();
  151|    623|        return false;
  152|    623|    }
  153|       |    // re-calculate the checksum, ensure it matches the included 4-byte checksum
  154|    126|    uint256 hash = Hash(std::span{vchRet}.first(vchRet.size() - 4));
  155|    126|    if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
  ------------------
  |  Branch (155:9): [True: 118, False: 8]
  ------------------
  156|    118|        vchRet.clear();
  157|    118|        return false;
  158|    118|    }
  159|      8|    vchRet.resize(vchRet.size() - 4);
  160|      8|    return true;
  161|    126|}

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

_ZN6bech3212DecodeResultC2Ev:
   54|    318|    DecodeResult() : encoding(Encoding::INVALID) {}
_ZN6bech3212DecodeResultC2ENS_8EncodingEONSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEONS2_6vectorIhNS6_IhEEEE:
   55|      9|    DecodeResult(Encoding enc, std::string&& h, std::vector<uint8_t>&& d) : encoding(enc), hrp(std::move(h)), data(std::move(d)) {}

_Z6Paramsv:
  128|    376|const CChainParams &Params() {
  129|    376|    assert(globalChainParams);
  ------------------
  |  Branch (129:5): [True: 376, False: 0]
  ------------------
  130|    376|    return *globalChainParams;
  131|    376|}

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

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

_Z16htole16_internalt:
   19|    921|{
   20|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_16(host_16bits);
   21|    921|        else return host_16bits;
   22|    921|}
_Z16be32toh_internalj:
   44|  3.29M|{
   45|  3.29M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(big_endian_32bits);
   46|       |        else return big_endian_32bits;
   47|  3.29M|}
_Z16htobe32_internalj:
   34|  1.33M|{
   35|  1.33M|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_32(host_32bits);
   36|       |        else return host_32bits;
   37|  1.33M|}
_Z16htole64_internalm:
   59|   161k|{
   60|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(host_64bits);
   61|   161k|        else return host_64bits;
   62|   161k|}
_Z16htobe64_internalm:
   54|   167k|{
   55|   167k|    if constexpr (std::endian::native == std::endian::little) return internal_bswap_64(host_64bits);
   56|       |        else return host_64bits;
   57|   167k|}
_Z16htole32_internalj:
   39|   808k|{
   40|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(host_32bits);
   41|   808k|        else return host_32bits;
   42|   808k|}
_Z16le32toh_internalj:
   49|  2.58M|{
   50|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(little_endian_32bits);
   51|  2.58M|        else return little_endian_32bits;
   52|  2.58M|}

_Z10MoneyRangeRKl:
   27|    514|inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
  ------------------
  |  Branch (27:57): [True: 367, False: 147]
  |  Branch (27:72): [True: 194, False: 173]
  ------------------

_Z14SighashFromStrRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  265|  9.35k|{
  266|  9.35k|    static const std::map<std::string, int> map_sighash_values = {
  267|  9.35k|        {std::string("DEFAULT"), int(SIGHASH_DEFAULT)},
  268|  9.35k|        {std::string("ALL"), int(SIGHASH_ALL)},
  269|  9.35k|        {std::string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)},
  270|  9.35k|        {std::string("NONE"), int(SIGHASH_NONE)},
  271|  9.35k|        {std::string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY)},
  272|  9.35k|        {std::string("SINGLE"), int(SIGHASH_SINGLE)},
  273|  9.35k|        {std::string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)},
  274|  9.35k|    };
  275|  9.35k|    const auto& it = map_sighash_values.find(sighash);
  276|  9.35k|    if (it != map_sighash_values.end()) {
  ------------------
  |  Branch (276:9): [True: 1, False: 9.35k]
  ------------------
  277|      1|        return it->second;
  278|  9.35k|    } else {
  279|  9.35k|        return util::Error{Untranslated("'" + sighash + "' is not a valid sighash parameter.")};
  280|  9.35k|    }
  281|  9.35k|}

_ZN15ChaCha20AlignedD2Ev:
   42|      4|{
   43|      4|    memory_cleanse(input, sizeof(input));
   44|      4|}
_ZN8ChaCha20D2Ev:
  332|      4|{
  333|      4|    memory_cleanse(m_buffer.data(), m_buffer.size());
  334|      4|}

_Z8ReadLE32ITk8ByteTypehEjPKT_:
   28|  2.58M|{
   29|  2.58M|    uint32_t x;
   30|  2.58M|    memcpy(&x, ptr, 4);
   31|  2.58M|    return le32toh_internal(x);
   32|  2.58M|}
_Z9WriteLE32ITk8ByteTypehEvPT_j:
   51|   808k|{
   52|   808k|    uint32_t v = htole32_internal(x);
   53|   808k|    memcpy(ptr, &v, 4);
   54|   808k|}
_Z8ReadBE32ITk8ByteTypehEjPKT_:
   73|  3.29M|{
   74|  3.29M|    uint32_t x;
   75|  3.29M|    memcpy(&x, ptr, 4);
   76|  3.29M|    return be32toh_internal(x);
   77|  3.29M|}
_Z9WriteBE32ITk8ByteTypehEvPT_j:
   96|  1.33M|{
   97|  1.33M|    uint32_t v = htobe32_internal(x);
   98|  1.33M|    memcpy(ptr, &v, 4);
   99|  1.33M|}
_Z9WriteLE64ITk8ByteTypehEvPT_m:
   58|   161k|{
   59|   161k|    uint64_t v = htole64_internal(x);
   60|   161k|    memcpy(ptr, &v, 8);
   61|   161k|}
_Z9WriteBE64ITk8ByteTypehEvPT_m:
  103|   167k|{
  104|   167k|    uint64_t v = htobe64_internal(x);
  105|   167k|    memcpy(ptr, &v, 8);
  106|   167k|}

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

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

_ZN7CSHA256C2Ev:
  695|   162k|{
  696|   162k|    sha256::Initialize(s);
  697|   162k|}
_ZN7CSHA2565WriteEPKhm:
  700|   508k|{
  701|   508k|    const unsigned char* end = data + len;
  702|   508k|    size_t bufsize = bytes % 64;
  703|   508k|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (703:9): [True: 339k, False: 169k]
  |  Branch (703:20): [True: 170k, False: 168k]
  ------------------
  704|       |        // Fill the buffer, and process it.
  705|   170k|        memcpy(buf + bufsize, data, 64 - bufsize);
  706|   170k|        bytes += 64 - bufsize;
  707|   170k|        data += 64 - bufsize;
  708|   170k|        Transform(s, buf, 1);
  709|   170k|        bufsize = 0;
  710|   170k|    }
  711|   508k|    if (end - data >= 64) {
  ------------------
  |  Branch (711:9): [True: 1.67k, False: 507k]
  ------------------
  712|  1.67k|        size_t blocks = (end - data) / 64;
  713|  1.67k|        Transform(s, data, blocks);
  714|  1.67k|        data += 64 * blocks;
  715|  1.67k|        bytes += 64 * blocks;
  716|  1.67k|    }
  717|   508k|    if (end > data) {
  ------------------
  |  Branch (717:9): [True: 339k, False: 169k]
  ------------------
  718|       |        // Fill the buffer with what remains.
  719|   339k|        memcpy(buf + bufsize, data, end - data);
  720|   339k|        bytes += end - data;
  721|   339k|    }
  722|   508k|    return *this;
  723|   508k|}
_ZN7CSHA2568FinalizeEPh:
  726|   167k|{
  727|   167k|    static const unsigned char pad[64] = {0x80};
  728|   167k|    unsigned char sizedesc[8];
  729|   167k|    WriteBE64(sizedesc, bytes << 3);
  730|   167k|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  731|   167k|    Write(sizedesc, 8);
  732|   167k|    WriteBE32(hash, s[0]);
  733|   167k|    WriteBE32(hash + 4, s[1]);
  734|   167k|    WriteBE32(hash + 8, s[2]);
  735|   167k|    WriteBE32(hash + 12, s[3]);
  736|   167k|    WriteBE32(hash + 16, s[4]);
  737|   167k|    WriteBE32(hash + 20, s[5]);
  738|   167k|    WriteBE32(hash + 24, s[6]);
  739|   167k|    WriteBE32(hash + 28, s[7]);
  740|   167k|}
_ZN7CSHA2565ResetEv:
  743|    126|{
  744|    126|    bytes = 0;
  745|    126|    sha256::Initialize(s);
  746|    126|    return *this;
  747|    126|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2569TransformEPjPKhm:
  100|   172k|{
  101|   378k|    while (blocks--) {
  ------------------
  |  Branch (101:12): [True: 205k, False: 172k]
  ------------------
  102|   205k|        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];
  103|   205k|        uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
  104|       |
  105|   205k|        Round(a, b, c, d, e, f, g, h, 0x428a2f98 + (w0 = ReadBE32(chunk + 0)));
  106|   205k|        Round(h, a, b, c, d, e, f, g, 0x71374491 + (w1 = ReadBE32(chunk + 4)));
  107|   205k|        Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf + (w2 = ReadBE32(chunk + 8)));
  108|   205k|        Round(f, g, h, a, b, c, d, e, 0xe9b5dba5 + (w3 = ReadBE32(chunk + 12)));
  109|   205k|        Round(e, f, g, h, a, b, c, d, 0x3956c25b + (w4 = ReadBE32(chunk + 16)));
  110|   205k|        Round(d, e, f, g, h, a, b, c, 0x59f111f1 + (w5 = ReadBE32(chunk + 20)));
  111|   205k|        Round(c, d, e, f, g, h, a, b, 0x923f82a4 + (w6 = ReadBE32(chunk + 24)));
  112|   205k|        Round(b, c, d, e, f, g, h, a, 0xab1c5ed5 + (w7 = ReadBE32(chunk + 28)));
  113|   205k|        Round(a, b, c, d, e, f, g, h, 0xd807aa98 + (w8 = ReadBE32(chunk + 32)));
  114|   205k|        Round(h, a, b, c, d, e, f, g, 0x12835b01 + (w9 = ReadBE32(chunk + 36)));
  115|   205k|        Round(g, h, a, b, c, d, e, f, 0x243185be + (w10 = ReadBE32(chunk + 40)));
  116|   205k|        Round(f, g, h, a, b, c, d, e, 0x550c7dc3 + (w11 = ReadBE32(chunk + 44)));
  117|   205k|        Round(e, f, g, h, a, b, c, d, 0x72be5d74 + (w12 = ReadBE32(chunk + 48)));
  118|   205k|        Round(d, e, f, g, h, a, b, c, 0x80deb1fe + (w13 = ReadBE32(chunk + 52)));
  119|   205k|        Round(c, d, e, f, g, h, a, b, 0x9bdc06a7 + (w14 = ReadBE32(chunk + 56)));
  120|   205k|        Round(b, c, d, e, f, g, h, a, 0xc19bf174 + (w15 = ReadBE32(chunk + 60)));
  121|       |
  122|   205k|        Round(a, b, c, d, e, f, g, h, 0xe49b69c1 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  123|   205k|        Round(h, a, b, c, d, e, f, g, 0xefbe4786 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  124|   205k|        Round(g, h, a, b, c, d, e, f, 0x0fc19dc6 + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  125|   205k|        Round(f, g, h, a, b, c, d, e, 0x240ca1cc + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  126|   205k|        Round(e, f, g, h, a, b, c, d, 0x2de92c6f + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  127|   205k|        Round(d, e, f, g, h, a, b, c, 0x4a7484aa + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  128|   205k|        Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  129|   205k|        Round(b, c, d, e, f, g, h, a, 0x76f988da + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  130|   205k|        Round(a, b, c, d, e, f, g, h, 0x983e5152 + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  131|   205k|        Round(h, a, b, c, d, e, f, g, 0xa831c66d + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  132|   205k|        Round(g, h, a, b, c, d, e, f, 0xb00327c8 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  133|   205k|        Round(f, g, h, a, b, c, d, e, 0xbf597fc7 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  134|   205k|        Round(e, f, g, h, a, b, c, d, 0xc6e00bf3 + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  135|   205k|        Round(d, e, f, g, h, a, b, c, 0xd5a79147 + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  136|   205k|        Round(c, d, e, f, g, h, a, b, 0x06ca6351 + (w14 += sigma1(w12) + w7 + sigma0(w15)));
  137|   205k|        Round(b, c, d, e, f, g, h, a, 0x14292967 + (w15 += sigma1(w13) + w8 + sigma0(w0)));
  138|       |
  139|   205k|        Round(a, b, c, d, e, f, g, h, 0x27b70a85 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  140|   205k|        Round(h, a, b, c, d, e, f, g, 0x2e1b2138 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  141|   205k|        Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  142|   205k|        Round(f, g, h, a, b, c, d, e, 0x53380d13 + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  143|   205k|        Round(e, f, g, h, a, b, c, d, 0x650a7354 + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  144|   205k|        Round(d, e, f, g, h, a, b, c, 0x766a0abb + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  145|   205k|        Round(c, d, e, f, g, h, a, b, 0x81c2c92e + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  146|   205k|        Round(b, c, d, e, f, g, h, a, 0x92722c85 + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  147|   205k|        Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1 + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  148|   205k|        Round(h, a, b, c, d, e, f, g, 0xa81a664b + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  149|   205k|        Round(g, h, a, b, c, d, e, f, 0xc24b8b70 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  150|   205k|        Round(f, g, h, a, b, c, d, e, 0xc76c51a3 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  151|   205k|        Round(e, f, g, h, a, b, c, d, 0xd192e819 + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  152|   205k|        Round(d, e, f, g, h, a, b, c, 0xd6990624 + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  153|   205k|        Round(c, d, e, f, g, h, a, b, 0xf40e3585 + (w14 += sigma1(w12) + w7 + sigma0(w15)));
  154|   205k|        Round(b, c, d, e, f, g, h, a, 0x106aa070 + (w15 += sigma1(w13) + w8 + sigma0(w0)));
  155|       |
  156|   205k|        Round(a, b, c, d, e, f, g, h, 0x19a4c116 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  157|   205k|        Round(h, a, b, c, d, e, f, g, 0x1e376c08 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  158|   205k|        Round(g, h, a, b, c, d, e, f, 0x2748774c + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  159|   205k|        Round(f, g, h, a, b, c, d, e, 0x34b0bcb5 + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  160|   205k|        Round(e, f, g, h, a, b, c, d, 0x391c0cb3 + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  161|   205k|        Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  162|   205k|        Round(c, d, e, f, g, h, a, b, 0x5b9cca4f + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  163|   205k|        Round(b, c, d, e, f, g, h, a, 0x682e6ff3 + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  164|   205k|        Round(a, b, c, d, e, f, g, h, 0x748f82ee + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  165|   205k|        Round(h, a, b, c, d, e, f, g, 0x78a5636f + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  166|   205k|        Round(g, h, a, b, c, d, e, f, 0x84c87814 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  167|   205k|        Round(f, g, h, a, b, c, d, e, 0x8cc70208 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  168|   205k|        Round(e, f, g, h, a, b, c, d, 0x90befffa + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  169|   205k|        Round(d, e, f, g, h, a, b, c, 0xa4506ceb + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  170|   205k|        Round(c, d, e, f, g, h, a, b, 0xbef9a3f7 + (w14 + sigma1(w12) + w7 + sigma0(w15)));
  171|   205k|        Round(b, c, d, e, f, g, h, a, 0xc67178f2 + (w15 + sigma1(w13) + w8 + sigma0(w0)));
  172|       |
  173|   205k|        s[0] += a;
  174|   205k|        s[1] += b;
  175|   205k|        s[2] += c;
  176|   205k|        s[3] += d;
  177|   205k|        s[4] += e;
  178|   205k|        s[5] += f;
  179|   205k|        s[6] += g;
  180|   205k|        s[7] += h;
  181|   205k|        chunk += 64;
  182|   205k|    }
  183|   172k|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2565RoundEjjjRjjjjS1_j:
   78|  13.1M|{
   79|  13.1M|    uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k;
   80|  13.1M|    uint32_t t2 = Sigma0(a) + Maj(a, b, c);
   81|  13.1M|    d += t1;
   82|  13.1M|    h = t1 + t2;
   83|  13.1M|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2566Sigma1Ej:
   72|  13.1M|uint32_t inline Sigma1(uint32_t x) { return (x >> 6 | x << 26) ^ (x >> 11 | x << 21) ^ (x >> 25 | x << 7); }
sha256.cpp:_ZN12_GLOBAL__N_16sha2562ChEjjj:
   69|  13.1M|uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
sha256.cpp:_ZN12_GLOBAL__N_16sha2566Sigma0Ej:
   71|  13.1M|uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
sha256.cpp:_ZN12_GLOBAL__N_16sha2563MajEjjj:
   70|  13.1M|uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
sha256.cpp:_ZN12_GLOBAL__N_16sha2566sigma1Ej:
   74|  9.87M|uint32_t inline sigma1(uint32_t x) { return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); }
sha256.cpp:_ZN12_GLOBAL__N_16sha2566sigma0Ej:
   73|  9.87M|uint32_t inline sigma0(uint32_t x) { return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3); }
sha256.cpp:_ZN12_GLOBAL__N_16sha25610InitializeEPj:
   87|   162k|{
   88|   162k|    s[0] = 0x6a09e667ul;
   89|   162k|    s[1] = 0xbb67ae85ul;
   90|   162k|    s[2] = 0x3c6ef372ul;
   91|   162k|    s[3] = 0xa54ff53aul;
   92|   162k|    s[4] = 0x510e527ful;
   93|   162k|    s[5] = 0x9b05688cul;
   94|   162k|    s[6] = 0x1f83d9abul;
   95|   162k|    s[7] = 0x5be0cd19ul;
   96|   162k|}

_Z4HashINSt3__14spanIhLm18446744073709551615EEEE7uint256RKT_:
   84|    126|{
   85|    126|    uint256 result;
   86|    126|    CHash256().Write(MakeUCharSpan(in1)).Finalize(result);
   87|    126|    return result;
   88|    126|}
_Z7Hash160I11XOnlyPubKeyE7uint160RKT_:
  101|  1.01k|{
  102|  1.01k|    uint160 result;
  103|  1.01k|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
  104|  1.01k|    return result;
  105|  1.01k|}
_ZN9ChainCodeC2Ev:
   25|    490|    constexpr ChainCode() = default;
_ZN9ChainCodeD2Ev:
   28|    492|    ~ChainCode() { memory_cleanse(data(), size()); }
_Z7Hash160INSt3__14spanIKhLm18446744073709551615EEEE7uint160RKT_:
  101|   160k|{
  102|   160k|    uint160 result;
  103|   160k|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
  104|   160k|    return result;
  105|   160k|}
_ZN8CHash2565WriteENSt3__14spanIKhLm18446744073709551615EEE:
   45|    126|    CHash256& Write(std::span<const unsigned char> input) {
   46|    126|        sha.Write(input.data(), input.size());
   47|    126|        return *this;
   48|    126|    }
_ZN8CHash2568FinalizeENSt3__14spanIhLm18446744073709551615EEE:
   38|    126|    void Finalize(std::span<unsigned char> output) {
   39|    126|        assert(output.size() == OUTPUT_SIZE);
  ------------------
  |  Branch (39:9): [True: 126, False: 0]
  ------------------
   40|    126|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   41|    126|        sha.Finalize(buf);
   42|    126|        sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   43|    126|    }
_ZN10HashWriterlsINSt3__14spanIKhLm32EEEEERS_RKT_:
  150|  4.00k|    {
  151|  4.00k|        ::Serialize(*this, obj);
  152|  4.00k|        return *this;
  153|  4.00k|    }
_ZN10HashWriterlsI7uint256EERS_RKT_:
  150|  4.00k|    {
  151|  4.00k|        ::Serialize(*this, obj);
  152|  4.00k|        return *this;
  153|  4.00k|    }
_ZN10HashWriterlsIhEERS_RKT_:
  150|  1.90k|    {
  151|  1.90k|        ::Serialize(*this, obj);
  152|  1.90k|        return *this;
  153|  1.90k|    }
_ZN10HashWriterlsI17CompactSizeWriterEERS_RKT_:
  150|  1.90k|    {
  151|  1.90k|        ::Serialize(*this, obj);
  152|  1.90k|        return *this;
  153|  1.90k|    }
_Z7Hash160I7CScriptE7uint160RKT_:
  101|    571|{
  102|    571|    uint160 result;
  103|    571|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
  104|    571|    return result;
  105|    571|}
_ZN8CHash1605WriteENSt3__14spanIKhLm18446744073709551615EEE:
   70|   161k|    CHash160& Write(std::span<const unsigned char> input) {
   71|   161k|        sha.Write(input.data(), input.size());
   72|   161k|        return *this;
   73|   161k|    }
_ZN8CHash1608FinalizeENSt3__14spanIhLm18446744073709551615EEE:
   63|   161k|    void Finalize(std::span<unsigned char> output) {
   64|   161k|        assert(output.size() == OUTPUT_SIZE);
  ------------------
  |  Branch (64:9): [True: 161k, False: 0]
  ------------------
   65|   161k|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   66|   161k|        sha.Finalize(buf);
   67|   161k|        CRIPEMD160().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   68|   161k|    }
_ZN10HashWriter5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  115|  11.7k|    {
  116|  11.7k|        ctx.Write(UCharCast(src.data()), src.size());
  117|  11.7k|    }
_ZN10HashWriter9GetSHA256Ev:
  134|  5.09k|    uint256 GetSHA256() {
  135|  5.09k|        uint256 result;
  136|  5.09k|        ctx.Finalize(result.begin());
  137|  5.09k|        return result;
  138|  5.09k|    }
_ZN10HashWriterlsINSt3__14spanIKhLm18446744073709551615EEEEERS_RKT_:
  150|  2.99k|    {
  151|  2.99k|        ::Serialize(*this, obj);
  152|  2.99k|        return *this;
  153|  2.99k|    }

_ZNK12CChainParams12Base58PrefixENS_10Base58TypeE:
  114|     11|    const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
_ZNK12CChainParams9Bech32HRPEv:
  115|    754|    const std::string& Bech32HRP() const { return bech32_hrp; }

_ZN7CExtKeyC2Ev:
  248|    245|    CExtKey() = default;
_ZN4CKeyC2Ev:
   79|    460|    CKey() noexcept = default;
_ZNK4CKey7IsValidEv:
  128|    460|    bool IsValid() const { return !!keydata; }

_Z12DecodeSecretRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  215|    215|{
  216|    215|    CKey key;
  217|    215|    std::vector<unsigned char> data;
  218|    215|    if (DecodeBase58Check(str, data, 34)) {
  ------------------
  |  Branch (218:9): [True: 1, False: 214]
  ------------------
  219|      1|        const std::vector<unsigned char>& privkey_prefix = Params().Base58Prefix(CChainParams::SECRET_KEY);
  220|      1|        if ((data.size() == 32 + privkey_prefix.size() || (data.size() == 33 + privkey_prefix.size() && data.back() == 1)) &&
  ------------------
  |  Branch (220:14): [True: 0, False: 1]
  |  Branch (220:60): [True: 0, False: 1]
  |  Branch (220:105): [True: 0, False: 0]
  ------------------
  221|      0|            std::equal(privkey_prefix.begin(), privkey_prefix.end(), data.begin())) {
  ------------------
  |  Branch (221:13): [True: 0, False: 0]
  ------------------
  222|      0|            bool compressed = data.size() == 33 + privkey_prefix.size();
  223|      0|            key.Set(data.begin() + privkey_prefix.size(), data.begin() + privkey_prefix.size() + 32, compressed);
  224|      0|        }
  225|      1|    }
  226|    215|    if (!data.empty()) {
  ------------------
  |  Branch (226:9): [True: 1, False: 214]
  ------------------
  227|      1|        memory_cleanse(data.data(), data.size());
  228|      1|    }
  229|    215|    return key;
  230|    215|}
_Z15DecodeExtPubKeyRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  246|    245|{
  247|    245|    CExtPubKey key;
  248|    245|    std::vector<unsigned char> data;
  249|    245|    if (DecodeBase58Check(str, data, 78)) {
  ------------------
  |  Branch (249:9): [True: 2, False: 243]
  ------------------
  250|      2|        const std::vector<unsigned char>& prefix = Params().Base58Prefix(CChainParams::EXT_PUBLIC_KEY);
  251|      2|        if (data.size() == BIP32_EXTKEY_SIZE + prefix.size() && std::equal(prefix.begin(), prefix.end(), data.begin())) {
  ------------------
  |  Branch (251:13): [True: 0, False: 2]
  |  Branch (251:65): [True: 0, False: 0]
  ------------------
  252|      0|            key.Decode(data.data() + prefix.size());
  253|      0|        }
  254|      2|    }
  255|    245|    return key;
  256|    245|}
_Z12DecodeExtKeyRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  269|    245|{
  270|    245|    CExtKey key;
  271|    245|    std::vector<unsigned char> data;
  272|    245|    if (DecodeBase58Check(str, data, 78)) {
  ------------------
  |  Branch (272:9): [True: 2, False: 243]
  ------------------
  273|      2|        const std::vector<unsigned char>& prefix = Params().Base58Prefix(CChainParams::EXT_SECRET_KEY);
  274|      2|        if (data.size() == BIP32_EXTKEY_SIZE + prefix.size() && std::equal(prefix.begin(), prefix.end(), data.begin())) {
  ------------------
  |  Branch (274:13): [True: 0, False: 2]
  |  Branch (274:65): [True: 0, False: 0]
  ------------------
  275|      0|            key.Decode(data.data() + prefix.size());
  276|      0|        }
  277|      2|    }
  278|    245|    if (!data.empty()) {
  ------------------
  |  Branch (278:9): [True: 2, False: 243]
  ------------------
  279|      2|        memory_cleanse(data.data(), data.size());
  280|      2|    }
  281|    245|    return key;
  282|    245|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_PNS_6vectorIiNS3_IiEEEE:
  301|    371|{
  302|    371|    return DecodeDestination(str, Params(), error_msg, error_locations);
  303|    371|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  306|    371|{
  307|    371|    std::string error_msg;
  308|    371|    return DecodeDestination(str, error_msg);
  309|    371|}
key_io.cpp:_ZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK12CChainParamsRS6_PNS0_6vectorIiNS4_IiEEEE:
   86|    371|{
   87|    371|    std::vector<unsigned char> data;
   88|    371|    uint160 hash;
   89|    371|    error_str = "";
   90|       |
   91|       |    // Note this will be false if it is a valid Bech32 address for a different network
   92|    371|    bool is_bech32 = (ToLower(str.substr(0, params.Bech32HRP().size())) == params.Bech32HRP());
   93|       |
   94|    371|    if (!is_bech32 && DecodeBase58Check(str, data, 21)) {
  ------------------
  |  Branch (94:9): [True: 44, False: 327]
  |  Branch (94:23): [True: 3, False: 41]
  ------------------
   95|       |        // base58-encoded Bitcoin addresses.
   96|       |        // Public-key-hash-addresses have version 0 (or 111 testnet).
   97|       |        // The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key.
   98|      3|        const std::vector<unsigned char>& pubkey_prefix = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
   99|      3|        if (data.size() == hash.size() + pubkey_prefix.size() && std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin())) {
  ------------------
  |  Branch (99:13): [True: 0, False: 3]
  |  Branch (99:66): [True: 0, False: 0]
  ------------------
  100|      0|            std::copy(data.begin() + pubkey_prefix.size(), data.end(), hash.begin());
  101|      0|            return PKHash(hash);
  102|      0|        }
  103|       |        // Script-hash-addresses have version 5 (or 196 testnet).
  104|       |        // The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script.
  105|      3|        const std::vector<unsigned char>& script_prefix = params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
  106|      3|        if (data.size() == hash.size() + script_prefix.size() && std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) {
  ------------------
  |  Branch (106:13): [True: 0, False: 3]
  |  Branch (106:66): [True: 0, False: 0]
  ------------------
  107|      0|            std::copy(data.begin() + script_prefix.size(), data.end(), hash.begin());
  108|      0|            return ScriptHash(hash);
  109|      0|        }
  110|       |
  111|       |        // If the prefix of data matches either the script or pubkey prefix, the length must have been wrong
  112|      3|        if ((data.size() >= script_prefix.size() &&
  ------------------
  |  Branch (112:14): [True: 3, False: 0]
  ------------------
  113|      3|                std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) ||
  ------------------
  |  Branch (113:17): [True: 0, False: 3]
  ------------------
  114|      3|            (data.size() >= pubkey_prefix.size() &&
  ------------------
  |  Branch (114:14): [True: 3, False: 0]
  ------------------
  115|      3|                std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin()))) {
  ------------------
  |  Branch (115:17): [True: 0, False: 3]
  ------------------
  116|      0|            error_str = "Invalid length for Base58 address (P2PKH or P2SH)";
  117|      3|        } else {
  118|      3|            error_str = "Invalid or unsupported Base58-encoded address.";
  119|      3|        }
  120|      3|        return CNoDestination();
  121|    368|    } else if (!is_bech32) {
  ------------------
  |  Branch (121:16): [True: 41, False: 327]
  ------------------
  122|       |        // Try Base58 decoding without the checksum, using a much larger max length
  123|     41|        if (!DecodeBase58(str, data, 100)) {
  ------------------
  |  Branch (123:13): [True: 12, False: 29]
  ------------------
  124|     12|            error_str = "Invalid or unsupported Segwit (Bech32) or Base58 encoding.";
  125|     29|        } else {
  126|     29|            error_str = "Invalid checksum or length of Base58 address (P2PKH or P2SH)";
  127|     29|        }
  128|     41|        return CNoDestination();
  129|     41|    }
  130|       |
  131|    327|    data.clear();
  132|    327|    const auto dec = bech32::Decode(str);
  133|    327|    if (dec.encoding == bech32::Encoding::BECH32 || dec.encoding == bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (133:9): [True: 5, False: 322]
  |  Branch (133:53): [True: 4, False: 318]
  ------------------
  134|      9|        if (dec.data.empty()) {
  ------------------
  |  Branch (134:13): [True: 1, False: 8]
  ------------------
  135|      1|            error_str = "Empty Bech32 data section";
  136|      1|            return CNoDestination();
  137|      1|        }
  138|       |        // Bech32 decoding
  139|      8|        if (dec.hrp != params.Bech32HRP()) {
  ------------------
  |  Branch (139:13): [True: 4, False: 4]
  ------------------
  140|      4|            error_str = strprintf("Invalid or unsupported prefix for Segwit (Bech32) address (expected %s, got %s).", params.Bech32HRP(), dec.hrp);
  ------------------
  |  | 1172|      4|#define strprintf tfm::format
  ------------------
  141|      4|            return CNoDestination();
  142|      4|        }
  143|      4|        int version = dec.data[0]; // The first 5 bit symbol is the witness version (0-16)
  144|      4|        if (version == 0 && dec.encoding != bech32::Encoding::BECH32) {
  ------------------
  |  Branch (144:13): [True: 0, False: 4]
  |  Branch (144:29): [True: 0, False: 0]
  ------------------
  145|      0|            error_str = "Version 0 witness address must use Bech32 checksum";
  146|      0|            return CNoDestination();
  147|      0|        }
  148|      4|        if (version != 0 && dec.encoding != bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (148:13): [True: 4, False: 0]
  |  Branch (148:29): [True: 1, False: 3]
  ------------------
  149|      1|            error_str = "Version 1+ witness address must use Bech32m checksum";
  150|      1|            return CNoDestination();
  151|      1|        }
  152|       |        // The rest of the symbols are converted witness program bytes.
  153|      3|        data.reserve(((dec.data.size() - 1) * 5) / 8);
  154|      3|        if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end())) {
  ------------------
  |  Branch (154:13): [True: 0, False: 3]
  ------------------
  155|       |
  156|      0|            std::string_view byte_str{data.size() == 1 ? "byte" : "bytes"};
  ------------------
  |  Branch (156:39): [True: 0, False: 0]
  ------------------
  157|       |
  158|      0|            if (version == 0) {
  ------------------
  |  Branch (158:17): [True: 0, False: 0]
  ------------------
  159|      0|                {
  160|      0|                    WitnessV0KeyHash keyid;
  161|      0|                    if (data.size() == keyid.size()) {
  ------------------
  |  Branch (161:25): [True: 0, False: 0]
  ------------------
  162|      0|                        std::copy(data.begin(), data.end(), keyid.begin());
  163|      0|                        return keyid;
  164|      0|                    }
  165|      0|                }
  166|      0|                {
  167|      0|                    WitnessV0ScriptHash scriptid;
  168|      0|                    if (data.size() == scriptid.size()) {
  ------------------
  |  Branch (168:25): [True: 0, False: 0]
  ------------------
  169|      0|                        std::copy(data.begin(), data.end(), scriptid.begin());
  170|      0|                        return scriptid;
  171|      0|                    }
  172|      0|                }
  173|       |
  174|      0|                error_str = strprintf("Invalid Bech32 v0 address program size (%d %s), per BIP141", data.size(), byte_str);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  175|      0|                return CNoDestination();
  176|      0|            }
  177|       |
  178|      0|            if (version == 1 && data.size() == WITNESS_V1_TAPROOT_SIZE) {
  ------------------
  |  Branch (178:17): [True: 0, False: 0]
  |  Branch (178:33): [True: 0, False: 0]
  ------------------
  179|      0|                static_assert(WITNESS_V1_TAPROOT_SIZE == WitnessV1Taproot::size());
  180|      0|                WitnessV1Taproot tap;
  181|      0|                std::copy(data.begin(), data.end(), tap.begin());
  182|      0|                return tap;
  183|      0|            }
  184|       |
  185|      0|            if (CScript::IsPayToAnchor(version, data)) {
  ------------------
  |  Branch (185:17): [True: 0, False: 0]
  ------------------
  186|      0|                return PayToAnchor();
  187|      0|            }
  188|       |
  189|      0|            if (version > 16) {
  ------------------
  |  Branch (189:17): [True: 0, False: 0]
  ------------------
  190|      0|                error_str = "Invalid Bech32 address witness version";
  191|      0|                return CNoDestination();
  192|      0|            }
  193|       |
  194|      0|            if (data.size() < 2 || data.size() > BECH32_WITNESS_PROG_MAX_LEN) {
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  |  Branch (194:36): [True: 0, False: 0]
  ------------------
  195|      0|                error_str = strprintf("Invalid Bech32 address program size (%d %s)", data.size(), byte_str);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
  196|      0|                return CNoDestination();
  197|      0|            }
  198|       |
  199|      0|            return WitnessUnknown{version, data};
  200|      3|        } else {
  201|      3|            error_str = strprintf("Invalid padding in Bech32 data section");
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
  202|      3|            return CNoDestination();
  203|      3|        }
  204|      3|    }
  205|       |
  206|       |    // Perform Bech32 error location
  207|    318|    auto res = bech32::LocateErrors(str);
  208|    318|    error_str = res.first;
  209|    318|    if (error_locations) *error_locations = std::move(res.second);
  ------------------
  |  Branch (209:9): [True: 0, False: 318]
  ------------------
  210|    318|    return CNoDestination();
  211|    327|}
key_io.cpp:_ZZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK12CChainParamsRS6_PNS0_6vectorIiNS4_IiEEEEENK3$_0clEh:
  154|     46|        if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end())) {

_Z22MuSig2AggregatePubkeysRKNSt3__16vectorI7CPubKeyNS_9allocatorIS1_EEEER28secp256k1_musig_keyagg_cacheRKNS_8optionalIS1_EE:
   58|  11.1k|{
   59|  11.1k|    if (!GetMuSig2KeyAggCache(pubkeys, keyagg_cache)) {
  ------------------
  |  Branch (59:9): [True: 0, False: 11.1k]
  ------------------
   60|      0|        return std::nullopt;
   61|      0|    }
   62|  11.1k|    std::optional<CPubKey> agg_key = GetCPubKeyFromMuSig2KeyAggCache(keyagg_cache);
   63|  11.1k|    if (!agg_key.has_value()) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 0, False: 11.1k]
  ------------------
   64|  11.1k|    if (expected_aggregate.has_value() && expected_aggregate != agg_key) return std::nullopt;
  ------------------
  |  Branch (64:9): [True: 0, False: 11.1k]
  |  Branch (64:43): [True: 0, False: 0]
  ------------------
   65|  11.1k|    return agg_key;
   66|  11.1k|}
_Z22MuSig2AggregatePubkeysRKNSt3__16vectorI7CPubKeyNS_9allocatorIS1_EEEE:
   69|  11.1k|{
   70|  11.1k|    secp256k1_musig_keyagg_cache keyagg_cache;
   71|  11.1k|    return MuSig2AggregatePubkeys(pubkeys, keyagg_cache, std::nullopt);
   72|  11.1k|}
musig.cpp:_ZL20GetMuSig2KeyAggCacheRKNSt3__16vectorI7CPubKeyNS_9allocatorIS1_EEEER28secp256k1_musig_keyagg_cache:
   17|  11.1k|{
   18|  11.1k|    if (pubkeys.empty()) {
  ------------------
  |  Branch (18:9): [True: 0, False: 11.1k]
  ------------------
   19|      0|        return false;
   20|      0|    }
   21|       |
   22|       |    // Parse the pubkeys
   23|  11.1k|    std::vector<secp256k1_pubkey> secp_pubkeys;
   24|  11.1k|    std::vector<const secp256k1_pubkey*> pubkey_ptrs;
   25|  30.4k|    for (const CPubKey& pubkey : pubkeys) {
  ------------------
  |  Branch (25:32): [True: 30.4k, False: 11.1k]
  ------------------
   26|  30.4k|        if (!secp256k1_ec_pubkey_parse(secp256k1_context_static, &secp_pubkeys.emplace_back(), pubkey.data(), pubkey.size())) {
  ------------------
  |  Branch (26:13): [True: 0, False: 30.4k]
  ------------------
   27|      0|            return false;
   28|      0|        }
   29|  30.4k|    }
   30|  11.1k|    pubkey_ptrs.reserve(secp_pubkeys.size());
   31|  30.4k|    for (const secp256k1_pubkey& p : secp_pubkeys) {
  ------------------
  |  Branch (31:36): [True: 30.4k, False: 11.1k]
  ------------------
   32|  30.4k|        pubkey_ptrs.push_back(&p);
   33|  30.4k|    }
   34|       |
   35|       |    // Aggregate the pubkey
   36|  11.1k|    if (!secp256k1_musig_pubkey_agg(secp256k1_context_static, nullptr, &keyagg_cache, pubkey_ptrs.data(), pubkey_ptrs.size())) {
  ------------------
  |  Branch (36:9): [True: 0, False: 11.1k]
  ------------------
   37|      0|        return false;
   38|      0|    }
   39|  11.1k|    return true;
   40|  11.1k|}
musig.cpp:_ZL31GetCPubKeyFromMuSig2KeyAggCacheR28secp256k1_musig_keyagg_cache:
   43|  11.1k|{
   44|       |    // Get the plain aggregated pubkey
   45|  11.1k|    secp256k1_pubkey agg_pubkey;
   46|  11.1k|    if (!secp256k1_musig_pubkey_get(secp256k1_context_static, &agg_pubkey, &keyagg_cache)) {
  ------------------
  |  Branch (46:9): [True: 0, False: 11.1k]
  ------------------
   47|      0|        return std::nullopt;
   48|      0|    }
   49|       |
   50|       |    // Turn into CPubKey
   51|  11.1k|    unsigned char ser_agg_pubkey[CPubKey::COMPRESSED_SIZE];
   52|  11.1k|    size_t ser_agg_pubkey_len = CPubKey::COMPRESSED_SIZE;
   53|  11.1k|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, ser_agg_pubkey, &ser_agg_pubkey_len, &agg_pubkey, SECP256K1_EC_COMPRESSED);
  ------------------
  |  |  216|  11.1k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|  11.1k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  202|  11.1k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
   54|  11.1k|    return CPubKey(ser_agg_pubkey, ser_agg_pubkey + ser_agg_pubkey_len);
   55|  11.1k|}

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

_ZN9prevectorILj36EhjiE6insertITkNSt3__114input_iteratorENS0_8iteratorEEEvS3_T_S4_:
  335|   348k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  336|   348k|        size_type p = pos - begin();
  337|   348k|        difference_type count = last - first;
  338|   348k|        size_type new_size = size() + count;
  339|   348k|        if (capacity() < new_size) {
  ------------------
  |  Branch (339:13): [True: 226k, False: 121k]
  ------------------
  340|   226k|            change_capacity(new_size + (new_size >> 1));
  341|   226k|        }
  342|   348k|        T* ptr = item_ptr(p);
  343|   348k|        T* dst = ptr + count;
  344|   348k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  345|   348k|        _size += count;
  346|   348k|        fill(ptr, first, last);
  347|   348k|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS0_8iteratorEEEvPhT_S5_:
  167|   348k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  2.20G|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 2.20G, False: 348k]
  ------------------
  169|  2.20G|            new(static_cast<void*>(dst)) T(*first);
  170|  2.20G|            ++dst;
  171|  2.20G|            ++first;
  172|  2.20G|        }
  173|   348k|    }
_ZNK9prevectorILj36EhjiE8iteratoreqES1_:
   74|  2.20G|        bool operator==(iterator x) const { return ptr == x.ptr; }
_ZN9prevectorILj36EhjiE8iteratorppEv:
   64|  2.20G|        iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj16EhjiE9is_directEv:
  126|     16|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj16EhjiED2Ev:
  422|     16|    ~prevector() {
  423|     16|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 0, False: 16]
  ------------------
  424|      0|            free(_union.indirect_contents.indirect);
  425|      0|            _union.indirect_contents.indirect = nullptr;
  426|      0|        }
  427|     16|    }
_ZN9prevectorILj36EhjiEC2EOS0_:
  224|  1.27M|        : _union(std::move(other._union)), _size(other._size)
  225|  1.27M|    {
  226|  1.27M|        other._size = 0;
  227|  1.27M|    }
_ZN9prevectorILj36EhjiE9push_backERKh:
  392|  17.1k|    void push_back(const T& value) {
  393|  17.1k|        emplace_back(value);
  394|  17.1k|    }
_ZN9prevectorILj36EhjiE12emplace_backIJRKhEEEvDpOT_:
  383|  17.1k|    void emplace_back(Args&&... args) {
  384|  17.1k|        size_type new_size = size() + 1;
  385|  17.1k|        if (capacity() < new_size) {
  ------------------
  |  Branch (385:13): [True: 147, False: 17.0k]
  ------------------
  386|    147|            change_capacity(new_size + (new_size >> 1));
  387|    147|        }
  388|  17.1k|        new(item_ptr(size())) T(std::forward<Args>(args)...);
  389|  17.1k|        _size++;
  390|  17.1k|    }
_ZN9prevectorILj36EhjiEaSEOS0_:
  237|   244k|    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
  238|   244k|        if (!is_direct()) {
  ------------------
  |  Branch (238:13): [True: 0, False: 244k]
  ------------------
  239|      0|            free(_union.indirect_contents.indirect);
  240|      0|        }
  241|   244k|        _union = std::move(other._union);
  242|   244k|        _size = other._size;
  243|   244k|        other._size = 0;
  244|   244k|        return *this;
  245|   244k|    }
_ZNK9prevectorILj36EhjiE4dataEv:
  468|  2.79k|    const value_type* data() const {
  469|  2.79k|        return item_ptr(0);
  470|  2.79k|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS0_14const_iteratorEEEvPhT_S5_:
  167|  4.14k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|   194k|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 189k, False: 4.14k]
  ------------------
  169|   189k|            new(static_cast<void*>(dst)) T(*first);
  170|   189k|            ++dst;
  171|   189k|            ++first;
  172|   189k|        }
  173|  4.14k|    }
_ZNK9prevectorILj36EhjiE14const_iteratoreqES1_:
  102|   194k|        bool operator==(const_iterator x) const { return ptr == x.ptr; }
_ZN9prevectorILj36EhjiE14const_iteratorppEv:
   92|   189k|        const_iterator& operator++() { ptr++; return *this; }
_ZN9prevectorILj36EhjiE8item_ptrEi:
  159|  5.62M|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (159:47): [True: 3.59M, False: 2.03M]
  ------------------
_ZNK9prevectorILj36EhjiE9is_directEv:
  126|  15.2M|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj36EhjiE10direct_ptrEi:
  122|  3.82M|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj36EhjiE12indirect_ptrEi:
  124|  2.03M|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj36EhjiE15change_capacityEj:
  128|   240k|    void change_capacity(size_type new_capacity) {
  129|   240k|        if (new_capacity <= N) {
  ------------------
  |  Branch (129:13): [True: 3.80k, False: 236k]
  ------------------
  130|  3.80k|            if (!is_direct()) {
  ------------------
  |  Branch (130:17): [True: 0, False: 3.80k]
  ------------------
  131|      0|                T* indirect = indirect_ptr(0);
  132|      0|                T* src = indirect;
  133|      0|                T* dst = direct_ptr(0);
  134|      0|                memcpy(dst, src, size() * sizeof(T));
  135|      0|                free(indirect);
  136|      0|                _size -= N + 1;
  137|      0|            }
  138|   236k|        } else {
  139|   236k|            if (!is_direct()) {
  ------------------
  |  Branch (139:17): [True: 7.29k, False: 228k]
  ------------------
  140|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  141|       |                    success. These should instead use an allocator or new/delete so that handlers
  142|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  143|  7.29k|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  144|  7.29k|                assert(_union.indirect_contents.indirect);
  ------------------
  |  Branch (144:17): [True: 7.29k, False: 0]
  ------------------
  145|  7.29k|                _union.indirect_contents.capacity = new_capacity;
  146|   228k|            } else {
  147|   228k|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  148|   228k|                assert(new_indirect);
  ------------------
  |  Branch (148:17): [True: 228k, False: 0]
  ------------------
  149|   228k|                T* src = direct_ptr(0);
  150|   228k|                T* dst = reinterpret_cast<T*>(new_indirect);
  151|   228k|                memcpy(dst, src, size() * sizeof(T));
  152|   228k|                _union.indirect_contents.indirect = new_indirect;
  153|   228k|                _union.indirect_contents.capacity = new_capacity;
  154|   228k|                _size += N + 1;
  155|   228k|            }
  156|   236k|        }
  157|   240k|    }
_ZNK9prevectorILj36EhjiE3endEv:
  258|  4.14k|    const_iterator end() const { return const_iterator(item_ptr(size())); }
_ZNK9prevectorILj36EhjiE8item_ptrEi:
  160|  11.0k|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (160:59): [True: 8.34k, False: 2.73k]
  ------------------
_ZNK9prevectorILj36EhjiE10direct_ptrEi:
  123|  8.34k|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj36EhjiE12indirect_ptrEi:
  125|  2.73k|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZNK9prevectorILj36EhjiE4sizeEv:
  247|  5.55M|    size_type size() const {
  248|  5.55M|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (248:16): [True: 3.74M, False: 1.80M]
  ------------------
  249|  5.55M|    }
_ZNK9prevectorILj36EhjiE5beginEv:
  256|  4.14k|    const_iterator begin() const { return const_iterator(item_ptr(0)); }
_ZNK9prevectorILj36EhjiE14const_iteratordeEv:
   89|   189k|        const T& operator*() const { return *ptr; }
_ZN9prevectorILj36EhjiEC2Ev:
  196|   610k|    prevector() = default;
_ZN9prevectorILj36EhjiE6insertENS0_8iteratorERKh:
  307|  1.24M|    iterator insert(iterator pos, const T& value) {
  308|  1.24M|        size_type p = pos - begin();
  309|  1.24M|        size_type new_size = size() + 1;
  310|  1.24M|        if (capacity() < new_size) {
  ------------------
  |  Branch (310:13): [True: 2.99k, False: 1.23M]
  ------------------
  311|  2.99k|            change_capacity(new_size + (new_size >> 1));
  312|  2.99k|        }
  313|  1.24M|        T* ptr = item_ptr(p);
  314|  1.24M|        T* dst = ptr + 1;
  315|  1.24M|        memmove(dst, ptr, (size() - p) * sizeof(T));
  316|  1.24M|        _size++;
  317|  1.24M|        new(static_cast<void*>(ptr)) T(value);
  318|  1.24M|        return iterator(ptr);
  319|  1.24M|    }
_ZmiN9prevectorILj36EhjiE8iteratorES1_:
   68|  1.98M|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj36EhjiE8iteratordeEv:
   61|  2.21G|        T& operator*() const { return *ptr; }
_ZNK9prevectorILj36EhjiE8capacityEv:
  260|  1.65M|    size_t capacity() const {
  261|  1.65M|        if (is_direct()) {
  ------------------
  |  Branch (261:13): [True: 1.20M, False: 450k]
  ------------------
  262|  1.20M|            return N;
  263|  1.20M|        } else {
  264|   450k|            return _union.indirect_contents.capacity;
  265|   450k|        }
  266|  1.65M|    }
_ZN9prevectorILj36EhjiE8iteratorC2EPh:
   60|  5.21M|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj36EhjiE6insertITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvNS0_8iteratorET_S8_:
  335|  45.3k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  336|  45.3k|        size_type p = pos - begin();
  337|  45.3k|        difference_type count = last - first;
  338|  45.3k|        size_type new_size = size() + count;
  339|  45.3k|        if (capacity() < new_size) {
  ------------------
  |  Branch (339:13): [True: 6.09k, False: 39.2k]
  ------------------
  340|  6.09k|            change_capacity(new_size + (new_size >> 1));
  341|  6.09k|        }
  342|  45.3k|        T* ptr = item_ptr(p);
  343|  45.3k|        T* dst = ptr + count;
  344|  45.3k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  345|  45.3k|        _size += count;
  346|  45.3k|        fill(ptr, first, last);
  347|  45.3k|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvPhT_S8_:
  167|  45.3k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  1.27M|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 1.22M, False: 45.3k]
  ------------------
  169|  1.22M|            new(static_cast<void*>(dst)) T(*first);
  170|  1.22M|            ++dst;
  171|  1.22M|            ++first;
  172|  1.22M|        }
  173|  45.3k|    }
_ZN9prevectorILj36EhjiEC2ERKS0_:
  216|  4.14k|    prevector(const prevector<N, T, Size, Diff>& other) {
  217|  4.14k|        size_type n = other.size();
  218|  4.14k|        change_capacity(n);
  219|  4.14k|        _size += n;
  220|  4.14k|        fill(item_ptr(0), other.begin(),  other.end());
  221|  4.14k|    }
_ZN9prevectorILj36EhjiE3endEv:
  257|  1.98M|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj36EhjiE5beginEv:
  255|  1.98M|    iterator begin() { return iterator(item_ptr(0)); }
_ZN9prevectorILj36EhjiED2Ev:
  422|  1.89M|    ~prevector() {
  423|  1.89M|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 228k, False: 1.66M]
  ------------------
  424|   228k|            free(_union.indirect_contents.indirect);
  425|   228k|            _union.indirect_contents.indirect = nullptr;
  426|   228k|        }
  427|  1.89M|    }
_ZN9prevectorILj36EhjiE14const_iteratorC2EPKh:
   87|  8.28k|        const_iterator(const T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj36EhjiEC2ITkNSt3__114input_iteratorENS2_11__wrap_iterIPhEEEET_S6_:
  209|     25|    prevector(InputIterator first, InputIterator last) {
  210|     25|        size_type n = last - first;
  211|     25|        change_capacity(n);
  212|     25|        _size += n;
  213|     25|        fill(item_ptr(0), first, last);
  214|     25|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPhEEEEvS4_T_S6_:
  167|     25|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  7.63k|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 7.61k, False: 25]
  ------------------
  169|  7.61k|            new(static_cast<void*>(dst)) T(*first);
  170|  7.61k|            ++dst;
  171|  7.61k|            ++first;
  172|  7.61k|        }
  173|     25|    }

_ZNK11XOnlyPubKey12IsFullyValidEv:
  231|  2.67k|{
  232|  2.67k|    secp256k1_xonly_pubkey pubkey;
  233|  2.67k|    return secp256k1_xonly_pubkey_parse(secp256k1_context_static, &pubkey, m_keydata.data());
  234|  2.67k|}
_ZNK11XOnlyPubKey19ComputeTapTweakHashEPK7uint256:
  247|  2.64k|{
  248|  2.64k|    if (merkle_root == nullptr) {
  ------------------
  |  Branch (248:9): [True: 1.27k, False: 1.36k]
  ------------------
  249|       |        // We have no scripts. The actual tweak does not matter, but follow BIP341 here to
  250|       |        // allow for reproducible tweaking.
  251|  1.27k|        return (HashWriter{HASHER_TAPTWEAK} << m_keydata).GetSHA256();
  252|  1.36k|    } else {
  253|  1.36k|        return (HashWriter{HASHER_TAPTWEAK} << m_keydata << *merkle_root).GetSHA256();
  254|  1.36k|    }
  255|  2.64k|}
_ZNK11XOnlyPubKey14CreateTapTweakEPK7uint256:
  266|  2.64k|{
  267|  2.64k|    secp256k1_xonly_pubkey base_point;
  268|  2.64k|    if (!secp256k1_xonly_pubkey_parse(secp256k1_context_static, &base_point, data())) return std::nullopt;
  ------------------
  |  Branch (268:9): [True: 0, False: 2.64k]
  ------------------
  269|  2.64k|    secp256k1_pubkey out;
  270|  2.64k|    uint256 tweak = ComputeTapTweakHash(merkle_root);
  271|  2.64k|    if (!secp256k1_xonly_pubkey_tweak_add(secp256k1_context_static, &out, &base_point, tweak.data())) return std::nullopt;
  ------------------
  |  Branch (271:9): [True: 0, False: 2.64k]
  ------------------
  272|  2.64k|    int parity = -1;
  273|  2.64k|    std::pair<XOnlyPubKey, bool> ret;
  274|  2.64k|    secp256k1_xonly_pubkey out_xonly;
  275|  2.64k|    if (!secp256k1_xonly_pubkey_from_pubkey(secp256k1_context_static, &out_xonly, &parity, &out)) return std::nullopt;
  ------------------
  |  Branch (275:9): [True: 0, False: 2.64k]
  ------------------
  276|  2.64k|    secp256k1_xonly_pubkey_serialize(secp256k1_context_static, ret.first.begin(), &out_xonly);
  277|  2.64k|    assert(parity == 0 || parity == 1);
  ------------------
  |  Branch (277:5): [True: 1.34k, False: 1.29k]
  |  Branch (277:5): [True: 1.29k, False: 0]
  |  Branch (277:5): [True: 2.64k, False: 0]
  ------------------
  278|  2.64k|    ret.second = parity;
  279|  2.64k|    return ret;
  280|  2.64k|}
_ZNK7CPubKey12IsFullyValidEv:
  320|  80.5k|bool CPubKey::IsFullyValid() const {
  321|  80.5k|    if (!IsValid())
  ------------------
  |  Branch (321:9): [True: 10.6k, False: 69.8k]
  ------------------
  322|  10.6k|        return false;
  323|  69.8k|    secp256k1_pubkey pubkey;
  324|  69.8k|    return secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size());
  325|  80.5k|}

_ZNK7CPubKey16IsValidNonHybridEv:
  198|  59.3k|    {
  199|  59.3k|        return size() > 0 && (vch[0] == 0x02 || vch[0] == 0x03 || vch[0] == 0x04);
  ------------------
  |  Branch (199:16): [True: 59.3k, False: 0]
  |  Branch (199:31): [True: 15.8k, False: 43.4k]
  |  Branch (199:49): [True: 43.2k, False: 179]
  |  Branch (199:67): [True: 177, False: 2]
  ------------------
  200|  59.3k|    }
_ZN11XOnlyPubKeyC2ERK7CPubKey:
  262|  36.8k|    explicit XOnlyPubKey(const CPubKey& pubkey) : XOnlyPubKey(std::span{pubkey}.subspan(1, 32)) {}
_ZeqRK7CPubKeyS1_:
  126|  7.29k|    {
  127|  7.29k|        return a.vch[0] == b.vch[0] &&
  ------------------
  |  Branch (127:16): [True: 7.29k, False: 0]
  ------------------
  128|  7.29k|               memcmp(a.vch, b.vch, a.size()) == 0;
  ------------------
  |  Branch (128:16): [True: 7.29k, False: 0]
  ------------------
  129|  7.29k|    }
_ZltRK7CPubKeyS1_:
  131|  2.69M|    {
  132|  2.69M|        return a.vch[0] < b.vch[0] ||
  ------------------
  |  Branch (132:16): [True: 258k, False: 2.43M]
  ------------------
  133|  2.43M|               (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
  ------------------
  |  Branch (133:17): [True: 2.19M, False: 242k]
  |  Branch (133:41): [True: 944k, False: 1.25M]
  ------------------
  134|  2.69M|    }
_ZNK11XOnlyPubKeyltERKS_:
  307|  2.48M|    bool operator<(const XOnlyPubKey& other) const { return m_keydata < other.m_keydata; }
_ZNK7CPubKey3endEv:
  121|  1.31k|    const unsigned char* end() const { return vch + size(); }
_ZNK7CPubKey12IsCompressedEv:
  207|  57.0k|    {
  208|  57.0k|        return size() == COMPRESSED_SIZE;
  209|  57.0k|    }
_ZNK7CPubKey4dataEv:
  119|  70.5k|    const unsigned char* data() const { return vch; }
_ZN11XOnlyPubKey4sizeEv:
  299|  1.01k|    static constexpr size_t size() { return decltype(m_keydata)::size(); }
_ZN7CPubKey6GetLenEh:
   67|  2.89M|    {
   68|  2.89M|        if (chHeader == 2 || chHeader == 3)
  ------------------
  |  Branch (68:13): [True: 456k, False: 2.44M]
  |  Branch (68:30): [True: 2.41M, False: 32.1k]
  ------------------
   69|  2.86M|            return COMPRESSED_SIZE;
   70|  32.1k|        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
  ------------------
  |  Branch (70:13): [True: 1.17k, False: 30.9k]
  |  Branch (70:30): [True: 125, False: 30.8k]
  |  Branch (70:47): [True: 156, False: 30.6k]
  ------------------
   71|  1.46k|            return SIZE;
   72|  30.6k|        return 0;
   73|  32.1k|    }
_ZN7CPubKey10InvalidateEv:
   77|  22.6k|    {
   78|  22.6k|        vch[0] = 0xFF;
   79|  22.6k|    }
_ZN7CPubKeyC2ENSt3__14spanIKhLm18446744073709551615EEE:
  113|  70.0k|    {
  114|  70.0k|        Set(_vch.begin(), _vch.end());
  115|  70.0k|    }
_ZNK7CPubKey4sizeEv:
  118|  2.80M|    unsigned int size() const { return GetLen(vch[0]); }
_ZNK7CPubKey7IsValidEv:
  192|   162k|    {
  193|   162k|        return size() > 0;
  194|   162k|    }
_ZN7CPubKey3SetINSt3__111__wrap_iterIPKhEEEEvT_S6_:
   96|  70.0k|    {
   97|  70.0k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (97:19): [True: 0, False: 70.0k]
  ------------------
   98|  70.0k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (98:13): [True: 60.8k, False: 9.14k]
  |  Branch (98:20): [True: 59.3k, False: 1.50k]
  ------------------
   99|  59.3k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
  100|  10.6k|        else
  101|  10.6k|            Invalidate();
  102|  70.0k|    }
_ZN7CPubKeyC2Ev:
   89|  11.9k|    {
   90|  11.9k|        Invalidate();
   91|  11.9k|    }
_ZNK7CPubKey5GetIDEv:
  167|   160k|    {
  168|   160k|        return CKeyID(Hash160(std::span{vch}.first(size())));
  169|   160k|    }
_ZN6CKeyIDC2ERK7uint160:
   29|   161k|    explicit CKeyID(const uint160& in) : uint160(in) {}
_ZNK11XOnlyPubKey5beginEv:
  301|  35.8k|    const unsigned char* begin() const { return m_keydata.begin(); }
_ZNK11XOnlyPubKey3endEv:
  302|  35.8k|    const unsigned char* end() const { return m_keydata.end(); }
_ZNK11XOnlyPubKey4dataEv:
  300|  3.65k|    const unsigned char* data() const { return m_keydata.begin(); }
_ZN11XOnlyPubKeyC2Ev:
  244|  13.2k|    XOnlyPubKey() = default;
_ZN11XOnlyPubKey5beginEv:
  304|  2.64k|    unsigned char* begin() { return m_keydata.begin(); }
_ZNK7CPubKey5beginEv:
  120|  1.31k|    const unsigned char* begin() const { return vch; }
_ZNK6CKeyID11fingerprintEv:
   31|   151k|    {
   32|   151k|        KeyFingerprint ret;
   33|   151k|        std::copy_n(begin(), ret.size(), ret.begin());
   34|   151k|        return ret;
   35|   151k|    }
_ZN7CPubKey3SetIPhEEvT_S2_:
   96|  21.6k|    {
   97|  21.6k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (97:19): [True: 0, False: 21.6k]
  ------------------
   98|  21.6k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (98:13): [True: 21.6k, False: 0]
  |  Branch (98:20): [True: 21.6k, False: 0]
  ------------------
   99|  21.6k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
  100|      0|        else
  101|      0|            Invalidate();
  102|  21.6k|    }
_ZN7CPubKeyC2IPhEET_S2_:
  107|  11.1k|    {
  108|  11.1k|        Set(pbegin, pend);
  109|  11.1k|    }
_ZN11XOnlyPubKeyC2ENSt3__14spanIKhLm18446744073709551615EEE:
  259|  36.8k|    constexpr explicit XOnlyPubKey(std::span<const unsigned char> bytes) : m_keydata{bytes} {}

random.cpp:_ZN12_GLOBAL__N_18RNGStateD2Ev:
  367|      2|    ~RNGState() = default;

_Z12JSONRPCErroriRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   71|  99.4k|{
   72|  99.4k|    UniValue error(UniValue::VOBJ);
   73|  99.4k|    error.pushKV("code", code);
   74|  99.4k|    error.pushKV("message", message);
   75|  99.4k|    return error;
   76|  99.4k|}

_Z15AmountFromValueRK8UniValuei:
  100|  10.7k|{
  101|  10.7k|    if (!value.isNum() && !value.isStr())
  ------------------
  |  Branch (101:9): [True: 9.68k, False: 1.10k]
  |  Branch (101:27): [True: 328, False: 9.35k]
  ------------------
  102|    328|        throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number or string");
  103|  10.4k|    int64_t amount;
  104|  10.4k|    if (!ParseFixedPoint(value.getValStr(), decimals, &amount))
  ------------------
  |  Branch (104:9): [True: 9.94k, False: 514]
  ------------------
  105|  9.94k|        throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
  106|    514|    if (!MoneyRange(amount))
  ------------------
  |  Branch (106:9): [True: 320, False: 194]
  ------------------
  107|    320|        throw JSONRPCError(RPC_TYPE_ERROR, "Amount out of range");
  108|    194|    return amount;
  109|    514|}
_Z10ParseHashVRK8UniValueNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  119|  43.1k|{
  120|  43.1k|    const std::string& strHex(v.get_str());
  121|  43.1k|    if (auto rv{uint256::FromHex(strHex)}) return *rv;
  ------------------
  |  Branch (121:14): [True: 5, False: 43.1k]
  ------------------
  122|  43.1k|    if (auto expected_len{uint256::size() * 2}; strHex.length() != expected_len) {
  ------------------
  |  Branch (122:49): [True: 18.7k, False: 24.4k]
  ------------------
  123|  18.7k|        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be of length %d (not %d, for '%s')", name, expected_len, strHex.length(), strHex));
  ------------------
  |  | 1172|  18.7k|#define strprintf tfm::format
  ------------------
  124|  18.7k|    }
  125|  24.4k|    throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be hexadecimal string (not '%s')", name, strHex));
  ------------------
  |  | 1172|  24.4k|#define strprintf tfm::format
  ------------------
  126|  43.1k|}
_Z10ParseHashORK8UniValueNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  128|  21.5k|{
  129|  21.5k|    return ParseHashV(o.find_value(strKey), strKey);
  130|  21.5k|}
_Z9ParseHexVRK8UniValueNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  132|  43.1k|{
  133|  43.1k|    std::string strHex;
  134|  43.1k|    if (v.isStr())
  ------------------
  |  Branch (134:9): [True: 18.7k, False: 24.4k]
  ------------------
  135|  18.7k|        strHex = v.get_str();
  136|  43.1k|    if (!IsHex(strHex))
  ------------------
  |  Branch (136:9): [True: 43.0k, False: 71]
  ------------------
  137|  43.0k|        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be hexadecimal string (not '%s')", name, strHex));
  ------------------
  |  | 1172|  43.0k|#define strprintf tfm::format
  ------------------
  138|     71|    return ParseHex(strHex);
  139|  43.1k|}
_Z9ParseHexORK8UniValueNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  141|  21.5k|{
  142|  21.5k|    return ParseHexV(o.find_value(strKey), strKey);
  143|  21.5k|}
_Z18ParseSighashStringRK8UniValue:
  359|  9.35k|{
  360|  9.35k|    if (sighash.isNull()) {
  ------------------
  |  Branch (360:9): [True: 1, False: 9.35k]
  ------------------
  361|      1|        return std::nullopt;
  362|      1|    }
  363|  9.35k|    const auto result{SighashFromStr(sighash.get_str())};
  364|  9.35k|    if (!result) {
  ------------------
  |  Branch (364:9): [True: 9.35k, False: 1]
  ------------------
  365|  9.35k|        throw JSONRPCError(RPC_INVALID_PARAMETER, util::ErrorString(result).original);
  366|  9.35k|    }
  367|      1|    return result.value();
  368|  9.35k|}
_Z18ParseConfirmTargetRK8UniValuej:
  371|  10.7k|{
  372|  10.7k|    const int target{value.getInt<int>()};
  373|  10.7k|    const unsigned int unsigned_target{static_cast<unsigned int>(target)};
  374|  10.7k|    if (target < 1 || unsigned_target > max_target) {
  ------------------
  |  Branch (374:9): [True: 10.6k, False: 150]
  |  Branch (374:23): [True: 0, False: 150]
  ------------------
  375|     79|        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u and %u", 1, max_target));
  ------------------
  |  | 1172|     79|#define strprintf tfm::format
  ------------------
  376|     79|    }
  377|  10.7k|    return unsigned_target;
  378|  10.7k|}
_Z20ParseDescriptorRangeRK8UniValue:
 1325|  10.7k|{
 1326|  10.7k|    int64_t low, high;
 1327|  10.7k|    std::tie(low, high) = ParseRange(value);
 1328|  10.7k|    if (low < 0) {
  ------------------
  |  Branch (1328:9): [True: 79, False: 10.7k]
  ------------------
 1329|     79|        throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should be greater or equal than 0");
 1330|     79|    }
 1331|  10.7k|    if ((high >> 31) != 0) {
  ------------------
  |  Branch (1331:9): [True: 361, False: 10.3k]
  ------------------
 1332|    361|        throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range is too high");
 1333|    361|    }
 1334|  10.3k|    if (high >= low + 1000000) {
  ------------------
  |  Branch (1334:9): [True: 81, False: 10.2k]
  ------------------
 1335|     81|        throw JSONRPCError(RPC_INVALID_PARAMETER, "Range is too large");
 1336|     81|    }
 1337|  10.2k|    return {low, high};
 1338|  10.3k|}
_Z28EvalDescriptorStringOrObjectRK8UniValueR19FlatSigningProviderb:
 1341|  10.6k|{
 1342|  10.6k|    std::string desc_str;
 1343|  10.6k|    std::pair<int64_t, int64_t> range = {0, 1000};
 1344|  10.6k|    if (scanobject.isStr()) {
  ------------------
  |  Branch (1344:9): [True: 9.28k, False: 1.37k]
  ------------------
 1345|  9.28k|        desc_str = scanobject.get_str();
 1346|  9.28k|    } else if (scanobject.isObject()) {
  ------------------
  |  Branch (1346:16): [True: 102, False: 1.27k]
  ------------------
 1347|    102|        const UniValue& desc_uni{scanobject.find_value("desc")};
 1348|    102|        if (desc_uni.isNull()) throw JSONRPCError(RPC_INVALID_PARAMETER, "Descriptor needs to be provided in scan object");
  ------------------
  |  Branch (1348:13): [True: 92, False: 10]
  ------------------
 1349|     10|        desc_str = desc_uni.get_str();
 1350|     10|        const UniValue& range_uni{scanobject.find_value("range")};
 1351|     10|        if (!range_uni.isNull()) {
  ------------------
  |  Branch (1351:13): [True: 0, False: 10]
  ------------------
 1352|      0|            range = ParseDescriptorRange(range_uni);
 1353|      0|        }
 1354|  1.27k|    } else {
 1355|  1.27k|        throw JSONRPCError(RPC_INVALID_PARAMETER, "Scan object needs to be either a string or an object");
 1356|  1.27k|    }
 1357|       |
 1358|  9.29k|    std::string error;
 1359|  9.29k|    auto descs = Parse(desc_str, provider, error);
 1360|  9.29k|    if (descs.empty()) {
  ------------------
  |  Branch (1360:9): [True: 6.17k, False: 3.11k]
  ------------------
 1361|  6.17k|        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error);
 1362|  6.17k|    }
 1363|  3.11k|    if (!descs.at(0)->IsRange()) {
  ------------------
  |  Branch (1363:9): [True: 3.11k, False: 4]
  ------------------
 1364|  3.11k|        range.first = 0;
 1365|  3.11k|        range.second = 0;
 1366|  3.11k|    }
 1367|  3.11k|    std::vector<CScript> ret;
 1368|  6.22k|    for (int64_t i = range.first; i <= range.second; ++i) {
  ------------------
  |  Branch (1368:35): [True: 3.11k, False: 3.11k]
  ------------------
 1369|  3.11k|        for (const auto& desc : descs) {
  ------------------
  |  Branch (1369:31): [True: 3.11k, False: 3.11k]
  ------------------
 1370|  3.11k|            std::vector<CScript> scripts;
 1371|  3.11k|            if (!desc->Expand(i, provider, scripts, provider)) {
  ------------------
  |  Branch (1371:17): [True: 0, False: 3.11k]
  ------------------
 1372|      0|                throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys: '%s'", desc_str));
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 1373|      0|            }
 1374|  3.11k|            if (expand_priv) {
  ------------------
  |  Branch (1374:17): [True: 0, False: 3.11k]
  ------------------
 1375|      0|                desc->ExpandPrivate(/*pos=*/i, provider, /*out=*/provider);
 1376|      0|            }
 1377|  3.11k|            std::move(scripts.begin(), scripts.end(), std::back_inserter(ret));
 1378|  3.11k|        }
 1379|  3.11k|    }
 1380|  3.11k|    return ret;
 1381|  3.11k|}
util.cpp:_ZL10ParseRangeRK8UniValue:
 1311|  10.7k|{
 1312|  10.7k|    if (value.isNum()) {
  ------------------
  |  Branch (1312:9): [True: 1.10k, False: 9.68k]
  ------------------
 1313|  1.10k|        return {0, value.getInt<int64_t>()};
 1314|  1.10k|    }
 1315|  9.68k|    if (value.isArray() && value.size() == 2 && value[0].isNum() && value[1].isNum()) {
  ------------------
  |  Branch (1315:9): [True: 208, False: 9.47k]
  |  Branch (1315:28): [True: 130, False: 78]
  |  Branch (1315:49): [True: 124, False: 6]
  |  Branch (1315:69): [True: 122, False: 2]
  ------------------
 1316|    122|        int64_t low = value[0].getInt<int64_t>();
 1317|    122|        int64_t high = value[1].getInt<int64_t>();
 1318|    122|        if (low > high) throw JSONRPCError(RPC_INVALID_PARAMETER, "Range specified as [begin,end] must not have begin after end");
  ------------------
  |  Branch (1318:13): [True: 32, False: 90]
  ------------------
 1319|     90|        return {low, high};
 1320|    122|    }
 1321|  9.56k|    throw JSONRPCError(RPC_INVALID_PARAMETER, "Range must be specified as end or as [begin,end]");
 1322|  9.68k|}

_Z13CheckChecksumRNSt3__14spanIKcLm18446744073709551615EEEbRNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPS9_:
 2925|  9.28k|{
 2926|  9.28k|    auto check_split = Split(sp, '#');
 2927|  9.28k|    if (check_split.size() > 2) {
  ------------------
  |  Branch (2927:9): [True: 23, False: 9.26k]
  ------------------
 2928|     23|        error = "Multiple '#' symbols";
 2929|     23|        return false;
 2930|     23|    }
 2931|  9.26k|    if (check_split.size() == 1 && require_checksum){
  ------------------
  |  Branch (2931:9): [True: 9.24k, False: 19]
  |  Branch (2931:36): [True: 0, False: 9.24k]
  ------------------
 2932|      0|        error = "Missing checksum";
 2933|      0|        return false;
 2934|      0|    }
 2935|  9.26k|    if (check_split.size() == 2) {
  ------------------
  |  Branch (2935:9): [True: 19, False: 9.24k]
  ------------------
 2936|     19|        if (check_split[1].size() != 8) {
  ------------------
  |  Branch (2936:13): [True: 12, False: 7]
  ------------------
 2937|     12|            error = strprintf("Expected 8 character checksum, not %u characters", check_split[1].size());
  ------------------
  |  | 1172|     12|#define strprintf tfm::format
  ------------------
 2938|     12|            return false;
 2939|     12|        }
 2940|     19|    }
 2941|  9.25k|    auto checksum = DescriptorChecksum(check_split[0]);
 2942|  9.25k|    if (checksum.empty()) {
  ------------------
  |  Branch (2942:9): [True: 31, False: 9.22k]
  ------------------
 2943|     31|        error = "Invalid characters in payload";
 2944|     31|        return false;
 2945|     31|    }
 2946|  9.22k|    if (check_split.size() == 2) {
  ------------------
  |  Branch (2946:9): [True: 7, False: 9.21k]
  ------------------
 2947|      7|        if (!std::equal(checksum.begin(), checksum.end(), check_split[1].begin())) {
  ------------------
  |  Branch (2947:13): [True: 6, False: 1]
  ------------------
 2948|      6|            error = strprintf("Provided checksum '%s' does not match computed checksum '%s'", std::string(check_split[1].begin(), check_split[1].end()), checksum);
  ------------------
  |  | 1172|      6|#define strprintf tfm::format
  ------------------
 2949|      6|            return false;
 2950|      6|        }
 2951|      7|    }
 2952|  9.21k|    if (out_checksum) *out_checksum = std::move(checksum);
  ------------------
  |  Branch (2952:9): [True: 0, False: 9.21k]
  ------------------
 2953|  9.21k|    sp = check_split[0];
 2954|  9.21k|    return true;
 2955|  9.22k|}
_Z5ParseNSt3__117basic_string_viewIcNS_11char_traitsIcEEEER19FlatSigningProviderRNS_12basic_stringIcS2_NS_9allocatorIcEEEEb:
 2958|  9.28k|{
 2959|  9.28k|    std::span<const char> sp{descriptor};
 2960|  9.28k|    if (!CheckChecksum(sp, require_checksum, error)) return {};
  ------------------
  |  Branch (2960:9): [True: 72, False: 9.21k]
  ------------------
 2961|  9.21k|    uint32_t key_exp_index = 0;
 2962|  9.21k|    auto ret = ParseScript(key_exp_index, sp, ParseScriptContext::TOP, out, error);
 2963|  9.21k|    if (sp.empty() && !ret.empty()) {
  ------------------
  |  Branch (2963:9): [True: 8.75k, False: 462]
  |  Branch (2963:23): [True: 3.11k, False: 5.64k]
  ------------------
 2964|  3.11k|        std::vector<std::unique_ptr<Descriptor>> descs;
 2965|  3.11k|        descs.reserve(ret.size());
 2966|  3.11k|        for (auto& r : ret) {
  ------------------
  |  Branch (2966:22): [True: 3.11k, False: 3.11k]
  ------------------
 2967|  3.11k|            descs.emplace_back(std::unique_ptr<Descriptor>(std::move(r)));
 2968|  3.11k|        }
 2969|  3.11k|        return descs;
 2970|  3.11k|    }
 2971|  6.10k|    return {};
 2972|  9.21k|}
descriptor.cpp:_ZN12_GLOBAL__N_118DescriptorChecksumERKNSt3__14spanIKcLm18446744073709551615EEE:
  125|  9.25k|{
  126|       |    /** A character set designed such that:
  127|       |     *  - The most common 'unprotected' descriptor characters (hex, keypaths) are in the first group of 32.
  128|       |     *  - Case errors cause an offset that's a multiple of 32.
  129|       |     *  - As many alphabetic characters are in the same group (while following the above restrictions).
  130|       |     *
  131|       |     * If p(x) gives the position of a character c in this character set, every group of 3 characters
  132|       |     * (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).
  133|       |     * This means that changes that only affect the lower 5 bits of the position, or only the higher 2 bits, will just
  134|       |     * affect a single symbol.
  135|       |     *
  136|       |     * As a result, within-group-of-32 errors count as 1 symbol, as do cross-group errors that don't affect
  137|       |     * the position within the groups.
  138|       |     */
  139|  9.25k|    static const std::string INPUT_CHARSET =
  140|  9.25k|        "0123456789()[],'/*abcdefgh@:$%{}"
  141|  9.25k|        "IJKLMNOPQRSTUVWXYZ&+-.;<=>?!^_|~"
  142|  9.25k|        "ijklmnopqrstuvwxyzABCDEFGH`#\"\\ ";
  143|       |
  144|       |    /** The character set for the checksum itself (same as bech32). */
  145|  9.25k|    static const std::string CHECKSUM_CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
  146|       |
  147|  9.25k|    uint64_t c = 1;
  148|  9.25k|    int cls = 0;
  149|  9.25k|    int clscount = 0;
  150|  7.74M|    for (auto ch : span) {
  ------------------
  |  Branch (150:18): [True: 7.74M, False: 9.22k]
  ------------------
  151|  7.74M|        auto pos = INPUT_CHARSET.find(ch);
  152|  7.74M|        if (pos == std::string::npos) return "";
  ------------------
  |  Branch (152:13): [True: 31, False: 7.74M]
  ------------------
  153|  7.74M|        c = PolyMod(c, pos & 31); // Emit a symbol for the position inside the group, for every character.
  154|  7.74M|        cls = cls * 3 + (pos >> 5); // Accumulate the group numbers
  155|  7.74M|        if (++clscount == 3) {
  ------------------
  |  Branch (155:13): [True: 2.57M, False: 5.16M]
  ------------------
  156|       |            // Emit an extra symbol representing the group numbers, for every 3 characters.
  157|  2.57M|            c = PolyMod(c, cls);
  158|  2.57M|            cls = 0;
  159|  2.57M|            clscount = 0;
  160|  2.57M|        }
  161|  7.74M|    }
  162|  9.22k|    if (clscount > 0) c = PolyMod(c, cls);
  ------------------
  |  Branch (162:9): [True: 6.50k, False: 2.71k]
  ------------------
  163|  83.0k|    for (int j = 0; j < 8; ++j) c = PolyMod(c, 0); // Shift further to determine the checksum.
  ------------------
  |  Branch (163:21): [True: 73.7k, False: 9.22k]
  ------------------
  164|  9.22k|    c ^= 1; // Prevent appending zeroes from not affecting the checksum.
  165|       |
  166|  9.22k|    std::string ret(8, ' ');
  167|  83.0k|    for (int j = 0; j < 8; ++j) ret[j] = CHECKSUM_CHARSET[(c >> (5 * (7 - j))) & 31];
  ------------------
  |  Branch (167:21): [True: 73.7k, False: 9.22k]
  ------------------
  168|  9.22k|    return ret;
  169|  9.25k|}
descriptor.cpp:_ZN12_GLOBAL__N_17PolyModEmi:
  113|  10.4M|{
  114|  10.4M|    uint8_t c0 = c >> 35;
  115|  10.4M|    c = ((c & 0x7ffffffff) << 5) ^ val;
  116|  10.4M|    if (c0 & 1) c ^= 0xf5dee51989;
  ------------------
  |  Branch (116:9): [True: 5.18M, False: 5.22M]
  ------------------
  117|  10.4M|    if (c0 & 2) c ^= 0xa9fdca3312;
  ------------------
  |  Branch (117:9): [True: 5.16M, False: 5.24M]
  ------------------
  118|  10.4M|    if (c0 & 4) c ^= 0x1bab10e32d;
  ------------------
  |  Branch (118:9): [True: 5.16M, False: 5.24M]
  ------------------
  119|  10.4M|    if (c0 & 8) c ^= 0x3706b1677a;
  ------------------
  |  Branch (119:9): [True: 5.16M, False: 5.24M]
  ------------------
  120|  10.4M|    if (c0 & 16) c ^= 0x644d626ffd;
  ------------------
  |  Branch (120:9): [True: 5.15M, False: 5.25M]
  ------------------
  121|  10.4M|    return c;
  122|  10.4M|}
descriptor.cpp:_ZN12_GLOBAL__N_111ParseScriptERjRNSt3__14spanIKcLm18446744073709551615EEENS_18ParseScriptContextER19FlatSigningProviderRNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2339|  15.4k|{
 2340|  15.4k|    using namespace script;
 2341|  15.4k|    Assume(ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH || ctx == ParseScriptContext::P2TR);
  ------------------
  |  |  128|  63.4k|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  |  |  ------------------
  |  |  |  Branch (128:51): [True: 9.21k, False: 6.25k]
  |  |  |  Branch (128:51): [True: 209, False: 6.04k]
  |  |  |  Branch (128:51): [True: 1.34k, False: 4.69k]
  |  |  |  Branch (128:51): [True: 4.69k, False: 0]
  |  |  ------------------
  ------------------
 2342|  15.4k|    std::vector<std::unique_ptr<DescriptorImpl>> ret;
 2343|  15.4k|    auto expr = Expr(sp);
 2344|  15.4k|    if (Func("pk", expr)) {
  ------------------
  |  Branch (2344:9): [True: 1.97k, False: 13.4k]
  ------------------
 2345|  1.97k|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 2346|  1.97k|        if (pubkeys.empty()) {
  ------------------
  |  Branch (2346:13): [True: 277, False: 1.70k]
  ------------------
 2347|    277|            error = strprintf("pk(): %s", error);
  ------------------
  |  | 1172|    277|#define strprintf tfm::format
  ------------------
 2348|    277|            return {};
 2349|    277|        }
 2350|  1.70k|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (2350:27): [True: 1.70k, False: 1.70k]
  ------------------
 2351|  1.70k|            ret.emplace_back(std::make_unique<PKDescriptor>(std::move(pubkey), ctx == ParseScriptContext::P2TR));
 2352|  1.70k|        }
 2353|  1.70k|        return ret;
 2354|  1.97k|    }
 2355|  13.4k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH) && Func("pkh", expr)) {
  ------------------
  |  Branch (2355:9): [True: 9, False: 13.4k]
  |  Branch (2355:10): [True: 8.95k, False: 4.53k]
  |  Branch (2355:44): [True: 205, False: 4.33k]
  |  Branch (2355:79): [True: 1.34k, False: 2.99k]
  |  Branch (2355:116): [True: 9, False: 10.4k]
  ------------------
 2356|      9|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 2357|      9|        if (pubkeys.empty()) {
  ------------------
  |  Branch (2357:13): [True: 3, False: 6]
  ------------------
 2358|      3|            error = strprintf("pkh(): %s", error);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 2359|      3|            return {};
 2360|      3|        }
 2361|      6|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (2361:27): [True: 6, False: 6]
  ------------------
 2362|      6|            ret.emplace_back(std::make_unique<PKHDescriptor>(std::move(pubkey)));
 2363|      6|        }
 2364|      6|        return ret;
 2365|      9|    }
 2366|  13.4k|    if (ctx == ParseScriptContext::TOP && Func("combo", expr)) {
  ------------------
  |  Branch (2366:9): [True: 8.95k, False: 4.53k]
  |  Branch (2366:9): [True: 4, False: 13.4k]
  |  Branch (2366:43): [True: 4, False: 8.94k]
  ------------------
 2367|      4|        auto pubkeys = ParsePubkey(key_exp_index, expr, ctx, out, error);
 2368|      4|        if (pubkeys.empty()) {
  ------------------
  |  Branch (2368:13): [True: 2, False: 2]
  ------------------
 2369|      2|            error = strprintf("combo(): %s", error);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 2370|      2|            return {};
 2371|      2|        }
 2372|      2|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (2372:27): [True: 2, False: 2]
  ------------------
 2373|      2|            ret.emplace_back(std::make_unique<ComboDescriptor>(std::move(pubkey)));
 2374|      2|        }
 2375|      2|        return ret;
 2376|  13.4k|    } else if (Func("combo", expr)) {
  ------------------
  |  Branch (2376:16): [True: 1, False: 13.4k]
  ------------------
 2377|      1|        error = "Can only have combo() at top level";
 2378|      1|        return {};
 2379|      1|    }
 2380|  13.4k|    const bool multi = Func("multi", expr);
 2381|  13.4k|    const bool sortedmulti = !multi && Func("sortedmulti", expr);
  ------------------
  |  Branch (2381:30): [True: 13.2k, False: 185]
  |  Branch (2381:40): [True: 71, False: 13.2k]
  ------------------
 2382|  13.4k|    const bool multi_a = !(multi || sortedmulti) && Func("multi_a", expr);
  ------------------
  |  Branch (2382:28): [True: 185, False: 13.2k]
  |  Branch (2382:37): [True: 71, False: 13.2k]
  |  Branch (2382:53): [True: 106, False: 13.1k]
  ------------------
 2383|  13.4k|    const bool sortedmulti_a = !(multi || sortedmulti || multi_a) && Func("sortedmulti_a", expr);
  ------------------
  |  Branch (2383:34): [True: 185, False: 13.2k]
  |  Branch (2383:43): [True: 71, False: 13.2k]
  |  Branch (2383:58): [True: 106, False: 13.1k]
  |  Branch (2383:70): [True: 983, False: 12.1k]
  ------------------
 2384|  13.4k|    if (((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH || ctx == ParseScriptContext::P2WSH) && (multi || sortedmulti)) ||
  ------------------
  |  Branch (2384:11): [True: 8.94k, False: 4.53k]
  |  Branch (2384:45): [True: 203, False: 4.33k]
  |  Branch (2384:80): [True: 1.33k, False: 2.99k]
  |  Branch (2384:118): [True: 184, False: 10.3k]
  |  Branch (2384:127): [True: 70, False: 10.2k]
  ------------------
 2385|  13.2k|        (ctx == ParseScriptContext::P2TR && (multi_a || sortedmulti_a))) {
  ------------------
  |  Branch (2385:10): [True: 2.99k, False: 10.2k]
  |  Branch (2385:46): [True: 105, False: 2.88k]
  |  Branch (2385:57): [True: 982, False: 1.90k]
  ------------------
 2386|  1.34k|        auto threshold = Expr(expr);
 2387|  1.34k|        uint32_t thres;
 2388|  1.34k|        std::vector<std::vector<std::unique_ptr<PubkeyProvider>>> providers; // List of multipath expanded pubkeys
 2389|  1.34k|        if (const auto maybe_thres{ToIntegral<uint32_t>(std::string_view{threshold.begin(), threshold.end()})}) {
  ------------------
  |  Branch (2389:24): [True: 1.31k, False: 27]
  ------------------
 2390|  1.31k|            thres = *maybe_thres;
 2391|  1.31k|        } else {
 2392|     27|            error = strprintf("Multi threshold '%s' is not valid", std::string(threshold.begin(), threshold.end()));
  ------------------
  |  | 1172|     27|#define strprintf tfm::format
  ------------------
 2393|     27|            return {};
 2394|     27|        }
 2395|  1.31k|        size_t script_size = 0;
 2396|  1.31k|        size_t max_providers_len = 0;
 2397|  36.2k|        while (expr.size()) {
  ------------------
  |  Branch (2397:16): [True: 35.0k, False: 1.21k]
  ------------------
 2398|  35.0k|            if (!Const(",", expr)) {
  ------------------
  |  Branch (2398:17): [True: 2, False: 35.0k]
  ------------------
 2399|      2|                error = strprintf("Multi: expected ',', got '%c'", expr[0]);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 2400|      2|                return {};
 2401|      2|            }
 2402|  35.0k|            auto arg = Expr(expr);
 2403|  35.0k|            auto pks = ParsePubkey(key_exp_index, arg, ctx, out, error);
 2404|  35.0k|            if (pks.empty()) {
  ------------------
  |  Branch (2404:17): [True: 98, False: 34.9k]
  ------------------
 2405|     98|                error = strprintf("Multi: %s", error);
  ------------------
  |  | 1172|     98|#define strprintf tfm::format
  ------------------
 2406|     98|                return {};
 2407|     98|            }
 2408|  34.9k|            script_size += pks.at(0)->GetSize() + 1;
 2409|  34.9k|            max_providers_len = std::max(max_providers_len, pks.size());
 2410|  34.9k|            providers.emplace_back(std::move(pks));
 2411|  34.9k|        }
 2412|  1.21k|        if ((multi || sortedmulti) && (providers.empty() || providers.size() > MAX_PUBKEYS_PER_MULTISIG)) {
  ------------------
  |  Branch (2412:14): [True: 85, False: 1.12k]
  |  Branch (2412:23): [True: 59, False: 1.07k]
  |  Branch (2412:40): [True: 4, False: 140]
  |  Branch (2412:61): [True: 3, False: 137]
  ------------------
 2413|      7|            error = strprintf("Cannot have %u keys in multisig; must have between 1 and %d keys, inclusive", providers.size(), MAX_PUBKEYS_PER_MULTISIG);
  ------------------
  |  | 1172|      7|#define strprintf tfm::format
  ------------------
 2414|      7|            return {};
 2415|  1.20k|        } else if ((multi_a || sortedmulti_a) && (providers.empty() || providers.size() > MAX_PUBKEYS_PER_MULTI_A)) {
  ------------------
  |  Branch (2415:21): [True: 101, False: 1.10k]
  |  Branch (2415:32): [True: 969, False: 137]
  |  Branch (2415:51): [True: 5, False: 1.06k]
  |  Branch (2415:72): [True: 0, False: 1.06k]
  ------------------
 2416|      5|            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|      5|#define strprintf tfm::format
  ------------------
 2417|      5|            return {};
 2418|  1.20k|        } else if (thres < 1) {
  ------------------
  |  Branch (2418:20): [True: 3, False: 1.19k]
  ------------------
 2419|      3|            error = strprintf("Multisig threshold cannot be %d, must be at least 1", thres);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 2420|      3|            return {};
 2421|  1.19k|        } else if (thres > providers.size()) {
  ------------------
  |  Branch (2421:20): [True: 35, False: 1.16k]
  ------------------
 2422|     35|            error = strprintf("Multisig threshold cannot be larger than the number of keys; threshold is %d but only %u keys specified", thres, providers.size());
  ------------------
  |  | 1172|     35|#define strprintf tfm::format
  ------------------
 2423|     35|            return {};
 2424|     35|        }
 2425|  1.16k|        if (ctx == ParseScriptContext::TOP) {
  ------------------
  |  Branch (2425:13): [True: 43, False: 1.12k]
  ------------------
 2426|     43|            if (providers.size() > 3) {
  ------------------
  |  Branch (2426:17): [True: 11, False: 32]
  ------------------
 2427|     11|                error = strprintf("Cannot have %u pubkeys in bare multisig; only at most 3 pubkeys", providers.size());
  ------------------
  |  | 1172|     11|#define strprintf tfm::format
  ------------------
 2428|     11|                return {};
 2429|     11|            }
 2430|     43|        }
 2431|  1.15k|        if (ctx == ParseScriptContext::P2SH) {
  ------------------
  |  Branch (2431:13): [True: 52, False: 1.10k]
  ------------------
 2432|       |            // This limits the maximum number of compressed pubkeys to 15.
 2433|     52|            if (script_size + 3 > MAX_SCRIPT_ELEMENT_SIZE) {
  ------------------
  |  Branch (2433:17): [True: 1, False: 51]
  ------------------
 2434|      1|                error = strprintf("P2SH script is too large, %d bytes is larger than %d bytes", script_size + 3, MAX_SCRIPT_ELEMENT_SIZE);
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2435|      1|                return {};
 2436|      1|            }
 2437|     52|        }
 2438|       |
 2439|       |        // Make sure all vecs are of the same length, or exactly length 1
 2440|       |        // For length 1 vectors, clone key providers until vector is the same length
 2441|  32.3k|        for (auto& vec : providers) {
  ------------------
  |  Branch (2441:24): [True: 32.3k, False: 1.15k]
  ------------------
 2442|  32.3k|            if (vec.size() == 1) {
  ------------------
  |  Branch (2442:17): [True: 32.3k, False: 0]
  ------------------
 2443|  32.3k|                for (size_t i = 1; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2443:36): [True: 0, False: 32.3k]
  ------------------
 2444|      0|                    vec.emplace_back(vec.at(0)->Clone());
 2445|      0|                }
 2446|  32.3k|            } else if (vec.size() != max_providers_len) {
  ------------------
  |  Branch (2446:24): [True: 0, False: 0]
  ------------------
 2447|      0|                error = strprintf("multi(): Multipath derivation paths have mismatched lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2448|      0|                return {};
 2449|      0|            }
 2450|  32.3k|        }
 2451|       |
 2452|       |        // Build the final descriptors vector
 2453|  2.30k|        for (size_t i = 0; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2453:28): [True: 1.15k, False: 1.15k]
  ------------------
 2454|       |            // Build final pubkeys vectors by retrieving the i'th subscript for each vector in subscripts
 2455|  1.15k|            std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 2456|  1.15k|            pubs.reserve(providers.size());
 2457|  32.3k|            for (auto& pub : providers) {
  ------------------
  |  Branch (2457:28): [True: 32.3k, False: 1.15k]
  ------------------
 2458|  32.3k|                pubs.emplace_back(std::move(pub.at(i)));
 2459|  32.3k|            }
 2460|  1.15k|            if (multi || sortedmulti) {
  ------------------
  |  Branch (2460:17): [True: 33, False: 1.11k]
  |  Branch (2460:26): [True: 58, False: 1.06k]
  ------------------
 2461|     91|                ret.emplace_back(std::make_unique<MultisigDescriptor>(thres, std::move(pubs), sortedmulti));
 2462|  1.06k|            } else {
 2463|  1.06k|                ret.emplace_back(std::make_unique<MultiADescriptor>(thres, std::move(pubs), sortedmulti_a));
 2464|  1.06k|            }
 2465|  1.15k|        }
 2466|  1.15k|        return ret;
 2467|  12.1k|    } else if (multi || sortedmulti) {
  ------------------
  |  Branch (2467:16): [True: 1, False: 12.1k]
  |  Branch (2467:25): [True: 1, False: 12.1k]
  ------------------
 2468|      2|        error = "Can only have multi/sortedmulti at top level, in sh(), or in wsh()";
 2469|      2|        return {};
 2470|  12.1k|    } else if (multi_a || sortedmulti_a) {
  ------------------
  |  Branch (2470:16): [True: 1, False: 12.1k]
  |  Branch (2470:27): [True: 1, False: 12.1k]
  ------------------
 2471|      2|        error = "Can only have multi_a/sortedmulti_a inside tr()";
 2472|      2|        return {};
 2473|      2|    }
 2474|  12.1k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wpkh", expr)) {
  ------------------
  |  Branch (2474:9): [True: 4, False: 12.1k]
  |  Branch (2474:10): [True: 8.78k, False: 3.34k]
  |  Branch (2474:44): [True: 137, False: 3.21k]
  |  Branch (2474:80): [True: 4, False: 8.92k]
  ------------------
 2475|      4|        auto pubkeys = ParsePubkey(key_exp_index, expr, ParseScriptContext::P2WPKH, out, error);
 2476|      4|        if (pubkeys.empty()) {
  ------------------
  |  Branch (2476:13): [True: 2, False: 2]
  ------------------
 2477|      2|            error = strprintf("wpkh(): %s", error);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 2478|      2|            return {};
 2479|      2|        }
 2480|      2|        for (auto& pubkey : pubkeys) {
  ------------------
  |  Branch (2480:27): [True: 2, False: 2]
  ------------------
 2481|      2|            ret.emplace_back(std::make_unique<WPKHDescriptor>(std::move(pubkey)));
 2482|      2|        }
 2483|      2|        return ret;
 2484|  12.1k|    } else if (Func("wpkh", expr)) {
  ------------------
  |  Branch (2484:16): [True: 1, False: 12.1k]
  ------------------
 2485|      1|        error = "Can only have wpkh() at top level or inside sh()";
 2486|      1|        return {};
 2487|      1|    }
 2488|  12.1k|    if (ctx == ParseScriptContext::TOP && Func("sh", expr)) {
  ------------------
  |  Branch (2488:9): [True: 8.78k, False: 3.34k]
  |  Branch (2488:9): [True: 209, False: 11.9k]
  |  Branch (2488:43): [True: 209, False: 8.57k]
  ------------------
 2489|    209|        auto descs = ParseScript(key_exp_index, expr, ParseScriptContext::P2SH, out, error);
 2490|    209|        if (descs.empty() || expr.size()) return {};
  ------------------
  |  Branch (2490:13): [True: 78, False: 131]
  |  Branch (2490:30): [True: 1, False: 130]
  ------------------
 2491|    130|        std::vector<std::unique_ptr<DescriptorImpl>> ret;
 2492|    130|        ret.reserve(descs.size());
 2493|    130|        for (auto& desc : descs) {
  ------------------
  |  Branch (2493:25): [True: 130, False: 130]
  ------------------
 2494|    130|            ret.push_back(std::make_unique<SHDescriptor>(std::move(desc)));
 2495|    130|        }
 2496|    130|        return ret;
 2497|  11.9k|    } else if (Func("sh", expr)) {
  ------------------
  |  Branch (2497:16): [True: 1, False: 11.9k]
  ------------------
 2498|      1|        error = "Can only have sh() at top level";
 2499|      1|        return {};
 2500|      1|    }
 2501|  11.9k|    if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wsh", expr)) {
  ------------------
  |  Branch (2501:9): [True: 1.34k, False: 10.5k]
  |  Branch (2501:10): [True: 8.57k, False: 3.34k]
  |  Branch (2501:44): [True: 135, False: 3.20k]
  |  Branch (2501:80): [True: 1.34k, False: 7.36k]
  ------------------
 2502|  1.34k|        auto descs = ParseScript(key_exp_index, expr, ParseScriptContext::P2WSH, out, error);
 2503|  1.34k|        if (descs.empty() || expr.size()) return {};
  ------------------
  |  Branch (2503:13): [True: 1.02k, False: 324]
  |  Branch (2503:30): [True: 5, False: 319]
  ------------------
 2504|    319|        for (auto& desc : descs) {
  ------------------
  |  Branch (2504:25): [True: 319, False: 319]
  ------------------
 2505|    319|            ret.emplace_back(std::make_unique<WSHDescriptor>(std::move(desc)));
 2506|    319|        }
 2507|    319|        return ret;
 2508|  10.5k|    } else if (Func("wsh", expr)) {
  ------------------
  |  Branch (2508:16): [True: 1, False: 10.5k]
  ------------------
 2509|      1|        error = "Can only have wsh() at top level or inside sh()";
 2510|      1|        return {};
 2511|      1|    }
 2512|  10.5k|    if (ctx == ParseScriptContext::TOP && Func("addr", expr)) {
  ------------------
  |  Branch (2512:9): [True: 7.31k, False: 3.25k]
  |  Branch (2512:9): [True: 371, False: 10.1k]
  |  Branch (2512:43): [True: 371, False: 6.94k]
  ------------------
 2513|    371|        CTxDestination dest = DecodeDestination(std::string(expr.begin(), expr.end()));
 2514|    371|        if (!IsValidDestination(dest)) {
  ------------------
  |  Branch (2514:13): [True: 371, False: 0]
  ------------------
 2515|    371|            error = "Address is not valid";
 2516|    371|            return {};
 2517|    371|        }
 2518|      0|        ret.emplace_back(std::make_unique<AddressDescriptor>(std::move(dest)));
 2519|      0|        return ret;
 2520|  10.1k|    } else if (Func("addr", expr)) {
  ------------------
  |  Branch (2520:16): [True: 1, False: 10.1k]
  ------------------
 2521|      1|        error = "Can only have addr() at top level";
 2522|      1|        return {};
 2523|      1|    }
 2524|  10.1k|    if (ctx == ParseScriptContext::TOP && Func("tr", expr)) {
  ------------------
  |  Branch (2524:9): [True: 6.94k, False: 3.25k]
  |  Branch (2524:9): [True: 3.36k, False: 6.83k]
  |  Branch (2524:43): [True: 3.36k, False: 3.57k]
  ------------------
 2525|  3.36k|        auto arg = Expr(expr);
 2526|  3.36k|        auto internal_keys = ParsePubkey(key_exp_index, arg, ParseScriptContext::P2TR, out, error);
 2527|  3.36k|        if (internal_keys.empty()) {
  ------------------
  |  Branch (2527:13): [True: 367, False: 2.99k]
  ------------------
 2528|    367|            error = strprintf("tr(): %s", error);
  ------------------
  |  | 1172|    367|#define strprintf tfm::format
  ------------------
 2529|    367|            return {};
 2530|    367|        }
 2531|  2.99k|        size_t max_providers_len = internal_keys.size();
 2532|  2.99k|        std::vector<std::vector<std::unique_ptr<DescriptorImpl>>> subscripts; //!< list of multipath expanded script subexpressions
 2533|  2.99k|        std::vector<int> depths; //!< depth in the tree of each subexpression (same length subscripts)
 2534|  2.99k|        if (expr.size()) {
  ------------------
  |  Branch (2534:13): [True: 1.72k, False: 1.27k]
  ------------------
 2535|  1.72k|            if (!Const(",", expr)) {
  ------------------
  |  Branch (2535:17): [True: 1, False: 1.71k]
  ------------------
 2536|      1|                error = strprintf("tr: expected ',', got '%c'", expr[0]);
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2537|      1|                return {};
 2538|      1|            }
 2539|       |            /** The path from the top of the tree to what we're currently processing.
 2540|       |             * branches[i] == false: left branch in the i'th step from the top; true: right branch.
 2541|       |             */
 2542|  1.71k|            std::vector<bool> branches;
 2543|       |            // Loop over all provided scripts. In every iteration exactly one script will be processed.
 2544|       |            // Use a do-loop because inside this if-branch we expect at least one script.
 2545|  4.69k|            do {
 2546|       |                // First process all open braces.
 2547|  9.18k|                while (Const("{", expr)) {
  ------------------
  |  Branch (2547:24): [True: 4.49k, False: 4.69k]
  ------------------
 2548|  4.49k|                    branches.push_back(false); // new left branch
 2549|  4.49k|                    if (branches.size() > TAPROOT_CONTROL_MAX_NODE_COUNT) {
  ------------------
  |  Branch (2549:25): [True: 2, False: 4.48k]
  ------------------
 2550|      2|                        error = strprintf("tr() supports at most %i nesting levels", TAPROOT_CONTROL_MAX_NODE_COUNT);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
 2551|      2|                        return {};
 2552|      2|                    }
 2553|  4.49k|                }
 2554|       |                // Process the actual script expression.
 2555|  4.69k|                auto sarg = Expr(expr);
 2556|  4.69k|                subscripts.emplace_back(ParseScript(key_exp_index, sarg, ParseScriptContext::P2TR, out, error));
 2557|  4.69k|                if (subscripts.back().empty()) return {};
  ------------------
  |  Branch (2557:21): [True: 311, False: 4.38k]
  ------------------
 2558|  4.38k|                max_providers_len = std::max(max_providers_len, subscripts.back().size());
 2559|  4.38k|                depths.push_back(branches.size());
 2560|       |                // Process closing braces; one is expected for every right branch we were in.
 2561|  5.23k|                while (branches.size() && branches.back()) {
  ------------------
  |  Branch (2561:24): [True: 3.86k, False: 1.37k]
  |  Branch (2561:24): [True: 870, False: 4.36k]
  |  Branch (2561:43): [True: 870, False: 2.99k]
  ------------------
 2562|    870|                    if (!Const("}", expr)) {
  ------------------
  |  Branch (2562:25): [True: 21, False: 849]
  ------------------
 2563|     21|                        error = strprintf("tr(): expected '}' after script expression");
  ------------------
  |  | 1172|     21|#define strprintf tfm::format
  ------------------
 2564|     21|                        return {};
 2565|     21|                    }
 2566|    849|                    branches.pop_back(); // move up one level after encountering '}'
 2567|    849|                }
 2568|       |                // If after that, we're at the end of a left branch, expect a comma.
 2569|  4.36k|                if (branches.size() && !branches.back()) {
  ------------------
  |  Branch (2569:21): [True: 2.99k, False: 1.37k]
  |  Branch (2569:21): [True: 2.99k, False: 1.37k]
  |  Branch (2569:40): [True: 2.99k, False: 0]
  ------------------
 2570|  2.99k|                    if (!Const(",", expr)) {
  ------------------
  |  Branch (2570:25): [True: 14, False: 2.97k]
  ------------------
 2571|     14|                        error = strprintf("tr(): expected ',' after script expression");
  ------------------
  |  | 1172|     14|#define strprintf tfm::format
  ------------------
 2572|     14|                        return {};
 2573|     14|                    }
 2574|  2.97k|                    branches.back() = true; // And now we're in a right branch.
 2575|  2.97k|                }
 2576|  4.36k|            } while (branches.size());
  ------------------
  |  Branch (2576:22): [True: 2.97k, False: 1.37k]
  ------------------
 2577|       |            // After we've explored a whole tree, we must be at the end of the expression.
 2578|  1.37k|            if (expr.size()) {
  ------------------
  |  Branch (2578:17): [True: 4, False: 1.36k]
  ------------------
 2579|      4|                error = strprintf("tr(): expected ')' after script expression");
  ------------------
  |  | 1172|      4|#define strprintf tfm::format
  ------------------
 2580|      4|                return {};
 2581|      4|            }
 2582|  1.37k|        }
 2583|  2.99k|        assert(TaprootBuilder::ValidDepths(depths));
  ------------------
  |  Branch (2583:9): [True: 2.64k, False: 0]
  ------------------
 2584|       |
 2585|       |        // Make sure all vecs are of the same length, or exactly length 1
 2586|       |        // For length 1 vectors, clone subdescs until vector is the same length
 2587|  2.64k|        for (auto& vec : subscripts) {
  ------------------
  |  Branch (2587:24): [True: 1.92k, False: 2.64k]
  ------------------
 2588|  1.92k|            if (vec.size() == 1) {
  ------------------
  |  Branch (2588:17): [True: 1.92k, False: 0]
  ------------------
 2589|  1.92k|                for (size_t i = 1; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2589:36): [True: 0, False: 1.92k]
  ------------------
 2590|      0|                    vec.emplace_back(vec.at(0)->Clone());
 2591|      0|                }
 2592|  1.92k|            } else if (vec.size() != max_providers_len) {
  ------------------
  |  Branch (2592:24): [True: 0, False: 0]
  ------------------
 2593|      0|                error = strprintf("tr(): Multipath subscripts have mismatched lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2594|      0|                return {};
 2595|      0|            }
 2596|  1.92k|        }
 2597|       |
 2598|  2.64k|        if (internal_keys.size() > 1 && internal_keys.size() != max_providers_len) {
  ------------------
  |  Branch (2598:13): [True: 0, False: 2.64k]
  |  Branch (2598:41): [True: 0, False: 0]
  ------------------
 2599|      0|            error = strprintf("tr(): Multipath internal key mismatches multipath subscripts lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2600|      0|            return {};
 2601|      0|        }
 2602|       |
 2603|  2.64k|        while (internal_keys.size() < max_providers_len) {
  ------------------
  |  Branch (2603:16): [True: 0, False: 2.64k]
  ------------------
 2604|      0|            internal_keys.emplace_back(internal_keys.at(0)->Clone());
 2605|      0|        }
 2606|       |
 2607|       |        // Build the final descriptors vector
 2608|  5.29k|        for (size_t i = 0; i < max_providers_len; ++i) {
  ------------------
  |  Branch (2608:28): [True: 2.64k, False: 2.64k]
  ------------------
 2609|       |            // Build final subscripts vectors by retrieving the i'th subscript for each vector in subscripts
 2610|  2.64k|            std::vector<std::unique_ptr<DescriptorImpl>> this_subs;
 2611|  2.64k|            this_subs.reserve(subscripts.size());
 2612|  2.64k|            for (auto& subs : subscripts) {
  ------------------
  |  Branch (2612:29): [True: 1.92k, False: 2.64k]
  ------------------
 2613|  1.92k|                this_subs.emplace_back(std::move(subs.at(i)));
 2614|  1.92k|            }
 2615|  2.64k|            ret.emplace_back(std::make_unique<TRDescriptor>(std::move(internal_keys.at(i)), std::move(this_subs), depths));
 2616|  2.64k|        }
 2617|  2.64k|        return ret;
 2618|       |
 2619|       |
 2620|  6.83k|    } else if (Func("tr", expr)) {
  ------------------
  |  Branch (2620:16): [True: 1, False: 6.83k]
  ------------------
 2621|      1|        error = "Can only have tr at top level";
 2622|      1|        return {};
 2623|      1|    }
 2624|  6.83k|    if (ctx == ParseScriptContext::TOP && Func("rawtr", expr)) {
  ------------------
  |  Branch (2624:9): [True: 3.57k, False: 3.25k]
  |  Branch (2624:9): [True: 38, False: 6.79k]
  |  Branch (2624:43): [True: 38, False: 3.53k]
  ------------------
 2625|     38|        auto arg = Expr(expr);
 2626|     38|        if (expr.size()) {
  ------------------
  |  Branch (2626:13): [True: 1, False: 37]
  ------------------
 2627|      1|            error = strprintf("rawtr(): only one key expected.");
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2628|      1|            return {};
 2629|      1|        }
 2630|     37|        auto output_keys = ParsePubkey(key_exp_index, arg, ParseScriptContext::P2TR, out, error);
 2631|     37|        if (output_keys.empty()) {
  ------------------
  |  Branch (2631:13): [True: 3, False: 34]
  ------------------
 2632|      3|            error = strprintf("rawtr(): %s", error);
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 2633|      3|            return {};
 2634|      3|        }
 2635|     34|        for (auto& pubkey : output_keys) {
  ------------------
  |  Branch (2635:27): [True: 34, False: 34]
  ------------------
 2636|     34|            ret.emplace_back(std::make_unique<RawTRDescriptor>(std::move(pubkey)));
 2637|     34|        }
 2638|     34|        return ret;
 2639|  6.79k|    } else if (Func("rawtr", expr)) {
  ------------------
  |  Branch (2639:16): [True: 1, False: 6.79k]
  ------------------
 2640|      1|        error = "Can only have rawtr at top level";
 2641|      1|        return {};
 2642|      1|    }
 2643|  6.79k|    if (ctx == ParseScriptContext::TOP && Func("unused", expr)) {
  ------------------
  |  Branch (2643:9): [True: 3.53k, False: 3.25k]
  |  Branch (2643:9): [True: 4, False: 6.78k]
  |  Branch (2643:43): [True: 4, False: 3.53k]
  ------------------
 2644|       |        // Check for only one expression, should not find commas, brackets, or parentheses
 2645|      4|        auto arg = Expr(expr);
 2646|      4|        if (expr.size()) {
  ------------------
  |  Branch (2646:13): [True: 1, False: 3]
  ------------------
 2647|      1|            error = strprintf("unused(): only one key expected");
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2648|      1|            return {};
 2649|      1|        }
 2650|      3|        auto keys = ParsePubkey(key_exp_index, arg, ctx, out, error);
 2651|      3|        if (keys.empty()) return {};
  ------------------
  |  Branch (2651:13): [True: 1, False: 2]
  ------------------
 2652|      2|        for (auto& pubkey : keys) {
  ------------------
  |  Branch (2652:27): [True: 2, False: 2]
  ------------------
 2653|      2|            if (pubkey->IsRange()) {
  ------------------
  |  Branch (2653:17): [True: 0, False: 2]
  ------------------
 2654|      0|                error = "unused(): key cannot be ranged";
 2655|      0|                return {};
 2656|      0|            }
 2657|      2|            ret.emplace_back(std::make_unique<UnusedDescriptor>(std::move(pubkey)));
 2658|      2|        }
 2659|      2|        return ret;
 2660|  6.78k|    } else if (Func("unused", expr)) {
  ------------------
  |  Branch (2660:16): [True: 1, False: 6.78k]
  ------------------
 2661|      1|        error = "Can only have unused at top level";
 2662|      1|        return {};
 2663|      1|    }
 2664|  6.78k|    if (ctx == ParseScriptContext::TOP && Func("raw", expr)) {
  ------------------
  |  Branch (2664:9): [True: 3.53k, False: 3.25k]
  |  Branch (2664:9): [True: 28, False: 6.76k]
  |  Branch (2664:43): [True: 28, False: 3.50k]
  ------------------
 2665|     28|        std::string str(expr.begin(), expr.end());
 2666|     28|        if (!IsHex(str)) {
  ------------------
  |  Branch (2666:13): [True: 3, False: 25]
  ------------------
 2667|      3|            error = "Raw script is not hex";
 2668|      3|            return {};
 2669|      3|        }
 2670|     25|        auto bytes = ParseHex(str);
 2671|     25|        ret.emplace_back(std::make_unique<RawDescriptor>(CScript(bytes.begin(), bytes.end())));
 2672|     25|        return ret;
 2673|  6.76k|    } else if (Func("raw", expr)) {
  ------------------
  |  Branch (2673:16): [True: 1, False: 6.75k]
  ------------------
 2674|      1|        error = "Can only have raw() at top level";
 2675|      1|        return {};
 2676|      1|    }
 2677|       |    // Process miniscript expressions.
 2678|  6.75k|    {
 2679|  6.75k|        const auto script_ctx{ctx == ParseScriptContext::P2WSH ? miniscript::MiniscriptContext::P2WSH : miniscript::MiniscriptContext::TAPSCRIPT};
  ------------------
  |  Branch (2679:31): [True: 1.30k, False: 5.45k]
  ------------------
 2680|  6.75k|        KeyParser parser(/*out = */&out, /* in = */nullptr, /* ctx = */script_ctx, key_exp_index);
 2681|  6.75k|        auto node = miniscript::FromString(std::string(expr.begin(), expr.end()), parser);
 2682|  6.75k|        if (parser.m_key_parsing_error != "") {
  ------------------
  |  Branch (2682:13): [True: 164, False: 6.59k]
  ------------------
 2683|    164|            error = std::move(parser.m_key_parsing_error);
 2684|    164|            return {};
 2685|    164|        }
 2686|  6.59k|        if (node) {
  ------------------
  |  Branch (2686:13): [True: 4.39k, False: 2.20k]
  ------------------
 2687|  4.39k|            if (ctx != ParseScriptContext::P2WSH && ctx != ParseScriptContext::P2TR) {
  ------------------
  |  Branch (2687:17): [True: 3.26k, False: 1.12k]
  |  Branch (2687:53): [True: 1.50k, False: 1.76k]
  ------------------
 2688|  1.50k|                error = "Miniscript expressions can only be used in wsh or tr.";
 2689|  1.50k|                return {};
 2690|  1.50k|            }
 2691|  2.88k|            if (!node->IsSane() || node->IsNotSatisfiable()) {
  ------------------
  |  Branch (2691:17): [True: 814, False: 2.07k]
  |  Branch (2691:36): [True: 123, False: 1.94k]
  ------------------
 2692|       |                // Try to find the first insane sub for better error reporting.
 2693|    937|                const auto* insane_node = &node.value();
 2694|    937|                if (const auto sub = node->FindInsaneSub()) insane_node = sub;
  ------------------
  |  Branch (2694:32): [True: 680, False: 257]
  ------------------
 2695|    937|                error = *insane_node->ToString(parser);
 2696|    937|                if (!insane_node->IsValid()) {
  ------------------
  |  Branch (2696:21): [True: 509, False: 428]
  ------------------
 2697|    509|                    error += " is invalid";
 2698|    509|                } else if (!node->IsSane()) {
  ------------------
  |  Branch (2698:28): [True: 305, False: 123]
  ------------------
 2699|    305|                    error += " is not sane";
 2700|    305|                    if (!insane_node->IsNonMalleable()) {
  ------------------
  |  Branch (2700:25): [True: 62, False: 243]
  ------------------
 2701|     62|                        error += ": malleable witnesses exist";
 2702|    243|                    } else if (insane_node == &node.value() && !insane_node->NeedsSignature()) {
  ------------------
  |  Branch (2702:32): [True: 139, False: 104]
  |  Branch (2702:64): [True: 87, False: 52]
  ------------------
 2703|     87|                        error += ": witnesses without signature exist";
 2704|    156|                    } else if (!insane_node->CheckTimeLocksMix()) {
  ------------------
  |  Branch (2704:32): [True: 7, False: 149]
  ------------------
 2705|      7|                        error += ": contains mixes of timelocks expressed in blocks and seconds";
 2706|    149|                    } else if (!insane_node->CheckDuplicateKey()) {
  ------------------
  |  Branch (2706:32): [True: 83, False: 66]
  ------------------
 2707|     83|                        error += ": contains duplicate public keys";
 2708|     83|                    } else if (!insane_node->ValidSatisfactions()) {
  ------------------
  |  Branch (2708:32): [True: 15, False: 51]
  ------------------
 2709|     15|                        error += ": needs witnesses that may exceed resource limits";
 2710|     15|                    }
 2711|    305|                } else {
 2712|    123|                    error += " is not satisfiable";
 2713|    123|                }
 2714|    937|                return {};
 2715|    937|            }
 2716|       |            // A signature check is required for a miniscript to be sane. Therefore no sane miniscript
 2717|       |            // may have an empty list of public keys.
 2718|  1.94k|            CHECK_NONFATAL(!parser.m_keys.empty());
  ------------------
  |  |  113|  1.94k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
 2719|       |            // Make sure all vecs are of the same length, or exactly length 1
 2720|       |            // For length 1 vectors, clone subdescs until vector is the same length
 2721|  1.94k|            size_t num_multipath = std::max_element(parser.m_keys.begin(), parser.m_keys.end(),
 2722|  1.94k|                    [](const std::vector<std::unique_ptr<PubkeyProvider>>& a, const std::vector<std::unique_ptr<PubkeyProvider>>& b) {
 2723|  1.94k|                        return a.size() < b.size();
 2724|  1.94k|                    })->size();
 2725|       |
 2726|  3.21k|            for (auto& vec : parser.m_keys) {
  ------------------
  |  Branch (2726:28): [True: 3.21k, False: 1.94k]
  ------------------
 2727|  3.21k|                if (vec.size() == 1) {
  ------------------
  |  Branch (2727:21): [True: 3.21k, False: 0]
  ------------------
 2728|  3.21k|                    for (size_t i = 1; i < num_multipath; ++i) {
  ------------------
  |  Branch (2728:40): [True: 0, False: 3.21k]
  ------------------
 2729|      0|                        vec.emplace_back(vec.at(0)->Clone());
 2730|      0|                    }
 2731|  3.21k|                } else if (vec.size() != num_multipath) {
  ------------------
  |  Branch (2731:28): [True: 0, False: 0]
  ------------------
 2732|      0|                    error = strprintf("Miniscript: Multipath derivation paths have mismatched lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2733|      0|                    return {};
 2734|      0|                }
 2735|  3.21k|            }
 2736|       |
 2737|       |            // Build the final descriptors vector
 2738|  3.89k|            for (size_t i = 0; i < num_multipath; ++i) {
  ------------------
  |  Branch (2738:32): [True: 1.94k, False: 1.94k]
  ------------------
 2739|       |                // Build final pubkeys vectors by retrieving the i'th subscript for each vector in subscripts
 2740|  1.94k|                std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 2741|  1.94k|                pubs.reserve(parser.m_keys.size());
 2742|  3.21k|                for (auto& pub : parser.m_keys) {
  ------------------
  |  Branch (2742:32): [True: 3.21k, False: 1.94k]
  ------------------
 2743|  3.21k|                    pubs.emplace_back(std::move(pub.at(i)));
 2744|  3.21k|                }
 2745|  1.94k|                ret.emplace_back(std::make_unique<MiniscriptDescriptor>(std::move(pubs), node->Clone()));
 2746|  1.94k|            }
 2747|  1.94k|            return ret;
 2748|  1.94k|        }
 2749|  6.59k|    }
 2750|  2.20k|    if (ctx == ParseScriptContext::P2SH) {
  ------------------
  |  Branch (2750:9): [True: 27, False: 2.17k]
  ------------------
 2751|     27|        error = "A function is needed within P2SH";
 2752|     27|        return {};
 2753|  2.17k|    } else if (ctx == ParseScriptContext::P2WSH) {
  ------------------
  |  Branch (2753:16): [True: 109, False: 2.06k]
  ------------------
 2754|    109|        error = "A function is needed within P2WSH";
 2755|    109|        return {};
 2756|    109|    }
 2757|  2.06k|    error = strprintf("'%s' is not a valid descriptor function", std::string(expr.begin(), expr.end()));
  ------------------
  |  | 1172|  2.06k|#define strprintf tfm::format
  ------------------
 2758|  2.06k|    return {};
 2759|  2.20k|}
descriptor.cpp:_ZN12_GLOBAL__N_111ParsePubkeyERjRKNSt3__14spanIKcLm18446744073709551615EEENS_18ParseScriptContextER19FlatSigningProviderRNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2010|  81.9k|{
 2011|  81.9k|    std::vector<std::unique_ptr<PubkeyProvider>> ret;
 2012|       |
 2013|  81.9k|    using namespace script;
 2014|       |
 2015|       |    // musig cannot be nested inside of an origin
 2016|  81.9k|    std::span<const char> span = sp;
 2017|  81.9k|    if (Const("musig(", span, /*skip=*/false)) {
  ------------------
  |  Branch (2017:9): [True: 11.4k, False: 70.5k]
  ------------------
 2018|  11.4k|        if (ctx != ParseScriptContext::P2TR) {
  ------------------
  |  Branch (2018:13): [True: 1, False: 11.4k]
  ------------------
 2019|      1|            error = "musig() is only allowed in tr() and rawtr()";
 2020|      1|            return {};
 2021|      1|        }
 2022|       |
 2023|       |        // Split the span on the end parentheses. The end parentheses must
 2024|       |        // be included in the resulting span so that Expr is happy.
 2025|  11.4k|        auto split = Split(sp, ')', /*include_sep=*/true);
 2026|  11.4k|        if (split.size() > 2) {
  ------------------
  |  Branch (2026:13): [True: 19, False: 11.4k]
  ------------------
 2027|     19|            error = "Too many ')' in musig() expression";
 2028|     19|            return {};
 2029|     19|        }
 2030|  11.4k|        std::span<const char> expr(split.at(0).begin(), split.at(0).end());
 2031|  11.4k|        if (!Func("musig", expr)) {
  ------------------
  |  Branch (2031:13): [True: 5, False: 11.4k]
  ------------------
 2032|      5|            error = "Invalid musig() expression";
 2033|      5|            return {};
 2034|      5|        }
 2035|       |
 2036|       |        // Parse the participant pubkeys
 2037|  11.4k|        bool any_ranged = false;
 2038|  11.4k|        bool all_bip32 = true;
 2039|  11.4k|        std::vector<std::vector<std::unique_ptr<PubkeyProvider>>> providers;
 2040|  11.4k|        bool any_key_parsed = false;
 2041|  11.4k|        size_t max_multipath_len = 0;
 2042|  42.3k|        while (expr.size()) {
  ------------------
  |  Branch (2042:16): [True: 30.9k, False: 11.3k]
  ------------------
 2043|  30.9k|            if (any_key_parsed && !Const(",", expr)) {
  ------------------
  |  Branch (2043:17): [True: 19.5k, False: 11.4k]
  |  Branch (2043:17): [True: 1, False: 30.9k]
  |  Branch (2043:35): [True: 1, False: 19.5k]
  ------------------
 2044|      1|                error = strprintf("musig(): expected ',', got '%c'", expr[0]);
  ------------------
  |  | 1172|      1|#define strprintf tfm::format
  ------------------
 2045|      1|                return {};
 2046|      1|            }
 2047|  30.9k|            auto arg = Expr(expr);
 2048|  30.9k|            auto pk = ParsePubkey(key_exp_index, arg, ParseScriptContext::MUSIG, out, error);
 2049|  30.9k|            if (pk.empty()) {
  ------------------
  |  Branch (2049:17): [True: 48, False: 30.9k]
  ------------------
 2050|     48|                error = strprintf("musig(): %s", error);
  ------------------
  |  | 1172|     48|#define strprintf tfm::format
  ------------------
 2051|     48|                return {};
 2052|     48|            }
 2053|  30.9k|            any_key_parsed = true;
 2054|       |
 2055|  30.9k|            any_ranged = any_ranged || pk.at(0)->IsRange();
  ------------------
  |  Branch (2055:26): [True: 0, False: 30.9k]
  |  Branch (2055:40): [True: 0, False: 30.9k]
  ------------------
 2056|  30.9k|            all_bip32 = all_bip32 &&  pk.at(0)->IsBIP32();
  ------------------
  |  Branch (2056:25): [True: 11.3k, False: 19.5k]
  |  Branch (2056:39): [True: 0, False: 11.3k]
  ------------------
 2057|       |
 2058|  30.9k|            max_multipath_len = std::max(max_multipath_len, pk.size());
 2059|       |
 2060|  30.9k|            providers.emplace_back(std::move(pk));
 2061|  30.9k|        }
 2062|  11.3k|        if (!any_key_parsed) {
  ------------------
  |  Branch (2062:13): [True: 3, False: 11.3k]
  ------------------
 2063|      3|            error = "musig(): Must contain key expressions";
 2064|      3|            return {};
 2065|      3|        }
 2066|       |
 2067|       |        // Parse any derivation
 2068|  11.3k|        DeriveType deriv_type = DeriveType::NON_RANGED;
 2069|  11.3k|        std::vector<KeyPath> derivation_multipaths;
 2070|  11.3k|        if (split.size() == 2 && Const("/", split.at(1), /*skip=*/false)) {
  ------------------
  |  Branch (2070:13): [True: 11.3k, False: 0]
  |  Branch (2070:13): [True: 1, False: 11.3k]
  |  Branch (2070:34): [True: 1, False: 11.3k]
  ------------------
 2071|      1|            if (!all_bip32) {
  ------------------
  |  Branch (2071:17): [True: 1, False: 0]
  ------------------
 2072|      1|                error = "musig(): derivation requires all participants to be xpubs or xprvs";
 2073|      1|                return {};
 2074|      1|            }
 2075|      0|            if (any_ranged) {
  ------------------
  |  Branch (2075:17): [True: 0, False: 0]
  ------------------
 2076|      0|                error = "musig(): Cannot have ranged participant keys if musig() also has derivation";
 2077|      0|                return {};
 2078|      0|            }
 2079|      0|            bool dummy = false;
 2080|      0|            auto deriv_split = Split(split.at(1), '/');
 2081|      0|            deriv_type = ParseDeriveType(deriv_split, dummy);
 2082|      0|            if (deriv_type == DeriveType::HARDENED_RANGED) {
  ------------------
  |  Branch (2082:17): [True: 0, False: 0]
  ------------------
 2083|      0|                error = "musig(): Cannot have hardened child derivation";
 2084|      0|                return {};
 2085|      0|            }
 2086|      0|            bool has_hardened = false;
 2087|      0|            if (!ParseKeyPath(deriv_split, derivation_multipaths, dummy, error, /*allow_multipath=*/true, has_hardened)) {
  ------------------
  |  Branch (2087:17): [True: 0, False: 0]
  ------------------
 2088|      0|                error = "musig(): " + error;
 2089|      0|                return {};
 2090|      0|            }
 2091|      0|            if (has_hardened) {
  ------------------
  |  Branch (2091:17): [True: 0, False: 0]
  ------------------
 2092|      0|                error = "musig(): cannot have hardened derivation steps";
 2093|      0|                return {};
 2094|      0|            }
 2095|  11.3k|        } else {
 2096|  11.3k|            derivation_multipaths.emplace_back();
 2097|  11.3k|        }
 2098|       |
 2099|       |        // Makes sure that all providers vectors in providers are the given length, or exactly length 1
 2100|       |        // Length 1 vectors have the single provider cloned until it matches the given length.
 2101|  11.3k|        const auto& clone_providers = [&providers](size_t length) -> bool {
 2102|  11.3k|            for (auto& multipath_providers : providers) {
 2103|  11.3k|                if (multipath_providers.size() == 1) {
 2104|  11.3k|                    for (size_t i = 1; i < length; ++i) {
 2105|  11.3k|                        multipath_providers.emplace_back(multipath_providers.at(0)->Clone());
 2106|  11.3k|                    }
 2107|  11.3k|                } else if (multipath_providers.size() != length) {
 2108|  11.3k|                    return false;
 2109|  11.3k|                }
 2110|  11.3k|            }
 2111|  11.3k|            return true;
 2112|  11.3k|        };
 2113|       |
 2114|       |        // Emplace the final MuSigPubkeyProvider into ret with the pubkey providers from the specified provider vectors index
 2115|       |        // and the path from the specified path index
 2116|  11.3k|        const auto& emplace_final_provider = [&ret, &key_exp_index, &deriv_type, &derivation_multipaths, &providers](size_t vec_idx, size_t path_idx) -> void {
 2117|  11.3k|            KeyPath& path = derivation_multipaths.at(path_idx);
 2118|  11.3k|            std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 2119|  11.3k|            pubs.reserve(providers.size());
 2120|  11.3k|            for (auto& vec : providers) {
 2121|  11.3k|                pubs.emplace_back(std::move(vec.at(vec_idx)));
 2122|  11.3k|            }
 2123|  11.3k|            ret.emplace_back(std::make_unique<MuSigPubkeyProvider>(key_exp_index, std::move(pubs), path, deriv_type));
 2124|  11.3k|        };
 2125|       |
 2126|  11.3k|        if (max_multipath_len > 1 && derivation_multipaths.size() > 1) {
  ------------------
  |  Branch (2126:13): [True: 0, False: 11.3k]
  |  Branch (2126:38): [True: 0, False: 0]
  ------------------
 2127|      0|            error = "musig(): Cannot have multipath participant keys if musig() is also multipath";
 2128|      0|            return {};
 2129|  11.3k|        } else if (max_multipath_len > 1) {
  ------------------
  |  Branch (2129:20): [True: 0, False: 11.3k]
  ------------------
 2130|      0|            if (!clone_providers(max_multipath_len)) {
  ------------------
  |  Branch (2130:17): [True: 0, False: 0]
  ------------------
 2131|      0|                error = strprintf("musig(): Multipath derivation paths have mismatched lengths");
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 2132|      0|                return {};
 2133|      0|            }
 2134|      0|            for (size_t i = 0; i < max_multipath_len; ++i) {
  ------------------
  |  Branch (2134:32): [True: 0, False: 0]
  ------------------
 2135|       |                // Final MuSigPubkeyProvider uses participant pubkey providers at each multipath position, and the first (and only) path
 2136|      0|                emplace_final_provider(i, 0);
 2137|      0|            }
 2138|  11.3k|        } else if (derivation_multipaths.size() > 1) {
  ------------------
  |  Branch (2138:20): [True: 0, False: 11.3k]
  ------------------
 2139|       |            // All key provider vectors should be length 1. Clone them until they have the same length as paths
 2140|      0|            if (!Assume(clone_providers(derivation_multipaths.size()))) {
  ------------------
  |  |  128|      0|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (2140:17): [True: 0, False: 0]
  ------------------
 2141|      0|                error = "musig(): Multipath derivation path with multipath participants is disallowed"; // This error is unreachable due to earlier check
 2142|      0|                return {};
 2143|      0|            }
 2144|      0|            for (size_t i = 0; i < derivation_multipaths.size(); ++i) {
  ------------------
  |  Branch (2144:32): [True: 0, False: 0]
  ------------------
 2145|       |                // Final MuSigPubkeyProvider uses cloned participant pubkey providers, and the multipath derivation paths
 2146|      0|                emplace_final_provider(i, i);
 2147|      0|            }
 2148|  11.3k|        } else {
 2149|       |            // No multipath derivation, MuSigPubkeyProvider uses the first (and only) participant pubkey providers, and the first (and only) path
 2150|  11.3k|            emplace_final_provider(0, 0);
 2151|  11.3k|        }
 2152|  11.3k|        ++key_exp_index; // Increment key expression index for the MuSigPubkeyProvider too
 2153|  11.3k|        return ret;
 2154|  11.3k|    }
 2155|       |
 2156|  70.5k|    auto origin_split = Split(sp, ']');
 2157|  70.5k|    if (origin_split.size() > 2) {
  ------------------
  |  Branch (2157:9): [True: 8, False: 70.4k]
  ------------------
 2158|      8|        error = "Multiple ']' characters found for a single pubkey";
 2159|      8|        return {};
 2160|      8|    }
 2161|       |    // This is set if either the origin or path suffix contains a hardened derivation.
 2162|  70.4k|    bool apostrophe = false;
 2163|  70.4k|    if (origin_split.size() == 1) {
  ------------------
  |  Branch (2163:9): [True: 67.4k, False: 3.02k]
  ------------------
 2164|  67.4k|        return ParsePubkeyInner(key_exp_index, origin_split[0], ctx, out, apostrophe, error);
 2165|  67.4k|    }
 2166|  3.02k|    if (origin_split[0].empty() || origin_split[0][0] != '[') {
  ------------------
  |  Branch (2166:9): [True: 4, False: 3.02k]
  |  Branch (2166:36): [True: 9, False: 3.01k]
  ------------------
 2167|     13|        error = strprintf("Key origin start '[ character expected but not found, got '%c' instead",
  ------------------
  |  | 1172|     13|#define strprintf tfm::format
  ------------------
 2168|     13|                          origin_split[0].empty() ? /** empty, implies split char */ ']' : origin_split[0][0]);
  ------------------
  |  Branch (2168:27): [True: 4, False: 9]
  ------------------
 2169|     13|        return {};
 2170|     13|    }
 2171|  3.01k|    auto slash_split = Split(origin_split[0].subspan(1), '/');
 2172|  3.01k|    if (slash_split[0].size() != 8) {
  ------------------
  |  Branch (2172:9): [True: 14, False: 3.00k]
  ------------------
 2173|     14|        error = strprintf("Fingerprint is not 4 bytes (%u characters instead of 8 characters)", slash_split[0].size());
  ------------------
  |  | 1172|     14|#define strprintf tfm::format
  ------------------
 2174|     14|        return {};
 2175|     14|    }
 2176|  3.00k|    std::string fpr_hex = std::string(slash_split[0].begin(), slash_split[0].end());
 2177|  3.00k|    if (!IsHex(fpr_hex)) {
  ------------------
  |  Branch (2177:9): [True: 4, False: 2.99k]
  ------------------
 2178|      4|        error = strprintf("Fingerprint '%s' is not hex", fpr_hex);
  ------------------
  |  | 1172|      4|#define strprintf tfm::format
  ------------------
 2179|      4|        return {};
 2180|      4|    }
 2181|  2.99k|    auto fpr_bytes = ParseHex(fpr_hex);
 2182|  2.99k|    KeyOriginInfo info;
 2183|  2.99k|    static_assert(sizeof(info.fingerprint) == 4, "Fingerprint must be 4 bytes");
 2184|  2.99k|    assert(fpr_bytes.size() == 4);
  ------------------
  |  Branch (2184:5): [True: 2.99k, False: 0]
  ------------------
 2185|  2.99k|    std::copy_n(fpr_bytes.begin(), info.fingerprint.size(), info.fingerprint.begin());
 2186|  2.99k|    std::vector<KeyPath> path;
 2187|  2.99k|    if (!ParseKeyPath(slash_split, path, apostrophe, error, /*allow_multipath=*/false)) return {};
  ------------------
  |  Branch (2187:9): [True: 106, False: 2.89k]
  ------------------
 2188|  2.89k|    info.path = path.at(0);
 2189|  2.89k|    auto providers = ParsePubkeyInner(key_exp_index, origin_split[1], ctx, out, apostrophe, error);
 2190|  2.89k|    if (providers.empty()) return {};
  ------------------
  |  Branch (2190:9): [True: 123, False: 2.76k]
  ------------------
 2191|  2.76k|    ret.reserve(providers.size());
 2192|  2.76k|    for (auto& prov : providers) {
  ------------------
  |  Branch (2192:21): [True: 2.76k, False: 2.76k]
  ------------------
 2193|  2.76k|        ret.emplace_back(std::make_unique<OriginPubkeyProvider>(prov->m_expr_index, info, std::move(prov), apostrophe));
 2194|  2.76k|    }
 2195|  2.76k|    return ret;
 2196|  2.89k|}
descriptor.cpp:_ZN12_GLOBAL__N_112ParseKeyPathERKNSt3__16vectorINS0_4spanIKcLm18446744073709551615EEENS0_9allocatorIS4_EEEERNS1_INS1_IjNS5_IjEEEENS5_ISB_EEEERbRNS0_12basic_stringIcNS0_11char_traitsIcEENS5_IcEEEEbSF_:
 1830|  2.99k|{
 1831|  2.99k|    auto parse_elem = [&](std::span<const char> elem) -> std::optional<uint32_t> {
 1832|  2.99k|        const auto parsed{ParseKeyPathElement(elem)};
 1833|  2.99k|        if (!parsed) {
 1834|  2.99k|            error = parsed.error();
 1835|  2.99k|            return std::nullopt;
 1836|  2.99k|        }
 1837|  2.99k|        if (parsed->is_hardened) {
 1838|  2.99k|            has_hardened = true;
 1839|  2.99k|            apostrophe = elem.back() == '\'';
 1840|  2.99k|        }
 1841|  2.99k|        return parsed->ChildNumber();
 1842|  2.99k|    };
 1843|       |
 1844|  2.99k|    KeyPath path;
 1845|  2.99k|    struct MultipathSubstitutes {
 1846|  2.99k|        size_t placeholder_index;
 1847|  2.99k|        std::vector<uint32_t> values;
 1848|  2.99k|    };
 1849|  2.99k|    std::optional<MultipathSubstitutes> substitutes;
 1850|  2.99k|    has_hardened = false;
 1851|       |
 1852|  33.9k|    for (size_t i = 1; i < split.size(); ++i) {
  ------------------
  |  Branch (1852:24): [True: 31.0k, False: 2.89k]
  ------------------
 1853|  31.0k|        const std::span<const char>& elem = split[i];
 1854|       |
 1855|       |        // Check if element contains multipath specifier
 1856|  31.0k|        if (!elem.empty() && elem.front() == '<' && elem.back() == '>') {
  ------------------
  |  Branch (1856:13): [True: 30.9k, False: 13]
  |  Branch (1856:30): [True: 8, False: 30.9k]
  |  Branch (1856:53): [True: 3, False: 5]
  ------------------
 1857|      3|            if (!allow_multipath) {
  ------------------
  |  Branch (1857:17): [True: 3, False: 0]
  ------------------
 1858|      3|                error = strprintf("Key path value '%s' specifies multipath in a section where multipath is not allowed", std::string(elem.begin(), elem.end()));
  ------------------
  |  | 1172|      3|#define strprintf tfm::format
  ------------------
 1859|      3|                return false;
 1860|      3|            }
 1861|      0|            if (substitutes) {
  ------------------
  |  Branch (1861:17): [True: 0, False: 0]
  ------------------
 1862|      0|                error = "Multiple multipath key path specifiers found";
 1863|      0|                return false;
 1864|      0|            }
 1865|       |
 1866|       |            // Parse each possible value
 1867|      0|            std::vector<std::span<const char>> nums = Split(std::span(elem.begin()+1, elem.end()-1), ";");
 1868|      0|            if (nums.size() < 2) {
  ------------------
  |  Branch (1868:17): [True: 0, False: 0]
  ------------------
 1869|      0|                error = "Multipath key path specifiers must have at least two items";
 1870|      0|                return false;
 1871|      0|            }
 1872|       |
 1873|      0|            substitutes.emplace();
 1874|      0|            std::unordered_set<uint32_t> seen_substitutes;
 1875|      0|            for (const auto& num : nums) {
  ------------------
  |  Branch (1875:34): [True: 0, False: 0]
  ------------------
 1876|      0|                const auto& op_num = parse_elem(num);
 1877|      0|                if (!op_num) return false;
  ------------------
  |  Branch (1877:21): [True: 0, False: 0]
  ------------------
 1878|      0|                auto [_, inserted] = seen_substitutes.insert(*op_num);
 1879|      0|                if (!inserted) {
  ------------------
  |  Branch (1879:21): [True: 0, False: 0]
  ------------------
 1880|      0|                    error = strprintf("Duplicated key path value %u in multipath specifier", *op_num);
  ------------------
  |  | 1172|      0|#define strprintf tfm::format
  ------------------
 1881|      0|                    return false;
 1882|      0|                }
 1883|      0|                substitutes->values.emplace_back(*op_num);
 1884|      0|            }
 1885|       |
 1886|      0|            path.emplace_back(); // Placeholder for multipath segment
 1887|      0|            substitutes->placeholder_index = path.size() - 1;
 1888|  31.0k|        } else {
 1889|  31.0k|            const auto& op_num = parse_elem(elem);
 1890|  31.0k|            if (!op_num) return false;
  ------------------
  |  Branch (1890:17): [True: 103, False: 30.9k]
  ------------------
 1891|  30.9k|            path.emplace_back(*op_num);
 1892|  30.9k|        }
 1893|  31.0k|    }
 1894|       |
 1895|  2.89k|    if (!substitutes) {
  ------------------
  |  Branch (1895:9): [True: 2.89k, False: 0]
  ------------------
 1896|  2.89k|        out.emplace_back(std::move(path));
 1897|  2.89k|    } else {
 1898|       |        // Replace the multipath placeholder with each value while generating paths
 1899|      0|        for (uint32_t substitute : substitutes->values) {
  ------------------
  |  Branch (1899:34): [True: 0, False: 0]
  ------------------
 1900|      0|            KeyPath branch_path = path;
 1901|      0|            branch_path[substitutes->placeholder_index] = substitute;
 1902|      0|            out.emplace_back(std::move(branch_path));
 1903|      0|        }
 1904|      0|    }
 1905|  2.89k|    return true;
 1906|  2.99k|}
descriptor.cpp:_ZZN12_GLOBAL__N_112ParseKeyPathERKNSt3__16vectorINS0_4spanIKcLm18446744073709551615EEENS0_9allocatorIS4_EEEERNS1_INS1_IjNS5_IjEEEENS5_ISB_EEEERbRNS0_12basic_stringIcNS0_11char_traitsIcEENS5_IcEEEEbSF_ENK3$_0clES4_:
 1831|  31.0k|    auto parse_elem = [&](std::span<const char> elem) -> std::optional<uint32_t> {
 1832|  31.0k|        const auto parsed{ParseKeyPathElement(elem)};
 1833|  31.0k|        if (!parsed) {
  ------------------
  |  Branch (1833:13): [True: 103, False: 30.9k]
  ------------------
 1834|    103|            error = parsed.error();
 1835|    103|            return std::nullopt;
 1836|    103|        }
 1837|  30.9k|        if (parsed->is_hardened) {
  ------------------
  |  Branch (1837:13): [True: 1.63k, False: 29.2k]
  ------------------
 1838|  1.63k|            has_hardened = true;
 1839|  1.63k|            apostrophe = elem.back() == '\'';
 1840|  1.63k|        }
 1841|  30.9k|        return parsed->ChildNumber();
 1842|  31.0k|    };
descriptor.cpp:_ZZN12_GLOBAL__N_111ParsePubkeyERjRKNSt3__14spanIKcLm18446744073709551615EEENS_18ParseScriptContextER19FlatSigningProviderRNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEENK3$_1clEmm:
 2116|  11.3k|        const auto& emplace_final_provider = [&ret, &key_exp_index, &deriv_type, &derivation_multipaths, &providers](size_t vec_idx, size_t path_idx) -> void {
 2117|  11.3k|            KeyPath& path = derivation_multipaths.at(path_idx);
 2118|  11.3k|            std::vector<std::unique_ptr<PubkeyProvider>> pubs;
 2119|  11.3k|            pubs.reserve(providers.size());
 2120|  30.7k|            for (auto& vec : providers) {
  ------------------
  |  Branch (2120:28): [True: 30.7k, False: 11.3k]
  ------------------
 2121|  30.7k|                pubs.emplace_back(std::move(vec.at(vec_idx)));
 2122|  30.7k|            }
 2123|  11.3k|            ret.emplace_back(std::make_unique<MuSigPubkeyProvider>(key_exp_index, std::move(pubs), path, deriv_type));
 2124|  11.3k|        };
descriptor.cpp:_ZN12_GLOBAL__N_119MuSigPubkeyProviderC2EjNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEENS2_IjNS8_IjEEEENS_10DeriveTypeE:
  641|  11.3k|        : PubkeyProvider(exp_index),
  642|  11.3k|        m_participants(std::move(providers)),
  643|  11.3k|        m_path(std::move(path)),
  644|  11.3k|        m_derive(derive),
  645|  11.3k|        m_ranged_participants(std::any_of(m_participants.begin(), m_participants.end(), [](const auto& pubkey) { return pubkey->IsRange(); }))
  646|  11.3k|    {
  647|  11.3k|        if (!Assume(!(m_ranged_participants && IsRangedDerivation()))) {
  ------------------
  |  |  128|  11.3k|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  |  |  ------------------
  |  |  |  Branch (128:51): [True: 0, False: 11.3k]
  |  |  |  Branch (128:51): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (647:13): [True: 0, False: 11.3k]
  ------------------
  648|      0|            throw std::runtime_error("musig(): Cannot have both ranged participants and ranged derivation");
  649|      0|        }
  650|  11.3k|        if (!Assume(m_derive != DeriveType::HARDENED_RANGED)) {
  ------------------
  |  |  128|  11.3k|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (650:13): [True: 0, False: 11.3k]
  ------------------
  651|      0|            throw std::runtime_error("musig(): Cannot have hardened derivation");
  652|      0|        }
  653|  11.3k|    }
descriptor.cpp:_ZN12_GLOBAL__N_114PubkeyProviderC2Ej:
  187|  94.8k|    explicit PubkeyProvider(uint32_t exp_index) : m_expr_index(exp_index) {}
descriptor.cpp:_ZZN12_GLOBAL__N_119MuSigPubkeyProviderC1EjNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEENS2_IjNS8_IjEEEENS_10DeriveTypeEENKUlRKT_E_clIS7_EEDaSG_:
  645|  30.7k|        m_ranged_participants(std::any_of(m_participants.begin(), m_participants.end(), [](const auto& pubkey) { return pubkey->IsRange(); }))
descriptor.cpp:_ZNK12_GLOBAL__N_119MuSigPubkeyProvider18IsRangedDerivationEv:
  632|  22.2k|    bool IsRangedDerivation() const { return m_derive != DeriveType::NON_RANGED; }
descriptor.cpp:_ZN12_GLOBAL__N_114PubkeyProviderD2Ev:
  189|  94.8k|    virtual ~PubkeyProvider() = default;
descriptor.cpp:_ZNK12_GLOBAL__N_119MuSigPubkeyProvider9GetPubKeyEiRK15SigningProviderR19FlatSigningProviderPK15DescriptorCachePS6_:
  656|  11.7k|    {
  657|  11.7k|        FlatSigningProvider dummy;
  658|       |        // If the participants are not ranged, we can compute and cache the aggregate pubkey by creating a PubkeyProvider for it
  659|  11.7k|        if (!m_aggregate_provider && !m_ranged_participants) {
  ------------------
  |  Branch (659:13): [True: 11.1k, False: 630]
  |  Branch (659:38): [True: 11.1k, False: 0]
  ------------------
  660|       |            // Retrieve the pubkeys from the providers
  661|  11.1k|            std::vector<CPubKey> pubkeys;
  662|  30.4k|            for (const auto& prov : m_participants) {
  ------------------
  |  Branch (662:35): [True: 30.4k, False: 11.1k]
  ------------------
  663|  30.4k|                std::optional<CPubKey> pubkey = prov->GetPubKey(0, arg, dummy, read_cache, write_cache);
  664|  30.4k|                if (!pubkey.has_value()) {
  ------------------
  |  Branch (664:21): [True: 0, False: 30.4k]
  ------------------
  665|      0|                    return std::nullopt;
  666|      0|                }
  667|  30.4k|                pubkeys.push_back(pubkey.value());
  668|  30.4k|            }
  669|  11.1k|            std::sort(pubkeys.begin(), pubkeys.end());
  670|       |
  671|       |            // Aggregate the pubkey
  672|  11.1k|            m_aggregate_pubkey = MuSig2AggregatePubkeys(pubkeys);
  673|  11.1k|            if (!Assume(m_aggregate_pubkey.has_value())) return std::nullopt;
  ------------------
  |  |  128|  11.1k|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (673:17): [True: 0, False: 11.1k]
  ------------------
  674|       |
  675|       |            // Make our pubkey provider
  676|  11.1k|            if (IsRangedDerivation() || !m_path.empty()) {
  ------------------
  |  Branch (676:17): [True: 0, False: 11.1k]
  |  Branch (676:41): [True: 0, False: 11.1k]
  ------------------
  677|       |                // Make the synthetic xpub and construct the BIP32PubkeyProvider
  678|      0|                CExtPubKey extpub = CreateMuSig2SyntheticXpub(m_aggregate_pubkey.value());
  679|      0|                m_aggregate_provider = std::make_unique<BIP32PubkeyProvider>(m_expr_index, extpub, m_path, m_derive, /*apostrophe=*/false);
  680|  11.1k|            } else {
  681|  11.1k|                m_aggregate_provider = std::make_unique<ConstPubkeyProvider>(m_expr_index, m_aggregate_pubkey.value(), /*xonly=*/false);
  682|  11.1k|            }
  683|  11.1k|        }
  684|       |
  685|       |        // Retrieve all participant pubkeys
  686|  11.7k|        std::vector<CPubKey> pubkeys;
  687|  31.3k|        for (const auto& prov : m_participants) {
  ------------------
  |  Branch (687:31): [True: 31.3k, False: 11.7k]
  ------------------
  688|  31.3k|            std::optional<CPubKey> pub = prov->GetPubKey(pos, arg, out, read_cache, write_cache);
  689|  31.3k|            if (!pub) return std::nullopt;
  ------------------
  |  Branch (689:17): [True: 0, False: 31.3k]
  ------------------
  690|  31.3k|            pubkeys.emplace_back(*pub);
  691|  31.3k|        }
  692|  11.7k|        std::sort(pubkeys.begin(), pubkeys.end());
  693|       |
  694|  11.7k|        CPubKey pubout;
  695|  11.7k|        if (m_aggregate_provider) {
  ------------------
  |  Branch (695:13): [True: 11.7k, False: 0]
  ------------------
  696|       |            // When we have a cached aggregate key, we are either returning it or deriving from it
  697|       |            // Either way, we can passthrough to its GetPubKey
  698|       |            // Use a dummy signing provider as private keys do not exist for the aggregate pubkey
  699|  11.7k|            std::optional<CPubKey> pub = m_aggregate_provider->GetPubKey(pos, dummy, out, read_cache, write_cache);
  700|  11.7k|            if (!pub) return std::nullopt;
  ------------------
  |  Branch (700:17): [True: 0, False: 11.7k]
  ------------------
  701|  11.7k|            pubout = *pub;
  702|  11.7k|            out.aggregate_pubkeys.emplace(m_aggregate_pubkey.value(), pubkeys);
  703|  11.7k|        } else {
  704|      0|            if (!Assume(m_ranged_participants) || !Assume(m_path.empty())) return std::nullopt;
  ------------------
  |  |  128|      0|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
                          if (!Assume(m_ranged_participants) || !Assume(m_path.empty())) return std::nullopt;
  ------------------
  |  |  128|      0|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (704:17): [True: 0, False: 0]
  |  Branch (704:17): [True: 0, False: 0]
  |  Branch (704:51): [True: 0, False: 0]
  ------------------
  705|       |            // Compute aggregate key from derived participants
  706|      0|            std::optional<CPubKey> aggregate_pubkey = MuSig2AggregatePubkeys(pubkeys);
  707|      0|            if (!aggregate_pubkey) return std::nullopt;
  ------------------
  |  Branch (707:17): [True: 0, False: 0]
  ------------------
  708|      0|            pubout = *aggregate_pubkey;
  709|       |
  710|      0|            std::unique_ptr<ConstPubkeyProvider> this_agg_provider = std::make_unique<ConstPubkeyProvider>(m_expr_index, aggregate_pubkey.value(), /*xonly=*/false);
  711|      0|            this_agg_provider->GetPubKey(0, dummy, out, read_cache, write_cache);
  712|      0|            out.aggregate_pubkeys.emplace(pubout, pubkeys);
  713|      0|        }
  714|       |
  715|  11.7k|        if (!Assume(pubout.IsValid())) return std::nullopt;
  ------------------
  |  |  128|  11.7k|#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
  ------------------
  |  Branch (715:13): [True: 0, False: 11.7k]
  ------------------
  716|  11.7k|        return pubout;
  717|  11.7k|    }
descriptor.cpp:_ZN12_GLOBAL__N_119ConstPubkeyProviderC2EjRK7CPubKeyb:
  347|  80.7k|    ConstPubkeyProvider(uint32_t exp_index, const CPubKey& pubkey, bool xonly) : PubkeyProvider(exp_index), m_pubkey(pubkey), m_xonly(xonly) {}
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider7IsRangeEv:
  357|  87.9k|    bool IsRange() const override { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider7GetSizeEv:
  358|  25.0k|    size_t GetSize() const override { return m_pubkey.size(); }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  360|  3.27k|    std::string ToString(StringType type) const override { return m_xonly ? HexStr(m_pubkey).substr(2) : HexStr(m_pubkey); }
  ------------------
  |  Branch (360:67): [True: 449, False: 2.82k]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider7IsBIP32Ev:
  359|  11.3k|    bool IsBIP32() const override { return false; }
descriptor.cpp:_ZNK12_GLOBAL__N_119ConstPubkeyProvider9GetPubKeyEiRK15SigningProviderR19FlatSigningProviderPK15DescriptorCachePS6_:
  349|   151k|    {
  350|   151k|        KeyOriginInfo info;
  351|   151k|        CKeyID keyid = m_pubkey.GetID();
  352|   151k|        info.fingerprint = keyid.fingerprint();
  353|   151k|        out.origins.emplace(keyid, std::make_pair(m_pubkey, info));
  354|   151k|        out.pubkeys.emplace(keyid, m_pubkey);
  355|   151k|        return m_pubkey;
  356|   151k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_119MuSigPubkeyProvider7IsRangeEv:
  718|  11.0k|    bool IsRange() const override { return IsRangedDerivation() || m_ranged_participants; }
  ------------------
  |  Branch (718:44): [True: 0, False: 11.0k]
  |  Branch (718:68): [True: 0, False: 11.0k]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_119MuSigPubkeyProvider7GetSizeEv:
  720|  9.86k|    size_t GetSize() const override { return 32; }
descriptor.cpp:_ZNK12_GLOBAL__N_119MuSigPubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  723|    106|    {
  724|    106|        std::string out = "musig(";
  725|    375|        for (size_t i = 0; i < m_participants.size(); ++i) {
  ------------------
  |  Branch (725:28): [True: 269, False: 106]
  ------------------
  726|    269|            const auto& pubkey = m_participants.at(i);
  727|    269|            if (i) out += ",";
  ------------------
  |  Branch (727:17): [True: 163, False: 106]
  ------------------
  728|    269|            out += pubkey->ToString(type);
  729|    269|        }
  730|    106|        out += ")";
  731|    106|        out += FormatHDKeypath(m_path);
  732|    106|        if (IsRangedDerivation()) {
  ------------------
  |  Branch (732:13): [True: 0, False: 106]
  ------------------
  733|      0|            out += "/*";
  734|      0|        }
  735|    106|        return out;
  736|    106|    }
descriptor.cpp:_ZN12_GLOBAL__N_116ParsePubkeyInnerERjRKNSt3__14spanIKcLm18446744073709551615EEENS_18ParseScriptContextER19FlatSigningProviderRbRNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1930|  70.3k|{
 1931|  70.3k|    std::vector<std::unique_ptr<PubkeyProvider>> ret;
 1932|  70.3k|    bool permit_uncompressed = ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH;
  ------------------
  |  Branch (1932:32): [True: 1.95k, False: 68.4k]
  |  Branch (1932:66): [True: 419, False: 67.9k]
  ------------------
 1933|  70.3k|    auto split = Split(sp, '/');
 1934|  70.3k|    std::string str(split[0].begin(), split[0].end());
 1935|  70.3k|    if (str.size() == 0) {
  ------------------
  |  Branch (1935:9): [True: 94, False: 70.2k]
  ------------------
 1936|     94|        error = "No key provided";
 1937|     94|        return {};
 1938|     94|    }
 1939|  70.2k|    if (IsSpace(str.front()) || IsSpace(str.back())) {
  ------------------
  |  Branch (1939:9): [True: 6, False: 70.2k]
  |  Branch (1939:33): [True: 1, False: 70.2k]
  ------------------
 1940|      7|        error = strprintf("Key '%s' is invalid due to whitespace", str);
  ------------------
  |  | 1172|      7|#define strprintf tfm::format
  ------------------
 1941|      7|        return {};
 1942|      7|    }
 1943|  70.2k|    if (split.size() == 1) {
  ------------------
  |  Branch (1943:9): [True: 70.2k, False: 30]
  ------------------
 1944|  70.2k|        if (IsHex(str)) {
  ------------------
  |  Branch (1944:13): [True: 70.0k, False: 215]
  ------------------
 1945|  70.0k|            std::vector<unsigned char> data = ParseHex(str);
 1946|  70.0k|            CPubKey pubkey(data);
 1947|  70.0k|            if (pubkey.IsValid() && !pubkey.IsValidNonHybrid()) {
  ------------------
  |  Branch (1947:17): [True: 59.3k, False: 10.6k]
  |  Branch (1947:37): [True: 2, False: 59.3k]
  ------------------
 1948|      2|                error = "Hybrid public keys are not allowed";
 1949|      2|                return {};
 1950|      2|            }
 1951|  70.0k|            if (pubkey.IsFullyValid()) {
  ------------------
  |  Branch (1951:17): [True: 59.1k, False: 10.8k]
  ------------------
 1952|  59.1k|                if (permit_uncompressed || pubkey.IsCompressed()) {
  ------------------
  |  Branch (1952:21): [True: 2.15k, False: 57.0k]
  |  Branch (1952:44): [True: 57.0k, False: 0]
  ------------------
 1953|  59.1k|                    ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, false));
 1954|  59.1k|                    ++key_exp_index;
 1955|  59.1k|                    return ret;
 1956|  59.1k|                } else {
 1957|      0|                    error = "Uncompressed keys are not allowed";
 1958|      0|                    return {};
 1959|      0|                }
 1960|  59.1k|            } else if (data.size() == 32 && ctx == ParseScriptContext::P2TR) {
  ------------------
  |  Branch (1960:24): [True: 10.5k, False: 302]
  |  Branch (1960:45): [True: 10.5k, False: 1]
  ------------------
 1961|  10.5k|                unsigned char fullkey[33] = {0x02};
 1962|  10.5k|                std::copy(data.begin(), data.end(), fullkey + 1);
 1963|  10.5k|                pubkey.Set(std::begin(fullkey), std::end(fullkey));
 1964|  10.5k|                if (pubkey.IsFullyValid()) {
  ------------------
  |  Branch (1964:21): [True: 10.4k, False: 91]
  ------------------
 1965|  10.4k|                    ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, true));
 1966|  10.4k|                    ++key_exp_index;
 1967|  10.4k|                    return ret;
 1968|  10.4k|                }
 1969|  10.5k|            }
 1970|    394|            error = strprintf("Pubkey '%s' is invalid", str);
  ------------------
  |  | 1172|    394|#define strprintf tfm::format
  ------------------
 1971|    394|            return {};
 1972|  70.0k|        }
 1973|    215|        CKey key = DecodeSecret(str);
 1974|    215|        if (key.IsValid()) {
  ------------------
  |  Branch (1974:13): [True: 0, False: 215]
  ------------------
 1975|      0|            if (permit_uncompressed || key.IsCompressed()) {
  ------------------
  |  Branch (1975:17): [True: 0, False: 0]
  |  Branch (1975:40): [True: 0, False: 0]
  ------------------
 1976|      0|                CPubKey pubkey = key.GetPubKey();
 1977|      0|                out.keys.emplace(pubkey.GetID(), key);
 1978|      0|                ret.emplace_back(std::make_unique<ConstPubkeyProvider>(key_exp_index, pubkey, ctx == ParseScriptContext::P2TR));
 1979|      0|                ++key_exp_index;
 1980|      0|                return ret;
 1981|      0|            } else {
 1982|      0|                error = "Uncompressed keys are not allowed";
 1983|      0|                return {};
 1984|      0|            }
 1985|      0|        }
 1986|    215|    }
 1987|    245|    CExtKey extkey = DecodeExtKey(str);
 1988|    245|    CExtPubKey extpubkey = DecodeExtPubKey(str);
 1989|    245|    if (!extkey.key.IsValid() && !extpubkey.pubkey.IsValid()) {
  ------------------
  |  Branch (1989:9): [True: 245, False: 0]
  |  Branch (1989:34): [True: 245, False: 0]
  ------------------
 1990|    245|        error = strprintf("key '%s' is not valid", str);
  ------------------
  |  | 1172|    245|#define strprintf tfm::format
  ------------------
 1991|    245|        return {};
 1992|    245|    }
 1993|      0|    std::vector<KeyPath> paths;
 1994|      0|    DeriveType type = ParseDeriveType(split, apostrophe);
 1995|      0|    if (!ParseKeyPath(split, paths, apostrophe, error, /*allow_multipath=*/true)) return {};
  ------------------
  |  Branch (1995:9): [True: 0, False: 0]
  ------------------
 1996|      0|    if (extkey.key.IsValid()) {
  ------------------
  |  Branch (1996:9): [True: 0, False: 0]
  ------------------
 1997|      0|        extpubkey = extkey.Neuter();
 1998|      0|        out.keys.emplace(extpubkey.pubkey.GetID(), extkey.key);
 1999|      0|    }
 2000|      0|    for (auto& path : paths) {
  ------------------
  |  Branch (2000:21): [True: 0, False: 0]
  ------------------
 2001|      0|        ret.emplace_back(std::make_unique<BIP32PubkeyProvider>(key_exp_index, extpubkey, std::move(path), type, apostrophe));
 2002|      0|    }
 2003|      0|    ++key_exp_index;
 2004|      0|    return ret;
 2005|      0|}
descriptor.cpp:_ZN12_GLOBAL__N_112ParseKeyPathERKNSt3__16vectorINS0_4spanIKcLm18446744073709551615EEENS0_9allocatorIS4_EEEERNS1_INS1_IjNS5_IjEEEENS5_ISB_EEEERbRNS0_12basic_stringIcNS0_11char_traitsIcEENS5_IcEEEEb:
 1909|  2.99k|{
 1910|  2.99k|    bool dummy;
 1911|  2.99k|    return ParseKeyPath(split, out, apostrophe, error, allow_multipath, /*has_hardened=*/dummy);
 1912|  2.99k|}
descriptor.cpp:_ZN12_GLOBAL__N_120OriginPubkeyProviderC2Ej13KeyOriginInfoNSt3__110unique_ptrINS_14PubkeyProviderENS2_14default_deleteIS4_EEEEb:
  267|  2.76k|    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_120OriginPubkeyProvider9GetPubKeyEiRK15SigningProviderR19FlatSigningProviderPK15DescriptorCachePS6_:
  269|  7.29k|    {
  270|       |        // Derive into a temporary provider. Another key expression may have already put this
  271|       |        // key into out with its origin prefixed, and prefixing that entry would double it up.
  272|  7.29k|        FlatSigningProvider subprovider;
  273|  7.29k|        std::optional<CPubKey> pub = m_provider->GetPubKey(pos, arg, subprovider, read_cache, write_cache);
  274|  7.29k|        if (!pub) return std::nullopt;
  ------------------
  |  Branch (274:13): [True: 0, False: 7.29k]
  ------------------
  275|  7.29k|        const CKeyID keyid{pub->GetID()};
  276|  7.29k|        Assert(subprovider.pubkeys.contains(keyid));
  ------------------
  |  |  116|  7.29k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
  277|  7.29k|        auto& [pubkey, suborigin] = subprovider.origins[keyid];
  278|  7.29k|        Assert(pubkey == *pub); // m_provider must have a valid origin by this point.
  ------------------
  |  |  116|  7.29k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
  279|  7.29k|        suborigin.fingerprint = m_origin.fingerprint;
  280|  7.29k|        suborigin.path.insert(suborigin.path.begin(), m_origin.path.begin(), m_origin.path.end());
  281|  7.29k|        auto origin{subprovider.origins.extract(keyid)};
  282|  7.29k|        out.Merge(std::move(subprovider));
  283|       |        // An explicit origin takes precedence over an implicit one for the same key.
  284|  7.29k|        out.origins.insert_or_assign(keyid, std::move(origin.mapped()));
  285|  7.29k|        return pub;
  286|  7.29k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider7IsRangeEv:
  287|    655|    bool IsRange() const override { return m_provider->IsRange(); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider7GetSizeEv:
  288|  1.45k|    size_t GetSize() const override { return m_provider->GetSize(); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider8ToStringENS_14PubkeyProvider10StringTypeE:
  290|    652|    std::string ToString(StringType type) const override { return "[" + OriginString(type) + "]" + m_provider->ToString(type); }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider12OriginStringENS_14PubkeyProvider10StringTypeEb:
  260|    652|    {
  261|       |        // If StringType==COMPAT, always use the apostrophe to stay compatible with previous versions
  262|    652|        bool use_apostrophe = (!normalized && m_apostrophe) || type == StringType::COMPAT;
  ------------------
  |  Branch (262:32): [True: 652, False: 0]
  |  Branch (262:47): [True: 177, False: 475]
  |  Branch (262:64): [True: 0, False: 475]
  ------------------
  263|    652|        return HexStr(m_origin.fingerprint) + FormatHDKeypath(m_origin.path, use_apostrophe);
  264|    652|    }
descriptor.cpp:_ZNK12_GLOBAL__N_120OriginPubkeyProvider7IsBIP32Ev:
  289|      3|    bool IsBIP32() const override { return m_provider->IsBIP32(); }
descriptor.cpp:_ZN12_GLOBAL__N_112PKDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEEb:
 1202|  1.70k|    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:
  868|  4.87k|    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:
  907|  5.45k|    {
  908|  37.2k|        for (const auto& pubkey : m_pubkey_args) {
  ------------------
  |  Branch (908:33): [True: 37.2k, False: 5.45k]
  ------------------
  909|  37.2k|            if (pubkey->IsRange()) return true;
  ------------------
  |  Branch (909:17): [True: 0, False: 37.2k]
  ------------------
  910|  37.2k|        }
  911|  5.45k|        for (const auto& arg : m_subdescriptor_args) {
  ------------------
  |  Branch (911:30): [True: 2.34k, False: 5.45k]
  ------------------
  912|  2.34k|            if (arg->IsRange()) return true;
  ------------------
  |  Branch (912:17): [True: 0, False: 2.34k]
  ------------------
  913|  2.34k|        }
  914|  5.45k|        return false;
  915|  5.45k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl6ExpandEiRK15SigningProviderRNSt3__16vectorI7CScriptNS4_9allocatorIS6_EEEER19FlatSigningProviderP15DescriptorCache:
 1023|  3.11k|    {
 1024|  3.11k|        return ExpandHelper(pos, provider, nullptr, output_scripts, out, write_cache);
 1025|  3.11k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_114DescriptorImpl12ExpandHelperEiRK15SigningProviderPK15DescriptorCacheRNSt3__16vectorI7CScriptNS7_9allocatorIS9_EEEER19FlatSigningProviderPS4_:
  998|  5.45k|    {
  999|  5.45k|        FlatSigningProvider subprovider;
 1000|  5.45k|        std::vector<CPubKey> pubkeys;
 1001|  5.45k|        pubkeys.reserve(m_pubkey_args.size());
 1002|       |
 1003|       |        // Construct temporary data in `pubkeys`, `subscripts`, and `subprovider` to avoid producing output in case of failure.
 1004|  37.2k|        for (const auto& p : m_pubkey_args) {
  ------------------
  |  Branch (1004:28): [True: 37.2k, False: 5.45k]
  ------------------
 1005|  37.2k|            std::optional<CPubKey> pubkey = p->GetPubKey(pos, arg, subprovider, read_cache, write_cache);
 1006|  37.2k|            if (!pubkey) return false;
  ------------------
  |  Branch (1006:17): [True: 0, False: 37.2k]
  ------------------
 1007|  37.2k|            pubkeys.push_back(pubkey.value());
 1008|  37.2k|        }
 1009|  5.45k|        std::vector<CScript> subscripts;
 1010|  5.45k|        for (const auto& subarg : m_subdescriptor_args) {
  ------------------
  |  Branch (1010:33): [True: 2.34k, False: 5.45k]
  ------------------
 1011|  2.34k|            std::vector<CScript> outscripts;
 1012|  2.34k|            if (!subarg->ExpandHelper(pos, arg, read_cache, outscripts, subprovider, write_cache)) return false;
  ------------------
  |  Branch (1012:17): [True: 0, False: 2.34k]
  ------------------
 1013|  2.34k|            assert(outscripts.size() == 1);
  ------------------
  |  Branch (1013:13): [True: 2.34k, False: 0]
  ------------------
 1014|  2.34k|            subscripts.emplace_back(std::move(outscripts[0]));
 1015|  2.34k|        }
 1016|  5.45k|        out.Merge(std::move(subprovider));
 1017|       |
 1018|  5.45k|        output_scripts = MakeScripts(pubkeys, std::span{subscripts}, out);
 1019|  5.45k|        return true;
 1020|  5.45k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_112PKDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1193|    545|    {
 1194|    545|        if (m_xonly) {
  ------------------
  |  Branch (1194:13): [True: 530, False: 15]
  ------------------
 1195|    530|            CScript script = CScript() << ToByteVector(XOnlyPubKey(keys[0])) << OP_CHECKSIG;
 1196|    530|            return Vector(std::move(script));
 1197|    530|        } else {
 1198|     15|            return Vector(GetScriptForRawPubKey(keys[0]));
 1199|     15|        }
 1200|    545|    }
descriptor.cpp:_ZN12_GLOBAL__N_113PKHDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1236|      6|    PKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "pkh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_113PKHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1231|      6|    {
 1232|      6|        CKeyID id = keys[0].GetID();
 1233|      6|        return Vector(GetScriptForDestination(PKHash(id)));
 1234|      6|    }
descriptor.cpp:_ZN12_GLOBAL__N_115ComboDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1311|      2|    ComboDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "combo") {}
descriptor.cpp:_ZNK12_GLOBAL__N_115ComboDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1297|      2|    {
 1298|      2|        std::vector<CScript> ret;
 1299|      2|        CKeyID id = keys[0].GetID();
 1300|      2|        ret.emplace_back(GetScriptForRawPubKey(keys[0])); // P2PK
 1301|      2|        ret.emplace_back(GetScriptForDestination(PKHash(id))); // P2PKH
 1302|      2|        if (keys[0].IsCompressed()) {
  ------------------
  |  Branch (1302:13): [True: 2, False: 0]
  ------------------
 1303|      2|            CScript p2wpkh = GetScriptForDestination(WitnessV0KeyHash(id));
 1304|      2|            out.scripts.emplace(CScriptID(p2wpkh), p2wpkh);
 1305|      2|            ret.emplace_back(p2wpkh);
 1306|      2|            ret.emplace_back(GetScriptForDestination(ScriptHash(p2wpkh))); // P2SH-P2WPKH
 1307|      2|        }
 1308|      2|        return ret;
 1309|      2|    }
descriptor.cpp:_ZN12_GLOBAL__N_118MultisigDescriptorC2EiNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEb:
 1335|     91|    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 (1335:155): [True: 58, False: 33]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_118MultisigDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1326|     91|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, std::span<const CScript>, FlatSigningProvider&) const override {
 1327|     91|        if (m_sorted) {
  ------------------
  |  Branch (1327:13): [True: 58, False: 33]
  ------------------
 1328|     58|            std::vector<CPubKey> sorted_keys(keys);
 1329|     58|            std::sort(sorted_keys.begin(), sorted_keys.end());
 1330|     58|            return Vector(GetScriptForMultisig(m_threshold, sorted_keys));
 1331|     58|        }
 1332|     33|        return Vector(GetScriptForMultisig(m_threshold, keys));
 1333|     91|    }
descriptor.cpp:_ZN12_GLOBAL__N_116MultiADescriptorC2EiNSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEb:
 1386|  1.06k|    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 (1386:153): [True: 965, False: 96]
  ------------------
descriptor.cpp:_ZNK12_GLOBAL__N_116MultiADescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1372|  1.00k|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, std::span<const CScript>, FlatSigningProvider&) const override {
 1373|  1.00k|        CScript ret;
 1374|  1.00k|        std::vector<XOnlyPubKey> xkeys;
 1375|  1.00k|        xkeys.reserve(keys.size());
 1376|  31.8k|        for (const auto& key : keys) xkeys.emplace_back(key);
  ------------------
  |  Branch (1376:30): [True: 31.8k, False: 1.00k]
  ------------------
 1377|  1.00k|        if (m_sorted) std::sort(xkeys.begin(), xkeys.end());
  ------------------
  |  Branch (1377:13): [True: 964, False: 41]
  ------------------
 1378|  1.00k|        ret << ToByteVector(xkeys[0]) << OP_CHECKSIG;
 1379|  31.8k|        for (size_t i = 1; i < keys.size(); ++i) {
  ------------------
  |  Branch (1379:28): [True: 30.8k, False: 1.00k]
  ------------------
 1380|  30.8k|            ret << ToByteVector(xkeys[i]) << OP_CHECKSIGADD;
 1381|  30.8k|        }
 1382|  1.00k|        ret << m_threshold << OP_NUMEQUAL;
 1383|  1.00k|        return Vector(std::move(ret));
 1384|  1.00k|    }
descriptor.cpp:_ZN12_GLOBAL__N_114WPKHDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1269|      2|    WPKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "wpkh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_114WPKHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1264|      2|    {
 1265|      2|        CKeyID id = keys[0].GetID();
 1266|      2|        return Vector(GetScriptForDestination(WitnessV0KeyHash(id)));
 1267|      2|    }
descriptor.cpp:_ZN12_GLOBAL__N_112SHDescriptorC2ENSt3__110unique_ptrINS_14DescriptorImplENS1_14default_deleteIS3_EEEE:
 1425|    130|    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:
  869|    449|    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_112SHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1416|    128|    {
 1417|    128|        auto ret = Vector(GetScriptForDestination(ScriptHash(scripts[0])));
 1418|    128|        if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
  ------------------
  |  Branch (1418:13): [True: 128, False: 0]
  ------------------
 1419|    128|        return ret;
 1420|    128|    }
descriptor.cpp:_ZN12_GLOBAL__N_113WSHDescriptorC2ENSt3__110unique_ptrINS_14DescriptorImplENS1_14default_deleteIS3_EEEE:
 1472|    319|    WSHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "wsh") {}
descriptor.cpp:_ZNK12_GLOBAL__N_113WSHDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1466|    311|    {
 1467|    311|        auto ret = Vector(GetScriptForDestination(WitnessV0ScriptHash(scripts[0])));
 1468|    311|        if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
  ------------------
  |  Branch (1468:13): [True: 311, False: 0]
  ------------------
 1469|    311|        return ret;
 1470|    311|    }
descriptor.cpp:_ZN12_GLOBAL__N_112TRDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEENS1_6vectorINS2_INS_14DescriptorImplENS4_IS8_EEEENS1_9allocatorISA_EEEENS7_IiNSB_IiEEEE:
 1560|  2.64k|        DescriptorImpl(Vector(std::move(internal_key)), std::move(descs), "tr"), m_depths(std::move(depths))
 1561|  2.64k|    {
 1562|       |        assert(m_subdescriptor_args.size() == m_depths.size());
  ------------------
  |  Branch (1562:9): [True: 2.64k, False: 0]
  ------------------
 1563|  2.64k|    }
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:
  870|  2.64k|    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_112TRDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1508|  2.64k|    {
 1509|  2.64k|        TaprootBuilder builder;
 1510|  2.64k|        assert(m_depths.size() == scripts.size());
  ------------------
  |  Branch (1510:9): [True: 2.64k, False: 0]
  ------------------
 1511|  4.55k|        for (size_t pos = 0; pos < m_depths.size(); ++pos) {
  ------------------
  |  Branch (1511:30): [True: 1.90k, False: 2.64k]
  ------------------
 1512|  1.90k|            builder.Add(m_depths[pos], scripts[pos], TAPROOT_LEAF_TAPSCRIPT);
 1513|  1.90k|        }
 1514|  2.64k|        if (!builder.IsComplete()) return {};
  ------------------
  |  Branch (1514:13): [True: 0, False: 2.64k]
  ------------------
 1515|  2.64k|        assert(keys.size() == 1);
  ------------------
  |  Branch (1515:9): [True: 2.64k, False: 0]
  ------------------
 1516|  2.64k|        XOnlyPubKey xpk(keys[0]);
 1517|  2.64k|        if (!xpk.IsFullyValid()) return {};
  ------------------
  |  Branch (1517:13): [True: 0, False: 2.64k]
  ------------------
 1518|  2.64k|        builder.Finalize(xpk);
 1519|  2.64k|        WitnessV1Taproot output = builder.GetOutput();
 1520|  2.64k|        out.tr_trees[output] = builder;
 1521|  2.64k|        return Vector(GetScriptForDestination(output));
 1522|  2.64k|    }
descriptor.cpp:_ZN12_GLOBAL__N_115RawTRDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1766|     34|    RawTRDescriptor(std::unique_ptr<PubkeyProvider> output_key) : DescriptorImpl(Vector(std::move(output_key)), "rawtr") {}
descriptor.cpp:_ZNK12_GLOBAL__N_115RawTRDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1758|     33|    {
 1759|     33|        assert(keys.size() == 1);
  ------------------
  |  Branch (1759:9): [True: 33, False: 0]
  ------------------
 1760|     33|        XOnlyPubKey xpk(keys[0]);
 1761|     33|        if (!xpk.IsFullyValid()) return {};
  ------------------
  |  Branch (1761:13): [True: 0, False: 33]
  ------------------
 1762|     33|        WitnessV1Taproot output{xpk};
 1763|     33|        return Vector(GetScriptForDestination(output));
 1764|     33|    }
descriptor.cpp:_ZN12_GLOBAL__N_116UnusedDescriptorC2ENSt3__110unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS3_EEEE:
 1794|      2|    UnusedDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "unused") {}
descriptor.cpp:_ZNK12_GLOBAL__N_116UnusedDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1792|      1|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, std::span<const CScript> scripts, FlatSigningProvider& out) const override { return {}; }
descriptor.cpp:_ZN12_GLOBAL__N_113RawDescriptorC2E7CScript:
 1166|     25|    RawDescriptor(CScript script) : DescriptorImpl({}, "raw"), m_script(std::move(script)) {}
descriptor.cpp:_ZNK12_GLOBAL__N_113RawDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1164|     24|    std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, std::span<const CScript>, FlatSigningProvider&) const override { return Vector(m_script); }
descriptor.cpp:_ZN12_GLOBAL__N_19KeyParserC2EP19FlatSigningProviderPK15SigningProviderN10miniscript17MiniscriptContextERj:
 2248|  6.75k|        : m_out(out), m_in(in), m_script_ctx(ctx), m_expr_index(key_exp_index) {}
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser9MsContextEv:
 2331|  2.06M|    miniscript::MiniscriptContext MsContext() const {
 2332|  2.06M|        return m_script_ctx;
 2333|  2.06M|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser10FromStringERNSt3__14spanIKcLm18446744073709551615EEE:
 2275|  10.5k|    {
 2276|  10.5k|        assert(m_out);
  ------------------
  |  Branch (2276:9): [True: 10.5k, False: 0]
  ------------------
 2277|  10.5k|        Key key = m_keys.size();
 2278|  10.5k|        auto pk = ParsePubkey(m_expr_index, in, ParseContext(), *m_out, m_key_parsing_error);
 2279|  10.5k|        if (pk.empty()) return {};
  ------------------
  |  Branch (2279:13): [True: 164, False: 10.4k]
  ------------------
 2280|  10.4k|        m_keys.emplace_back(std::move(pk));
 2281|  10.4k|        return key;
 2282|  10.5k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser12ParseContextEv:
 2266|  10.5k|    ParseScriptContext ParseContext() const {
 2267|  10.5k|        switch (m_script_ctx) {
  ------------------
  |  Branch (2267:17): [True: 10.5k, False: 0]
  ------------------
 2268|  5.16k|            case miniscript::MiniscriptContext::P2WSH: return ParseScriptContext::P2WSH;
  ------------------
  |  Branch (2268:13): [True: 5.16k, False: 5.39k]
  ------------------
 2269|  5.39k|            case miniscript::MiniscriptContext::TAPSCRIPT: return ParseScriptContext::P2TR;
  ------------------
  |  Branch (2269:13): [True: 5.39k, False: 5.16k]
  ------------------
 2270|  10.5k|        }
 2271|  10.5k|        assert(false);
  ------------------
  |  Branch (2271:9): [Folded, False: 0]
  ------------------
 2272|      0|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser10KeyCompareERKjS2_:
 2250|  26.4k|    bool KeyCompare(const Key& a, const Key& b) const {
 2251|       |        // Deriving a hardened step needs the private key, so use the provider that was filled
 2252|       |        // while parsing, or the one we are inferring from, rather than an empty one.
 2253|  26.4k|        const SigningProvider& provider{m_out ? *m_out : (m_in ? *m_in : DUMMY_SIGNING_PROVIDER)};
  ------------------
  |  Branch (2253:41): [True: 26.4k, False: 0]
  |  Branch (2253:59): [True: 0, False: 0]
  ------------------
 2254|  26.4k|        const PubkeyProvider& key_a{*m_keys.at(a).at(0)};
 2255|  26.4k|        const PubkeyProvider& key_b{*m_keys.at(b).at(0)};
 2256|  26.4k|        FlatSigningProvider out_a, out_b;
 2257|  26.4k|        const std::optional<CPubKey> pub_a{key_a.GetPubKey(0, provider, out_a)};
 2258|  26.4k|        const std::optional<CPubKey> pub_b{key_b.GetPubKey(0, provider, out_b)};
 2259|  26.4k|        if (pub_a && pub_b) return *pub_a < *pub_b;
  ------------------
  |  Branch (2259:13): [True: 26.4k, False: 0]
  |  Branch (2259:22): [True: 26.4k, False: 0]
  ------------------
 2260|       |        // Keys that cannot be derived sort before the ones that can, and are compared by their
 2261|       |        // expression so that two different keys are not taken for duplicates.
 2262|      0|        if (pub_a.has_value() != pub_b.has_value()) return !pub_a.has_value();
  ------------------
  |  Branch (2262:13): [True: 0, False: 0]
  ------------------
 2263|      0|        return key_a.ToString() < key_b.ToString();
 2264|      0|    }
descriptor.cpp:_ZNK12_GLOBAL__N_19KeyParser8ToStringERKjRb:
 2285|  3.11k|    {
 2286|  3.11k|        return m_keys.at(key).at(0)->ToString();
 2287|  3.11k|    }
descriptor.cpp:_ZZN12_GLOBAL__N_111ParseScriptERjRNSt3__14spanIKcLm18446744073709551615EEENS_18ParseScriptContextER19FlatSigningProviderRNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEENK3$_0clERKNS1_6vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteISJ_EEEENSC_ISM_EEEESQ_:
 2722|  1.26k|                    [](const std::vector<std::unique_ptr<PubkeyProvider>>& a, const std::vector<std::unique_ptr<PubkeyProvider>>& b) {
 2723|  1.26k|                        return a.size() < b.size();
 2724|  1.26k|                    })->size();
descriptor.cpp:_ZN12_GLOBAL__N_120MiniscriptDescriptorC2ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEON10miniscript4NodeIjEE:
 1693|  1.94k|        : DescriptorImpl(std::move(providers), "?"), m_node(std::move(node))
 1694|  1.94k|    {
 1695|       |        // Traverse miniscript tree for unsafe use of older()
 1696|  1.94k|        miniscript::ForEachNode(m_node, [&](const miniscript::Node<uint32_t>& node) {
 1697|  1.94k|            if (node.Fragment() == miniscript::Fragment::OLDER) {
 1698|  1.94k|                const uint32_t raw = node.K();
 1699|  1.94k|                const uint32_t value_part = raw & ~CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG;
 1700|  1.94k|                if (value_part > CTxIn::SEQUENCE_LOCKTIME_MASK) {
 1701|  1.94k|                    const bool is_time_based = (raw & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) != 0;
 1702|  1.94k|                    if (is_time_based) {
 1703|  1.94k|                        m_warnings.push_back(strprintf("time-based relative locktime: older(%u) > (65535 * 512) seconds is unsafe", raw));
 1704|  1.94k|                    } else {
 1705|  1.94k|                        m_warnings.push_back(strprintf("height-based relative locktime: older(%u) > 65535 blocks is unsafe", raw));
 1706|  1.94k|                    }
 1707|  1.94k|                }
 1708|  1.94k|            }
 1709|  1.94k|        });
 1710|  1.94k|    }
descriptor.cpp:_ZZN12_GLOBAL__N_120MiniscriptDescriptorC1ENSt3__16vectorINS1_10unique_ptrINS_14PubkeyProviderENS1_14default_deleteIS4_EEEENS1_9allocatorIS7_EEEEON10miniscript4NodeIjEEENKUlRKSD_E_clESG_:
 1696|   669k|        miniscript::ForEachNode(m_node, [&](const miniscript::Node<uint32_t>& node) {
 1697|   669k|            if (node.Fragment() == miniscript::Fragment::OLDER) {
  ------------------
  |  Branch (1697:17): [True: 88, False: 668k]
  ------------------
 1698|     88|                const uint32_t raw = node.K();
 1699|     88|                const uint32_t value_part = raw & ~CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG;
 1700|     88|                if (value_part > CTxIn::SEQUENCE_LOCKTIME_MASK) {
  ------------------
  |  Branch (1700:21): [True: 77, False: 11]
  ------------------
 1701|     77|                    const bool is_time_based = (raw & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) != 0;
 1702|     77|                    if (is_time_based) {
  ------------------
  |  Branch (1702:25): [True: 73, False: 4]
  ------------------
 1703|     73|                        m_warnings.push_back(strprintf("time-based relative locktime: older(%u) > (65535 * 512) seconds is unsafe", raw));
  ------------------
  |  | 1172|     73|#define strprintf tfm::format
  ------------------
 1704|     73|                    } else {
 1705|      4|                        m_warnings.push_back(strprintf("height-based relative locktime: older(%u) > 65535 blocks is unsafe", raw));
  ------------------
  |  | 1172|      4|#define strprintf tfm::format
  ------------------
 1706|      4|                    }
 1707|     77|                }
 1708|     88|            }
 1709|   669k|        });
descriptor.cpp:_ZNK12_GLOBAL__N_120MiniscriptDescriptor11MakeScriptsERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEENS1_4spanIK7CScriptLm18446744073709551615EEER19FlatSigningProvider:
 1679|    669|    {
 1680|    669|        const auto script_ctx{m_node.GetMsCtx()};
 1681|  1.71k|        for (const auto& key : keys) {
  ------------------
  |  Branch (1681:30): [True: 1.71k, False: 669]
  ------------------
 1682|  1.71k|            if (miniscript::IsTapscript(script_ctx)) {
  ------------------
  |  Branch (1682:17): [True: 891, False: 826]
  ------------------
 1683|    891|                provider.pubkeys.emplace(Hash160(XOnlyPubKey{key}), key);
 1684|    891|            } else {
 1685|    826|                provider.pubkeys.emplace(key.GetID(), key);
 1686|    826|            }
 1687|  1.71k|        }
 1688|    669|        return Vector(m_node.ToScript(ScriptMaker(keys, script_ctx)));
 1689|    669|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker9ToPKBytesEj:
 1615|  1.56k|    std::vector<unsigned char> ToPKBytes(uint32_t key) const {
 1616|       |        // In Tapscript keys always serialize as x-only, whether an x-only key was used in the descriptor or not.
 1617|  1.56k|        if (!miniscript::IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1617:13): [True: 799, False: 770]
  ------------------
 1618|    799|            return {m_keys[key].begin(), m_keys[key].end()};
 1619|    799|        }
 1620|    770|        const XOnlyPubKey xonly_pubkey{m_keys[key]};
 1621|    770|        return {xonly_pubkey.begin(), xonly_pubkey.end()};
 1622|  1.56k|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker10ToPKHBytesEj:
 1624|    148|    std::vector<unsigned char> ToPKHBytes(uint32_t key) const {
 1625|    148|        auto id = GetHash160(key);
 1626|    148|        return {id.begin(), id.end()};
 1627|    148|    }
descriptor.cpp:_ZNK12_GLOBAL__N_111ScriptMaker10GetHash160Ej:
 1605|    148|    uint160 GetHash160(uint32_t key) const {
 1606|    148|        if (miniscript::IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1606:13): [True: 121, False: 27]
  ------------------
 1607|    121|            return Hash160(XOnlyPubKey{m_keys[key]});
 1608|    121|        }
 1609|     27|        return m_keys[key].GetID();
 1610|    148|    }
descriptor.cpp:_ZN12_GLOBAL__N_111ScriptMakerC2ERKNSt3__16vectorI7CPubKeyNS1_9allocatorIS3_EEEEN10miniscript17MiniscriptContextE:
 1613|    669|    ScriptMaker(const std::vector<CPubKey>& keys LIFETIMEBOUND, const miniscript::MiniscriptContext script_ctx) : m_keys(keys), m_script_ctx{script_ctx} {}

_ZN10DescriptorD2Ev:
  109|  7.96k|    virtual ~Descriptor() = default;

_Z18ComputeTapleafHashhNSt3__14spanIKhLm18446744073709551615EEE:
 1883|  1.90k|{
 1884|  1.90k|    return (HashWriter{HASHER_TAPLEAF} << leaf_version << CompactSizeWriter(script.size()) << script).GetSHA256();
 1885|  1.90k|}
_Z20ComputeTapbranchHashNSt3__14spanIKhLm18446744073709551615EEES2_:
 1888|    544|{
 1889|    544|    HashWriter ss_branch{HASHER_TAPBRANCH};
 1890|    544|    if (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())) {
  ------------------
  |  Branch (1890:9): [True: 229, False: 315]
  ------------------
 1891|    229|        ss_branch << a << b;
 1892|    315|    } else {
 1893|    315|        ss_branch << b << a;
 1894|    315|    }
 1895|    544|    return ss_branch.GetSHA256();
 1896|    544|}

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

_ZN10miniscript8internal12SanitizeTypeENS_4TypeE:
   19|  2.72M|Type SanitizeType(Type e) {
   20|  2.72M|    int num_types = (e << "K"_mst) + (e << "V"_mst) + (e << "B"_mst) + (e << "W"_mst);
   21|  2.72M|    if (num_types == 0) return ""_mst; // No valid type, don't care about the rest
  ------------------
  |  Branch (21:9): [True: 518k, False: 2.20M]
  ------------------
   22|  2.20M|    CHECK_NONFATAL(num_types == 1); // K, V, B, W all conflict with each other
  ------------------
  |  |  113|  2.20M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   23|  2.20M|    CHECK_NONFATAL(!(e << "z"_mst) || !(e << "o"_mst)); // z conflicts with o
  ------------------
  |  |  113|  3.55M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 858k, False: 1.34M]
  |  |  |  Branch (113:28): [True: 1.34M, False: 0]
  |  |  ------------------
  ------------------
   24|  2.20M|    CHECK_NONFATAL(!(e << "n"_mst) || !(e << "z"_mst)); // n conflicts with z
  ------------------
  |  |  113|  2.51M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 1.89M, False: 310k]
  |  |  |  Branch (113:28): [True: 310k, False: 0]
  |  |  ------------------
  ------------------
   25|  2.20M|    CHECK_NONFATAL(!(e << "n"_mst) || !(e << "W"_mst)); // n conflicts with W
  ------------------
  |  |  113|  2.51M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 1.89M, False: 310k]
  |  |  |  Branch (113:28): [True: 310k, False: 0]
  |  |  ------------------
  ------------------
   26|  2.20M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "d"_mst)); // V conflicts with d
  ------------------
  |  |  113|  2.23M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.18M, False: 26.4k]
  |  |  |  Branch (113:28): [True: 26.4k, False: 0]
  |  |  ------------------
  ------------------
   27|  2.20M|    CHECK_NONFATAL(!(e << "K"_mst) ||  (e << "u"_mst)); // K implies u
  ------------------
  |  |  113|  2.21M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.20M, False: 5.41k]
  |  |  |  Branch (113:28): [True: 5.41k, False: 0]
  |  |  ------------------
  ------------------
   28|  2.20M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "u"_mst)); // V conflicts with u
  ------------------
  |  |  113|  2.23M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.18M, False: 26.4k]
  |  |  |  Branch (113:28): [True: 26.4k, False: 0]
  |  |  ------------------
  ------------------
   29|  2.20M|    CHECK_NONFATAL(!(e << "e"_mst) || !(e << "f"_mst)); // e conflicts with f
  ------------------
  |  |  113|  3.45M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 959k, False: 1.24M]
  |  |  |  Branch (113:28): [True: 1.24M, False: 0]
  |  |  ------------------
  ------------------
   30|  2.20M|    CHECK_NONFATAL(!(e << "e"_mst) ||  (e << "d"_mst)); // e implies d
  ------------------
  |  |  113|  3.45M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 959k, False: 1.24M]
  |  |  |  Branch (113:28): [True: 1.24M, False: 0]
  |  |  ------------------
  ------------------
   31|  2.20M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "e"_mst)); // V conflicts with e
  ------------------
  |  |  113|  2.23M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.18M, False: 26.4k]
  |  |  |  Branch (113:28): [True: 26.4k, False: 0]
  |  |  ------------------
  ------------------
   32|  2.20M|    CHECK_NONFATAL(!(e << "d"_mst) || !(e << "f"_mst)); // d conflicts with f
  ------------------
  |  |  113|  4.12M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 287k, False: 1.92M]
  |  |  |  Branch (113:28): [True: 1.92M, False: 0]
  |  |  ------------------
  ------------------
   33|  2.20M|    CHECK_NONFATAL(!(e << "V"_mst) ||  (e << "f"_mst)); // V implies f
  ------------------
  |  |  113|  2.23M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.18M, False: 26.4k]
  |  |  |  Branch (113:28): [True: 26.4k, False: 0]
  |  |  ------------------
  ------------------
   34|  2.20M|    CHECK_NONFATAL(!(e << "K"_mst) ||  (e << "s"_mst)); // K implies s
  ------------------
  |  |  113|  2.21M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.20M, False: 5.41k]
  |  |  |  Branch (113:28): [True: 5.41k, False: 0]
  |  |  ------------------
  ------------------
   35|  2.20M|    CHECK_NONFATAL(!(e << "z"_mst) ||  (e << "m"_mst)); // z implies m
  ------------------
  |  |  113|  3.55M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 858k, False: 1.34M]
  |  |  |  Branch (113:28): [True: 1.34M, False: 0]
  |  |  ------------------
  ------------------
   36|  2.20M|    return e;
   37|  2.72M|}
_ZN10miniscript8internal11ComputeTypeENS_8FragmentENS_4TypeES2_S2_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEjmmmNS_17MiniscriptContextE:
   40|  2.72M|                 size_t data_size, size_t n_subs, size_t n_keys, MiniscriptContext ms_ctx) {
   41|       |    // Sanity check on data
   42|  2.72M|    if (fragment == Fragment::SHA256 || fragment == Fragment::HASH256) {
  ------------------
  |  Branch (42:9): [True: 45, False: 2.72M]
  |  Branch (42:41): [True: 2, False: 2.72M]
  ------------------
   43|     47|        CHECK_NONFATAL(data_size == 32);
  ------------------
  |  |  113|     47|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   44|  2.72M|    } else if (fragment == Fragment::RIPEMD160 || fragment == Fragment::HASH160) {
  ------------------
  |  Branch (44:16): [True: 151, False: 2.72M]
  |  Branch (44:51): [True: 277, False: 2.72M]
  ------------------
   45|    428|        CHECK_NONFATAL(data_size == 20);
  ------------------
  |  |  113|    428|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   46|  2.72M|    } else {
   47|  2.72M|        CHECK_NONFATAL(data_size == 0);
  ------------------
  |  |  113|  2.72M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   48|  2.72M|    }
   49|       |    // Sanity check on k
   50|  2.72M|    if (fragment == Fragment::OLDER || fragment == Fragment::AFTER) {
  ------------------
  |  Branch (50:9): [True: 4.71k, False: 2.72M]
  |  Branch (50:40): [True: 4.46k, False: 2.71M]
  ------------------
   51|  9.18k|        CHECK_NONFATAL(k >= 1 && k < 0x80000000UL);
  ------------------
  |  |  113|  18.3k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 9.18k, False: 0]
  |  |  |  Branch (113:28): [True: 9.18k, False: 0]
  |  |  ------------------
  ------------------
   52|  2.71M|    } else if (fragment == Fragment::MULTI || fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (52:16): [True: 2.33k, False: 2.71M]
  |  Branch (52:47): [True: 344, False: 2.71M]
  ------------------
   53|  2.67k|        CHECK_NONFATAL(k >= 1 && k <= n_keys);
  ------------------
  |  |  113|  5.35k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.67k, False: 0]
  |  |  |  Branch (113:28): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
   54|  2.71M|    } else if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (54:16): [True: 7.64k, False: 2.70M]
  ------------------
   55|  7.64k|        CHECK_NONFATAL(k >= 1 && k <= n_subs);
  ------------------
  |  |  113|  15.2k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 7.64k, False: 0]
  |  |  |  Branch (113:28): [True: 7.64k, False: 0]
  |  |  ------------------
  ------------------
   56|  2.70M|    } else {
   57|  2.70M|        CHECK_NONFATAL(k == 0);
  ------------------
  |  |  113|  2.70M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   58|  2.70M|    }
   59|       |    // Sanity check on subs
   60|  2.72M|    if (fragment == Fragment::AND_V || fragment == Fragment::AND_B || fragment == Fragment::OR_B ||
  ------------------
  |  Branch (60:9): [True: 153k, False: 2.57M]
  |  Branch (60:40): [True: 6.16k, False: 2.56M]
  |  Branch (60:71): [True: 6.48k, False: 2.56M]
  ------------------
   61|  2.56M|        fragment == Fragment::OR_C || fragment == Fragment::OR_I || fragment == Fragment::OR_D) {
  ------------------
  |  Branch (61:9): [True: 2.37k, False: 2.55M]
  |  Branch (61:39): [True: 670k, False: 1.88M]
  |  Branch (61:69): [True: 4.20k, False: 1.88M]
  ------------------
   62|   842k|        CHECK_NONFATAL(n_subs == 2);
  ------------------
  |  |  113|   842k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   63|  1.88M|    } else if (fragment == Fragment::ANDOR) {
  ------------------
  |  Branch (63:16): [True: 5.99k, False: 1.87M]
  ------------------
   64|  5.99k|        CHECK_NONFATAL(n_subs == 3);
  ------------------
  |  |  113|  5.99k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   65|  1.87M|    } else if (fragment == Fragment::WRAP_A || fragment == Fragment::WRAP_S || fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (65:16): [True: 32.6k, False: 1.84M]
  |  Branch (65:48): [True: 8.24k, False: 1.83M]
  |  Branch (65:80): [True: 47.5k, False: 1.78M]
  ------------------
   66|  1.78M|               fragment == Fragment::WRAP_D || fragment == Fragment::WRAP_V || fragment == Fragment::WRAP_J ||
  ------------------
  |  Branch (66:16): [True: 13.0k, False: 1.77M]
  |  Branch (66:48): [True: 28.0k, False: 1.74M]
  |  Branch (66:80): [True: 266k, False: 1.48M]
  ------------------
   67|  1.48M|               fragment == Fragment::WRAP_N) {
  ------------------
  |  Branch (67:16): [True: 493k, False: 988k]
  ------------------
   68|   889k|        CHECK_NONFATAL(n_subs == 1);
  ------------------
  |  |  113|   889k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   69|   988k|    } else if (fragment != Fragment::THRESH) {
  ------------------
  |  Branch (69:16): [True: 980k, False: 7.64k]
  ------------------
   70|   980k|        CHECK_NONFATAL(n_subs == 0);
  ------------------
  |  |  113|   980k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   71|   980k|    }
   72|       |    // Sanity check on keys
   73|  2.72M|    if (fragment == Fragment::PK_K || fragment == Fragment::PK_H) {
  ------------------
  |  Branch (73:9): [True: 3.67k, False: 2.72M]
  |  Branch (73:39): [True: 1.74k, False: 2.72M]
  ------------------
   74|  5.41k|        CHECK_NONFATAL(n_keys == 1);
  ------------------
  |  |  113|  5.41k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   75|  2.72M|    } else if (fragment == Fragment::MULTI) {
  ------------------
  |  Branch (75:16): [True: 2.33k, False: 2.71M]
  ------------------
   76|  2.33k|        CHECK_NONFATAL(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTISIG);
  ------------------
  |  |  113|  4.66k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.33k, False: 0]
  |  |  |  Branch (113:28): [True: 2.33k, False: 0]
  |  |  ------------------
  ------------------
   77|  2.33k|        CHECK_NONFATAL(!IsTapscript(ms_ctx));
  ------------------
  |  |  113|  2.33k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   78|  2.71M|    } else if (fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (78:16): [True: 344, False: 2.71M]
  ------------------
   79|    344|        CHECK_NONFATAL(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTI_A);
  ------------------
  |  |  113|    688|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 344, False: 0]
  |  |  |  Branch (113:28): [True: 344, False: 0]
  |  |  ------------------
  ------------------
   80|    344|        CHECK_NONFATAL(IsTapscript(ms_ctx));
  ------------------
  |  |  113|    344|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   81|  2.71M|    } else {
   82|  2.71M|        CHECK_NONFATAL(n_keys == 0);
  ------------------
  |  |  113|  2.71M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   83|  2.71M|    }
   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|  2.72M|    switch (fragment) {
  ------------------
  |  Branch (88:13): [True: 2.72M, False: 0]
  ------------------
   89|  3.67k|        case Fragment::PK_K: return "Konudemsxk"_mst;
  ------------------
  |  Branch (89:9): [True: 3.67k, False: 2.72M]
  ------------------
   90|  1.74k|        case Fragment::PK_H: return "Knudemsxk"_mst;
  ------------------
  |  Branch (90:9): [True: 1.74k, False: 2.72M]
  ------------------
   91|  4.71k|        case Fragment::OLDER: return
  ------------------
  |  Branch (91:9): [True: 4.71k, False: 2.72M]
  ------------------
   92|  4.71k|            "g"_mst.If(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) |
   93|  4.71k|            "h"_mst.If(!(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)) |
   94|  4.71k|            "Bzfmxk"_mst;
   95|  4.46k|        case Fragment::AFTER: return
  ------------------
  |  Branch (95:9): [True: 4.46k, False: 2.72M]
  ------------------
   96|  4.46k|            "i"_mst.If(k >= LOCKTIME_THRESHOLD) |
   97|  4.46k|            "j"_mst.If(k < LOCKTIME_THRESHOLD) |
   98|  4.46k|            "Bzfmxk"_mst;
   99|     45|        case Fragment::SHA256: return "Bonudmk"_mst;
  ------------------
  |  Branch (99:9): [True: 45, False: 2.72M]
  ------------------
  100|    151|        case Fragment::RIPEMD160: return "Bonudmk"_mst;
  ------------------
  |  Branch (100:9): [True: 151, False: 2.72M]
  ------------------
  101|      2|        case Fragment::HASH256: return "Bonudmk"_mst;
  ------------------
  |  Branch (101:9): [True: 2, False: 2.72M]
  ------------------
  102|    277|        case Fragment::HASH160: return "Bonudmk"_mst;
  ------------------
  |  Branch (102:9): [True: 277, False: 2.72M]
  ------------------
  103|   209k|        case Fragment::JUST_1: return "Bzufmxk"_mst;
  ------------------
  |  Branch (103:9): [True: 209k, False: 2.51M]
  ------------------
  104|   753k|        case Fragment::JUST_0: return "Bzudemsxk"_mst;
  ------------------
  |  Branch (104:9): [True: 753k, False: 1.97M]
  ------------------
  105|  32.6k|        case Fragment::WRAP_A: return
  ------------------
  |  Branch (105:9): [True: 32.6k, False: 2.69M]
  ------------------
  106|  32.6k|            "W"_mst.If(x << "B"_mst) | // W=B_x
  107|  32.6k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  108|  32.6k|            (x & "udfems"_mst) | // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  109|  32.6k|            "x"_mst; // x
  110|  8.24k|        case Fragment::WRAP_S: return
  ------------------
  |  Branch (110:9): [True: 8.24k, False: 2.71M]
  ------------------
  111|  8.24k|            "W"_mst.If(x << "Bo"_mst) | // W=B_x*o_x
  112|  8.24k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  113|  8.24k|            (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|  47.5k|        case Fragment::WRAP_C: return
  ------------------
  |  Branch (114:9): [True: 47.5k, False: 2.67M]
  ------------------
  115|  47.5k|            "B"_mst.If(x << "K"_mst) | // B=K_x
  116|  47.5k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  117|  47.5k|            (x & "ondfem"_mst) | // o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x
  118|  47.5k|            "us"_mst; // u, s
  119|  13.0k|        case Fragment::WRAP_D: return
  ------------------
  |  Branch (119:9): [True: 13.0k, False: 2.71M]
  ------------------
  120|  13.0k|            "B"_mst.If(x << "Vz"_mst) | // B=V_x*z_x
  121|  13.0k|            "o"_mst.If(x << "z"_mst) | // o=z_x
  122|  13.0k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  123|  13.0k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  124|  13.0k|            (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|  13.0k|            "u"_mst.If(IsTapscript(ms_ctx)) |
  127|  13.0k|            "ndx"_mst; // n, d, x
  128|  28.0k|        case Fragment::WRAP_V: return
  ------------------
  |  Branch (128:9): [True: 28.0k, False: 2.69M]
  ------------------
  129|  28.0k|            "V"_mst.If(x << "B"_mst) | // V=B_x
  130|  28.0k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  131|  28.0k|            (x & "zonms"_mst) | // z=z_x, o=o_x, n=n_x, m=m_x, s=s_x
  132|  28.0k|            "fx"_mst; // f, x
  133|   266k|        case Fragment::WRAP_J: return
  ------------------
  |  Branch (133:9): [True: 266k, False: 2.46M]
  ------------------
  134|   266k|            "B"_mst.If(x << "Bn"_mst) | // B=B_x*n_x
  135|   266k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  136|   266k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  137|   266k|            (x & "oums"_mst) | // o=o_x, u=u_x, m=m_x, s=s_x
  138|   266k|            "ndx"_mst; // n, d, x
  139|   493k|        case Fragment::WRAP_N: return
  ------------------
  |  Branch (139:9): [True: 493k, False: 2.23M]
  ------------------
  140|   493k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  141|   493k|            (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|   493k|            "ux"_mst; // u, x
  143|   153k|        case Fragment::AND_V: return
  ------------------
  |  Branch (143:9): [True: 153k, False: 2.57M]
  ------------------
  144|   153k|            (y & "KVB"_mst).If(x << "V"_mst) | // B=V_x*B_y, V=V_x*V_y, K=V_x*K_y
  145|   153k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  146|   153k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  147|   153k|            (x & y & "mz"_mst) | // m=m_x*m_y, z=z_x*z_y
  148|   153k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  149|   153k|            "f"_mst.If((y << "f"_mst) || (x << "s"_mst)) | // f=f_y+s_x
  ------------------
  |  Branch (149:24): [True: 152k, False: 551]
  |  Branch (149:42): [True: 45, False: 506]
  ------------------
  150|   153k|            (y & "ux"_mst) | // u=u_y, x=x_y
  151|   153k|            ((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|   153k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (152:24): [True: 22.4k, False: 130k]
  ------------------
  153|  22.4k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (153:20): [True: 589, False: 21.9k]
  |  Branch (153:38): [True: 66, False: 523]
  ------------------
  154|  22.4k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (154:18): [True: 629, False: 21.7k]
  |  Branch (154:36): [True: 66, False: 563]
  ------------------
  155|  22.3k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (155:18): [True: 362, False: 21.9k]
  |  Branch (155:36): [True: 69, False: 293]
  ------------------
  156|  22.2k|                ((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: 293, False: 21.9k]
  |  Branch (156:36): [True: 31, False: 262]
  ------------------
  157|  6.16k|        case Fragment::AND_B: return
  ------------------
  |  Branch (157:9): [True: 6.16k, False: 2.72M]
  ------------------
  158|  6.16k|            (x & "B"_mst).If(y << "W"_mst) | // B=B_x*W_y
  159|  6.16k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  160|  6.16k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  161|  6.16k|            (x & y & "e"_mst).If((x & y) << "s"_mst) | // e=e_x*e_y*s_x*s_y
  162|  6.16k|            (x & y & "dzm"_mst) | // d=d_x*d_y, z=z_x*z_y, m=m_x*m_y
  163|  6.16k|            "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.42k, False: 4.73k]
  |  Branch (163:48): [True: 199, False: 4.53k]
  |  Branch (163:67): [True: 5, False: 4.53k]
  ------------------
  164|  6.16k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  165|  6.16k|            "ux"_mst | // u, x
  166|  6.16k|            ((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.16k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (167:24): [True: 3.68k, False: 2.48k]
  ------------------
  168|  3.68k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (168:20): [True: 149, False: 3.53k]
  |  Branch (168:38): [True: 77, False: 72]
  ------------------
  169|  3.60k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (169:18): [True: 477, False: 3.13k]
  |  Branch (169:36): [True: 196, False: 281]
  ------------------
  170|  3.41k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (170:18): [True: 198, False: 3.21k]
  |  Branch (170:36): [True: 127, False: 71]
  ------------------
  171|  3.28k|                ((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: 245, False: 3.03k]
  |  Branch (171:36): [True: 157, False: 88]
  ------------------
  172|  6.48k|        case Fragment::OR_B: return
  ------------------
  |  Branch (172:9): [True: 6.48k, False: 2.72M]
  ------------------
  173|  6.48k|            "B"_mst.If(x << "Bd"_mst && y << "Wd"_mst) | // B=B_x*d_x*W_x*d_y
  ------------------
  |  Branch (173:24): [True: 4.38k, False: 2.10k]
  |  Branch (173:41): [True: 2.18k, False: 2.19k]
  ------------------
  174|  6.48k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  175|  6.48k|            (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: 4.41k, False: 2.07k]
  |  Branch (175:56): [True: 2.46k, False: 1.94k]
  ------------------
  176|  6.48k|            (x & y & "zse"_mst) | // z=z_x*z_y, s=s_x*s_y, e=e_x*e_y
  177|  6.48k|            "dux"_mst | // d, u, x
  178|  6.48k|            ((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|  6.48k|            (x & y & "k"_mst); // k=k_x*k_y
  180|  4.20k|        case Fragment::OR_D: return
  ------------------
  |  Branch (180:9): [True: 4.20k, False: 2.72M]
  ------------------
  181|  4.20k|            (y & "B"_mst).If(x << "Bdu"_mst) | // B=B_y*B_x*d_x*u_x
  182|  4.20k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  183|  4.20k|            (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: 1.52k, False: 2.67k]
  |  Branch (183:50): [True: 1.22k, False: 298]
  ------------------
  184|  4.20k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  185|  4.20k|            (y & "ufde"_mst) | // u=u_y, f=f_y, d=d_y, e=e_y
  186|  4.20k|            "x"_mst | // x
  187|  4.20k|            ((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|  4.20k|            (x & y & "k"_mst); // k=k_x*k_y
  189|  2.37k|        case Fragment::OR_C: return
  ------------------
  |  Branch (189:9): [True: 2.37k, False: 2.72M]
  ------------------
  190|  2.37k|            (y & "V"_mst).If(x << "Bdu"_mst) | // V=V_y*B_x*u_x*d_x
  191|  2.37k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  192|  2.37k|            (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: 1.12k, False: 1.25k]
  |  Branch (192:50): [True: 885, False: 238]
  ------------------
  193|  2.37k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  194|  2.37k|            "fx"_mst | // f, x
  195|  2.37k|            ((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|  2.37k|            (x & y & "k"_mst); // k=k_x*k_y
  197|   670k|        case Fragment::OR_I: return
  ------------------
  |  Branch (197:9): [True: 670k, False: 2.05M]
  ------------------
  198|   670k|            (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|   670k|            "o"_mst.If((x & y) << "z"_mst) | // o=z_x*z_y
  200|   670k|            ((x | y) & "e"_mst).If((x | y) << "f"_mst) | // e=e_x*f_y+f_x*e_y
  201|   670k|            (x & y & "m"_mst).If((x | y) << "s"_mst) | // m=m_x*m_y*(s_x+s_y)
  202|   670k|            ((x | y) & "d"_mst) | // d=d_x+d_y
  203|   670k|            "x"_mst | // x
  204|   670k|            ((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|   670k|            (x & y & "k"_mst); // k=k_x*k_y
  206|  5.99k|        case Fragment::ANDOR: return
  ------------------
  |  Branch (206:9): [True: 5.99k, False: 2.72M]
  ------------------
  207|  5.99k|            (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|  5.99k|            (x & y & z & "z"_mst) | // z=z_x*z_y*z_z
  209|  5.99k|            ((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|  5.99k|            (y & z & "u"_mst) | // u=u_y*u_z
  211|  5.99k|            (z & "f"_mst).If((x << "s"_mst) || (y << "f"_mst)) | // f=(s_x+f_y)*f_z
  ------------------
  |  Branch (211:30): [True: 3.01k, False: 2.98k]
  |  Branch (211:48): [True: 1.29k, False: 1.68k]
  ------------------
  212|  5.99k|            (z & "d"_mst) | // d=d_z
  213|  5.99k|            (z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_z*(s_x+f_y)
  ------------------
  |  Branch (213:30): [True: 3.01k, False: 2.98k]
  |  Branch (213:46): [True: 1.29k, False: 1.68k]
  ------------------
  214|  5.99k|            (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: 3.57k, False: 2.41k]
  |  Branch (214:54): [True: 3.03k, False: 543]
  ------------------
  215|  5.99k|            (z & (x | y) & "s"_mst) | // s=s_z*(s_x+s_y)
  216|  5.99k|            "x"_mst | // x
  217|  5.99k|            ((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|  5.99k|            "k"_mst.If(((x & y & z) << "k"_mst) &&
  ------------------
  |  Branch (218:24): [True: 4.65k, False: 1.34k]
  ------------------
  219|  4.65k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (219:20): [True: 97, False: 4.55k]
  |  Branch (219:38): [True: 18, False: 79]
  ------------------
  220|  4.63k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (220:18): [True: 150, False: 4.48k]
  |  Branch (220:36): [True: 66, False: 84]
  ------------------
  221|  4.57k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (221:18): [True: 172, False: 4.39k]
  |  Branch (221:36): [True: 83, False: 89]
  ------------------
  222|  4.48k|                ((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: 251, False: 4.23k]
  |  Branch (222:36): [True: 138, False: 113]
  ------------------
  223|  2.33k|        case Fragment::MULTI: {
  ------------------
  |  Branch (223:9): [True: 2.33k, False: 2.72M]
  ------------------
  224|  2.33k|            return "Bnudemsk"_mst;
  225|      0|        }
  226|    344|        case Fragment::MULTI_A: {
  ------------------
  |  Branch (226:9): [True: 344, False: 2.72M]
  ------------------
  227|    344|            return "Budemsk"_mst;
  228|      0|        }
  229|  7.64k|        case Fragment::THRESH: {
  ------------------
  |  Branch (229:9): [True: 7.64k, False: 2.71M]
  ------------------
  230|  7.64k|            bool all_e = true;
  231|  7.64k|            bool all_m = true;
  232|  7.64k|            uint32_t args = 0;
  233|  7.64k|            uint32_t num_s = 0;
  234|  7.64k|            Type acc_tl = "k"_mst;
  235|  36.8k|            for (size_t i = 0; i < sub_types.size(); ++i) {
  ------------------
  |  Branch (235:32): [True: 32.1k, False: 4.74k]
  ------------------
  236|  32.1k|                Type t = sub_types[i];
  237|  32.1k|                if (!(t << (i ? "Wdu"_mst : "Bdu"_mst))) return ""_mst; // Require Bdu, Wdu, Wdu, ...
  ------------------
  |  Branch (237:21): [True: 2.90k, False: 29.2k]
  |  Branch (237:29): [True: 24.5k, False: 7.64k]
  ------------------
  238|  29.2k|                if (!(t << "e"_mst)) all_e = false;
  ------------------
  |  Branch (238:21): [True: 2.68k, False: 26.5k]
  ------------------
  239|  29.2k|                if (!(t << "m"_mst)) all_m = false;
  ------------------
  |  Branch (239:21): [True: 668, False: 28.5k]
  ------------------
  240|  29.2k|                if (t << "s"_mst) num_s += 1;
  ------------------
  |  Branch (240:21): [True: 26.3k, False: 2.89k]
  ------------------
  241|  29.2k|                args += (t << "z"_mst) ? 0 : (t << "o"_mst) ? 1 : 2;
  ------------------
  |  Branch (241:25): [True: 3.28k, False: 25.9k]
  |  Branch (241:46): [True: 1.34k, False: 24.6k]
  ------------------
  242|  29.2k|                acc_tl = ((acc_tl | t) & "ghij"_mst) |
  243|       |                    // Thresh contains a combination of timelocks if it has threshold > 1 and
  244|       |                    // it contains two different children that have different types of timelocks
  245|       |                    // Note how if any of the children don't have "k", the parent also does not have "k"
  246|  29.2k|                    "k"_mst.If(((acc_tl & t) << "k"_mst) && ((k <= 1) ||
  ------------------
  |  Branch (246:32): [True: 28.9k, False: 338]
  |  Branch (246:62): [True: 21.7k, False: 7.11k]
  ------------------
  247|  7.11k|                        ((k > 1) && !(((acc_tl << "g"_mst) && (t << "h"_mst)) ||
  ------------------
  |  Branch (247:26): [True: 7.11k, False: 0]
  |  Branch (247:40): [True: 429, False: 6.68k]
  |  Branch (247:63): [True: 75, False: 354]
  ------------------
  248|  7.03k|                        ((acc_tl << "h"_mst) && (t << "g"_mst)) ||
  ------------------
  |  Branch (248:26): [True: 488, False: 6.54k]
  |  Branch (248:49): [True: 118, False: 370]
  ------------------
  249|  6.91k|                        ((acc_tl << "i"_mst) && (t << "j"_mst)) ||
  ------------------
  |  Branch (249:26): [True: 269, False: 6.64k]
  |  Branch (249:49): [True: 67, False: 202]
  ------------------
  250|  6.85k|                        ((acc_tl << "j"_mst) && (t << "i"_mst))))));
  ------------------
  |  Branch (250:26): [True: 205, False: 6.64k]
  |  Branch (250:49): [True: 2, False: 203]
  ------------------
  251|  29.2k|            }
  252|  4.74k|            return "Bdu"_mst |
  253|  4.74k|                   "z"_mst.If(args == 0) | // z=all z
  254|  4.74k|                   "o"_mst.If(args == 1) | // o=all z except one o
  255|  4.74k|                   "e"_mst.If(all_e && num_s == n_subs) | // e=all e and all s
  ------------------
  |  Branch (255:31): [True: 3.18k, False: 1.56k]
  |  Branch (255:40): [True: 2.67k, False: 512]
  ------------------
  256|  4.74k|                   "m"_mst.If(all_e && all_m && num_s >= n_subs - k) | // m=all e, >=(n-k) s
  ------------------
  |  Branch (256:31): [True: 3.18k, False: 1.56k]
  |  Branch (256:40): [True: 3.14k, False: 38]
  |  Branch (256:49): [True: 3.12k, False: 16]
  ------------------
  257|  4.74k|                   "s"_mst.If(num_s >= n_subs - k + 1) |  // s= >=(n-k+1) s
  258|  4.74k|                   acc_tl; // timelock info
  259|  7.64k|            }
  260|  2.72M|    }
  261|  2.72M|    assert(false);
  ------------------
  |  Branch (261:5): [Folded, False: 0]
  ------------------
  262|      0|}
_ZN10miniscript8internal16ComputeScriptLenENS_8FragmentENS_4TypeEmjmmNS_17MiniscriptContextE:
  265|  2.72M|                        size_t n_keys, MiniscriptContext ms_ctx) {
  266|  2.72M|    switch (fragment) {
  ------------------
  |  Branch (266:13): [True: 2.72M, False: 0]
  ------------------
  267|   209k|        case Fragment::JUST_1:
  ------------------
  |  Branch (267:9): [True: 209k, False: 2.51M]
  ------------------
  268|   962k|        case Fragment::JUST_0: return 1;
  ------------------
  |  Branch (268:9): [True: 753k, False: 1.97M]
  ------------------
  269|  3.67k|        case Fragment::PK_K: return IsTapscript(ms_ctx) ? 33 : 34;
  ------------------
  |  Branch (269:9): [True: 3.67k, False: 2.72M]
  |  Branch (269:37): [True: 3.21k, False: 457]
  ------------------
  270|  1.74k|        case Fragment::PK_H: return 3 + 21;
  ------------------
  |  Branch (270:9): [True: 1.74k, False: 2.72M]
  ------------------
  271|  4.71k|        case Fragment::OLDER:
  ------------------
  |  Branch (271:9): [True: 4.71k, False: 2.72M]
  ------------------
  272|  9.18k|        case Fragment::AFTER: return 1 + BuildScript(k).size();
  ------------------
  |  Branch (272:9): [True: 4.46k, False: 2.72M]
  ------------------
  273|      2|        case Fragment::HASH256:
  ------------------
  |  Branch (273:9): [True: 2, False: 2.72M]
  ------------------
  274|     47|        case Fragment::SHA256: return 4 + 2 + 33;
  ------------------
  |  Branch (274:9): [True: 45, False: 2.72M]
  ------------------
  275|    277|        case Fragment::HASH160:
  ------------------
  |  Branch (275:9): [True: 277, False: 2.72M]
  ------------------
  276|    428|        case Fragment::RIPEMD160: return 4 + 2 + 21;
  ------------------
  |  Branch (276:9): [True: 151, False: 2.72M]
  ------------------
  277|  2.33k|        case Fragment::MULTI: return 1 + BuildScript(n_keys).size() + BuildScript(k).size() + 34 * n_keys;
  ------------------
  |  Branch (277:9): [True: 2.33k, False: 2.72M]
  ------------------
  278|    344|        case Fragment::MULTI_A: return (1 + 32 + 1) * n_keys + BuildScript(k).size() + 1;
  ------------------
  |  Branch (278:9): [True: 344, False: 2.72M]
  ------------------
  279|   153k|        case Fragment::AND_V: return subsize;
  ------------------
  |  Branch (279:9): [True: 153k, False: 2.57M]
  ------------------
  280|  28.0k|        case Fragment::WRAP_V: return subsize + (sub0typ << "x"_mst);
  ------------------
  |  Branch (280:9): [True: 28.0k, False: 2.69M]
  ------------------
  281|  8.24k|        case Fragment::WRAP_S:
  ------------------
  |  Branch (281:9): [True: 8.24k, False: 2.71M]
  ------------------
  282|  55.7k|        case Fragment::WRAP_C:
  ------------------
  |  Branch (282:9): [True: 47.5k, False: 2.67M]
  ------------------
  283|   549k|        case Fragment::WRAP_N:
  ------------------
  |  Branch (283:9): [True: 493k, False: 2.23M]
  ------------------
  284|   555k|        case Fragment::AND_B:
  ------------------
  |  Branch (284:9): [True: 6.16k, False: 2.72M]
  ------------------
  285|   561k|        case Fragment::OR_B: return subsize + 1;
  ------------------
  |  Branch (285:9): [True: 6.48k, False: 2.72M]
  ------------------
  286|  32.6k|        case Fragment::WRAP_A:
  ------------------
  |  Branch (286:9): [True: 32.6k, False: 2.69M]
  ------------------
  287|  35.0k|        case Fragment::OR_C: return subsize + 2;
  ------------------
  |  Branch (287:9): [True: 2.37k, False: 2.72M]
  ------------------
  288|  13.0k|        case Fragment::WRAP_D:
  ------------------
  |  Branch (288:9): [True: 13.0k, False: 2.71M]
  ------------------
  289|  17.2k|        case Fragment::OR_D:
  ------------------
  |  Branch (289:9): [True: 4.20k, False: 2.72M]
  ------------------
  290|   687k|        case Fragment::OR_I:
  ------------------
  |  Branch (290:9): [True: 670k, False: 2.05M]
  ------------------
  291|   693k|        case Fragment::ANDOR: return subsize + 3;
  ------------------
  |  Branch (291:9): [True: 5.99k, False: 2.72M]
  ------------------
  292|   266k|        case Fragment::WRAP_J: return subsize + 4;
  ------------------
  |  Branch (292:9): [True: 266k, False: 2.46M]
  ------------------
  293|  7.64k|        case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
  ------------------
  |  Branch (293:9): [True: 7.64k, False: 2.71M]
  ------------------
  294|  2.72M|    }
  295|  2.72M|    assert(false);
  ------------------
  |  Branch (295:5): [Folded, False: 0]
  ------------------
  296|      0|}
_ZN10miniscript8internal12FindNextCharENSt3__14spanIKcLm18446744073709551615EEEc:
  422|  20.6k|{
  423|   854k|    for (int i = 0; i < (int)sp.size(); ++i) {
  ------------------
  |  Branch (423:21): [True: 854k, False: 260]
  ------------------
  424|   854k|        if (sp[i] == m) return i;
  ------------------
  |  Branch (424:13): [True: 17.8k, False: 836k]
  ------------------
  425|       |        // We only search within the current parentheses
  426|   836k|        if (sp[i] == ')') break;
  ------------------
  |  Branch (426:13): [True: 2.55k, False: 833k]
  ------------------
  427|   836k|    }
  428|  2.81k|    return -1;
  429|  20.6k|}

descriptor.cpp:_ZN10miniscript10FromStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS_4NodeINT_3KeyEEEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKS6_:
 2686|  6.75k|{
 2687|  6.75k|    return internal::Parse<typename Ctx::Key>(str, ctx);
 2688|  6.75k|}
descriptor.cpp:_ZN10miniscript8internal5ParseIjN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS_4NodeIT_EEEENS4_4spanIKcLm18446744073709551615EEERKT0_:
 1855|  6.75k|{
 1856|  6.75k|    using namespace script;
 1857|       |
 1858|       |    // Account for the minimum script size for all parsed fragments so far. It "borrows" 1
 1859|       |    // script byte from all leaf nodes, counting it instead whenever a space for a recursive
 1860|       |    // expression is added (through andor, and_*, or_*, thresh). This guarantees that all fragments
 1861|       |    // increment the script_size by at least one, except for:
 1862|       |    // - "0", "1": these leafs are only a single byte, so their subtracted-from increment is 0.
 1863|       |    //   This is not an issue however, as "space" for them has to be created by combinators,
 1864|       |    //   which do increment script_size.
 1865|       |    // - "v:": the v wrapper adds nothing as in some cases it results in no opcode being added
 1866|       |    //   (instead transforming another opcode into its VERIFY form). However, the v: wrapper has
 1867|       |    //   to be interleaved with other fragments to be valid, so this is not a concern.
 1868|  6.75k|    size_t script_size{1};
 1869|  6.75k|    size_t max_size{internal::MaxScriptSize(ctx.MsContext())};
 1870|       |
 1871|       |    // The two integers are used to hold state for thresh()
 1872|  6.75k|    std::vector<std::tuple<ParseContext, int64_t, int64_t>> to_parse;
 1873|  6.75k|    std::vector<Node<Key>> constructed;
 1874|       |
 1875|  6.75k|    to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 1876|       |
 1877|       |    // Parses a multi() or multi_a() from its string representation. Returns false on parsing error.
 1878|  6.75k|    const auto parse_multi_exp = [&](std::span<const char>& in, const bool is_multi_a) -> bool {
 1879|  6.75k|        const auto max_keys{is_multi_a ? MAX_PUBKEYS_PER_MULTI_A : MAX_PUBKEYS_PER_MULTISIG};
 1880|  6.75k|        const auto required_ctx{is_multi_a ? MiniscriptContext::TAPSCRIPT : MiniscriptContext::P2WSH};
 1881|  6.75k|        if (ctx.MsContext() != required_ctx) return false;
 1882|       |        // Get threshold
 1883|  6.75k|        int next_comma = FindNextChar(in, ',');
 1884|  6.75k|        if (next_comma < 1) return false;
 1885|  6.75k|        const auto k_to_integral{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 1886|  6.75k|        if (!k_to_integral.has_value()) return false;
 1887|  6.75k|        const int64_t k{k_to_integral.value()};
 1888|  6.75k|        in = in.subspan(next_comma + 1);
 1889|       |        // Get keys. It is compatible for both compressed and x-only keys.
 1890|  6.75k|        std::vector<Key> keys;
 1891|  6.75k|        while (next_comma != -1) {
 1892|  6.75k|            next_comma = FindNextChar(in, ',');
 1893|  6.75k|            int key_length = (next_comma == -1) ? FindNextChar(in, ')') : next_comma;
 1894|  6.75k|            if (key_length < 1) return false;
 1895|  6.75k|            std::span<const char> sp{in.begin(), in.begin() + key_length};
 1896|  6.75k|            auto key = ctx.FromString(sp);
 1897|  6.75k|            if (!key) return false;
 1898|  6.75k|            keys.push_back(std::move(*key));
 1899|  6.75k|            in = in.subspan(key_length + 1);
 1900|  6.75k|        }
 1901|  6.75k|        if (keys.size() < 1 || keys.size() > max_keys) return false;
 1902|  6.75k|        if (k < 1 || k > (int64_t)keys.size()) return false;
 1903|  6.75k|        if (is_multi_a) {
 1904|       |            // (push + xonly-key + CHECKSIG[ADD]) * n + k + OP_NUMEQUAL(VERIFY), minus one.
 1905|  6.75k|            script_size += (1 + 32 + 1) * keys.size() + BuildScript(k).size();
 1906|  6.75k|            constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), k);
 1907|  6.75k|        } else {
 1908|  6.75k|            script_size += 2 + (keys.size() > 16) + (k > 16) + 34 * keys.size();
 1909|  6.75k|            constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), k);
 1910|  6.75k|        }
 1911|  6.75k|        return true;
 1912|  6.75k|    };
 1913|       |
 1914|  1.70M|    while (!to_parse.empty()) {
  ------------------
  |  Branch (1914:12): [True: 1.70M, False: 4.46k]
  ------------------
 1915|  1.70M|        if (script_size > max_size) return {};
  ------------------
  |  Branch (1915:13): [True: 2, False: 1.70M]
  ------------------
 1916|       |
 1917|       |        // Get the current context we are decoding within
 1918|  1.70M|        auto [cur_context, n, k] = to_parse.back();
 1919|  1.70M|        to_parse.pop_back();
 1920|       |
 1921|  1.70M|        switch (cur_context) {
  ------------------
  |  Branch (1921:17): [True: 1.70M, False: 0]
  ------------------
 1922|   164k|        case ParseContext::WRAPPED_EXPR: {
  ------------------
  |  Branch (1922:9): [True: 164k, False: 1.53M]
  ------------------
 1923|   164k|            std::optional<size_t> colon_index{};
 1924|  1.46M|            for (size_t i = 1; i < in.size(); ++i) {
  ------------------
  |  Branch (1924:32): [True: 1.46M, False: 352]
  ------------------
 1925|  1.46M|                if (in[i] == ':') {
  ------------------
  |  Branch (1925:21): [True: 49.1k, False: 1.41M]
  ------------------
 1926|  49.1k|                    colon_index = i;
 1927|  49.1k|                    break;
 1928|  49.1k|                }
 1929|  1.41M|                if (in[i] < 'a' || in[i] > 'z') break;
  ------------------
  |  Branch (1929:21): [True: 115k, False: 1.30M]
  |  Branch (1929:36): [True: 11, False: 1.30M]
  ------------------
 1930|  1.41M|            }
 1931|       |            // If there is no colon, this loop won't execute
 1932|   164k|            bool last_was_v{false};
 1933|  1.40M|            for (size_t j = 0; colon_index && j < *colon_index; ++j) {
  ------------------
  |  Branch (1933:32): [True: 1.28M, False: 115k]
  |  Branch (1933:47): [True: 1.23M, False: 49.1k]
  ------------------
 1934|  1.23M|                if (script_size > max_size) return {};
  ------------------
  |  Branch (1934:21): [True: 1, False: 1.23M]
  ------------------
 1935|  1.23M|                if (in[j] == 'a') {
  ------------------
  |  Branch (1935:21): [True: 26.5k, False: 1.21M]
  ------------------
 1936|  26.5k|                    script_size += 2;
 1937|  26.5k|                    to_parse.emplace_back(ParseContext::ALT, -1, -1);
 1938|  1.21M|                } else if (in[j] == 's') {
  ------------------
  |  Branch (1938:28): [True: 7.04k, False: 1.20M]
  ------------------
 1939|  7.04k|                    script_size += 1;
 1940|  7.04k|                    to_parse.emplace_back(ParseContext::SWAP, -1, -1);
 1941|  1.20M|                } else if (in[j] == 'c') {
  ------------------
  |  Branch (1941:28): [True: 43.4k, False: 1.16M]
  ------------------
 1942|  43.4k|                    script_size += 1;
 1943|  43.4k|                    to_parse.emplace_back(ParseContext::CHECK, -1, -1);
 1944|  1.16M|                } else if (in[j] == 'd') {
  ------------------
  |  Branch (1944:28): [True: 12.5k, False: 1.14M]
  ------------------
 1945|  12.5k|                    script_size += 3;
 1946|  12.5k|                    to_parse.emplace_back(ParseContext::DUP_IF, -1, -1);
 1947|  1.14M|                } else if (in[j] == 'j') {
  ------------------
  |  Branch (1947:28): [True: 138k, False: 1.01M]
  ------------------
 1948|   138k|                    script_size += 4;
 1949|   138k|                    to_parse.emplace_back(ParseContext::NON_ZERO, -1, -1);
 1950|  1.01M|                } else if (in[j] == 'n') {
  ------------------
  |  Branch (1950:28): [True: 283k, False: 728k]
  ------------------
 1951|   283k|                    script_size += 1;
 1952|   283k|                    to_parse.emplace_back(ParseContext::ZERO_NOTEQUAL, -1, -1);
 1953|   728k|                } else if (in[j] == 'v') {
  ------------------
  |  Branch (1953:28): [True: 20.7k, False: 707k]
  ------------------
 1954|       |                    // do not permit "...vv...:"; it's not valid, and also doesn't trigger early
 1955|       |                    // failure as script_size isn't incremented.
 1956|  20.7k|                    if (last_was_v) return {};
  ------------------
  |  Branch (1956:25): [True: 2, False: 20.7k]
  ------------------
 1957|  20.7k|                    to_parse.emplace_back(ParseContext::VERIFY, -1, -1);
 1958|   707k|                } else if (in[j] == 'u') {
  ------------------
  |  Branch (1958:28): [True: 289k, False: 418k]
  ------------------
 1959|   289k|                    script_size += 4;
 1960|   289k|                    to_parse.emplace_back(ParseContext::WRAP_U, -1, -1);
 1961|   418k|                } else if (in[j] == 't') {
  ------------------
  |  Branch (1961:28): [True: 149k, False: 269k]
  ------------------
 1962|   149k|                    script_size += 1;
 1963|   149k|                    to_parse.emplace_back(ParseContext::WRAP_T, -1, -1);
 1964|   269k|                } else if (in[j] == 'l') {
  ------------------
  |  Branch (1964:28): [True: 269k, False: 20]
  ------------------
 1965|       |                    // The l: wrapper is equivalent to or_i(0,X)
 1966|   269k|                    script_size += 4;
 1967|   269k|                    constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0);
 1968|   269k|                    to_parse.emplace_back(ParseContext::OR_I, -1, -1);
 1969|   269k|                } else {
 1970|     20|                    return {};
 1971|     20|                }
 1972|  1.23M|                last_was_v = (in[j] == 'v');
 1973|  1.23M|            }
 1974|   164k|            to_parse.emplace_back(ParseContext::EXPR, -1, -1);
 1975|   164k|            if (colon_index) in = in.subspan(*colon_index + 1);
  ------------------
  |  Branch (1975:17): [True: 49.1k, False: 115k]
  ------------------
 1976|   164k|            break;
 1977|   164k|        }
 1978|   164k|        case ParseContext::EXPR: {
  ------------------
  |  Branch (1978:9): [True: 164k, False: 1.53M]
  ------------------
 1979|   164k|            if (Const("0", in)) {
  ------------------
  |  Branch (1979:17): [True: 47.5k, False: 117k]
  ------------------
 1980|  47.5k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0);
 1981|   117k|            } else if (Const("1", in)) {
  ------------------
  |  Branch (1981:24): [True: 57.1k, False: 60.3k]
  ------------------
 1982|  57.1k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1);
 1983|  60.3k|            } else if (Const("pk(", in, /*skip=*/false)) {
  ------------------
  |  Branch (1983:24): [True: 2.10k, False: 58.2k]
  ------------------
 1984|  2.10k|                std::optional<Key> key = ParseKey<Key, Ctx>("pk", in, ctx);
 1985|  2.10k|                if (!key) return {};
  ------------------
  |  Branch (1985:21): [True: 58, False: 2.04k]
  ------------------
 1986|  2.04k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(Node<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(*key)))));
 1987|  2.04k|                script_size += IsTapscript(ctx.MsContext()) ? 33 : 34;
  ------------------
  |  Branch (1987:32): [True: 1.68k, False: 361]
  ------------------
 1988|  58.2k|            } else if (Const("pkh(", in, /*skip=*/false)) {
  ------------------
  |  Branch (1988:24): [True: 1.16k, False: 57.0k]
  ------------------
 1989|  1.16k|                std::optional<Key> key = ParseKey<Key, Ctx>("pkh", in, ctx);
 1990|  1.16k|                if (!key) return {};
  ------------------
  |  Branch (1990:21): [True: 21, False: 1.14k]
  ------------------
 1991|  1.14k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(Node<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(*key)))));
 1992|  1.14k|                script_size += 24;
 1993|  57.0k|            } else if (Const("pk_k(", in, /*skip=*/false)) {
  ------------------
  |  Branch (1993:24): [True: 149, False: 56.9k]
  ------------------
 1994|    149|                std::optional<Key> key = ParseKey<Key, Ctx>("pk_k", in, ctx);
 1995|    149|                if (!key) return {};
  ------------------
  |  Branch (1995:21): [True: 2, False: 147]
  ------------------
 1996|    147|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(*key)));
 1997|    147|                script_size += IsTapscript(ctx.MsContext()) ? 32 : 33;
  ------------------
  |  Branch (1997:32): [True: 140, False: 7]
  ------------------
 1998|  56.9k|            } else if (Const("pk_h(", in, /*skip=*/false)) {
  ------------------
  |  Branch (1998:24): [True: 230, False: 56.6k]
  ------------------
 1999|    230|                std::optional<Key> key = ParseKey<Key, Ctx>("pk_h", in, ctx);
 2000|    230|                if (!key) return {};
  ------------------
  |  Branch (2000:21): [True: 16, False: 214]
  ------------------
 2001|    214|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(*key)));
 2002|    214|                script_size += 23;
 2003|  56.6k|            } else if (Const("sha256(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2003:24): [True: 53, False: 56.6k]
  ------------------
 2004|     53|                std::optional<std::vector<unsigned char>> hash = ParseHexStr("sha256", in, 32);
 2005|     53|                if (!hash) return {};
  ------------------
  |  Branch (2005:21): [True: 8, False: 45]
  ------------------
 2006|     45|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::SHA256, std::move(*hash));
 2007|     45|                script_size += 38;
 2008|  56.6k|            } else if (Const("ripemd160(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2008:24): [True: 152, False: 56.4k]
  ------------------
 2009|    152|                std::optional<std::vector<unsigned char>> hash = ParseHexStr("ripemd160", in, 20);
 2010|    152|                if (!hash) return {};
  ------------------
  |  Branch (2010:21): [True: 1, False: 151]
  ------------------
 2011|    151|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::RIPEMD160, std::move(*hash));
 2012|    151|                script_size += 26;
 2013|  56.4k|            } else if (Const("hash256(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2013:24): [True: 4, False: 56.4k]
  ------------------
 2014|      4|                std::optional<std::vector<unsigned char>> hash = ParseHexStr("hash256", in, 32);
 2015|      4|                if (!hash) return {};
  ------------------
  |  Branch (2015:21): [True: 2, False: 2]
  ------------------
 2016|      2|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH256, std::move(*hash));
 2017|      2|                script_size += 38;
 2018|  56.4k|            } else if (Const("hash160(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2018:24): [True: 295, False: 56.1k]
  ------------------
 2019|    295|                std::optional<std::vector<unsigned char>> hash = ParseHexStr("hash160", in, 20);
 2020|    295|                if (!hash) return {};
  ------------------
  |  Branch (2020:21): [True: 18, False: 277]
  ------------------
 2021|    277|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH160, std::move(*hash));
 2022|    277|                script_size += 26;
 2023|  56.1k|            } else if (Const("after(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2023:24): [True: 4.59k, False: 51.5k]
  ------------------
 2024|  4.59k|                auto expr = Expr(in);
 2025|  4.59k|                if (!Func("after", expr)) return {};
  ------------------
  |  Branch (2025:21): [True: 5, False: 4.58k]
  ------------------
 2026|  4.58k|                const auto num{ToIntegral<int64_t>(std::string_view(expr.begin(), expr.end()))};
 2027|  4.58k|                if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {};
  ------------------
  |  Branch (2027:21): [True: 19, False: 4.56k]
  |  Branch (2027:41): [True: 101, False: 4.46k]
  |  Branch (2027:53): [True: 9, False: 4.45k]
  ------------------
 2028|  4.45k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AFTER, *num);
 2029|  4.45k|                script_size += 1 + (*num > 16) + (*num > 0x7f) + (*num > 0x7fff) + (*num > 0x7fffff);
 2030|  51.5k|            } else if (Const("older(", in, /*skip=*/false)) {
  ------------------
  |  Branch (2030:24): [True: 4.75k, False: 46.8k]
  ------------------
 2031|  4.75k|                auto expr = Expr(in);
 2032|  4.75k|                if (!Func("older", expr)) return {};
  ------------------
  |  Branch (2032:21): [True: 3, False: 4.75k]
  ------------------
 2033|  4.75k|                const auto num{ToIntegral<int64_t>(std::string_view(expr.begin(), expr.end()))};
 2034|  4.75k|                if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {};
  ------------------
  |  Branch (2034:21): [True: 22, False: 4.73k]
  |  Branch (2034:41): [True: 79, False: 4.65k]
  |  Branch (2034:53): [True: 32, False: 4.62k]
  ------------------
 2035|  4.62k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OLDER, *num);
 2036|  4.62k|                script_size += 1 + (*num > 16) + (*num > 0x7f) + (*num > 0x7fff) + (*num > 0x7fffff);
 2037|  46.8k|            } else if (Const("multi(", in)) {
  ------------------
  |  Branch (2037:24): [True: 2.22k, False: 44.6k]
  ------------------
 2038|  2.22k|                if (!parse_multi_exp(in, /* is_multi_a = */false)) return {};
  ------------------
  |  Branch (2038:21): [True: 89, False: 2.13k]
  ------------------
 2039|  44.6k|            } else if (Const("multi_a(", in)) {
  ------------------
  |  Branch (2039:24): [True: 587, False: 44.0k]
  ------------------
 2040|    587|                if (!parse_multi_exp(in, /* is_multi_a = */true)) return {};
  ------------------
  |  Branch (2040:21): [True: 355, False: 232]
  ------------------
 2041|  44.0k|            } else if (Const("thresh(", in)) {
  ------------------
  |  Branch (2041:24): [True: 8.10k, False: 35.9k]
  ------------------
 2042|  8.10k|                int next_comma = FindNextChar(in, ',');
 2043|  8.10k|                if (next_comma < 1) return {};
  ------------------
  |  Branch (2043:21): [True: 4, False: 8.10k]
  ------------------
 2044|  8.10k|                const auto k{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 2045|  8.10k|                if (!k.has_value() || *k < 1) return {};
  ------------------
  |  Branch (2045:21): [True: 45, False: 8.05k]
  |  Branch (2045:39): [True: 70, False: 7.98k]
  ------------------
 2046|  7.98k|                in = in.subspan(next_comma + 1);
 2047|       |                // n = 1 here because we read the first WRAPPED_EXPR before reaching THRESH
 2048|  7.98k|                to_parse.emplace_back(ParseContext::THRESH, 1, *k);
 2049|  7.98k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2050|  7.98k|                script_size += 2 + (*k > 16) + (*k > 0x7f) + (*k > 0x7fff) + (*k > 0x7fffff);
 2051|  35.9k|            } else if (Const("andor(", in)) {
  ------------------
  |  Branch (2051:24): [True: 4.12k, False: 31.7k]
  ------------------
 2052|  4.12k|                to_parse.emplace_back(ParseContext::ANDOR, -1, -1);
 2053|  4.12k|                to_parse.emplace_back(ParseContext::CLOSE_BRACKET, -1, -1);
 2054|  4.12k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2055|  4.12k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2056|  4.12k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2057|  4.12k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2058|  4.12k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2059|  4.12k|                script_size += 5;
 2060|  31.7k|            } else {
 2061|  31.7k|                if (Const("and_n(", in)) {
  ------------------
  |  Branch (2061:21): [True: 2.54k, False: 29.2k]
  ------------------
 2062|  2.54k|                    to_parse.emplace_back(ParseContext::AND_N, -1, -1);
 2063|  2.54k|                    script_size += 5;
 2064|  29.2k|                } else if (Const("and_b(", in)) {
  ------------------
  |  Branch (2064:28): [True: 6.67k, False: 22.5k]
  ------------------
 2065|  6.67k|                    to_parse.emplace_back(ParseContext::AND_B, -1, -1);
 2066|  6.67k|                    script_size += 2;
 2067|  22.5k|                } else if (Const("and_v(", in)) {
  ------------------
  |  Branch (2067:28): [True: 1.99k, False: 20.5k]
  ------------------
 2068|  1.99k|                    to_parse.emplace_back(ParseContext::AND_V, -1, -1);
 2069|  1.99k|                    script_size += 1;
 2070|  20.5k|                } else if (Const("or_b(", in)) {
  ------------------
  |  Branch (2070:28): [True: 7.79k, False: 12.7k]
  ------------------
 2071|  7.79k|                    to_parse.emplace_back(ParseContext::OR_B, -1, -1);
 2072|  7.79k|                    script_size += 2;
 2073|  12.7k|                } else if (Const("or_c(", in)) {
  ------------------
  |  Branch (2073:28): [True: 3.28k, False: 9.47k]
  ------------------
 2074|  3.28k|                    to_parse.emplace_back(ParseContext::OR_C, -1, -1);
 2075|  3.28k|                    script_size += 3;
 2076|  9.47k|                } else if (Const("or_d(", in)) {
  ------------------
  |  Branch (2076:28): [True: 5.98k, False: 3.49k]
  ------------------
 2077|  5.98k|                    to_parse.emplace_back(ParseContext::OR_D, -1, -1);
 2078|  5.98k|                    script_size += 4;
 2079|  5.98k|                } else if (Const("or_i(", in)) {
  ------------------
  |  Branch (2079:28): [True: 2.61k, False: 876]
  ------------------
 2080|  2.61k|                    to_parse.emplace_back(ParseContext::OR_I, -1, -1);
 2081|  2.61k|                    script_size += 4;
 2082|  2.61k|                } else {
 2083|    876|                    return {};
 2084|    876|                }
 2085|  30.9k|                to_parse.emplace_back(ParseContext::CLOSE_BRACKET, -1, -1);
 2086|  30.9k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2087|  30.9k|                to_parse.emplace_back(ParseContext::COMMA, -1, -1);
 2088|  30.9k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2089|  30.9k|            }
 2090|   163k|            break;
 2091|   164k|        }
 2092|   163k|        case ParseContext::ALT: {
  ------------------
  |  Branch (2092:9): [True: 24.4k, False: 1.67M]
  ------------------
 2093|  24.4k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_A, Vector(std::move(constructed.back()))};
 2094|  24.4k|            break;
 2095|   164k|        }
 2096|  6.61k|        case ParseContext::SWAP: {
  ------------------
  |  Branch (2096:9): [True: 6.61k, False: 1.69M]
  ------------------
 2097|  6.61k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_S, Vector(std::move(constructed.back()))};
 2098|  6.61k|            break;
 2099|   164k|        }
 2100|  42.4k|        case ParseContext::CHECK: {
  ------------------
  |  Branch (2100:9): [True: 42.4k, False: 1.66M]
  ------------------
 2101|  42.4k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(std::move(constructed.back()))};
 2102|  42.4k|            break;
 2103|   164k|        }
 2104|  11.7k|        case ParseContext::DUP_IF: {
  ------------------
  |  Branch (2104:9): [True: 11.7k, False: 1.69M]
  ------------------
 2105|  11.7k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_D, Vector(std::move(constructed.back()))};
 2106|  11.7k|            break;
 2107|   164k|        }
 2108|   137k|        case ParseContext::NON_ZERO: {
  ------------------
  |  Branch (2108:9): [True: 137k, False: 1.56M]
  ------------------
 2109|   137k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_J, Vector(std::move(constructed.back()))};
 2110|   137k|            break;
 2111|   164k|        }
 2112|   279k|        case ParseContext::ZERO_NOTEQUAL: {
  ------------------
  |  Branch (2112:9): [True: 279k, False: 1.42M]
  ------------------
 2113|   279k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_N, Vector(std::move(constructed.back()))};
 2114|   279k|            break;
 2115|   164k|        }
 2116|  20.0k|        case ParseContext::VERIFY: {
  ------------------
  |  Branch (2116:9): [True: 20.0k, False: 1.68M]
  ------------------
 2117|  20.0k|            script_size += (constructed.back().GetType() << "x"_mst);
 2118|  20.0k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_V, Vector(std::move(constructed.back()))};
 2119|  20.0k|            break;
 2120|   164k|        }
 2121|   285k|        case ParseContext::WRAP_U: {
  ------------------
  |  Branch (2121:9): [True: 285k, False: 1.41M]
  ------------------
 2122|   285k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::OR_I, Vector(std::move(constructed.back()), Node<Key>{internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0})};
 2123|   285k|            break;
 2124|   164k|        }
 2125|   145k|        case ParseContext::WRAP_T: {
  ------------------
  |  Branch (2125:9): [True: 145k, False: 1.55M]
  ------------------
 2126|   145k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::AND_V, Vector(std::move(constructed.back()), Node<Key>{internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1})};
 2127|   145k|            break;
 2128|   164k|        }
 2129|  5.68k|        case ParseContext::AND_B: {
  ------------------
  |  Branch (2129:9): [True: 5.68k, False: 1.69M]
  ------------------
 2130|  5.68k|            BuildBack(ctx.MsContext(), Fragment::AND_B, constructed);
 2131|  5.68k|            break;
 2132|   164k|        }
 2133|  2.28k|        case ParseContext::AND_N: {
  ------------------
  |  Branch (2133:9): [True: 2.28k, False: 1.70M]
  ------------------
 2134|  2.28k|            auto mid = std::move(constructed.back());
 2135|  2.28k|            constructed.pop_back();
 2136|  2.28k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(constructed.back()), std::move(mid), Node<Key>{internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0})};
 2137|  2.28k|            break;
 2138|   164k|        }
 2139|    779|        case ParseContext::AND_V: {
  ------------------
  |  Branch (2139:9): [True: 779, False: 1.70M]
  ------------------
 2140|    779|            BuildBack(ctx.MsContext(), Fragment::AND_V, constructed);
 2141|    779|            break;
 2142|   164k|        }
 2143|  6.18k|        case ParseContext::OR_B: {
  ------------------
  |  Branch (2143:9): [True: 6.18k, False: 1.69M]
  ------------------
 2144|  6.18k|            BuildBack(ctx.MsContext(), Fragment::OR_B, constructed);
 2145|  6.18k|            break;
 2146|   164k|        }
 2147|  2.37k|        case ParseContext::OR_C: {
  ------------------
  |  Branch (2147:9): [True: 2.37k, False: 1.70M]
  ------------------
 2148|  2.37k|            BuildBack(ctx.MsContext(), Fragment::OR_C, constructed);
 2149|  2.37k|            break;
 2150|   164k|        }
 2151|  3.92k|        case ParseContext::OR_D: {
  ------------------
  |  Branch (2151:9): [True: 3.92k, False: 1.69M]
  ------------------
 2152|  3.92k|            BuildBack(ctx.MsContext(), Fragment::OR_D, constructed);
 2153|  3.92k|            break;
 2154|   164k|        }
 2155|   246k|        case ParseContext::OR_I: {
  ------------------
  |  Branch (2155:9): [True: 246k, False: 1.45M]
  ------------------
 2156|   246k|            BuildBack(ctx.MsContext(), Fragment::OR_I, constructed);
 2157|   246k|            break;
 2158|   164k|        }
 2159|  3.12k|        case ParseContext::ANDOR: {
  ------------------
  |  Branch (2159:9): [True: 3.12k, False: 1.70M]
  ------------------
 2160|  3.12k|            auto right = std::move(constructed.back());
 2161|  3.12k|            constructed.pop_back();
 2162|  3.12k|            auto mid = std::move(constructed.back());
 2163|  3.12k|            constructed.pop_back();
 2164|  3.12k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(constructed.back()), std::move(mid), std::move(right))};
 2165|  3.12k|            break;
 2166|   164k|        }
 2167|  86.2k|        case ParseContext::THRESH: {
  ------------------
  |  Branch (2167:9): [True: 86.2k, False: 1.61M]
  ------------------
 2168|  86.2k|            if (in.size() < 1) return {};
  ------------------
  |  Branch (2168:17): [True: 148, False: 86.0k]
  ------------------
 2169|  86.0k|            if (in[0] == ',') {
  ------------------
  |  Branch (2169:17): [True: 79.3k, False: 6.73k]
  ------------------
 2170|  79.3k|                in = in.subspan(1);
 2171|  79.3k|                to_parse.emplace_back(ParseContext::THRESH, n+1, k);
 2172|  79.3k|                to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
 2173|  79.3k|                script_size += 2;
 2174|  79.3k|            } else if (in[0] == ')') {
  ------------------
  |  Branch (2174:24): [True: 6.70k, False: 29]
  ------------------
 2175|  6.70k|                if (k > n) return {};
  ------------------
  |  Branch (2175:21): [True: 68, False: 6.63k]
  ------------------
 2176|  6.63k|                in = in.subspan(1);
 2177|       |                // Children are constructed in reverse order, so iterate from end to beginning
 2178|  6.63k|                std::vector<Node<Key>> subs;
 2179|  87.0k|                for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (2179:33): [True: 80.4k, False: 6.63k]
  ------------------
 2180|  80.4k|                    subs.push_back(std::move(constructed.back()));
 2181|  80.4k|                    constructed.pop_back();
 2182|  80.4k|                }
 2183|  6.63k|                std::reverse(subs.begin(), subs.end());
 2184|  6.63k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::THRESH, std::move(subs), k);
 2185|  6.63k|            } else {
 2186|     29|                return {};
 2187|     29|            }
 2188|  85.9k|            break;
 2189|  86.0k|        }
 2190|  85.9k|        case ParseContext::COMMA: {
  ------------------
  |  Branch (2190:9): [True: 35.9k, False: 1.66M]
  ------------------
 2191|  35.9k|            if (in.size() < 1 || in[0] != ',') return {};
  ------------------
  |  Branch (2191:17): [True: 15, False: 35.8k]
  |  Branch (2191:34): [True: 47, False: 35.8k]
  ------------------
 2192|  35.8k|            in = in.subspan(1);
 2193|  35.8k|            break;
 2194|  35.9k|        }
 2195|  26.7k|        case ParseContext::CLOSE_BRACKET: {
  ------------------
  |  Branch (2195:9): [True: 26.7k, False: 1.67M]
  ------------------
 2196|  26.7k|            if (in.size() < 1 || in[0] != ')') return {};
  ------------------
  |  Branch (2196:17): [True: 62, False: 26.6k]
  |  Branch (2196:34): [True: 67, False: 26.6k]
  ------------------
 2197|  26.6k|            in = in.subspan(1);
 2198|  26.6k|            break;
 2199|  26.7k|        }
 2200|  1.70M|        }
 2201|  1.70M|    }
 2202|       |
 2203|       |    // Sanity checks on the produced miniscript
 2204|  6.75k|    assert(constructed.size() >= 1);
  ------------------
  |  Branch (2204:5): [True: 4.46k, False: 0]
  ------------------
 2205|  4.46k|    CHECK_NONFATAL(constructed.size() == 1);
  ------------------
  |  |  113|  4.46k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
 2206|  4.46k|    assert(constructed[0].ScriptSize() == script_size);
  ------------------
  |  Branch (2206:5): [True: 4.46k, False: 0]
  ------------------
 2207|  4.46k|    if (in.size() > 0) return {};
  ------------------
  |  Branch (2207:9): [True: 73, False: 4.39k]
  ------------------
 2208|  4.39k|    Node<Key> tl_node{std::move(constructed.front())};
 2209|  4.39k|    tl_node.DuplicateKeyCheck(ctx);
 2210|  4.39k|    return tl_node;
 2211|  4.46k|}
descriptor.cpp:_ZN10miniscript8internal8ParseKeyIjN12_GLOBAL__N_19KeyParserEEENSt3__18optionalIT_EERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERNS4_4spanIKcLm18446744073709551615EEERKT0_:
 1817|  3.65k|{
 1818|  3.65k|    std::span<const char> expr = script::Expr(in);
 1819|  3.65k|    if (!script::Func(func, expr)) return {};
  ------------------
  |  Branch (1819:9): [True: 38, False: 3.61k]
  ------------------
 1820|  3.61k|    return ctx.FromString(expr);
 1821|  3.65k|}
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIjNS6_9allocatorIjEEEEj:
 1727|  5.92k|        : fragment(nt), k(val), keys(std::move(key)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZNK10miniscript4NodeIjE7CalcOpsEv:
 1004|  2.72M|    internal::Ops CalcOps() const {
 1005|  2.72M|        switch (fragment) {
  ------------------
  |  Branch (1005:17): [True: 2.72M, False: 0]
  ------------------
 1006|   209k|            case Fragment::JUST_1: return {0, 0, {}};
  ------------------
  |  Branch (1006:13): [True: 209k, False: 2.51M]
  ------------------
 1007|   753k|            case Fragment::JUST_0: return {0, {}, 0};
  ------------------
  |  Branch (1007:13): [True: 753k, False: 1.97M]
  ------------------
 1008|  3.67k|            case Fragment::PK_K: return {0, 0, 0};
  ------------------
  |  Branch (1008:13): [True: 3.67k, False: 2.72M]
  ------------------
 1009|  1.74k|            case Fragment::PK_H: return {3, 0, 0};
  ------------------
  |  Branch (1009:13): [True: 1.74k, False: 2.72M]
  ------------------
 1010|  4.71k|            case Fragment::OLDER:
  ------------------
  |  Branch (1010:13): [True: 4.71k, False: 2.72M]
  ------------------
 1011|  9.18k|            case Fragment::AFTER: return {1, 0, {}};
  ------------------
  |  Branch (1011:13): [True: 4.46k, False: 2.72M]
  ------------------
 1012|     45|            case Fragment::SHA256:
  ------------------
  |  Branch (1012:13): [True: 45, False: 2.72M]
  ------------------
 1013|    196|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1013:13): [True: 151, False: 2.72M]
  ------------------
 1014|    198|            case Fragment::HASH256:
  ------------------
  |  Branch (1014:13): [True: 2, False: 2.72M]
  ------------------
 1015|    475|            case Fragment::HASH160: return {4, 0, {}};
  ------------------
  |  Branch (1015:13): [True: 277, False: 2.72M]
  ------------------
 1016|   153k|            case Fragment::AND_V: return {subs[0].ops.count + subs[1].ops.count, subs[0].ops.sat + subs[1].ops.sat, {}};
  ------------------
  |  Branch (1016:13): [True: 153k, False: 2.57M]
  ------------------
 1017|  6.16k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1017:13): [True: 6.16k, False: 2.72M]
  ------------------
 1018|  6.16k|                const auto count{1 + subs[0].ops.count + subs[1].ops.count};
 1019|  6.16k|                const auto sat{subs[0].ops.sat + subs[1].ops.sat};
 1020|  6.16k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1021|  6.16k|                return {count, sat, dsat};
 1022|    198|            }
 1023|  6.48k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1023:13): [True: 6.48k, False: 2.72M]
  ------------------
 1024|  6.48k|                const auto count{1 + subs[0].ops.count + subs[1].ops.count};
 1025|  6.48k|                const auto sat{(subs[0].ops.sat + subs[1].ops.dsat) | (subs[1].ops.sat + subs[0].ops.dsat)};
 1026|  6.48k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1027|  6.48k|                return {count, sat, dsat};
 1028|    198|            }
 1029|  4.20k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1029:13): [True: 4.20k, False: 2.72M]
  ------------------
 1030|  4.20k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count};
 1031|  4.20k|                const auto sat{subs[0].ops.sat | (subs[1].ops.sat + subs[0].ops.dsat)};
 1032|  4.20k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1033|  4.20k|                return {count, sat, dsat};
 1034|    198|            }
 1035|  2.37k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1035:13): [True: 2.37k, False: 2.72M]
  ------------------
 1036|  2.37k|                const auto count{2 + subs[0].ops.count + subs[1].ops.count};
 1037|  2.37k|                const auto sat{subs[0].ops.sat | (subs[1].ops.sat + subs[0].ops.dsat)};
 1038|  2.37k|                return {count, sat, {}};
 1039|    198|            }
 1040|   670k|            case Fragment::OR_I: {
  ------------------
  |  Branch (1040:13): [True: 670k, False: 2.05M]
  ------------------
 1041|   670k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count};
 1042|   670k|                const auto sat{subs[0].ops.sat | subs[1].ops.sat};
 1043|   670k|                const auto dsat{subs[0].ops.dsat | subs[1].ops.dsat};
 1044|   670k|                return {count, sat, dsat};
 1045|    198|            }
 1046|  5.99k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1046:13): [True: 5.99k, False: 2.72M]
  ------------------
 1047|  5.99k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count + subs[2].ops.count};
 1048|  5.99k|                const auto sat{(subs[1].ops.sat + subs[0].ops.sat) | (subs[0].ops.dsat + subs[2].ops.sat)};
 1049|  5.99k|                const auto dsat{subs[0].ops.dsat + subs[2].ops.dsat};
 1050|  5.99k|                return {count, sat, dsat};
 1051|    198|            }
 1052|  2.33k|            case Fragment::MULTI: return {1, (uint32_t)keys.size(), (uint32_t)keys.size()};
  ------------------
  |  Branch (1052:13): [True: 2.33k, False: 2.72M]
  ------------------
 1053|    344|            case Fragment::MULTI_A: return {(uint32_t)keys.size() + 1, 0, 0};
  ------------------
  |  Branch (1053:13): [True: 344, False: 2.72M]
  ------------------
 1054|  8.24k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1054:13): [True: 8.24k, False: 2.71M]
  ------------------
 1055|  55.7k|            case Fragment::WRAP_C:
  ------------------
  |  Branch (1055:13): [True: 47.5k, False: 2.67M]
  ------------------
 1056|   549k|            case Fragment::WRAP_N: return {1 + subs[0].ops.count, subs[0].ops.sat, subs[0].ops.dsat};
  ------------------
  |  Branch (1056:13): [True: 493k, False: 2.23M]
  ------------------
 1057|  32.6k|            case Fragment::WRAP_A: return {2 + subs[0].ops.count, subs[0].ops.sat, subs[0].ops.dsat};
  ------------------
  |  Branch (1057:13): [True: 32.6k, False: 2.69M]
  ------------------
 1058|  13.0k|            case Fragment::WRAP_D: return {3 + subs[0].ops.count, subs[0].ops.sat, 0};
  ------------------
  |  Branch (1058:13): [True: 13.0k, False: 2.71M]
  ------------------
 1059|   266k|            case Fragment::WRAP_J: return {4 + subs[0].ops.count, subs[0].ops.sat, 0};
  ------------------
  |  Branch (1059:13): [True: 266k, False: 2.46M]
  ------------------
 1060|  28.0k|            case Fragment::WRAP_V: return {subs[0].ops.count + (subs[0].GetType() << "x"_mst), subs[0].ops.sat, {}};
  ------------------
  |  Branch (1060:13): [True: 28.0k, False: 2.69M]
  ------------------
 1061|  7.64k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1061:13): [True: 7.64k, False: 2.71M]
  ------------------
 1062|  7.64k|                uint32_t count = 0;
 1063|  7.64k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1064|  90.4k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1064:38): [True: 90.4k, False: 7.64k]
  ------------------
 1065|  90.4k|                    count += sub.ops.count + 1;
 1066|  90.4k|                    auto next_sats = Vector(sats[0] + sub.ops.dsat);
 1067|  52.9M|                    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 (1067:40): [True: 52.8M, False: 90.4k]
  ------------------
 1068|  90.4k|                    next_sats.push_back(sats[sats.size() - 1] + sub.ops.sat);
 1069|  90.4k|                    sats = std::move(next_sats);
 1070|  90.4k|                }
 1071|  7.64k|                assert(k < sats.size());
  ------------------
  |  Branch (1071:17): [True: 7.64k, False: 0]
  ------------------
 1072|  7.64k|                return {count, sats[k], sats[0]};
 1073|  7.64k|            }
 1074|  2.72M|        }
 1075|  2.72M|        assert(false);
  ------------------
  |  Branch (1075:9): [Folded, False: 0]
  ------------------
 1076|      0|    }
_ZNK10miniscript4NodeIjE13CalcStackSizeEv:
 1078|  2.72M|    internal::StackSize CalcStackSize() const {
 1079|  2.72M|        using namespace internal;
 1080|  2.72M|        switch (fragment) {
  ------------------
  |  Branch (1080:17): [True: 2.72M, False: 0]
  ------------------
 1081|   753k|            case Fragment::JUST_0: return {{}, SatInfo::Push()};
  ------------------
  |  Branch (1081:13): [True: 753k, False: 1.97M]
  ------------------
 1082|   209k|            case Fragment::JUST_1: return {SatInfo::Push(), {}};
  ------------------
  |  Branch (1082:13): [True: 209k, False: 2.51M]
  ------------------
 1083|  4.71k|            case Fragment::OLDER:
  ------------------
  |  Branch (1083:13): [True: 4.71k, False: 2.72M]
  ------------------
 1084|  9.18k|            case Fragment::AFTER: return {SatInfo::Push() + SatInfo::Nop(), {}};
  ------------------
  |  Branch (1084:13): [True: 4.46k, False: 2.72M]
  ------------------
 1085|  3.67k|            case Fragment::PK_K: return {SatInfo::Push()};
  ------------------
  |  Branch (1085:13): [True: 3.67k, False: 2.72M]
  ------------------
 1086|  1.74k|            case Fragment::PK_H: return {SatInfo::OP_DUP() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY()};
  ------------------
  |  Branch (1086:13): [True: 1.74k, False: 2.72M]
  ------------------
 1087|     45|            case Fragment::SHA256:
  ------------------
  |  Branch (1087:13): [True: 45, False: 2.72M]
  ------------------
 1088|    196|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1088:13): [True: 151, False: 2.72M]
  ------------------
 1089|    198|            case Fragment::HASH256:
  ------------------
  |  Branch (1089:13): [True: 2, False: 2.72M]
  ------------------
 1090|    475|            case Fragment::HASH160: return {
  ------------------
  |  Branch (1090:13): [True: 277, False: 2.72M]
  ------------------
 1091|    475|                SatInfo::OP_SIZE() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1092|    475|                {}
 1093|    475|            };
 1094|  5.99k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1094:13): [True: 5.99k, False: 2.72M]
  ------------------
 1095|  5.99k|                const auto& x{subs[0].ss};
 1096|  5.99k|                const auto& y{subs[1].ss};
 1097|  5.99k|                const auto& z{subs[2].ss};
 1098|  5.99k|                return {
 1099|  5.99k|                    (x.Sat() + SatInfo::If() + y.Sat()) | (x.Dsat() + SatInfo::If() + z.Sat()),
 1100|  5.99k|                    x.Dsat() + SatInfo::If() + z.Dsat()
 1101|  5.99k|                };
 1102|    198|            }
 1103|   153k|            case Fragment::AND_V: {
  ------------------
  |  Branch (1103:13): [True: 153k, False: 2.57M]
  ------------------
 1104|   153k|                const auto& x{subs[0].ss};
 1105|   153k|                const auto& y{subs[1].ss};
 1106|   153k|                return {x.Sat() + y.Sat(), {}};
 1107|    198|            }
 1108|  6.16k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1108:13): [True: 6.16k, False: 2.72M]
  ------------------
 1109|  6.16k|                const auto& x{subs[0].ss};
 1110|  6.16k|                const auto& y{subs[1].ss};
 1111|  6.16k|                return {x.Sat() + y.Sat() + SatInfo::BinaryOp(), x.Dsat() + y.Dsat() + SatInfo::BinaryOp()};
 1112|    198|            }
 1113|  6.48k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1113:13): [True: 6.48k, False: 2.72M]
  ------------------
 1114|  6.48k|                const auto& x{subs[0].ss};
 1115|  6.48k|                const auto& y{subs[1].ss};
 1116|  6.48k|                return {
 1117|  6.48k|                    ((x.Sat() + y.Dsat()) | (x.Dsat() + y.Sat())) + SatInfo::BinaryOp(),
 1118|  6.48k|                    x.Dsat() + y.Dsat() + SatInfo::BinaryOp()
 1119|  6.48k|                };
 1120|    198|            }
 1121|  2.37k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1121:13): [True: 2.37k, False: 2.72M]
  ------------------
 1122|  2.37k|                const auto& x{subs[0].ss};
 1123|  2.37k|                const auto& y{subs[1].ss};
 1124|  2.37k|                return {(x.Sat() + SatInfo::If()) | (x.Dsat() + SatInfo::If() + y.Sat()), {}};
 1125|    198|            }
 1126|  4.20k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1126:13): [True: 4.20k, False: 2.72M]
  ------------------
 1127|  4.20k|                const auto& x{subs[0].ss};
 1128|  4.20k|                const auto& y{subs[1].ss};
 1129|  4.20k|                return {
 1130|  4.20k|                    (x.Sat() + SatInfo::OP_IFDUP(true) + SatInfo::If()) | (x.Dsat() + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.Sat()),
 1131|  4.20k|                    x.Dsat() + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.Dsat()
 1132|  4.20k|                };
 1133|    198|            }
 1134|   670k|            case Fragment::OR_I: {
  ------------------
  |  Branch (1134:13): [True: 670k, False: 2.05M]
  ------------------
 1135|   670k|                const auto& x{subs[0].ss};
 1136|   670k|                const auto& y{subs[1].ss};
 1137|   670k|                return {SatInfo::If() + (x.Sat() | y.Sat()), SatInfo::If() + (x.Dsat() | y.Dsat())};
 1138|    198|            }
 1139|       |            // multi(k, key1, key2, ..., key_n) starts off with k+1 stack elements (a 0, plus k
 1140|       |            // signatures), then reaches n+k+3 stack elements after pushing the n keys, plus k and
 1141|       |            // n itself, and ends with 1 stack element (success or failure). Thus, it net removes
 1142|       |            // k elements (from k+1 to 1), while reaching k+n+2 more than it ends with.
 1143|  2.33k|            case Fragment::MULTI: return {SatInfo(k, k + keys.size() + 2)};
  ------------------
  |  Branch (1143:13): [True: 2.33k, False: 2.72M]
  ------------------
 1144|       |            // multi_a(k, key1, key2, ..., key_n) starts off with n stack elements (the
 1145|       |            // signatures), reaches 1 more (after the first key push), and ends with 1. Thus it net
 1146|       |            // removes n-1 elements (from n to 1) while reaching n more than it ends with.
 1147|    344|            case Fragment::MULTI_A: return {SatInfo(keys.size() - 1, keys.size())};
  ------------------
  |  Branch (1147:13): [True: 344, False: 2.72M]
  ------------------
 1148|  32.6k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1148:13): [True: 32.6k, False: 2.69M]
  ------------------
 1149|   526k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1149:13): [True: 493k, False: 2.23M]
  ------------------
 1150|   534k|            case Fragment::WRAP_S: return subs[0].ss;
  ------------------
  |  Branch (1150:13): [True: 8.24k, False: 2.71M]
  ------------------
 1151|  47.5k|            case Fragment::WRAP_C: return {
  ------------------
  |  Branch (1151:13): [True: 47.5k, False: 2.67M]
  ------------------
 1152|  47.5k|                subs[0].ss.Sat() + SatInfo::OP_CHECKSIG(),
 1153|  47.5k|                subs[0].ss.Dsat() + SatInfo::OP_CHECKSIG()
 1154|  47.5k|            };
 1155|  13.0k|            case Fragment::WRAP_D: return {
  ------------------
  |  Branch (1155:13): [True: 13.0k, False: 2.71M]
  ------------------
 1156|  13.0k|                SatInfo::OP_DUP() + SatInfo::If() + subs[0].ss.Sat(),
 1157|  13.0k|                SatInfo::OP_DUP() + SatInfo::If()
 1158|  13.0k|            };
 1159|  28.0k|            case Fragment::WRAP_V: return {subs[0].ss.Sat() + SatInfo::OP_VERIFY(), {}};
  ------------------
  |  Branch (1159:13): [True: 28.0k, False: 2.69M]
  ------------------
 1160|   266k|            case Fragment::WRAP_J: return {
  ------------------
  |  Branch (1160:13): [True: 266k, False: 2.46M]
  ------------------
 1161|   266k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If() + subs[0].ss.Sat(),
 1162|   266k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If()
 1163|   266k|            };
 1164|  7.64k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1164:13): [True: 7.64k, False: 2.71M]
  ------------------
 1165|       |                // sats[j] is the SatInfo corresponding to all traces reaching j satisfactions.
 1166|  7.64k|                auto sats = Vector(SatInfo::Empty());
 1167|  98.1k|                for (size_t i = 0; i < subs.size(); ++i) {
  ------------------
  |  Branch (1167:36): [True: 90.4k, False: 7.64k]
  ------------------
 1168|       |                    // Loop over the subexpressions, processing them one by one. After adding
 1169|       |                    // element i we need to add OP_ADD (if i>0).
 1170|  90.4k|                    auto add = i ? SatInfo::BinaryOp() : SatInfo::Empty();
  ------------------
  |  Branch (1170:32): [True: 82.8k, False: 7.64k]
  ------------------
 1171|       |                    // Construct a variable that will become the next sats, starting with index 0.
 1172|  90.4k|                    auto next_sats = Vector(sats[0] + subs[i].ss.Dsat() + add);
 1173|       |                    // Then loop to construct next_sats[1..i].
 1174|  52.9M|                    for (size_t j = 1; j < sats.size(); ++j) {
  ------------------
  |  Branch (1174:40): [True: 52.8M, False: 90.4k]
  ------------------
 1175|  52.8M|                        next_sats.push_back(((sats[j] + subs[i].ss.Dsat()) | (sats[j - 1] + subs[i].ss.Sat())) + add);
 1176|  52.8M|                    }
 1177|       |                    // Finally construct next_sats[i+1].
 1178|  90.4k|                    next_sats.push_back(sats[sats.size() - 1] + subs[i].ss.Sat() + add);
 1179|       |                    // Switch over.
 1180|  90.4k|                    sats = std::move(next_sats);
 1181|  90.4k|                }
 1182|       |                // To satisfy thresh we need k satisfactions; to dissatisfy we need 0. In both
 1183|       |                // cases a push of k and an OP_EQUAL follow.
 1184|  7.64k|                return {
 1185|  7.64k|                    sats[k] + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1186|  7.64k|                    sats[0] + SatInfo::Push() + SatInfo::OP_EQUAL()
 1187|  7.64k|                };
 1188|   526k|            }
 1189|  2.72M|        }
 1190|  2.72M|        assert(false);
  ------------------
  |  Branch (1190:9): [Folded, False: 0]
  ------------------
 1191|      0|    }
_ZNK10miniscript4NodeIjE15CalcWitnessSizeEv:
 1193|  2.72M|    internal::WitnessSize CalcWitnessSize() const {
 1194|  2.72M|        const uint32_t sig_size = IsTapscript(m_script_ctx) ? 1 + 65 : 1 + 72;
  ------------------
  |  Branch (1194:35): [True: 2.57M, False: 147k]
  ------------------
 1195|  2.72M|        const uint32_t pubkey_size = IsTapscript(m_script_ctx) ? 1 + 32 : 1 + 33;
  ------------------
  |  Branch (1195:38): [True: 2.57M, False: 147k]
  ------------------
 1196|  2.72M|        switch (fragment) {
  ------------------
  |  Branch (1196:17): [True: 2.72M, False: 0]
  ------------------
 1197|   753k|            case Fragment::JUST_0: return {{}, 0};
  ------------------
  |  Branch (1197:13): [True: 753k, False: 1.97M]
  ------------------
 1198|   209k|            case Fragment::JUST_1:
  ------------------
  |  Branch (1198:13): [True: 209k, False: 2.51M]
  ------------------
 1199|   214k|            case Fragment::OLDER:
  ------------------
  |  Branch (1199:13): [True: 4.71k, False: 2.72M]
  ------------------
 1200|   219k|            case Fragment::AFTER: return {0, {}};
  ------------------
  |  Branch (1200:13): [True: 4.46k, False: 2.72M]
  ------------------
 1201|  3.67k|            case Fragment::PK_K: return {sig_size, 1};
  ------------------
  |  Branch (1201:13): [True: 3.67k, False: 2.72M]
  ------------------
 1202|  1.74k|            case Fragment::PK_H: return {sig_size + pubkey_size, 1 + pubkey_size};
  ------------------
  |  Branch (1202:13): [True: 1.74k, False: 2.72M]
  ------------------
 1203|     45|            case Fragment::SHA256:
  ------------------
  |  Branch (1203:13): [True: 45, False: 2.72M]
  ------------------
 1204|    196|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1204:13): [True: 151, False: 2.72M]
  ------------------
 1205|    198|            case Fragment::HASH256:
  ------------------
  |  Branch (1205:13): [True: 2, False: 2.72M]
  ------------------
 1206|    475|            case Fragment::HASH160: return {1 + 32, {}};
  ------------------
  |  Branch (1206:13): [True: 277, False: 2.72M]
  ------------------
 1207|  5.99k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1207:13): [True: 5.99k, False: 2.72M]
  ------------------
 1208|  5.99k|                const auto sat{(subs[0].ws.sat + subs[1].ws.sat) | (subs[0].ws.dsat + subs[2].ws.sat)};
 1209|  5.99k|                const auto dsat{subs[0].ws.dsat + subs[2].ws.dsat};
 1210|  5.99k|                return {sat, dsat};
 1211|    198|            }
 1212|   153k|            case Fragment::AND_V: return {subs[0].ws.sat + subs[1].ws.sat, {}};
  ------------------
  |  Branch (1212:13): [True: 153k, False: 2.57M]
  ------------------
 1213|  6.16k|            case Fragment::AND_B: return {subs[0].ws.sat + subs[1].ws.sat, subs[0].ws.dsat + subs[1].ws.dsat};
  ------------------
  |  Branch (1213:13): [True: 6.16k, False: 2.72M]
  ------------------
 1214|  6.48k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1214:13): [True: 6.48k, False: 2.72M]
  ------------------
 1215|  6.48k|                const auto sat{(subs[0].ws.dsat + subs[1].ws.sat) | (subs[0].ws.sat + subs[1].ws.dsat)};
 1216|  6.48k|                const auto dsat{subs[0].ws.dsat + subs[1].ws.dsat};
 1217|  6.48k|                return {sat, dsat};
 1218|    198|            }
 1219|  2.37k|            case Fragment::OR_C: return {subs[0].ws.sat | (subs[0].ws.dsat + subs[1].ws.sat), {}};
  ------------------
  |  Branch (1219:13): [True: 2.37k, False: 2.72M]
  ------------------
 1220|  4.20k|            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 (1220:13): [True: 4.20k, False: 2.72M]
  ------------------
 1221|   670k|            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 (1221:13): [True: 670k, False: 2.05M]
  ------------------
 1222|  2.33k|            case Fragment::MULTI: return {k * sig_size + 1, k + 1};
  ------------------
  |  Branch (1222:13): [True: 2.33k, False: 2.72M]
  ------------------
 1223|    344|            case Fragment::MULTI_A: return {k * sig_size + static_cast<uint32_t>(keys.size()) - k, static_cast<uint32_t>(keys.size())};
  ------------------
  |  Branch (1223:13): [True: 344, False: 2.72M]
  ------------------
 1224|  32.6k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1224:13): [True: 32.6k, False: 2.69M]
  ------------------
 1225|   526k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1225:13): [True: 493k, False: 2.23M]
  ------------------
 1226|   534k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1226:13): [True: 8.24k, False: 2.71M]
  ------------------
 1227|   581k|            case Fragment::WRAP_C: return subs[0].ws;
  ------------------
  |  Branch (1227:13): [True: 47.5k, False: 2.67M]
  ------------------
 1228|  13.0k|            case Fragment::WRAP_D: return {1 + 1 + subs[0].ws.sat, 1};
  ------------------
  |  Branch (1228:13): [True: 13.0k, False: 2.71M]
  ------------------
 1229|  28.0k|            case Fragment::WRAP_V: return {subs[0].ws.sat, {}};
  ------------------
  |  Branch (1229:13): [True: 28.0k, False: 2.69M]
  ------------------
 1230|   266k|            case Fragment::WRAP_J: return {subs[0].ws.sat, 1};
  ------------------
  |  Branch (1230:13): [True: 266k, False: 2.46M]
  ------------------
 1231|  7.64k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1231:13): [True: 7.64k, False: 2.71M]
  ------------------
 1232|  7.64k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1233|  90.4k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1233:38): [True: 90.4k, False: 7.64k]
  ------------------
 1234|  90.4k|                    auto next_sats = Vector(sats[0] + sub.ws.dsat);
 1235|  52.9M|                    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 (1235:40): [True: 52.8M, False: 90.4k]
  ------------------
 1236|  90.4k|                    next_sats.push_back(sats[sats.size() - 1] + sub.ws.sat);
 1237|  90.4k|                    sats = std::move(next_sats);
 1238|  90.4k|                }
 1239|  7.64k|                assert(k < sats.size());
  ------------------
  |  Branch (1239:17): [True: 7.64k, False: 0]
  ------------------
 1240|  7.64k|                return {sats[k], sats[0]};
 1241|  7.64k|            }
 1242|  2.72M|        }
 1243|  2.72M|        assert(false);
  ------------------
  |  Branch (1243:9): [Folded, False: 0]
  ------------------
 1244|      0|    }
_ZNK10miniscript4NodeIjE8CalcTypeEv:
  780|  2.72M|    Type CalcType() const {
  781|  2.72M|        using namespace internal;
  782|       |
  783|       |        // THRESH has a variable number of subexpressions
  784|  2.72M|        std::vector<Type> sub_types;
  785|  2.72M|        if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (785:13): [True: 7.64k, False: 2.71M]
  ------------------
  786|  90.4k|            for (const auto& sub : subs) sub_types.push_back(sub.GetType());
  ------------------
  |  Branch (786:34): [True: 90.4k, False: 7.64k]
  ------------------
  787|  7.64k|        }
  788|       |        // All other nodes than THRESH can be computed just from the types of the 0-3 subexpressions.
  789|  2.72M|        Type x = subs.size() > 0 ? subs[0].GetType() : ""_mst;
  ------------------
  |  Branch (789:18): [True: 1.74M, False: 980k]
  ------------------
  790|  2.72M|        Type y = subs.size() > 1 ? subs[1].GetType() : ""_mst;
  ------------------
  |  Branch (790:18): [True: 853k, False: 1.87M]
  ------------------
  791|  2.72M|        Type z = subs.size() > 2 ? subs[2].GetType() : ""_mst;
  ------------------
  |  Branch (791:18): [True: 9.29k, False: 2.71M]
  ------------------
  792|       |
  793|  2.72M|        return SanitizeType(ComputeType(fragment, x, y, z, sub_types, k, data.size(), subs.size(), keys.size(), m_script_ctx));
  794|  2.72M|    }
_ZNK10miniscript4NodeIjE13CalcScriptLenEv:
  619|  2.72M|    {
  620|  2.72M|        size_t subsize = 0;
  621|  2.72M|        for (const auto& sub : subs) {
  ------------------
  |  Branch (621:30): [True: 2.68M, False: 2.72M]
  ------------------
  622|  2.68M|            subsize += sub.ScriptSize();
  623|  2.68M|        }
  624|  2.72M|        Type sub0type = subs.size() > 0 ? subs[0].GetType() : ""_mst;
  ------------------
  |  Branch (624:25): [True: 1.74M, False: 980k]
  ------------------
  625|  2.72M|        return internal::ComputeScriptLen(fragment, sub0type, subsize, k, subs.size(), keys.size(), m_script_ctx);
  626|  2.72M|    }
_ZN10miniscript8internal11ParseHexStrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS1_4spanIKcLm18446744073709551615EEEm:
 1825|    504|{
 1826|    504|    std::span<const char> expr = script::Expr(in);
 1827|    504|    if (!script::Func(func, expr)) return {};
  ------------------
  |  Branch (1827:9): [True: 6, False: 498]
  ------------------
 1828|    498|    std::string val = std::string(expr.begin(), expr.end());
 1829|    498|    if (!IsHex(val)) return {};
  ------------------
  |  Branch (1829:9): [True: 11, False: 487]
  ------------------
 1830|    487|    auto hash = ParseHex(val);
 1831|    487|    if (hash.size() != expected_size) return {};
  ------------------
  |  Branch (1831:9): [True: 12, False: 475]
  ------------------
 1832|    475|    return hash;
 1833|    487|}
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIhNS6_9allocatorIhEEEEj:
 1723|    475|        : fragment(nt), k(val), data(std::move(arg)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
descriptor.cpp:_ZZN10miniscript8internal5ParseIjN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS_4NodeIT_EEEENS4_4spanIKcLm18446744073709551615EEERKT0_ENKUlRSC_bE_clESG_b:
 1878|  2.80k|    const auto parse_multi_exp = [&](std::span<const char>& in, const bool is_multi_a) -> bool {
 1879|  2.80k|        const auto max_keys{is_multi_a ? MAX_PUBKEYS_PER_MULTI_A : MAX_PUBKEYS_PER_MULTISIG};
  ------------------
  |  Branch (1879:29): [True: 587, False: 2.22k]
  ------------------
 1880|  2.80k|        const auto required_ctx{is_multi_a ? MiniscriptContext::TAPSCRIPT : MiniscriptContext::P2WSH};
  ------------------
  |  Branch (1880:33): [True: 587, False: 2.22k]
  ------------------
 1881|  2.80k|        if (ctx.MsContext() != required_ctx) return false;
  ------------------
  |  Branch (1881:13): [True: 2, False: 2.80k]
  ------------------
 1882|       |        // Get threshold
 1883|  2.80k|        int next_comma = FindNextChar(in, ',');
 1884|  2.80k|        if (next_comma < 1) return false;
  ------------------
  |  Branch (1884:13): [True: 12, False: 2.79k]
  ------------------
 1885|  2.79k|        const auto k_to_integral{ToIntegral<int64_t>(std::string_view(in.data(), next_comma))};
 1886|  2.79k|        if (!k_to_integral.has_value()) return false;
  ------------------
  |  Branch (1886:13): [True: 78, False: 2.71k]
  ------------------
 1887|  2.71k|        const int64_t k{k_to_integral.value()};
 1888|  2.71k|        in = in.subspan(next_comma + 1);
 1889|       |        // Get keys. It is compatible for both compressed and x-only keys.
 1890|  2.71k|        std::vector<Key> keys;
 1891|  9.56k|        while (next_comma != -1) {
  ------------------
  |  Branch (1891:16): [True: 7.07k, False: 2.48k]
  ------------------
 1892|  7.07k|            next_comma = FindNextChar(in, ',');
 1893|  7.07k|            int key_length = (next_comma == -1) ? FindNextChar(in, ')') : next_comma;
  ------------------
  |  Branch (1893:30): [True: 2.67k, False: 4.40k]
  ------------------
 1894|  7.07k|            if (key_length < 1) return false;
  ------------------
  |  Branch (1894:17): [True: 129, False: 6.95k]
  ------------------
 1895|  6.95k|            std::span<const char> sp{in.begin(), in.begin() + key_length};
 1896|  6.95k|            auto key = ctx.FromString(sp);
 1897|  6.95k|            if (!key) return false;
  ------------------
  |  Branch (1897:17): [True: 105, False: 6.84k]
  ------------------
 1898|  6.84k|            keys.push_back(std::move(*key));
 1899|  6.84k|            in = in.subspan(key_length + 1);
 1900|  6.84k|        }
 1901|  2.48k|        if (keys.size() < 1 || keys.size() > max_keys) return false;
  ------------------
  |  Branch (1901:13): [True: 0, False: 2.48k]
  |  Branch (1901:32): [True: 2, False: 2.48k]
  ------------------
 1902|  2.48k|        if (k < 1 || k > (int64_t)keys.size()) return false;
  ------------------
  |  Branch (1902:13): [True: 65, False: 2.41k]
  |  Branch (1902:22): [True: 51, False: 2.36k]
  ------------------
 1903|  2.36k|        if (is_multi_a) {
  ------------------
  |  Branch (1903:13): [True: 232, False: 2.13k]
  ------------------
 1904|       |            // (push + xonly-key + CHECKSIG[ADD]) * n + k + OP_NUMEQUAL(VERIFY), minus one.
 1905|    232|            script_size += (1 + 32 + 1) * keys.size() + BuildScript(k).size();
 1906|    232|            constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), k);
 1907|  2.13k|        } else {
 1908|  2.13k|            script_size += 2 + (keys.size() > 16) + (k > 16) + 34 * keys.size();
 1909|  2.13k|            constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), k);
 1910|  2.13k|        }
 1911|  2.36k|        return true;
 1912|  2.48k|    };
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS1_NS6_9allocatorIS1_EEEEj:
 1729|  1.23M|        : fragment(nt), k(val), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript4NodeIjEaSEOS1_:
 1753|  1.30M|    Node& operator=(Node&&) noexcept = default;
_ZNK10miniscript4NodeIjE7GetTypeEv:
 1617|  5.21M|    Type GetType() const { return typ; }
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEj:
 1731|   816k|        : fragment(nt), k(val), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript8internal9BuildBackIjEEvNS_17MiniscriptContextENS_8FragmentERNSt3__16vectorINS_4NodeIT_EENS4_9allocatorIS8_EEEEb:
 1838|   265k|{
 1839|   265k|    Node<Key> child{std::move(constructed.back())};
 1840|   265k|    constructed.pop_back();
 1841|   265k|    if (reverse) {
  ------------------
  |  Branch (1841:9): [True: 0, False: 265k]
  ------------------
 1842|      0|        constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(child), std::move(constructed.back()))};
 1843|   265k|    } else {
 1844|   265k|        constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(constructed.back()), std::move(child))};
 1845|   265k|    }
 1846|   265k|}
_ZN10miniscript4NodeIjEC2EOS1_:
 1752|  5.30M|    Node(Node&&) noexcept = default;
_ZNK10miniscript4NodeIjE10ScriptSizeEv:
 1559|  2.90M|    size_t ScriptSize() const { return scriptlen; }
descriptor.cpp:_ZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_:
 1501|  4.39k|    {
 1502|       |        // We cannot use a lambda here, as lambdas are non assignable, and the set operations
 1503|       |        // below require moving the comparators around.
 1504|  4.39k|        struct Comp {
 1505|  4.39k|            const Ctx* ctx_ptr;
 1506|  4.39k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
 1507|  4.39k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
 1508|  4.39k|        };
 1509|       |
 1510|       |        // state in the recursive computation:
 1511|       |        // - std::nullopt means "this node has duplicates"
 1512|       |        // - an std::set means "this node has no duplicate keys, and they are: ...".
 1513|  4.39k|        using keyset = std::set<Key, Comp>;
 1514|  4.39k|        using state = std::optional<keyset>;
 1515|       |
 1516|  4.39k|        auto upfn = [&ctx](const Node& node, std::span<state> subs) -> state {
 1517|       |            // If this node is already known to have duplicates, nothing left to do.
 1518|  4.39k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
 1519|       |
 1520|       |            // Check if one of the children is already known to have duplicates.
 1521|  4.39k|            for (auto& sub : subs) {
 1522|  4.39k|                if (!sub.has_value()) {
 1523|  4.39k|                    node.has_duplicate_keys = true;
 1524|  4.39k|                    return {};
 1525|  4.39k|                }
 1526|  4.39k|            }
 1527|       |
 1528|       |            // Start building the set of keys involved in this node and children.
 1529|       |            // Start by keys in this node directly.
 1530|  4.39k|            size_t keys_count = node.keys.size();
 1531|  4.39k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1532|  4.39k|            if (key_set.size() != keys_count) {
 1533|       |                // It already has duplicates; bail out.
 1534|  4.39k|                node.has_duplicate_keys = true;
 1535|  4.39k|                return {};
 1536|  4.39k|            }
 1537|       |
 1538|       |            // Merge the keys from the children into this set.
 1539|  4.39k|            for (auto& sub : subs) {
 1540|  4.39k|                keys_count += sub->size();
 1541|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1542|       |                // logarithmic in the size of the first.
 1543|  4.39k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
 1544|  4.39k|                key_set.merge(*sub);
 1545|  4.39k|                if (key_set.size() != keys_count) {
 1546|  4.39k|                    node.has_duplicate_keys = true;
 1547|  4.39k|                    return {};
 1548|  4.39k|                }
 1549|  4.39k|            }
 1550|       |
 1551|  4.39k|            node.has_duplicate_keys = false;
 1552|  4.39k|            return key_set;
 1553|  4.39k|        };
 1554|       |
 1555|  4.39k|        TreeEval<state>(upfn);
 1556|  4.39k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_NS3_4spanISG_Lm18446744073709551615EEEE_EES9_T0_:
  748|  4.39k|    {
  749|  4.39k|        struct DummyState {};
  750|  4.39k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  751|  4.39k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  752|  4.39k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|  4.39k|                Result res{upfn(node, subs)};
  754|  4.39k|                return std::optional<Result>(std::move(res));
  755|  4.39k|            }
  756|  4.39k|        ));
  757|  4.39k|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS1_8TreeEvalISG_ZNKS6_IS8_EEvSB_EUlRKS1_NS3_4spanISG_Lm18446744073709551615EEEE_EES9_T0_E10DummyStateZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_mE_ZNKSH_ISG_SM_EES9_SN_EUlSO_SJ_SL_E_EENS4_IS9_EESN_T1_T2_:
  653|  4.39k|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|  4.39k|        struct StackElem
  656|  4.39k|        {
  657|  4.39k|            const Node& node; //!< The node being evaluated.
  658|  4.39k|            size_t expanded; //!< How many children of this node have been expanded.
  659|  4.39k|            State state; //!< The state for that node.
  660|       |
  661|  4.39k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|  4.39k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|  4.39k|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|  4.39k|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|  4.39k|        std::vector<Result> results;
  669|  4.39k|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|  3.23M|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 3.22M, False: 4.39k]
  ------------------
  688|  3.22M|            const Node& node = stack.back().node;
  689|  3.22M|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 1.61M, False: 1.61M]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|  1.61M|                size_t child_index = stack.back().expanded++;
  694|  1.61M|                State child_state = downfn(stack.back().state, node, child_index);
  695|  1.61M|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|  1.61M|                continue;
  697|  1.61M|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|  3.22M|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 1.61M, False: 0]
  ------------------
  700|  1.61M|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|  1.61M|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|  1.61M|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 1.61M]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|  1.61M|            results.erase(results.end() - node.subs.size(), results.end());
  706|  1.61M|            results.push_back(std::move(*result));
  707|  1.61M|            stack.pop_back();
  708|  1.61M|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|  4.39k|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 4.39k, False: 0]
  ------------------
  711|  4.39k|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|  4.39k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|  4.39k|        return std::move(results[0]);
  713|  4.39k|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS1_8TreeEvalISG_ZNKS6_IS8_EEvSB_EUlRKS1_NS3_4spanISG_Lm18446744073709551615EEEE_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_:
  662|  1.61M|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_NS3_4spanISG_Lm18446744073709551615EEEE_EES9_T0_ENKUlZNKS2_ISG_SL_EES9_SM_E10DummyStateSI_mE_clESN_SI_m:
  751|  1.61M|            [](DummyState, const Node&, size_t) { return DummyState{}; },
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalINSt3__18optionalINS3_3setIjZNKS1_17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_E4CompNS3_9allocatorIjEEEEEEZNKS6_IS8_EEvSB_EUlRKS1_NS3_4spanISG_Lm18446744073709551615EEEE_EES9_T0_ENKUlZNKS2_ISG_SL_EES9_SM_E10DummyStateSI_SK_E_clESN_SI_SK_:
  752|  1.61M|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|  1.61M|                Result res{upfn(node, subs)};
  754|  1.61M|                return std::optional<Result>(std::move(res));
  755|  1.61M|            }
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_ENKUlRKS1_NSt3__14spanINSA_8optionalINSA_3setIjZNKS2_IS4_EEvS7_E4CompNSA_9allocatorIjEEEEEELm18446744073709551615EEEE_clES9_SJ_:
 1516|  1.61M|        auto upfn = [&ctx](const Node& node, std::span<state> subs) -> state {
 1517|       |            // If this node is already known to have duplicates, nothing left to do.
 1518|  1.61M|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
  ------------------
  |  Branch (1518:17): [True: 0, False: 1.61M]
  |  Branch (1518:56): [True: 0, False: 0]
  ------------------
 1519|       |
 1520|       |            // Check if one of the children is already known to have duplicates.
 1521|  1.61M|            for (auto& sub : subs) {
  ------------------
  |  Branch (1521:28): [True: 1.61M, False: 1.61M]
  ------------------
 1522|  1.61M|                if (!sub.has_value()) {
  ------------------
  |  Branch (1522:21): [True: 3.38k, False: 1.60M]
  ------------------
 1523|  3.38k|                    node.has_duplicate_keys = true;
 1524|  3.38k|                    return {};
 1525|  3.38k|                }
 1526|  1.61M|            }
 1527|       |
 1528|       |            // Start building the set of keys involved in this node and children.
 1529|       |            // Start by keys in this node directly.
 1530|  1.61M|            size_t keys_count = node.keys.size();
 1531|  1.61M|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1532|  1.61M|            if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1532:17): [True: 163, False: 1.61M]
  ------------------
 1533|       |                // It already has duplicates; bail out.
 1534|    163|                node.has_duplicate_keys = true;
 1535|    163|                return {};
 1536|    163|            }
 1537|       |
 1538|       |            // Merge the keys from the children into this set.
 1539|  1.61M|            for (auto& sub : subs) {
  ------------------
  |  Branch (1539:28): [True: 1.60M, False: 1.61M]
  ------------------
 1540|  1.60M|                keys_count += sub->size();
 1541|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1542|       |                // logarithmic in the size of the first.
 1543|  1.60M|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
  ------------------
  |  Branch (1543:21): [True: 221k, False: 1.38M]
  ------------------
 1544|  1.60M|                key_set.merge(*sub);
 1545|  1.60M|                if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1545:21): [True: 144, False: 1.60M]
  ------------------
 1546|    144|                    node.has_duplicate_keys = true;
 1547|    144|                    return {};
 1548|    144|                }
 1549|  1.60M|            }
 1550|       |
 1551|  1.61M|            node.has_duplicate_keys = false;
 1552|  1.61M|            return key_set;
 1553|  1.61M|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_EN4CompC2ERKS4_:
 1506|  1.61M|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE17DuplicateKeyCheckIN12_GLOBAL__N_19KeyParserEEEvRKT_ENK4CompclERKjSA_:
 1507|  26.4k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
_ZNK10miniscript4NodeIjE6IsSaneEv:
 1702|  3.31k|    bool IsSane() const { return IsValidTopLevel() && IsSaneSubexpression() && NeedsSignature(); }
  ------------------
  |  Branch (1702:34): [True: 2.50k, False: 811]
  |  Branch (1702:55): [True: 2.33k, False: 172]
  |  Branch (1702:80): [True: 2.19k, False: 136]
  ------------------
_ZNK10miniscript4NodeIjE15IsValidTopLevelEv:
 1681|  3.31k|    bool IsValidTopLevel() const { return IsValid() && GetType() << "B"_mst; }
  ------------------
  |  Branch (1681:43): [True: 2.65k, False: 655]
  |  Branch (1681:56): [True: 2.50k, False: 156]
  ------------------
_ZNK10miniscript4NodeIjE19IsSaneSubexpressionEv:
 1699|   218k|    bool IsSaneSubexpression() const { return ValidSatisfactions() && IsNonMalleable() && CheckTimeLocksMix() && CheckDuplicateKey(); }
  ------------------
  |  Branch (1699:47): [True: 216k, False: 2.51k]
  |  Branch (1699:71): [True: 215k, False: 703]
  |  Branch (1699:91): [True: 215k, False: 69]
  |  Branch (1699:114): [True: 215k, False: 229]
  ------------------
_ZNK10miniscript4NodeIjE16IsNotSatisfiableEv:
 1607|  2.07k|    bool IsNotSatisfiable() const { return !GetStackSize(); }
_ZNK10miniscript4NodeIjE12GetStackSizeEv:
 1583|   101k|    std::optional<uint32_t> GetStackSize() const {
 1584|   101k|        if (!ss.Sat().Valid()) return {};
  ------------------
  |  Branch (1584:13): [True: 61.2k, False: 39.9k]
  ------------------
 1585|  39.9k|        return ss.Sat().NetDiff() + static_cast<int32_t>(IsBKW());
 1586|   101k|    }
_ZNK10miniscript8internal7SatInfo5ValidEv:
  458|   218k|    bool Valid() const { return valid; }
_ZNK10miniscript8internal7SatInfo7NetDiffEv:
  459|  39.9k|    int32_t NetDiff() const { return netdiff; }
_ZNK10miniscript4NodeIjE5IsBKWEv:
 1578|  50.5k|    bool IsBKW() const {
 1579|  50.5k|        return !((GetType() & "BKW"_mst) == ""_mst);
 1580|  50.5k|    }
_ZNK10miniscript4NodeIjE13FindInsaneSubEv:
 1623|    937|    const Node* FindInsaneSub() const {
 1624|    937|        return TreeEval<const Node*>([](const Node& node, std::span<const Node*> subs) -> const Node* {
 1625|    937|            for (auto& sub: subs) if (sub) return sub;
 1626|    937|            if (!node.IsSaneSubexpression()) return &node;
 1627|    937|            return nullptr;
 1628|    937|        });
 1629|    937|    }
_ZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_NSt3__14spanIS4_Lm18446744073709551615EEEE_EET_T0_:
  748|    937|    {
  749|    937|        struct DummyState {};
  750|    937|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  751|    937|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  752|    937|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|    937|                Result res{upfn(node, subs)};
  754|    937|                return std::optional<Result>(std::move(res));
  755|    937|            }
  756|    937|        ));
  757|    937|    }
_ZNK10miniscript4NodeIjE13TreeEvalMaybeIPKS1_ZNKS1_8TreeEvalIS4_ZNKS1_13FindInsaneSubEvEUlRS3_NSt3__14spanIS4_Lm18446744073709551615EEEE_EET_T0_E10DummyStateZNKS5_IS4_SA_EESB_SC_EUlSD_S6_mE_ZNKS5_IS4_SA_EESB_SC_EUlSD_S6_S9_E_EENS7_8optionalISB_EESC_T1_T2_:
  653|    937|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|    937|        struct StackElem
  656|    937|        {
  657|    937|            const Node& node; //!< The node being evaluated.
  658|    937|            size_t expanded; //!< How many children of this node have been expanded.
  659|    937|            State state; //!< The state for that node.
  660|       |
  661|    937|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|    937|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|    937|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|    937|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|    937|        std::vector<Result> results;
  669|    937|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|   518k|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 517k, False: 937]
  ------------------
  688|   517k|            const Node& node = stack.back().node;
  689|   517k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 258k, False: 259k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   258k|                size_t child_index = stack.back().expanded++;
  694|   258k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   258k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   258k|                continue;
  697|   258k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|   517k|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 259k, False: 0]
  ------------------
  700|   259k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   259k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   259k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 259k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   259k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   259k|            results.push_back(std::move(*result));
  707|   259k|            stack.pop_back();
  708|   259k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|    937|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 937, False: 0]
  ------------------
  711|    937|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|    937|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|    937|        return std::move(results[0]);
  713|    937|    }
_ZZNK10miniscript4NodeIjE13TreeEvalMaybeIPKS1_ZNKS1_8TreeEvalIS4_ZNKS1_13FindInsaneSubEvEUlRS3_NSt3__14spanIS4_Lm18446744073709551615EEEE_EET_T0_E10DummyStateZNKS5_IS4_SA_EESB_SC_EUlSD_S6_mE_ZNKS5_IS4_SA_EESB_SC_EUlSD_S6_S9_E_EENS7_8optionalISB_EESC_T1_T2_EN9StackElemC2ES6_mOSD_:
  662|   259k|                node(node_), expanded(exp_), state(std::move(state_)) {}
_ZZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_NSt3__14spanIS4_Lm18446744073709551615EEEE_EET_T0_ENKUlZNKS2_IS4_S9_EESA_SB_E10DummyStateS5_mE_clESC_S5_m:
  751|   258k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
_ZZNK10miniscript4NodeIjE8TreeEvalIPKS1_ZNKS1_13FindInsaneSubEvEUlRS3_NSt3__14spanIS4_Lm18446744073709551615EEEE_EET_T0_ENKUlZNKS2_IS4_S9_EESA_SB_E10DummyStateS5_S8_E_clESC_S5_S8_:
  752|   259k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|   259k|                Result res{upfn(node, subs)};
  754|   259k|                return std::optional<Result>(std::move(res));
  755|   259k|            }
_ZZNK10miniscript4NodeIjE13FindInsaneSubEvENKUlRKS1_NSt3__14spanIPS2_Lm18446744073709551615EEEE_clES3_S7_:
 1624|   259k|        return TreeEval<const Node*>([](const Node& node, std::span<const Node*> subs) -> const Node* {
 1625|   259k|            for (auto& sub: subs) if (sub) return sub;
  ------------------
  |  Branch (1625:27): [True: 245k, False: 216k]
  |  Branch (1625:39): [True: 43.0k, False: 202k]
  ------------------
 1626|   216k|            if (!node.IsSaneSubexpression()) return &node;
  ------------------
  |  Branch (1626:17): [True: 3.34k, False: 212k]
  ------------------
 1627|   212k|            return nullptr;
 1628|   216k|        });
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_:
  877|    937|    std::optional<std::string> ToString(const CTx& ctx) const {
  878|    937|        bool dummy{false};
  879|    937|        return ToString(ctx, dummy);
  880|    937|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_Rb:
  883|    937|    std::optional<std::string> ToString(const CTx& ctx, bool& has_priv_key) const {
  884|       |        // To construct the std::string representation for a Miniscript object, we use
  885|       |        // the TreeEvalMaybe algorithm. The State is a boolean: whether the parent node is a
  886|       |        // wrapper. If so, non-wrapper expressions must be prefixed with a ":".
  887|    937|        auto downfn = [](bool, const Node& node, size_t) {
  888|    937|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  889|    937|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  890|    937|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  891|    937|                    node.fragment == Fragment::WRAP_C ||
  892|    937|                    (node.fragment == Fragment::AND_V && node.subs[1].fragment == Fragment::JUST_1) ||
  893|    937|                    (node.fragment == Fragment::OR_I && node.subs[0].fragment == Fragment::JUST_0) ||
  894|    937|                    (node.fragment == Fragment::OR_I && node.subs[1].fragment == Fragment::JUST_0));
  895|    937|        };
  896|    937|        auto toString = [&ctx, &has_priv_key](Key key) -> std::optional<std::string> {
  897|    937|            bool fragment_has_priv_key{false};
  898|    937|            auto key_str{ctx.ToString(key, fragment_has_priv_key)};
  899|    937|            if (key_str) has_priv_key = has_priv_key || fragment_has_priv_key;
  900|    937|            return key_str;
  901|    937|        };
  902|       |        // The upward function computes for a node, given whether its parent is a wrapper,
  903|       |        // and the string representations of its child nodes, the string representation of the node.
  904|    937|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  905|    937|        auto upfn = [is_tapscript, &toString](bool wrapped, const Node& node, std::span<std::string> subs) -> std::optional<std::string> {
  906|    937|            std::string ret = wrapped ? ":" : "";
  907|       |
  908|    937|            switch (node.fragment) {
  909|    937|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  910|    937|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  911|    937|                case Fragment::WRAP_C:
  912|    937|                    if (node.subs[0].fragment == Fragment::PK_K) {
  913|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  914|    937|                        auto key_str = toString(node.subs[0].keys[0]);
  915|    937|                        if (!key_str) return {};
  916|    937|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  917|    937|                    }
  918|    937|                    if (node.subs[0].fragment == Fragment::PK_H) {
  919|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  920|    937|                        auto key_str = toString(node.subs[0].keys[0]);
  921|    937|                        if (!key_str) return {};
  922|    937|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  923|    937|                    }
  924|    937|                    return "c" + std::move(subs[0]);
  925|    937|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  926|    937|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  927|    937|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  928|    937|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  929|    937|                case Fragment::AND_V:
  930|       |                    // t:X is syntactic sugar for and_v(X,1).
  931|    937|                    if (node.subs[1].fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  932|    937|                    break;
  933|    937|                case Fragment::OR_I:
  934|    937|                    if (node.subs[0].fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  935|    937|                    if (node.subs[1].fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  936|    937|                    break;
  937|    937|                default: break;
  938|    937|            }
  939|    937|            switch (node.fragment) {
  940|    937|                case Fragment::PK_K: {
  941|    937|                    auto key_str = toString(node.keys[0]);
  942|    937|                    if (!key_str) return {};
  943|    937|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  944|    937|                }
  945|    937|                case Fragment::PK_H: {
  946|    937|                    auto key_str = toString(node.keys[0]);
  947|    937|                    if (!key_str) return {};
  948|    937|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  949|    937|                }
  950|    937|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  951|    937|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  952|    937|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  953|    937|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  954|    937|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  955|    937|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  956|    937|                case Fragment::JUST_1: return std::move(ret) + "1";
  957|    937|                case Fragment::JUST_0: return std::move(ret) + "0";
  958|    937|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  959|    937|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  960|    937|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  961|    937|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  962|    937|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  963|    937|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  964|    937|                case Fragment::ANDOR:
  965|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  966|    937|                    if (node.subs[2].fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  967|    937|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  968|    937|                case Fragment::MULTI: {
  969|    937|                    CHECK_NONFATAL(!is_tapscript);
  970|    937|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  971|    937|                    for (const auto& key : node.keys) {
  972|    937|                        auto key_str = toString(key);
  973|    937|                        if (!key_str) return {};
  974|    937|                        str += "," + std::move(*key_str);
  975|    937|                    }
  976|    937|                    return std::move(str) + ")";
  977|    937|                }
  978|    937|                case Fragment::MULTI_A: {
  979|    937|                    CHECK_NONFATAL(is_tapscript);
  980|    937|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  981|    937|                    for (const auto& key : node.keys) {
  982|    937|                        auto key_str = toString(key);
  983|    937|                        if (!key_str) return {};
  984|    937|                        str += "," + std::move(*key_str);
  985|    937|                    }
  986|    937|                    return std::move(str) + ")";
  987|    937|                }
  988|    937|                case Fragment::THRESH: {
  989|    937|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  990|    937|                    for (auto& sub : subs) {
  991|    937|                        str += "," + std::move(sub);
  992|    937|                    }
  993|    937|                    return std::move(str) + ")";
  994|    937|                }
  995|    937|                default: break;
  996|    937|            }
  997|    937|            assert(false);
  998|    937|        };
  999|       |
 1000|    937|        return TreeEvalMaybe<std::string>(false, downfn, upfn);
 1001|    937|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_19KeyParserEEENS3_8optionalIS9_EERKT_RbEUlbRKS1_mE_ZNKSA_ISC_EESE_SH_SI_EUlbSK_NS3_4spanIS9_Lm18446744073709551615EEEE_EENSD_ISF_EET0_T1_T2_:
  653|    937|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|    937|        struct StackElem
  656|    937|        {
  657|    937|            const Node& node; //!< The node being evaluated.
  658|    937|            size_t expanded; //!< How many children of this node have been expanded.
  659|    937|            State state; //!< The state for that node.
  660|       |
  661|    937|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|    937|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|    937|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|    937|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|    937|        std::vector<Result> results;
  669|    937|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|   313k|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 312k, False: 937]
  ------------------
  688|   312k|            const Node& node = stack.back().node;
  689|   312k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 155k, False: 156k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   155k|                size_t child_index = stack.back().expanded++;
  694|   155k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   155k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   155k|                continue;
  697|   155k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|   312k|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 156k, False: 0]
  ------------------
  700|   156k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   156k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   156k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 156k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   156k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   156k|            results.push_back(std::move(*result));
  707|   156k|            stack.pop_back();
  708|   156k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|    937|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 937, False: 0]
  ------------------
  711|    937|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|    937|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|    937|        return std::move(results[0]);
  713|    937|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbZNKS1_8ToStringIN12_GLOBAL__N_19KeyParserEEENS3_8optionalIS9_EERKT_RbEUlbRKS1_mE_ZNKSA_ISC_EESE_SH_SI_EUlbSK_NS3_4spanIS9_Lm18446744073709551615EEEE_EENSD_ISF_EET0_T1_T2_EN9StackElemC2ESK_mOb:
  662|   156k|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_RbENKUlbRKS1_mE_clEbSJ_m:
  887|   155k|        auto downfn = [](bool, const Node& node, size_t) {
  888|   155k|            return (node.fragment == Fragment::WRAP_A || node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (888:21): [True: 4.48k, False: 151k]
  |  Branch (888:58): [True: 1.23k, False: 150k]
  ------------------
  889|   150k|                    node.fragment == Fragment::WRAP_D || node.fragment == Fragment::WRAP_V ||
  ------------------
  |  Branch (889:21): [True: 1.11k, False: 149k]
  |  Branch (889:58): [True: 3.63k, False: 145k]
  ------------------
  890|   145k|                    node.fragment == Fragment::WRAP_J || node.fragment == Fragment::WRAP_N ||
  ------------------
  |  Branch (890:21): [True: 1.52k, False: 143k]
  |  Branch (890:58): [True: 32.9k, False: 111k]
  ------------------
  891|   111k|                    node.fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (891:21): [True: 764, False: 110k]
  ------------------
  892|   110k|                    (node.fragment == Fragment::AND_V && node.subs[1].fragment == Fragment::JUST_1) ||
  ------------------
  |  Branch (892:22): [True: 4.89k, False: 105k]
  |  Branch (892:58): [True: 4.68k, False: 210]
  ------------------
  893|   105k|                    (node.fragment == Fragment::OR_I && node.subs[0].fragment == Fragment::JUST_0) ||
  ------------------
  |  Branch (893:22): [True: 81.4k, False: 24.0k]
  |  Branch (893:57): [True: 70.0k, False: 11.4k]
  ------------------
  894|  35.4k|                    (node.fragment == Fragment::OR_I && node.subs[1].fragment == Fragment::JUST_0));
  ------------------
  |  Branch (894:22): [True: 11.4k, False: 24.0k]
  |  Branch (894:57): [True: 9.99k, False: 1.42k]
  ------------------
  895|   155k|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_RbENKUlbRKS1_NS5_4spanISC_Lm18446744073709551615EEEE_clEbSJ_SL_:
  905|   156k|        auto upfn = [is_tapscript, &toString](bool wrapped, const Node& node, std::span<std::string> subs) -> std::optional<std::string> {
  906|   156k|            std::string ret = wrapped ? ":" : "";
  ------------------
  |  Branch (906:31): [True: 130k, False: 26.4k]
  ------------------
  907|       |
  908|   156k|            switch (node.fragment) {
  909|  4.48k|                case Fragment::WRAP_A: return "a" + std::move(subs[0]);
  ------------------
  |  Branch (909:17): [True: 4.48k, False: 152k]
  ------------------
  910|  1.23k|                case Fragment::WRAP_S: return "s" + std::move(subs[0]);
  ------------------
  |  Branch (910:17): [True: 1.23k, False: 155k]
  ------------------
  911|    764|                case Fragment::WRAP_C:
  ------------------
  |  Branch (911:17): [True: 764, False: 156k]
  ------------------
  912|    764|                    if (node.subs[0].fragment == Fragment::PK_K) {
  ------------------
  |  Branch (912:25): [True: 233, False: 531]
  ------------------
  913|       |                        // pk(K) is syntactic sugar for c:pk_k(K)
  914|    233|                        auto key_str = toString(node.subs[0].keys[0]);
  915|    233|                        if (!key_str) return {};
  ------------------
  |  Branch (915:29): [True: 0, False: 233]
  ------------------
  916|    233|                        return std::move(ret) + "pk(" + std::move(*key_str) + ")";
  917|    233|                    }
  918|    531|                    if (node.subs[0].fragment == Fragment::PK_H) {
  ------------------
  |  Branch (918:25): [True: 488, False: 43]
  ------------------
  919|       |                        // pkh(K) is syntactic sugar for c:pk_h(K)
  920|    488|                        auto key_str = toString(node.subs[0].keys[0]);
  921|    488|                        if (!key_str) return {};
  ------------------
  |  Branch (921:29): [True: 0, False: 488]
  ------------------
  922|    488|                        return std::move(ret) + "pkh(" + std::move(*key_str) + ")";
  923|    488|                    }
  924|     43|                    return "c" + std::move(subs[0]);
  925|  1.11k|                case Fragment::WRAP_D: return "d" + std::move(subs[0]);
  ------------------
  |  Branch (925:17): [True: 1.11k, False: 155k]
  ------------------
  926|  3.63k|                case Fragment::WRAP_V: return "v" + std::move(subs[0]);
  ------------------
  |  Branch (926:17): [True: 3.63k, False: 153k]
  ------------------
  927|  1.52k|                case Fragment::WRAP_J: return "j" + std::move(subs[0]);
  ------------------
  |  Branch (927:17): [True: 1.52k, False: 155k]
  ------------------
  928|  32.9k|                case Fragment::WRAP_N: return "n" + std::move(subs[0]);
  ------------------
  |  Branch (928:17): [True: 32.9k, False: 123k]
  ------------------
  929|  2.44k|                case Fragment::AND_V:
  ------------------
  |  Branch (929:17): [True: 2.44k, False: 154k]
  ------------------
  930|       |                    // t:X is syntactic sugar for and_v(X,1).
  931|  2.44k|                    if (node.subs[1].fragment == Fragment::JUST_1) return "t" + std::move(subs[0]);
  ------------------
  |  Branch (931:25): [True: 2.34k, False: 105]
  ------------------
  932|    105|                    break;
  933|  40.7k|                case Fragment::OR_I:
  ------------------
  |  Branch (933:17): [True: 40.7k, False: 116k]
  ------------------
  934|  40.7k|                    if (node.subs[0].fragment == Fragment::JUST_0) return "l" + std::move(subs[1]);
  ------------------
  |  Branch (934:25): [True: 35.0k, False: 5.70k]
  ------------------
  935|  5.70k|                    if (node.subs[1].fragment == Fragment::JUST_0) return "u" + std::move(subs[0]);
  ------------------
  |  Branch (935:25): [True: 4.99k, False: 710]
  ------------------
  936|    710|                    break;
  937|  68.0k|                default: break;
  ------------------
  |  Branch (937:17): [True: 68.0k, False: 88.8k]
  ------------------
  938|   156k|            }
  939|  68.8k|            switch (node.fragment) {
  940|    235|                case Fragment::PK_K: {
  ------------------
  |  Branch (940:17): [True: 235, False: 68.5k]
  ------------------
  941|    235|                    auto key_str = toString(node.keys[0]);
  942|    235|                    if (!key_str) return {};
  ------------------
  |  Branch (942:25): [True: 0, False: 235]
  ------------------
  943|    235|                    return std::move(ret) + "pk_k(" + std::move(*key_str) + ")";
  944|    235|                }
  945|    497|                case Fragment::PK_H: {
  ------------------
  |  Branch (945:17): [True: 497, False: 68.3k]
  ------------------
  946|    497|                    auto key_str = toString(node.keys[0]);
  947|    497|                    if (!key_str) return {};
  ------------------
  |  Branch (947:25): [True: 0, False: 497]
  ------------------
  948|    497|                    return std::move(ret) + "pk_h(" + std::move(*key_str) + ")";
  949|    497|                }
  950|  1.03k|                case Fragment::AFTER: return std::move(ret) + "after(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (950:17): [True: 1.03k, False: 67.7k]
  ------------------
  951|  1.58k|                case Fragment::OLDER: return std::move(ret) + "older(" + util::ToString(node.k) + ")";
  ------------------
  |  Branch (951:17): [True: 1.58k, False: 67.2k]
  ------------------
  952|      1|                case Fragment::HASH256: return std::move(ret) + "hash256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (952:17): [True: 1, False: 68.8k]
  ------------------
  953|    145|                case Fragment::HASH160: return std::move(ret) + "hash160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (953:17): [True: 145, False: 68.6k]
  ------------------
  954|      1|                case Fragment::SHA256: return std::move(ret) + "sha256(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (954:17): [True: 1, False: 68.8k]
  ------------------
  955|     98|                case Fragment::RIPEMD160: return std::move(ret) + "ripemd160(" + HexStr(node.data) + ")";
  ------------------
  |  Branch (955:17): [True: 98, False: 68.7k]
  ------------------
  956|  5.31k|                case Fragment::JUST_1: return std::move(ret) + "1";
  ------------------
  |  Branch (956:17): [True: 5.31k, False: 63.5k]
  ------------------
  957|  53.8k|                case Fragment::JUST_0: return std::move(ret) + "0";
  ------------------
  |  Branch (957:17): [True: 53.8k, False: 15.0k]
  ------------------
  958|    105|                case Fragment::AND_V: return std::move(ret) + "and_v(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (958:17): [True: 105, False: 68.7k]
  ------------------
  959|    809|                case Fragment::AND_B: return std::move(ret) + "and_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (959:17): [True: 809, False: 68.0k]
  ------------------
  960|  1.41k|                case Fragment::OR_B: return std::move(ret) + "or_b(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (960:17): [True: 1.41k, False: 67.4k]
  ------------------
  961|    266|                case Fragment::OR_D: return std::move(ret) + "or_d(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (961:17): [True: 266, False: 68.5k]
  ------------------
  962|    340|                case Fragment::OR_C: return std::move(ret) + "or_c(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (962:17): [True: 340, False: 68.4k]
  ------------------
  963|    710|                case Fragment::OR_I: return std::move(ret) + "or_i(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (963:17): [True: 710, False: 68.1k]
  ------------------
  964|  1.30k|                case Fragment::ANDOR:
  ------------------
  |  Branch (964:17): [True: 1.30k, False: 67.5k]
  ------------------
  965|       |                    // and_n(X,Y) is syntactic sugar for andor(X,Y,0).
  966|  1.30k|                    if (node.subs[2].fragment == Fragment::JUST_0) return std::move(ret) + "and_n(" + std::move(subs[0]) + "," + std::move(subs[1]) + ")";
  ------------------
  |  Branch (966:25): [True: 814, False: 490]
  ------------------
  967|    490|                    return std::move(ret) + "andor(" + std::move(subs[0]) + "," + std::move(subs[1]) + "," + std::move(subs[2]) + ")";
  968|    400|                case Fragment::MULTI: {
  ------------------
  |  Branch (968:17): [True: 400, False: 68.4k]
  ------------------
  969|    400|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |  113|    400|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  970|    400|                    auto str = std::move(ret) + "multi(" + util::ToString(node.k);
  971|    766|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (971:42): [True: 766, False: 400]
  ------------------
  972|    766|                        auto key_str = toString(key);
  973|    766|                        if (!key_str) return {};
  ------------------
  |  Branch (973:29): [True: 0, False: 766]
  ------------------
  974|    766|                        str += "," + std::move(*key_str);
  975|    766|                    }
  976|    400|                    return std::move(str) + ")";
  977|    400|                }
  978|     31|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (978:17): [True: 31, False: 68.7k]
  ------------------
  979|     31|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |  113|     31|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  980|     31|                    auto str = std::move(ret) + "multi_a(" + util::ToString(node.k);
  981|    892|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (981:42): [True: 892, False: 31]
  ------------------
  982|    892|                        auto key_str = toString(key);
  983|    892|                        if (!key_str) return {};
  ------------------
  |  Branch (983:29): [True: 0, False: 892]
  ------------------
  984|    892|                        str += "," + std::move(*key_str);
  985|    892|                    }
  986|     31|                    return std::move(str) + ")";
  987|     31|                }
  988|    718|                case Fragment::THRESH: {
  ------------------
  |  Branch (988:17): [True: 718, False: 68.1k]
  ------------------
  989|    718|                    auto str = std::move(ret) + "thresh(" + util::ToString(node.k);
  990|  14.2k|                    for (auto& sub : subs) {
  ------------------
  |  Branch (990:36): [True: 14.2k, False: 718]
  ------------------
  991|  14.2k|                        str += "," + std::move(sub);
  992|  14.2k|                    }
  993|    718|                    return std::move(str) + ")";
  994|     31|                }
  995|      0|                default: break;
  ------------------
  |  Branch (995:17): [True: 0, False: 68.8k]
  ------------------
  996|  68.8k|            }
  997|  68.8k|            assert(false);
  ------------------
  |  Branch (997:13): [Folded, False: 0]
  ------------------
  998|      0|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToStringIN12_GLOBAL__N_19KeyParserEEENSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEERKT_RbENKUljE_clEj:
  896|  3.11k|        auto toString = [&ctx, &has_priv_key](Key key) -> std::optional<std::string> {
  897|  3.11k|            bool fragment_has_priv_key{false};
  898|  3.11k|            auto key_str{ctx.ToString(key, fragment_has_priv_key)};
  899|  3.11k|            if (key_str) has_priv_key = has_priv_key || fragment_has_priv_key;
  ------------------
  |  Branch (899:17): [True: 3.11k, False: 0]
  |  Branch (899:41): [True: 0, False: 3.11k]
  |  Branch (899:57): [True: 0, False: 3.11k]
  ------------------
  900|  3.11k|            return key_str;
  901|  3.11k|        };
_ZNK10miniscript4NodeIjE7IsValidEv:
 1675|   222k|    bool IsValid() const {
 1676|   222k|        if (GetType() == ""_mst) return false;
  ------------------
  |  Branch (1676:13): [True: 3.59k, False: 219k]
  ------------------
 1677|   219k|        return ScriptSize() <= internal::MaxScriptSize(m_script_ctx);
 1678|   222k|    }
_ZNK10miniscript4NodeIjE14IsNonMalleableEv:
 1684|   216k|    bool IsNonMalleable() const { return GetType() << "m"_mst; }
_ZNK10miniscript4NodeIjE14NeedsSignatureEv:
 1687|  2.47k|    bool NeedsSignature() const { return GetType() << "s"_mst; }
_ZNK10miniscript4NodeIjE17CheckTimeLocksMixEv:
 1690|   215k|    bool CheckTimeLocksMix() const { return GetType() << "k"_mst; }
_ZNK10miniscript4NodeIjE17CheckDuplicateKeyEv:
 1693|   215k|    bool CheckDuplicateKey() const { return has_duplicate_keys && !*has_duplicate_keys; }
  ------------------
  |  Branch (1693:45): [True: 215k, False: 0]
  |  Branch (1693:67): [True: 215k, False: 312]
  ------------------
_ZNK10miniscript4NodeIjE18ValidSatisfactionsEv:
 1696|   218k|    bool ValidSatisfactions() const { return IsValid() && CheckOpsLimit() && CheckStackSize(); }
  ------------------
  |  Branch (1696:46): [True: 216k, False: 2.43k]
  |  Branch (1696:59): [True: 216k, False: 86]
  |  Branch (1696:78): [True: 216k, False: 14]
  ------------------
_ZNK10miniscript4NodeIjE13CheckOpsLimitEv:
 1571|   216k|    bool CheckOpsLimit() const {
 1572|   216k|        if (IsTapscript(m_script_ctx)) return true;
  ------------------
  |  Branch (1572:13): [True: 117k, False: 99.2k]
  ------------------
 1573|  99.2k|        if (const auto ops = GetOps()) return *ops <= MAX_OPS_PER_SCRIPT;
  ------------------
  |  Branch (1573:24): [True: 38.1k, False: 61.1k]
  ------------------
 1574|  61.1k|        return true;
 1575|  99.2k|    }
_ZNK10miniscript4NodeIjE6GetOpsEv:
 1562|  99.2k|    std::optional<uint32_t> GetOps() const {
 1563|  99.2k|        if (!ops.sat.Valid()) return {};
  ------------------
  |  Branch (1563:13): [True: 61.1k, False: 38.1k]
  ------------------
 1564|  38.1k|        return ops.count + ops.sat.Value();
 1565|  99.2k|    }
_ZNK10miniscript8internal6MaxIntIjE5ValidEv:
  374|  99.2k|    bool Valid() const { return valid; }
_ZNK10miniscript8internal6MaxIntIjE5ValueEv:
  375|  38.1k|    I Value() const { return value; }
_ZNK10miniscript4NodeIjE14CheckStackSizeEv:
 1595|   216k|    bool CheckStackSize() const {
 1596|       |        // Since in Tapscript there is no standardness limit on the script and witness sizes, we may run
 1597|       |        // into the maximum stack size while executing the script. Make sure it doesn't happen.
 1598|   216k|        if (IsTapscript(m_script_ctx)) {
  ------------------
  |  Branch (1598:13): [True: 117k, False: 99.1k]
  ------------------
 1599|   117k|            if (const auto exec_ss = GetExecStackSize()) return exec_ss <= MAX_STACK_SIZE;
  ------------------
  |  Branch (1599:28): [True: 10.5k, False: 106k]
  ------------------
 1600|   106k|            return true;
 1601|   117k|        }
 1602|  99.1k|        if (const auto ss = GetStackSize()) return *ss <= MAX_STANDARD_P2WSH_STACK_ITEMS;
  ------------------
  |  Branch (1602:24): [True: 38.0k, False: 61.1k]
  ------------------
 1603|  61.1k|        return true;
 1604|  99.1k|    }
_ZNK10miniscript4NodeIjE16GetExecStackSizeEv:
 1589|   117k|    std::optional<uint32_t> GetExecStackSize() const {
 1590|   117k|        if (!ss.Sat().Valid()) return {};
  ------------------
  |  Branch (1590:13): [True: 106k, False: 10.5k]
  ------------------
 1591|  10.5k|        return ss.Sat().Exec() + static_cast<int32_t>(IsBKW());
 1592|   117k|    }
_ZNK10miniscript8internal7SatInfo4ExecEv:
  460|  10.5k|    int32_t Exec() const { return exec; }
descriptor.cpp:_ZN10miniscript11ForEachNodeIjTkNSt3__19invocableIRKNS_4NodeIT_EEEEZN12_GLOBAL__N_120MiniscriptDescriptorC1ENS1_6vectorINS1_10unique_ptrINS8_14PubkeyProviderENS1_14default_deleteISC_EEEENS1_9allocatorISF_EEEEONS3_IjEEEUlRKSJ_E_EEvS7_OT0_:
  200|  1.94k|{
  201|  1.94k|    std::vector<std::reference_wrapper<const Node<Key>>> stack{root};
  202|   671k|    while (!stack.empty()) {
  ------------------
  |  Branch (202:12): [True: 669k, False: 1.94k]
  ------------------
  203|   669k|        const Node<Key>& node = stack.back();
  204|   669k|        std::invoke(fn, node);
  205|   669k|        stack.pop_back();
  206|   669k|        for (const auto& sub : node.Subs()) {
  ------------------
  |  Branch (206:30): [True: 667k, False: 669k]
  ------------------
  207|   667k|            stack.emplace_back(sub);
  208|   667k|        }
  209|   669k|    }
  210|  1.94k|}
_ZNK10miniscript4NodeIjE8FragmentEv:
  587|   669k|    enum Fragment Fragment() const { return fragment; }
_ZNK10miniscript4NodeIjE1KEv:
  588|     88|    uint32_t K() const { return k; }
_ZNK10miniscript4NodeIjE4SubsEv:
  591|   669k|    const std::vector<Node>& Subs() const { return subs; }
_ZNK10miniscript4NodeIjE8GetMsCtxEv:
 1620|    669|    MiniscriptContext GetMsCtx() const { return m_script_ctx; }
descriptor.cpp:_ZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_:
  799|    669|    {
  800|       |        // To construct the CScript for a Miniscript object, we use the TreeEval algorithm.
  801|       |        // The State is a boolean: whether or not the node's script expansion is followed
  802|       |        // by an OP_VERIFY (which may need to be combined with the last script opcode).
  803|    669|        auto downfn = [](bool verify, const Node& node, size_t index) {
  804|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  805|    669|            if (node.fragment == Fragment::WRAP_V) return true;
  806|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  807|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  808|    669|            if (node.fragment == Fragment::WRAP_S ||
  809|    669|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  810|    669|            return false;
  811|    669|        };
  812|       |        // The upward function computes for a node, given its followed-by-OP_VERIFY status
  813|       |        // and the CScripts of its child nodes, the CScript of the node.
  814|    669|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  815|    669|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, std::span<CScript> subs) -> CScript {
  816|    669|            switch (node.fragment) {
  817|    669|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  818|    669|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  819|    669|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  820|    669|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  821|    669|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  822|    669|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  823|    669|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  824|    669|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  825|    669|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  826|    669|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  827|    669|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  828|    669|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  829|    669|                case Fragment::WRAP_V: {
  830|    669|                    if (node.subs[0].GetType() << "x"_mst) {
  831|    669|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  832|    669|                    } else {
  833|    669|                        return std::move(subs[0]);
  834|    669|                    }
  835|    669|                }
  836|    669|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  837|    669|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  838|    669|                case Fragment::JUST_1: return BuildScript(OP_1);
  839|    669|                case Fragment::JUST_0: return BuildScript(OP_0);
  840|    669|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  841|    669|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  842|    669|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  843|    669|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  844|    669|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  845|    669|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  846|    669|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  847|    669|                case Fragment::MULTI: {
  848|    669|                    CHECK_NONFATAL(!is_tapscript);
  849|    669|                    CScript script = BuildScript(node.k);
  850|    669|                    for (const auto& key : node.keys) {
  851|    669|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  852|    669|                    }
  853|    669|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  854|    669|                }
  855|    669|                case Fragment::MULTI_A: {
  856|    669|                    CHECK_NONFATAL(is_tapscript);
  857|    669|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  858|    669|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  859|    669|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  860|    669|                    }
  861|    669|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  862|    669|                }
  863|    669|                case Fragment::THRESH: {
  864|    669|                    CScript script = std::move(subs[0]);
  865|    669|                    for (size_t i = 1; i < subs.size(); ++i) {
  866|    669|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  867|    669|                    }
  868|    669|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  869|    669|                }
  870|    669|            }
  871|    669|            assert(false);
  872|    669|        };
  873|    669|        return TreeEval<CScript>(false, downfn, upfn);
  874|    669|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE8TreeEvalI7CScriptbRZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS4_IS6_EES3_S9_EUlbSB_NSt3__14spanIS3_Lm18446744073709551615EEEE_EES7_T0_OT1_T2_:
  732|    669|    {
  733|       |        // Invoke TreeEvalMaybe with upfn wrapped to return std::optional<Result>, and then
  734|       |        // unconditionally dereference the result (it cannot be std::nullopt).
  735|    669|        return std::move(*TreeEvalMaybe<Result>(std::move(root_state),
  736|    669|            std::forward<DownFn>(downfn),
  737|    669|            [&upfn](State&& state, const Node& node, std::span<Result> subs) {
  738|    669|                Result res{upfn(std::move(state), node, subs)};
  739|    669|                return std::optional<Result>(std::move(res));
  740|    669|            }
  741|    669|        ));
  742|    669|    }
descriptor.cpp:_ZNK10miniscript4NodeIjE13TreeEvalMaybeI7CScriptbZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS1_8TreeEvalIS3_bRSC_ZNKS4_IS6_EES3_S9_EUlbSB_NSt3__14spanIS3_Lm18446744073709551615EEEE_EES7_T0_OT1_T2_EUlObSB_SH_E_EENSF_8optionalIS7_EESJ_SK_SM_:
  653|    669|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|    669|        struct StackElem
  656|    669|        {
  657|    669|            const Node& node; //!< The node being evaluated.
  658|    669|            size_t expanded; //!< How many children of this node have been expanded.
  659|    669|            State state; //!< The state for that node.
  660|       |
  661|    669|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|    669|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|    669|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|    669|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|    669|        std::vector<Result> results;
  669|    669|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|  1.14M|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 1.14M, False: 669]
  ------------------
  688|  1.14M|            const Node& node = stack.back().node;
  689|  1.14M|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 571k, False: 572k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   571k|                size_t child_index = stack.back().expanded++;
  694|   571k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   571k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   571k|                continue;
  697|   571k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|  1.14M|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 572k, False: 0]
  ------------------
  700|   572k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   572k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   572k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 572k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   572k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   572k|            results.push_back(std::move(*result));
  707|   572k|            stack.pop_back();
  708|   572k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|    669|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 669, False: 0]
  ------------------
  711|    669|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|    669|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|    669|        return std::move(results[0]);
  713|    669|    }
descriptor.cpp:_ZZNK10miniscript4NodeIjE13TreeEvalMaybeI7CScriptbZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS1_8TreeEvalIS3_bRSC_ZNKS4_IS6_EES3_S9_EUlbSB_NSt3__14spanIS3_Lm18446744073709551615EEEE_EES7_T0_OT1_T2_EUlObSB_SH_E_EENSF_8optionalIS7_EESJ_SK_SM_EN9StackElemC2ESB_mSN_:
  662|   572k|                node(node_), expanded(exp_), state(std::move(state_)) {}
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_ENKUlbRKS1_mE_clEbSA_m:
  803|   571k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  804|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  805|   571k|            if (node.fragment == Fragment::WRAP_V) return true;
  ------------------
  |  Branch (805:17): [True: 7.61k, False: 564k]
  ------------------
  806|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  807|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  808|   564k|            if (node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (808:17): [True: 1.63k, False: 562k]
  ------------------
  809|   562k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  ------------------
  |  Branch (809:18): [True: 12.7k, False: 549k]
  |  Branch (809:54): [True: 6.36k, False: 6.36k]
  ------------------
  810|   556k|            return false;
  811|   564k|        };
descriptor.cpp:_ZZNK10miniscript4NodeIjE8TreeEvalI7CScriptbRZNKS1_8ToScriptIN12_GLOBAL__N_111ScriptMakerEEES3_RKT_EUlbRKS1_mE_ZNKS4_IS6_EES3_S9_EUlbSB_NSt3__14spanIS3_Lm18446744073709551615EEEE_EES7_T0_OT1_T2_ENKUlObSB_SG_E_clESM_SB_SG_:
  737|   572k|            [&upfn](State&& state, const Node& node, std::span<Result> subs) {
  738|   572k|                Result res{upfn(std::move(state), node, subs)};
  739|   572k|                return std::optional<Result>(std::move(res));
  740|   572k|            }
descriptor.cpp:_ZZNK10miniscript4NodeIjE8ToScriptIN12_GLOBAL__N_111ScriptMakerEEE7CScriptRKT_ENKUlbRKS1_NSt3__14spanIS5_Lm18446744073709551615EEEE_clEbSA_SD_:
  815|   572k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, std::span<CScript> subs) -> CScript {
  816|   572k|            switch (node.fragment) {
  ------------------
  |  Branch (816:21): [True: 572k, False: 0]
  ------------------
  817|    284|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  ------------------
  |  Branch (817:17): [True: 284, False: 572k]
  ------------------
  818|    148|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  ------------------
  |  Branch (818:17): [True: 148, False: 572k]
  ------------------
  819|     23|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  ------------------
  |  Branch (819:17): [True: 23, False: 572k]
  ------------------
  820|     12|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  ------------------
  |  Branch (820:17): [True: 12, False: 572k]
  ------------------
  821|      0|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (821:17): [True: 0, False: 572k]
  |  Branch (821:110): [True: 0, False: 0]
  ------------------
  822|      0|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (822:17): [True: 0, False: 572k]
  |  Branch (822:116): [True: 0, False: 0]
  ------------------
  823|      0|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (823:17): [True: 0, False: 572k]
  |  Branch (823:112): [True: 0, False: 0]
  ------------------
  824|      0|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (824:17): [True: 0, False: 572k]
  |  Branch (824:112): [True: 0, False: 0]
  ------------------
  825|  8.20k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  ------------------
  |  Branch (825:17): [True: 8.20k, False: 564k]
  ------------------
  826|  1.63k|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  ------------------
  |  Branch (826:17): [True: 1.63k, False: 570k]
  ------------------
  827|    432|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  ------------------
  |  Branch (827:17): [True: 432, False: 572k]
  |  Branch (827:79): [True: 55, False: 377]
  ------------------
  828|  1.25k|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (828:17): [True: 1.25k, False: 571k]
  ------------------
  829|  7.61k|                case Fragment::WRAP_V: {
  ------------------
  |  Branch (829:17): [True: 7.61k, False: 564k]
  ------------------
  830|  7.61k|                    if (node.subs[0].GetType() << "x"_mst) {
  ------------------
  |  Branch (830:25): [True: 7.38k, False: 225]
  ------------------
  831|  7.38k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  832|  7.38k|                    } else {
  833|    225|                        return std::move(subs[0]);
  834|    225|                    }
  835|  7.61k|                }
  836|   126k|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (836:17): [True: 126k, False: 445k]
  ------------------
  837|   207k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  ------------------
  |  Branch (837:17): [True: 207k, False: 365k]
  ------------------
  838|  6.48k|                case Fragment::JUST_1: return BuildScript(OP_1);
  ------------------
  |  Branch (838:17): [True: 6.48k, False: 566k]
  ------------------
  839|   107k|                case Fragment::JUST_0: return BuildScript(OP_0);
  ------------------
  |  Branch (839:17): [True: 107k, False: 465k]
  ------------------
  840|  6.36k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  ------------------
  |  Branch (840:17): [True: 6.36k, False: 566k]
  ------------------
  841|    483|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  ------------------
  |  Branch (841:17): [True: 483, False: 572k]
  ------------------
  842|    300|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  ------------------
  |  Branch (842:17): [True: 300, False: 572k]
  ------------------
  843|     94|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (843:17): [True: 94, False: 572k]
  ------------------
  844|      0|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (844:17): [True: 0, False: 572k]
  ------------------
  845|  96.5k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (845:17): [True: 96.5k, False: 475k]
  ------------------
  846|    429|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (846:17): [True: 429, False: 572k]
  ------------------
  847|    190|                case Fragment::MULTI: {
  ------------------
  |  Branch (847:17): [True: 190, False: 572k]
  ------------------
  848|    190|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |  113|    190|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  849|    190|                    CScript script = BuildScript(node.k);
  850|    711|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (850:42): [True: 711, False: 190]
  ------------------
  851|    711|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  852|    711|                    }
  853|    190|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  ------------------
  |  Branch (853:77): [True: 31, False: 159]
  ------------------
  854|  7.61k|                }
  855|     93|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (855:17): [True: 93, False: 572k]
  ------------------
  856|     93|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |  113|     93|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  857|     93|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  858|    574|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  ------------------
  |  Branch (858:59): [True: 481, False: 93]
  ------------------
  859|    481|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  860|    481|                    }
  861|     93|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  ------------------
  |  Branch (861:67): [True: 0, False: 93]
  ------------------
  862|  7.61k|                }
  863|  1.00k|                case Fragment::THRESH: {
  ------------------
  |  Branch (863:17): [True: 1.00k, False: 571k]
  ------------------
  864|  1.00k|                    CScript script = std::move(subs[0]);
  865|  10.0k|                    for (size_t i = 1; i < subs.size(); ++i) {
  ------------------
  |  Branch (865:40): [True: 9.05k, False: 1.00k]
  ------------------
  866|  9.05k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  867|  9.05k|                    }
  868|  1.00k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (868:67): [True: 139, False: 868]
  ------------------
  869|  7.61k|                }
  870|   572k|            }
  871|   572k|            assert(false);
  ------------------
  |  Branch (871:13): [Folded, False: 0]
  ------------------
  872|      0|        };
_ZNK10miniscript4NodeIjE5CloneEv:
  573|  1.94k|    {
  574|       |        // Use TreeEval() to avoid a stack-overflow due to recursion
  575|  1.94k|        auto upfn = [](const Node& node, std::span<Node> children) {
  576|  1.94k|            std::vector<Node> new_subs;
  577|  1.94k|            for (auto& child : children) {
  578|       |                // It's fine to move from children as they are new nodes having
  579|       |                // been produced by calling this function one level down.
  580|  1.94k|                new_subs.push_back(std::move(child));
  581|  1.94k|            }
  582|  1.94k|            return Node{internal::NoDupCheck{}, node.m_script_ctx, node.fragment, std::move(new_subs), node.keys, node.data, node.k};
  583|  1.94k|        };
  584|  1.94k|        return TreeEval<Node>(upfn);
  585|  1.94k|    }
_ZNK10miniscript4NodeIjE8TreeEvalIS1_ZNKS1_5CloneEvEUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_EET_T0_:
  748|  1.94k|    {
  749|  1.94k|        struct DummyState {};
  750|  1.94k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  751|  1.94k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  752|  1.94k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|  1.94k|                Result res{upfn(node, subs)};
  754|  1.94k|                return std::optional<Result>(std::move(res));
  755|  1.94k|            }
  756|  1.94k|        ));
  757|  1.94k|    }
_ZNK10miniscript4NodeIjE13TreeEvalMaybeIS1_ZNKS1_8TreeEvalIS1_ZNKS1_5CloneEvEUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_EET_T0_E10DummyStateZNKS3_IS1_S9_EESA_SB_EUlSC_S5_mE_ZNKS3_IS1_S9_EESA_SB_EUlSC_S5_S8_E_EENS6_8optionalISA_EESB_T1_T2_:
  653|  1.94k|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|  1.94k|        struct StackElem
  656|  1.94k|        {
  657|  1.94k|            const Node& node; //!< The node being evaluated.
  658|  1.94k|            size_t expanded; //!< How many children of this node have been expanded.
  659|  1.94k|            State state; //!< The state for that node.
  660|       |
  661|  1.94k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|  1.94k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|  1.94k|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|  1.94k|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|  1.94k|        std::vector<Result> results;
  669|  1.94k|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|  1.33M|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 1.33M, False: 1.94k]
  ------------------
  688|  1.33M|            const Node& node = stack.back().node;
  689|  1.33M|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 667k, False: 669k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   667k|                size_t child_index = stack.back().expanded++;
  694|   667k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   667k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   667k|                continue;
  697|   667k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|  1.33M|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 669k, False: 0]
  ------------------
  700|   669k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   669k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   669k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 669k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   669k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   669k|            results.push_back(std::move(*result));
  707|   669k|            stack.pop_back();
  708|   669k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|  1.94k|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 1.94k, False: 0]
  ------------------
  711|  1.94k|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|  1.94k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|  1.94k|        return std::move(results[0]);
  713|  1.94k|    }
_ZZNK10miniscript4NodeIjE13TreeEvalMaybeIS1_ZNKS1_8TreeEvalIS1_ZNKS1_5CloneEvEUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_EET_T0_E10DummyStateZNKS3_IS1_S9_EESA_SB_EUlSC_S5_mE_ZNKS3_IS1_S9_EESA_SB_EUlSC_S5_S8_E_EENS6_8optionalISA_EESB_T1_T2_EN9StackElemC2ES5_mOSC_:
  662|   669k|                node(node_), expanded(exp_), state(std::move(state_)) {}
_ZZNK10miniscript4NodeIjE8TreeEvalIS1_ZNKS1_5CloneEvEUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_EET_T0_ENKUlZNKS2_IS1_S8_EES9_SA_E10DummyStateS4_mE_clESB_S4_m:
  751|   667k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
_ZZNK10miniscript4NodeIjE8TreeEvalIS1_ZNKS1_5CloneEvEUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_EET_T0_ENKUlZNKS2_IS1_S8_EES9_SA_E10DummyStateS4_S7_E_clESB_S4_S7_:
  752|   669k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|   669k|                Result res{upfn(node, subs)};
  754|   669k|                return std::optional<Result>(std::move(res));
  755|   669k|            }
_ZZNK10miniscript4NodeIjE5CloneEvENKUlRKS1_NSt3__14spanIS1_Lm18446744073709551615EEEE_clES3_S6_:
  575|   669k|        auto upfn = [](const Node& node, std::span<Node> children) {
  576|   669k|            std::vector<Node> new_subs;
  577|   669k|            for (auto& child : children) {
  ------------------
  |  Branch (577:30): [True: 667k, False: 669k]
  ------------------
  578|       |                // It's fine to move from children as they are new nodes having
  579|       |                // been produced by calling this function one level down.
  580|   667k|                new_subs.push_back(std::move(child));
  581|   667k|            }
  582|   669k|            return Node{internal::NoDupCheck{}, node.m_script_ctx, node.fragment, std::move(new_subs), node.keys, node.data, node.k};
  583|   669k|        };
_ZN10miniscript4NodeIjEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS1_NS6_9allocatorIS1_EEEENS7_IjNS8_IjEEEENS7_IhNS8_IhEEEEj:
  615|   669k|        : fragment(nt), k(val), keys(std::move(key)), data(std::move(arg)), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
_ZN10miniscript4NodeIjED2Ev:
  553|  8.03M|    {
  554|       |        // Destroy the subexpressions iteratively after moving out their
  555|       |        // subexpressions to avoid a stack-overflow due to recursive calls to
  556|       |        // the subs' destructors.
  557|       |        // We move vectors in order to only update array-pointers inside them
  558|       |        // rather than moving individual Node instances which would involve
  559|       |        // moving/copying each Node field.
  560|  8.03M|        std::vector<std::vector<Node>> queue;
  561|  8.03M|        queue.push_back(std::move(subs));
  562|  9.76M|        do {
  563|  9.76M|            auto flattening{std::move(queue.back())};
  564|  9.76M|            queue.pop_back();
  565|  9.76M|            for (Node& n : flattening) {
  ------------------
  |  Branch (565:26): [True: 2.68M, False: 9.76M]
  ------------------
  566|  2.68M|                if (!n.subs.empty()) queue.push_back(std::move(n.subs));
  ------------------
  |  Branch (566:21): [True: 1.73M, False: 952k]
  ------------------
  567|  2.68M|            }
  568|  9.76M|        } while (!queue.empty());
  ------------------
  |  Branch (568:18): [True: 1.73M, False: 8.03M]
  ------------------
  569|  8.03M|    }
_ZNK10miniscript4Type2IfEb:
  157|  3.66M|    constexpr Type If(bool x) const { return Type(x ? m_flags : 0); }
  ------------------
  |  Branch (157:51): [True: 1.52M, False: 2.14M]
  ------------------
_ZN10miniscript4TypeC2Ej:
  135|  27.0M|    explicit constexpr Type(uint32_t flags) : m_flags(flags) {}
_ZNK10miniscript4TypeorES0_:
  142|  12.9M|    constexpr Type operator|(Type x) const { return Type(m_flags | x.m_flags); }
_ZNK10miniscript4TypeanES0_:
  145|  10.4M|    constexpr Type operator&(Type x) const { return Type(m_flags & x.m_flags); }
_ZNK10miniscript4TypeeqES0_:
  154|   273k|    constexpr bool operator==(Type x) const { return m_flags == x.m_flags; }
_ZN10miniscript8internal3OpsC2EjNS0_6MaxIntIjEES3_:
  397|  2.72M|    Ops(uint32_t in_count, MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : count(in_count), sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal7SatInfoC2Ev:
  452|   159M|    constexpr SatInfo() noexcept : valid(false), netdiff(0), exec(0) {}
_ZN10miniscript8internal7SatInfoC2Eii:
  456|  8.98M|        valid{true}, netdiff{in_netdiff}, exec{in_exec} {}
_ZN10miniscript8internalorERKNS0_7SatInfoES3_:
  464|  54.2M|    {
  465|       |        // Union with an empty set is itself.
  466|  54.2M|        if (!a.valid) return b;
  ------------------
  |  Branch (466:13): [True: 53.0M, False: 1.22M]
  ------------------
  467|  1.22M|        if (!b.valid) return a;
  ------------------
  |  Branch (467:13): [True: 360k, False: 861k]
  ------------------
  468|       |        // Otherwise the netdiff and exec of the union is the maximum of the individual values.
  469|   861k|        return {std::max(a.netdiff, b.netdiff), std::max(a.exec, b.exec)};
  470|  1.22M|    }
_ZN10miniscript8internalplERKNS0_7SatInfoES3_:
  474|   162M|    {
  475|       |        // Concatenation with an empty set yields an empty set.
  476|   162M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (476:13): [True: 157M, False: 4.27M]
  |  Branch (476:25): [True: 459k, False: 3.81M]
  ------------------
  477|       |        // Otherwise, the maximum stack size difference for the combined scripts is the sum of the
  478|       |        // netdiffs, and the maximum stack size difference anywhere is either b.exec (if the
  479|       |        // maximum occurred in b) or b.netdiff+a.exec (if the maximum occurred in a).
  480|  3.81M|        return {a.netdiff + b.netdiff, std::max(b.exec, b.netdiff + a.exec)};
  481|   162M|    }
_ZN10miniscript8internal7SatInfo5EmptyEv:
  484|  15.2k|    static constexpr SatInfo Empty() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo4PushEv:
  486|   993k|    static constexpr SatInfo Push() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo4HashEv:
  488|  2.22k|    static constexpr SatInfo Hash() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo3NopEv:
  490|  9.18k|    static constexpr SatInfo Nop() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo2IfEv:
  492|  1.93M|    static constexpr SatInfo If() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8BinaryOpEv:
  494|   108k|    static constexpr SatInfo BinaryOp() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo6OP_DUPEv:
  497|  27.7k|    static constexpr SatInfo OP_DUP() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo8OP_IFDUPEb:
  498|  12.6k|    static constexpr SatInfo OP_IFDUP(bool nonzero) noexcept { return {nonzero ? -1 : 0, 0}; }
  ------------------
  |  Branch (498:72): [True: 4.20k, False: 8.40k]
  ------------------
_ZN10miniscript8internal7SatInfo14OP_EQUALVERIFYEv:
  499|  2.22k|    static constexpr SatInfo OP_EQUALVERIFY() noexcept { return {2, 2}; }
_ZN10miniscript8internal7SatInfo8OP_EQUALEv:
  500|  15.7k|    static constexpr SatInfo OP_EQUAL() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo7OP_SIZEEv:
  501|   534k|    static constexpr SatInfo OP_SIZE() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo11OP_CHECKSIGEv:
  502|  95.0k|    static constexpr SatInfo OP_CHECKSIG() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo12OP_0NOTEQUALEv:
  503|   533k|    static constexpr SatInfo OP_0NOTEQUAL() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo9OP_VERIFYEv:
  504|  28.0k|    static constexpr SatInfo OP_VERIFY() noexcept { return {1, 1}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoES2_:
  512|  2.18M|    constexpr StackSize(SatInfo in_sat, SatInfo in_dsat) noexcept : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoE:
  513|  8.09k|    constexpr StackSize(SatInfo in_both) noexcept : sat(in_both), dsat(in_both) {};
_ZNK10miniscript8internal9StackSize3SatEv:
  515|  55.2M|    const SatInfo& Sat() const { return sat; }
_ZNK10miniscript8internal9StackSize4DsatEv:
  516|  54.4M|    const SatInfo& Dsat() const { return dsat; }
_ZN10miniscript8internal11WitnessSizeC2ENS0_6MaxIntIjEES3_:
  525|  2.14M|    WitnessSize(MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal13MaxScriptSizeENS_17MiniscriptContextE:
  285|   226k|{
  286|   226k|    if (IsTapscript(ms_ctx)) {
  ------------------
  |  Branch (286:9): [True: 124k, False: 101k]
  ------------------
  287|       |        // Leaf scripts under Tapscript are not explicitly limited in size. They are only implicitly
  288|       |        // bounded by the maximum standard size of a spending transaction. Let the maximum script
  289|       |        // size conservatively be small enough such that even a maximum sized witness and a reasonably
  290|       |        // sized spending transaction can spend an output paying to this script without running into
  291|       |        // the maximum standard tx size limit.
  292|   124k|        constexpr auto max_size{MAX_STANDARD_TX_WEIGHT - TX_BODY_LEEWAY_WEIGHT - MAX_TAPSCRIPT_SAT_SIZE};
  293|   124k|        return max_size - GetSizeOfCompactSize(max_size);
  294|   124k|    }
  295|   101k|    return MAX_STANDARD_P2WSH_SCRIPT_SIZE;
  296|   226k|}
_ZN10miniscript11IsTapscriptENS_17MiniscriptContextE:
  260|  6.13M|{
  261|  6.13M|    switch (ms_ctx) {
  ------------------
  |  Branch (261:13): [True: 6.13M, False: 0]
  ------------------
  262|   603k|        case MiniscriptContext::P2WSH: return false;
  ------------------
  |  Branch (262:9): [True: 603k, False: 5.53M]
  ------------------
  263|  5.53M|        case MiniscriptContext::TAPSCRIPT: return true;
  ------------------
  |  Branch (263:9): [True: 5.53M, False: 603k]
  ------------------
  264|  6.13M|    }
  265|  6.13M|    assert(false);
  ------------------
  |  Branch (265:5): [Folded, False: 0]
  ------------------
  266|      0|}
_ZN10miniscript8internal6MaxIntIjEC2Ej:
  372|  12.5M|    MaxInt(I val) : valid(true), value(val) {}
_ZN10miniscript8internal6MaxIntIjEC2Ev:
  371|   214M|    MaxInt() : valid(false), value(0) {}
_ZN10miniscript8internalplERKNS0_6MaxIntIjEES4_:
  377|   216M|    friend MaxInt<I> operator+(const MaxInt<I>& a, const MaxInt<I>& b) {
  378|   216M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (378:13): [True: 211M, False: 4.62M]
  |  Branch (378:25): [True: 396k, False: 4.22M]
  ------------------
  379|  4.22M|        return a.value + b.value;
  380|   216M|    }
_ZN10miniscript8internalorERKNS0_6MaxIntIjEES4_:
  382|   108M|    friend MaxInt<I> operator|(const MaxInt<I>& a, const MaxInt<I>& b) {
  383|   108M|        if (!a.valid) return b;
  ------------------
  |  Branch (383:13): [True: 106M, False: 2.44M]
  ------------------
  384|  2.44M|        if (!b.valid) return a;
  ------------------
  |  Branch (384:13): [True: 722k, False: 1.72M]
  ------------------
  385|  1.72M|        return std::max(a.value, b.value);
  386|  2.44M|    }
_ZNK10miniscript4TypelsES0_:
  148|  51.9M|    constexpr bool operator<<(Type x) const { return (x.m_flags & ~m_flags) == 0; }

_ZN6script5ConstERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_4spanIKcLm18446744073709551615EEEb:
   14|  1.31M|{
   15|  1.31M|    if ((size_t)sp.size() >= str.size() && std::equal(str.begin(), str.end(), sp.begin())) {
  ------------------
  |  Branch (15:9): [True: 1.29M, False: 14.8k]
  |  Branch (15:44): [True: 240k, False: 1.05M]
  ------------------
   16|   240k|        if (skip) sp = sp.subspan(str.size());
  ------------------
  |  Branch (16:13): [True: 215k, False: 24.9k]
  ------------------
   17|   240k|        return true;
   18|   240k|    }
   19|  1.07M|    return false;
   20|  1.31M|}
_ZN6script4FuncERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_4spanIKcLm18446744073709551615EEE:
   23|   249k|{
   24|   249k|    if ((size_t)sp.size() >= str.size() + 2 && sp[str.size()] == '(' && sp[sp.size() - 1] == ')' && std::equal(str.begin(), str.end(), sp.begin())) {
  ------------------
  |  Branch (24:9): [True: 240k, False: 9.61k]
  |  Branch (24:48): [True: 58.0k, False: 182k]
  |  Branch (24:73): [True: 55.6k, False: 2.45k]
  |  Branch (24:101): [True: 33.5k, False: 22.0k]
  ------------------
   25|  33.5k|        sp = sp.subspan(str.size() + 1, sp.size() - str.size() - 2);
   26|  33.5k|        return true;
   27|  33.5k|    }
   28|   216k|    return false;
   29|   249k|}
_ZN6script4ExprERNSt3__14spanIKcLm18446744073709551615EEE:
   32|   104k|{
   33|   104k|    int level = 0;
   34|   104k|    auto it = sp.begin();
   35|  22.7M|    while (it != sp.end()) {
  ------------------
  |  Branch (35:12): [True: 22.6M, False: 32.8k]
  ------------------
   36|  22.6M|        if (*it == '(' || *it == '{') {
  ------------------
  |  Branch (36:13): [True: 185k, False: 22.5M]
  |  Branch (36:27): [True: 6.39k, False: 22.5M]
  ------------------
   37|   192k|            ++level;
   38|  22.5M|        } else if (level && (*it == ')' || *it == '}')) {
  ------------------
  |  Branch (38:20): [True: 17.6M, False: 4.87M]
  |  Branch (38:30): [True: 152k, False: 17.4M]
  |  Branch (38:44): [True: 1.15k, False: 17.4M]
  ------------------
   39|   153k|            --level;
   40|  22.3M|        } else if (level == 0 && (*it == ')' || *it == '}' || *it == ',')) {
  ------------------
  |  Branch (40:20): [True: 4.87M, False: 17.4M]
  |  Branch (40:35): [True: 2.47k, False: 4.87M]
  |  Branch (40:49): [True: 243, False: 4.87M]
  |  Branch (40:63): [True: 68.8k, False: 4.80M]
  ------------------
   41|  71.5k|            break;
   42|  71.5k|        }
   43|  22.6M|        ++it;
   44|  22.6M|    }
   45|   104k|    std::span<const char> ret = sp.first(it - sp.begin());
   46|   104k|    sp = sp.subspan(it - sp.begin());
   47|   104k|    return ret;
   48|   104k|}

_ZN9CScriptIDC2ERK7CScript:
   17|    441|CScriptID::CScriptID(const CScript& in) : BaseHash(Hash160(in)) {}

_Z12ToByteVectorI6PKHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|      8|{
   70|      8|    return std::vector<unsigned char>(in.begin(), in.end());
   71|      8|}
_Z12ToByteVectorI10ScriptHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|    130|{
   70|    130|    return std::vector<unsigned char>(in.begin(), in.end());
   71|    130|}
_Z12ToByteVectorI19WitnessV0ScriptHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|    311|{
   70|    311|    return std::vector<unsigned char>(in.begin(), in.end());
   71|    311|}
_Z12ToByteVectorI16WitnessV0KeyHashENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|      4|{
   70|      4|    return std::vector<unsigned char>(in.begin(), in.end());
   71|      4|}
_Z12ToByteVectorI16WitnessV1TaprootENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|  2.67k|{
   70|  2.67k|    return std::vector<unsigned char>(in.begin(), in.end());
   71|  2.67k|}
_Z11BuildScriptIJRKlEE7CScriptDpOT_:
  612|    232|{
  613|    232|    CScript ret;
  614|    232|    int cnt{0};
  615|       |
  616|    232|    ([&ret, &cnt] (Ts&& input) {
  617|    232|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    232|            if (cnt == 0) {
  620|    232|                ret = std::forward<Ts>(input);
  621|    232|            } else {
  622|    232|                ret.insert(ret.end(), input.begin(), input.end());
  623|    232|            }
  624|    232|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    232|            ret << input;
  627|    232|        }
  628|    232|        cnt++;
  629|    232|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    232|    return ret;
  632|    232|}
_ZZ11BuildScriptIJRKlEE7CScriptDpOT_ENKUlS1_E_clES1_:
  616|    232|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    232|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    232|            ret << input;
  627|    232|        }
  628|    232|        cnt++;
  629|    232|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_:
  612|    284|{
  613|    284|    CScript ret;
  614|    284|    int cnt{0};
  615|       |
  616|    284|    ([&ret, &cnt] (Ts&& input) {
  617|    284|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    284|            if (cnt == 0) {
  620|    284|                ret = std::forward<Ts>(input);
  621|    284|            } else {
  622|    284|                ret.insert(ret.end(), input.begin(), input.end());
  623|    284|            }
  624|    284|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    284|            ret << input;
  627|    284|        }
  628|    284|        cnt++;
  629|    284|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    284|    return ret;
  632|    284|}
_ZZ11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_ENKUlOS4_E_clES9_:
  616|    284|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    284|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    284|            ret << input;
  627|    284|        }
  628|    284|        cnt++;
  629|    284|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  612|    148|{
  613|    148|    CScript ret;
  614|    148|    int cnt{0};
  615|       |
  616|    148|    ([&ret, &cnt] (Ts&& input) {
  617|    148|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    148|            if (cnt == 0) {
  620|    148|                ret = std::forward<Ts>(input);
  621|    148|            } else {
  622|    148|                ret.insert(ret.end(), input.begin(), input.end());
  623|    148|            }
  624|    148|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    148|            ret << input;
  627|    148|        }
  628|    148|        cnt++;
  629|    148|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    148|    return ret;
  632|    148|}
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESA_:
  616|    148|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    148|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    148|            ret << input;
  627|    148|        }
  628|    148|        cnt++;
  629|    148|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESA_:
  616|    148|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    148|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    148|            ret << input;
  627|    148|        }
  628|    148|        cnt++;
  629|    148|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS5_E_clESA_:
  616|    148|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    148|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    148|            ret << input;
  627|    148|        }
  628|    148|        cnt++;
  629|    148|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESA_:
  616|    148|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    148|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    148|            ret << input;
  627|    148|        }
  628|    148|        cnt++;
  629|    148|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_:
  612|     35|{
  613|     35|    CScript ret;
  614|     35|    int cnt{0};
  615|       |
  616|     35|    ([&ret, &cnt] (Ts&& input) {
  617|     35|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     35|            if (cnt == 0) {
  620|     35|                ret = std::forward<Ts>(input);
  621|     35|            } else {
  622|     35|                ret.insert(ret.end(), input.begin(), input.end());
  623|     35|            }
  624|     35|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     35|            ret << input;
  627|     35|        }
  628|     35|        cnt++;
  629|     35|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|     35|    return ret;
  632|     35|}
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlS1_E_clES1_:
  616|     35|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     35|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     35|            ret << input;
  627|     35|        }
  628|     35|        cnt++;
  629|     35|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlOS2_E_clES7_:
  616|     35|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     35|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     35|            ret << input;
  627|     35|        }
  628|     35|        cnt++;
  629|     35|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_:
  612|  8.20k|{
  613|  8.20k|    CScript ret;
  614|  8.20k|    int cnt{0};
  615|       |
  616|  8.20k|    ([&ret, &cnt] (Ts&& input) {
  617|  8.20k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  8.20k|            if (cnt == 0) {
  620|  8.20k|                ret = std::forward<Ts>(input);
  621|  8.20k|            } else {
  622|  8.20k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  8.20k|            }
  624|  8.20k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  8.20k|            ret << input;
  627|  8.20k|        }
  628|  8.20k|        cnt++;
  629|  8.20k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  8.20k|    return ret;
  632|  8.20k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|  8.20k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  8.20k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  8.20k|            ret << input;
  627|  8.20k|        }
  628|  8.20k|        cnt++;
  629|  8.20k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|  8.20k|    ([&ret, &cnt] (Ts&& input) {
  617|  8.20k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  8.20k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 8.20k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  8.20k|            } else {
  622|  8.20k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  8.20k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  8.20k|        cnt++;
  629|  8.20k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|  8.20k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  8.20k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  8.20k|            ret << input;
  627|  8.20k|        }
  628|  8.20k|        cnt++;
  629|  8.20k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_:
  612|  1.63k|{
  613|  1.63k|    CScript ret;
  614|  1.63k|    int cnt{0};
  615|       |
  616|  1.63k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.63k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.63k|            if (cnt == 0) {
  620|  1.63k|                ret = std::forward<Ts>(input);
  621|  1.63k|            } else {
  622|  1.63k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.63k|            }
  624|  1.63k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.63k|            ret << input;
  627|  1.63k|        }
  628|  1.63k|        cnt++;
  629|  1.63k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.63k|    return ret;
  632|  1.63k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlOS0_E_clES6_:
  616|  1.63k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.63k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.63k|            ret << input;
  627|  1.63k|        }
  628|  1.63k|        cnt++;
  629|  1.63k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlS2_E_clES2_:
  616|  1.63k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.63k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.63k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 1.63k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  1.63k|            } else {
  622|  1.63k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.63k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.63k|        cnt++;
  629|  1.63k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_:
  612|   214k|{
  613|   214k|    CScript ret;
  614|   214k|    int cnt{0};
  615|       |
  616|   214k|    ([&ret, &cnt] (Ts&& input) {
  617|   214k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   214k|            if (cnt == 0) {
  620|   214k|                ret = std::forward<Ts>(input);
  621|   214k|            } else {
  622|   214k|                ret.insert(ret.end(), input.begin(), input.end());
  623|   214k|            }
  624|   214k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   214k|            ret << input;
  627|   214k|        }
  628|   214k|        cnt++;
  629|   214k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|   214k|    return ret;
  632|   214k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  616|   214k|    ([&ret, &cnt] (Ts&& input) {
  617|   214k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   214k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 214k, False: 0]
  ------------------
  620|   214k|                ret = std::forward<Ts>(input);
  621|   214k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|   214k|        cnt++;
  629|   214k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  616|   214k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   214k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   214k|            ret << input;
  627|   214k|        }
  628|   214k|        cnt++;
  629|   214k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_:
  612|  1.25k|{
  613|  1.25k|    CScript ret;
  614|  1.25k|    int cnt{0};
  615|       |
  616|  1.25k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.25k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.25k|            if (cnt == 0) {
  620|  1.25k|                ret = std::forward<Ts>(input);
  621|  1.25k|            } else {
  622|  1.25k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.25k|            }
  624|  1.25k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.25k|            ret << input;
  627|  1.25k|        }
  628|  1.25k|        cnt++;
  629|  1.25k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.25k|    return ret;
  632|  1.25k|}
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|  1.25k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.25k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.25k|            ret << input;
  627|  1.25k|        }
  628|  1.25k|        cnt++;
  629|  1.25k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|  1.25k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.25k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.25k|            ret << input;
  627|  1.25k|        }
  628|  1.25k|        cnt++;
  629|  1.25k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|  1.25k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.25k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.25k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 1.25k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  1.25k|            } else {
  622|  1.25k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.25k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.25k|        cnt++;
  629|  1.25k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|  1.25k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.25k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.25k|            ret << input;
  627|  1.25k|        }
  628|  1.25k|        cnt++;
  629|  1.25k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_:
  612|   126k|{
  613|   126k|    CScript ret;
  614|   126k|    int cnt{0};
  615|       |
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|   126k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   126k|            if (cnt == 0) {
  620|   126k|                ret = std::forward<Ts>(input);
  621|   126k|            } else {
  622|   126k|                ret.insert(ret.end(), input.begin(), input.end());
  623|   126k|            }
  624|   126k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   126k|            ret << input;
  627|   126k|        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|   126k|    return ret;
  632|   126k|}
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E2_clES6_:
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   126k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   126k|            ret << input;
  627|   126k|        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   126k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   126k|            ret << input;
  627|   126k|        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   126k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   126k|            ret << input;
  627|   126k|        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|   126k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   126k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 126k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|   126k|            } else {
  622|   126k|                ret.insert(ret.end(), input.begin(), input.end());
  623|   126k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|   126k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   126k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   126k|            ret << input;
  627|   126k|        }
  628|   126k|        cnt++;
  629|   126k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeEE7CScriptDpOT_:
  612|   113k|{
  613|   113k|    CScript ret;
  614|   113k|    int cnt{0};
  615|       |
  616|   113k|    ([&ret, &cnt] (Ts&& input) {
  617|   113k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   113k|            if (cnt == 0) {
  620|   113k|                ret = std::forward<Ts>(input);
  621|   113k|            } else {
  622|   113k|                ret.insert(ret.end(), input.begin(), input.end());
  623|   113k|            }
  624|   113k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   113k|            ret << input;
  627|   113k|        }
  628|   113k|        cnt++;
  629|   113k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|   113k|    return ret;
  632|   113k|}
_ZZ11BuildScriptIJ10opcodetypeEE7CScriptDpOT_ENKUlOS0_E_clES5_:
  616|   113k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   113k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   113k|            ret << input;
  627|   113k|        }
  628|   113k|        cnt++;
  629|   113k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_EES0_DpOT_:
  612|  6.36k|{
  613|  6.36k|    CScript ret;
  614|  6.36k|    int cnt{0};
  615|       |
  616|  6.36k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.36k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.36k|            if (cnt == 0) {
  620|  6.36k|                ret = std::forward<Ts>(input);
  621|  6.36k|            } else {
  622|  6.36k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  6.36k|            }
  624|  6.36k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.36k|            ret << input;
  627|  6.36k|        }
  628|  6.36k|        cnt++;
  629|  6.36k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  6.36k|    return ret;
  632|  6.36k|}
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlOS0_E_clES5_:
  616|  6.36k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.36k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.36k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 6.36k, False: 0]
  ------------------
  620|  6.36k|                ret = std::forward<Ts>(input);
  621|  6.36k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  6.36k|        cnt++;
  629|  6.36k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlS1_E_clES1_:
  616|  6.36k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.36k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.36k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 6.36k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  6.36k|            } else {
  622|  6.36k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  6.36k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  6.36k|        cnt++;
  629|  6.36k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_:
  612|  9.83k|{
  613|  9.83k|    CScript ret;
  614|  9.83k|    int cnt{0};
  615|       |
  616|  9.83k|    ([&ret, &cnt] (Ts&& input) {
  617|  9.83k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  9.83k|            if (cnt == 0) {
  620|  9.83k|                ret = std::forward<Ts>(input);
  621|  9.83k|            } else {
  622|  9.83k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  9.83k|            }
  624|  9.83k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  9.83k|            ret << input;
  627|  9.83k|        }
  628|  9.83k|        cnt++;
  629|  9.83k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  9.83k|    return ret;
  632|  9.83k|}
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS0_E_clES6_:
  616|  9.83k|    ([&ret, &cnt] (Ts&& input) {
  617|  9.83k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  9.83k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 9.83k, False: 0]
  ------------------
  620|  9.83k|                ret = std::forward<Ts>(input);
  621|  9.83k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  9.83k|        cnt++;
  629|  9.83k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlS1_E_clES1_:
  616|  9.83k|    ([&ret, &cnt] (Ts&& input) {
  617|  9.83k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  9.83k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 9.83k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  9.83k|            } else {
  622|  9.83k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  9.83k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  9.83k|        cnt++;
  629|  9.83k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS2_E_clES6_:
  616|  9.83k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  9.83k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  9.83k|            ret << input;
  627|  9.83k|        }
  628|  9.83k|        cnt++;
  629|  9.83k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_:
  612|     94|{
  613|     94|    CScript ret;
  614|     94|    int cnt{0};
  615|       |
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|     94|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     94|            if (cnt == 0) {
  620|     94|                ret = std::forward<Ts>(input);
  621|     94|            } else {
  622|     94|                ret.insert(ret.end(), input.begin(), input.end());
  623|     94|            }
  624|     94|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     94|            ret << input;
  627|     94|        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|     94|    return ret;
  632|     94|}
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|     94|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     94|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 94, False: 0]
  ------------------
  620|     94|                ret = std::forward<Ts>(input);
  621|     94|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     94|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     94|            ret << input;
  627|     94|        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     94|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     94|            ret << input;
  627|     94|        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|     94|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     94|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 94]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|     94|            } else {
  622|     94|                ret.insert(ret.end(), input.begin(), input.end());
  623|     94|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  616|     94|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     94|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     94|            ret << input;
  627|     94|        }
  628|     94|        cnt++;
  629|     94|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_:
  612|  96.5k|{
  613|  96.5k|    CScript ret;
  614|  96.5k|    int cnt{0};
  615|       |
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|  96.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  96.5k|            if (cnt == 0) {
  620|  96.5k|                ret = std::forward<Ts>(input);
  621|  96.5k|            } else {
  622|  96.5k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  96.5k|            }
  624|  96.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  96.5k|            ret << input;
  627|  96.5k|        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  96.5k|    return ret;
  632|  96.5k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  96.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  96.5k|            ret << input;
  627|  96.5k|        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E0_clES2_:
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|  96.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  96.5k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 96.5k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  96.5k|            } else {
  622|  96.5k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  96.5k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  96.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  96.5k|            ret << input;
  627|  96.5k|        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|  96.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  96.5k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 96.5k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  96.5k|            } else {
  622|  96.5k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  96.5k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|  96.5k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  96.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  96.5k|            ret << input;
  627|  96.5k|        }
  628|  96.5k|        cnt++;
  629|  96.5k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_:
  612|    429|{
  613|    429|    CScript ret;
  614|    429|    int cnt{0};
  615|       |
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|    429|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    429|            if (cnt == 0) {
  620|    429|                ret = std::forward<Ts>(input);
  621|    429|            } else {
  622|    429|                ret.insert(ret.end(), input.begin(), input.end());
  623|    429|            }
  624|    429|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    429|            ret << input;
  627|    429|        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    429|    return ret;
  632|    429|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|    429|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    429|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 429, False: 0]
  ------------------
  620|    429|                ret = std::forward<Ts>(input);
  621|    429|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    429|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    429|            ret << input;
  627|    429|        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E0_clES2_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|    429|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    429|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 429]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|    429|            } else {
  622|    429|                ret.insert(ret.end(), input.begin(), input.end());
  623|    429|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    429|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    429|            ret << input;
  627|    429|        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|    429|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    429|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 429]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|    429|            } else {
  622|    429|                ret.insert(ret.end(), input.begin(), input.end());
  623|    429|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  616|    429|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    429|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    429|            ret << input;
  627|    429|        }
  628|    429|        cnt++;
  629|    429|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKjEE7CScriptDpOT_:
  612|    190|{
  613|    190|    CScript ret;
  614|    190|    int cnt{0};
  615|       |
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|    190|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    190|            if (cnt == 0) {
  620|    190|                ret = std::forward<Ts>(input);
  621|    190|            } else {
  622|    190|                ret.insert(ret.end(), input.begin(), input.end());
  623|    190|            }
  624|    190|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    190|            ret << input;
  627|    190|        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    190|    return ret;
  632|    190|}
_ZZ11BuildScriptIJRKjEE7CScriptDpOT_ENKUlS1_E_clES1_:
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    190|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    190|            ret << input;
  627|    190|        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_:
  612|    711|{
  613|    711|    CScript ret;
  614|    711|    int cnt{0};
  615|       |
  616|    711|    ([&ret, &cnt] (Ts&& input) {
  617|    711|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    711|            if (cnt == 0) {
  620|    711|                ret = std::forward<Ts>(input);
  621|    711|            } else {
  622|    711|                ret.insert(ret.end(), input.begin(), input.end());
  623|    711|            }
  624|    711|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    711|            ret << input;
  627|    711|        }
  628|    711|        cnt++;
  629|    711|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    711|    return ret;
  632|    711|}
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS0_E_clES9_:
  616|    711|    ([&ret, &cnt] (Ts&& input) {
  617|    711|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    711|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 711, False: 0]
  ------------------
  620|    711|                ret = std::forward<Ts>(input);
  621|    711|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    711|        cnt++;
  629|    711|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS5_E_clES9_:
  616|    711|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    711|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    711|            ret << input;
  627|    711|        }
  628|    711|        cnt++;
  629|    711|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_:
  612|    190|{
  613|    190|    CScript ret;
  614|    190|    int cnt{0};
  615|       |
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|    190|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    190|            if (cnt == 0) {
  620|    190|                ret = std::forward<Ts>(input);
  621|    190|            } else {
  622|    190|                ret.insert(ret.end(), input.begin(), input.end());
  623|    190|            }
  624|    190|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    190|            ret << input;
  627|    190|        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    190|    return ret;
  632|    190|}
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|    190|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    190|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 190, False: 0]
  ------------------
  620|    190|                ret = std::forward<Ts>(input);
  621|    190|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOmE_clES5_:
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    190|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    190|            ret << input;
  627|    190|        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  616|    190|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    190|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    190|            ret << input;
  627|    190|        }
  628|    190|        cnt++;
  629|    190|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_:
  612|     93|{
  613|     93|    CScript ret;
  614|     93|    int cnt{0};
  615|       |
  616|     93|    ([&ret, &cnt] (Ts&& input) {
  617|     93|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     93|            if (cnt == 0) {
  620|     93|                ret = std::forward<Ts>(input);
  621|     93|            } else {
  622|     93|                ret.insert(ret.end(), input.begin(), input.end());
  623|     93|            }
  624|     93|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     93|            ret << input;
  627|     93|        }
  628|     93|        cnt++;
  629|     93|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|     93|    return ret;
  632|     93|}
_ZZ11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlOS4_E_clESA_:
  616|     93|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     93|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     93|            ret << input;
  627|     93|        }
  628|     93|        cnt++;
  629|     93|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlOS5_E_clESA_:
  616|     93|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     93|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     93|            ret << input;
  627|     93|        }
  628|     93|        cnt++;
  629|     93|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_:
  612|    481|{
  613|    481|    CScript ret;
  614|    481|    int cnt{0};
  615|       |
  616|    481|    ([&ret, &cnt] (Ts&& input) {
  617|    481|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    481|            if (cnt == 0) {
  620|    481|                ret = std::forward<Ts>(input);
  621|    481|            } else {
  622|    481|                ret.insert(ret.end(), input.begin(), input.end());
  623|    481|            }
  624|    481|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    481|            ret << input;
  627|    481|        }
  628|    481|        cnt++;
  629|    481|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    481|    return ret;
  632|    481|}
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlOS0_E_clESA_:
  616|    481|    ([&ret, &cnt] (Ts&& input) {
  617|    481|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    481|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 481, False: 0]
  ------------------
  620|    481|                ret = std::forward<Ts>(input);
  621|    481|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    481|        cnt++;
  629|    481|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlOS5_E_clESA_:
  616|    481|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    481|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    481|            ret << input;
  627|    481|        }
  628|    481|        cnt++;
  629|    481|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlOS6_E_clESA_:
  616|    481|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    481|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    481|            ret << input;
  627|    481|        }
  628|    481|        cnt++;
  629|    481|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_:
  612|  1.10k|{
  613|  1.10k|    CScript ret;
  614|  1.10k|    int cnt{0};
  615|       |
  616|  1.10k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.10k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.10k|            if (cnt == 0) {
  620|  1.10k|                ret = std::forward<Ts>(input);
  621|  1.10k|            } else {
  622|  1.10k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.10k|            }
  624|  1.10k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.10k|            ret << input;
  627|  1.10k|        }
  628|  1.10k|        cnt++;
  629|  1.10k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.10k|    return ret;
  632|  1.10k|}
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS0_E_clES7_:
  616|  1.10k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.10k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.10k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 1.10k, False: 0]
  ------------------
  620|  1.10k|                ret = std::forward<Ts>(input);
  621|  1.10k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.10k|        cnt++;
  629|  1.10k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlS2_E_clES2_:
  616|  1.10k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.10k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.10k|            ret << input;
  627|  1.10k|        }
  628|  1.10k|        cnt++;
  629|  1.10k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS3_E_clES7_:
  616|  1.10k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.10k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.10k|            ret << input;
  627|  1.10k|        }
  628|  1.10k|        cnt++;
  629|  1.10k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRjEE7CScriptDpOT_:
  612|  19.5k|{
  613|  19.5k|    CScript ret;
  614|  19.5k|    int cnt{0};
  615|       |
  616|  19.5k|    ([&ret, &cnt] (Ts&& input) {
  617|  19.5k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  19.5k|            if (cnt == 0) {
  620|  19.5k|                ret = std::forward<Ts>(input);
  621|  19.5k|            } else {
  622|  19.5k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  19.5k|            }
  624|  19.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  19.5k|            ret << input;
  627|  19.5k|        }
  628|  19.5k|        cnt++;
  629|  19.5k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  19.5k|    return ret;
  632|  19.5k|}
_ZZ11BuildScriptIJRjEE7CScriptDpOT_ENKUlS0_E_clES0_:
  616|  19.5k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  19.5k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  19.5k|            ret << input;
  627|  19.5k|        }
  628|  19.5k|        cnt++;
  629|  19.5k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRmEE7CScriptDpOT_:
  612|  2.33k|{
  613|  2.33k|    CScript ret;
  614|  2.33k|    int cnt{0};
  615|       |
  616|  2.33k|    ([&ret, &cnt] (Ts&& input) {
  617|  2.33k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  2.33k|            if (cnt == 0) {
  620|  2.33k|                ret = std::forward<Ts>(input);
  621|  2.33k|            } else {
  622|  2.33k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  2.33k|            }
  624|  2.33k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.33k|            ret << input;
  627|  2.33k|        }
  628|  2.33k|        cnt++;
  629|  2.33k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  2.33k|    return ret;
  632|  2.33k|}
_ZZ11BuildScriptIJRmEE7CScriptDpOT_ENKUlS0_E_clES0_:
  616|  2.33k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.33k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.33k|            ret << input;
  627|  2.33k|        }
  628|  2.33k|        cnt++;
  629|  2.33k|    } (std::forward<Ts>(inputs)), ...);
_Z12ToByteVectorI7CPubKeyENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|    502|{
   70|    502|    return std::vector<unsigned char>(in.begin(), in.end());
   71|    502|}
_Z12ToByteVectorI11XOnlyPubKeyENSt3__16vectorIhNS1_9allocatorIhEEEERKT_:
   69|  32.3k|{
   70|  32.3k|    return std::vector<unsigned char>(in.begin(), in.end());
   71|  32.3k|}
_ZN7CScriptlsEl:
  468|  24.7k|    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
_ZN7CScript10push_int64El:
  435|  24.7k|    {
  436|  24.7k|        if (n == -1 || (n >= 1 && n <= 16))
  ------------------
  |  Branch (436:13): [True: 0, False: 24.7k]
  |  Branch (436:25): [True: 24.7k, False: 0]
  |  Branch (436:35): [True: 17.1k, False: 7.60k]
  ------------------
  437|  17.1k|        {
  438|  17.1k|            push_back(n + (OP_1 - 1));
  439|  17.1k|        }
  440|  7.60k|        else if (n == 0)
  ------------------
  |  Branch (440:18): [True: 0, False: 7.60k]
  ------------------
  441|      0|        {
  442|      0|            push_back(OP_0);
  443|      0|        }
  444|  7.60k|        else
  445|  7.60k|        {
  446|  7.60k|            *this << CScriptNum::serialize(n);
  447|  7.60k|        }
  448|  24.7k|        return *this;
  449|  24.7k|    }
_ZN7CScriptC2Ev:
  452|   610k|    CScript() = default;
_ZN10CScriptNum9serializeERKl:
  343|  7.60k|    {
  344|  7.60k|        if(value == 0)
  ------------------
  |  Branch (344:12): [True: 0, False: 7.60k]
  ------------------
  345|      0|            return std::vector<unsigned char>();
  346|       |
  347|  7.60k|        std::vector<unsigned char> result;
  348|  7.60k|        const bool neg = value < 0;
  349|  7.60k|        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
  ------------------
  |  Branch (349:29): [True: 0, False: 7.60k]
  ------------------
  350|       |
  351|  28.9k|        while(absvalue)
  ------------------
  |  Branch (351:15): [True: 21.3k, False: 7.60k]
  ------------------
  352|  21.3k|        {
  353|  21.3k|            result.push_back(absvalue & 0xff);
  354|  21.3k|            absvalue >>= 8;
  355|  21.3k|        }
  356|       |
  357|       |//    - If the most significant byte is >= 0x80 and the value is positive, push a
  358|       |//    new zero-byte to make the significant byte < 0x80 again.
  359|       |
  360|       |//    - If the most significant byte is >= 0x80 and the value is negative, push a
  361|       |//    new 0x80 byte that will be popped off when converting to an integral.
  362|       |
  363|       |//    - If the most significant byte is < 0x80 and the value is negative, add
  364|       |//    0x80 to it, since it will be subtracted and interpreted as a negative when
  365|       |//    converting to an integral.
  366|       |
  367|  7.60k|        if (result.back() & 0x80)
  ------------------
  |  Branch (367:13): [True: 756, False: 6.85k]
  ------------------
  368|    756|            result.push_back(neg ? 0x80 : 0);
  ------------------
  |  Branch (368:30): [True: 0, False: 756]
  ------------------
  369|  6.85k|        else if (neg)
  ------------------
  |  Branch (369:18): [True: 0, False: 6.85k]
  ------------------
  370|      0|            result.back() |= 0x80;
  371|       |
  372|  7.60k|        return result;
  373|  7.60k|    }
_ZN7CScriptlsENSt3__14spanIKhLm18446744073709551615EEE:
  493|  45.3k|    {
  494|  45.3k|        return *this << std::as_bytes(b);
  495|  45.3k|    }
_ZN7CScriptlsENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  485|  45.3k|    {
  486|  45.3k|        AppendDataSize(b.size());
  487|  45.3k|        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
  488|  45.3k|        return *this;
  489|  45.3k|    }
_ZN7CScript14AppendDataSizeEj:
  409|  45.3k|    {
  410|  45.3k|        if (size < OP_PUSHDATA1) {
  ------------------
  |  Branch (410:13): [True: 45.3k, False: 0]
  ------------------
  411|  45.3k|            insert(end(), static_cast<value_type>(size));
  412|  45.3k|        } else if (size <= 0xff) {
  ------------------
  |  Branch (412:20): [True: 0, False: 0]
  ------------------
  413|      0|            insert(end(), OP_PUSHDATA1);
  414|      0|            insert(end(), static_cast<value_type>(size));
  415|      0|        } else if (size <= 0xffff) {
  ------------------
  |  Branch (415:20): [True: 0, False: 0]
  ------------------
  416|      0|            insert(end(), OP_PUSHDATA2);
  417|      0|            value_type data[2];
  418|      0|            WriteLE16(data, size);
  419|      0|            insert(end(), std::cbegin(data), std::cend(data));
  420|      0|        } else {
  421|      0|            insert(end(), OP_PUSHDATA4);
  422|      0|            value_type data[4];
  423|      0|            WriteLE32(data, size);
  424|      0|            insert(end(), std::cbegin(data), std::cend(data));
  425|      0|        }
  426|  45.3k|    }
_ZN7CScript10AppendDataENSt3__14spanIKhLm18446744073709551615EEE:
  429|  45.3k|    {
  430|  45.3k|        insert(end(), data.begin(), data.end());
  431|  45.3k|    }
_ZN7CScriptlsE10opcodetype:
  471|  1.19M|    {
  472|  1.19M|        if (opcode < 0 || opcode > 0xff)
  ------------------
  |  Branch (472:13): [True: 0, False: 1.19M]
  |  Branch (472:27): [True: 0, False: 1.19M]
  ------------------
  473|      0|            throw std::runtime_error("CScript::operator<<(): invalid opcode");
  474|  1.19M|        insert(end(), (unsigned char)opcode);
  475|  1.19M|        return *this;
  476|  1.19M|    }
_ZN7CScriptC2ITkNSt3__114input_iteratorENS1_11__wrap_iterIPhEEEET_S5_:
  454|     25|    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }

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

_ZN19FlatSigningProvider5MergeEOS_:
  151|  12.7k|{
  152|  12.7k|    scripts.merge(b.scripts);
  153|  12.7k|    pubkeys.merge(b.pubkeys);
  154|  12.7k|    keys.merge(b.keys);
  155|  12.7k|    origins.merge(b.origins);
  156|  12.7k|    tr_trees.merge(b.tr_trees);
  157|  12.7k|    aggregate_pubkeys.merge(b.aggregate_pubkeys);
  158|       |    // We shouldn't be merging 2 different sessions, just overwrite with b's sessions.
  159|  12.7k|    if (!musig2_secnonces) musig2_secnonces = b.musig2_secnonces;
  ------------------
  |  Branch (159:9): [True: 12.7k, False: 0]
  ------------------
  160|  12.7k|    return *this;
  161|  12.7k|}
_ZN14TaprootBuilder7CombineEONS_8NodeInfoES1_:
  359|    544|{
  360|    544|    NodeInfo ret;
  361|       |    /* Iterate over all tracked leaves in a, add b's hash to their Merkle branch, and move them to ret. */
  362|  9.29k|    for (auto& leaf : a.leaves) {
  ------------------
  |  Branch (362:21): [True: 9.29k, False: 544]
  ------------------
  363|  9.29k|        leaf.merkle_branch.push_back(b.hash);
  364|  9.29k|        ret.leaves.emplace_back(std::move(leaf));
  365|  9.29k|    }
  366|       |    /* Iterate over all tracked leaves in b, add a's hash to their Merkle branch, and move them to ret. */
  367|    544|    for (auto& leaf : b.leaves) {
  ------------------
  |  Branch (367:21): [True: 544, False: 544]
  ------------------
  368|    544|        leaf.merkle_branch.push_back(a.hash);
  369|    544|        ret.leaves.emplace_back(std::move(leaf));
  370|    544|    }
  371|    544|    ret.hash = ComputeTapbranchHash(a.hash, b.hash);
  372|    544|    return ret;
  373|    544|}
_ZN14TaprootBuilder6InsertEONS_8NodeInfoEi:
  391|  1.90k|{
  392|  1.90k|    assert(depth >= 0 && (size_t)depth <= TAPROOT_CONTROL_MAX_NODE_COUNT);
  ------------------
  |  Branch (392:5): [True: 1.90k, False: 0]
  |  Branch (392:5): [True: 1.90k, False: 0]
  |  Branch (392:5): [True: 1.90k, False: 0]
  ------------------
  393|       |    /* We cannot insert a leaf at a lower depth while a deeper branch is unfinished. Doing
  394|       |     * so would mean the Add() invocations do not correspond to a DFS traversal of a
  395|       |     * binary tree. */
  396|  1.90k|    if ((size_t)depth + 1 < m_branch.size()) {
  ------------------
  |  Branch (396:9): [True: 0, False: 1.90k]
  ------------------
  397|      0|        m_valid = false;
  398|      0|        return;
  399|      0|    }
  400|       |    /* As long as an entry in the branch exists at the specified depth, combine it and propagate up.
  401|       |     * The 'node' variable is overwritten here with the newly combined node. */
  402|  2.45k|    while (m_valid && m_branch.size() > (size_t)depth && m_branch[depth].has_value()) {
  ------------------
  |  Branch (402:12): [True: 2.45k, False: 0]
  |  Branch (402:23): [True: 634, False: 1.81k]
  |  Branch (402:58): [True: 544, False: 90]
  ------------------
  403|    544|        node = Combine(std::move(node), std::move(*m_branch[depth]));
  404|    544|        m_branch.pop_back();
  405|    544|        if (depth == 0) m_valid = false; /* Can't propagate further up than the root */
  ------------------
  |  Branch (405:13): [True: 0, False: 544]
  ------------------
  406|    544|        --depth;
  407|    544|    }
  408|  1.90k|    if (m_valid) {
  ------------------
  |  Branch (408:9): [True: 1.90k, False: 0]
  ------------------
  409|       |        /* Make sure the branch is big enough to place the new node. */
  410|  1.90k|        if (m_branch.size() <= (size_t)depth) m_branch.resize((size_t)depth + 1);
  ------------------
  |  Branch (410:13): [True: 1.81k, False: 90]
  ------------------
  411|  1.90k|        assert(!m_branch[depth].has_value());
  ------------------
  |  Branch (411:9): [True: 1.90k, False: 0]
  ------------------
  412|  1.90k|        m_branch[depth] = std::move(node);
  413|  1.90k|    }
  414|  1.90k|}
_ZN14TaprootBuilder11ValidDepthsERKNSt3__16vectorIiNS0_9allocatorIiEEEE:
  417|  2.64k|{
  418|  2.64k|    std::vector<bool> branch;
  419|  2.64k|    for (int depth : depths) {
  ------------------
  |  Branch (419:20): [True: 1.92k, False: 2.64k]
  ------------------
  420|       |        // This inner loop corresponds to effectively the same logic on branch
  421|       |        // as what Insert() performs on the m_branch variable. Instead of
  422|       |        // storing a NodeInfo object, just remember whether or not there is one
  423|       |        // at that depth.
  424|  1.92k|        if (depth < 0 || (size_t)depth > TAPROOT_CONTROL_MAX_NODE_COUNT) return false;
  ------------------
  |  Branch (424:13): [True: 0, False: 1.92k]
  |  Branch (424:26): [True: 0, False: 1.92k]
  ------------------
  425|  1.92k|        if ((size_t)depth + 1 < branch.size()) return false;
  ------------------
  |  Branch (425:13): [True: 0, False: 1.92k]
  ------------------
  426|  2.48k|        while (branch.size() > (size_t)depth && branch[depth]) {
  ------------------
  |  Branch (426:16): [True: 654, False: 1.82k]
  |  Branch (426:16): [True: 557, False: 1.92k]
  |  Branch (426:49): [True: 557, False: 97]
  ------------------
  427|    557|            branch.pop_back();
  428|    557|            if (depth == 0) return false;
  ------------------
  |  Branch (428:17): [True: 0, False: 557]
  ------------------
  429|    557|            --depth;
  430|    557|        }
  431|  1.92k|        if (branch.size() <= (size_t)depth) branch.resize((size_t)depth + 1);
  ------------------
  |  Branch (431:13): [True: 1.82k, False: 97]
  ------------------
  432|  1.92k|        assert(!branch[depth]);
  ------------------
  |  Branch (432:9): [True: 1.92k, False: 0]
  ------------------
  433|  1.92k|        branch[depth] = true;
  434|  1.92k|    }
  435|       |    // And this check corresponds to the IsComplete() check on m_branch.
  436|  2.64k|    return branch.size() == 0 || (branch.size() == 1 && branch[0]);
  ------------------
  |  Branch (436:12): [True: 1.27k, False: 1.36k]
  |  Branch (436:35): [True: 1.36k, False: 0]
  |  Branch (436:57): [True: 1.36k, False: 0]
  ------------------
  437|  2.64k|}
_ZN14TaprootBuilder3AddEiNSt3__14spanIKhLm18446744073709551615EEEib:
  440|  1.90k|{
  441|  1.90k|    assert((leaf_version & ~TAPROOT_LEAF_MASK) == 0);
  ------------------
  |  Branch (441:5): [True: 1.90k, False: 0]
  ------------------
  442|  1.90k|    if (!IsValid()) return *this;
  ------------------
  |  Branch (442:9): [True: 0, False: 1.90k]
  ------------------
  443|       |    /* Construct NodeInfo object with leaf hash and (if track is true) also leaf information. */
  444|  1.90k|    NodeInfo node;
  445|  1.90k|    node.hash = ComputeTapleafHash(leaf_version, script);
  446|  1.90k|    if (track) node.leaves.emplace_back(LeafInfo{std::vector<unsigned char>(script.begin(), script.end()), leaf_version, {}});
  ------------------
  |  Branch (446:9): [True: 1.90k, False: 0]
  ------------------
  447|       |    /* Insert into the branch. */
  448|  1.90k|    Insert(std::move(node), depth);
  449|  1.90k|    return *this;
  450|  1.90k|}
_ZN14TaprootBuilder8FinalizeERK11XOnlyPubKey:
  463|  2.64k|{
  464|       |    /* Can only call this function when IsComplete() is true. */
  465|  2.64k|    assert(IsComplete());
  ------------------
  |  Branch (465:5): [True: 2.64k, False: 0]
  ------------------
  466|  2.64k|    m_internal_key = internal_key;
  467|  2.64k|    auto ret = m_internal_key.CreateTapTweak(m_branch.size() == 0 ? nullptr : &m_branch[0]->hash);
  ------------------
  |  Branch (467:46): [True: 1.27k, False: 1.36k]
  ------------------
  468|  2.64k|    assert(ret.has_value());
  ------------------
  |  Branch (468:5): [True: 2.64k, False: 0]
  ------------------
  469|  2.64k|    std::tie(m_output_key, m_parity) = *ret;
  470|  2.64k|    return *this;
  471|  2.64k|}
_ZN14TaprootBuilder9GetOutputEv:
  473|  2.64k|WitnessV1Taproot TaprootBuilder::GetOutput() { return WitnessV1Taproot{m_output_key}; }

_ZNK14TaprootBuilder7IsValidEv:
  141|  1.90k|    bool IsValid() const { return m_valid; }
_ZNK14TaprootBuilder10IsCompleteEv:
  143|  5.28k|    bool IsComplete() const { return m_valid && (m_branch.size() == 0 || (m_branch.size() == 1 && m_branch[0].has_value())); }
  ------------------
  |  Branch (143:38): [True: 5.28k, False: 0]
  |  Branch (143:50): [True: 2.55k, False: 2.73k]
  |  Branch (143:75): [True: 2.73k, False: 0]
  |  Branch (143:99): [True: 2.73k, False: 0]
  ------------------
_ZN15SigningProviderD2Ev:
  170|  88.2k|    virtual ~SigningProvider() = default;

_Z21GetScriptForRawPubKeyRK7CPubKey:
  214|     17|{
  215|     17|    return CScript() << std::vector<unsigned char>(pubKey.begin(), pubKey.end()) << OP_CHECKSIG;
  216|     17|}
_Z20GetScriptForMultisigiRKNSt3__16vectorI7CPubKeyNS_9allocatorIS1_EEEE:
  219|     91|{
  220|     91|    CScript script;
  221|       |
  222|     91|    script << nRequired;
  223|     91|    for (const CPubKey& key : keys)
  ------------------
  |  Branch (223:29): [True: 502, False: 91]
  ------------------
  224|    502|        script << ToByteVector(key);
  225|     91|    script << keys.size() << OP_CHECKMULTISIG;
  226|       |
  227|     91|    return script;
  228|     91|}

secp256k1.c:secp256k1_eckey_pubkey_parse:
   18|   100k|static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size) {
   19|   100k|    if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  220|   200k|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
                  if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  221|  64.3k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (19:9): [True: 100k, False: 177]
  |  Branch (19:24): [True: 35.7k, False: 64.3k]
  |  Branch (19:63): [True: 64.3k, False: 0]
  ------------------
   20|   100k|        secp256k1_fe x;
   21|   100k|        return secp256k1_fe_set_b32_limit(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD);
  ------------------
  |  |   88|   100k|#  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);
  ------------------
  |  |  221|   100k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (21:16): [True: 100k, False: 1]
  |  Branch (21:57): [True: 100k, False: 94]
  ------------------
   22|   100k|    } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  222|    354|#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)) {
  ------------------
  |  |  223|    177|#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)) {
  ------------------
  |  |  224|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (22:16): [True: 177, False: 0]
  |  Branch (22:31): [True: 177, False: 0]
  |  Branch (22:78): [True: 0, False: 0]
  |  Branch (22:124): [True: 0, False: 0]
  ------------------
   23|    177|        secp256k1_fe x, y;
   24|    177|        if (!secp256k1_fe_set_b32_limit(&x, pub+1) || !secp256k1_fe_set_b32_limit(&y, pub+33)) {
  ------------------
  |  |   88|    177|#  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|    176|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  |  Branch (24:13): [True: 1, False: 176]
  |  Branch (24:55): [True: 3, False: 173]
  ------------------
   25|      4|            return 0;
   26|      4|        }
   27|    173|        secp256k1_ge_set_xy(elem, &x, &y);
   28|    173|        if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  223|    346|#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06
  ------------------
                      if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  224|    173|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (28:14): [True: 0, False: 173]
  |  Branch (28:60): [True: 0, False: 173]
  ------------------
   29|      0|            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)) {
  ------------------
  |  |  224|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (29:13): [True: 0, False: 0]
  ------------------
   30|      0|            return 0;
   31|      0|        }
   32|    173|        return secp256k1_ge_is_valid_var(elem);
   33|    173|    } else {
   34|      0|        return 0;
   35|      0|    }
   36|   100k|}
secp256k1.c:secp256k1_eckey_pubkey_serialize33:
   38|  70.7k|static void secp256k1_eckey_pubkey_serialize33(secp256k1_ge *elem, unsigned char *pub33) {
   39|  70.7k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(elem));
   40|       |
   41|  70.7k|    secp256k1_fe_normalize_var(&elem->x);
  ------------------
  |  |   80|  70.7k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   42|  70.7k|    secp256k1_fe_normalize_var(&elem->y);
  ------------------
  |  |   80|  70.7k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   43|  70.7k|    pub33[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |   85|  70.7k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
                  pub33[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  221|  47.0k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
                  pub33[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  220|  94.3k|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
  |  Branch (43:16): [True: 47.0k, False: 23.6k]
  ------------------
   44|  70.7k|    secp256k1_fe_get_b32(&pub33[1], &elem->x);
  ------------------
  |  |   89|  70.7k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   45|  70.7k|}
secp256k1.c:secp256k1_eckey_pubkey_tweak_add:
   62|  2.64k|static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge *key, const secp256k1_scalar *tweak) {
   63|  2.64k|    secp256k1_gej pt;
   64|  2.64k|    secp256k1_gej_set_ge(&pt, key);
   65|  2.64k|    secp256k1_ecmult(&pt, &pt, &secp256k1_scalar_one, tweak);
   66|       |
   67|  2.64k|    if (secp256k1_gej_is_infinity(&pt)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 2.64k]
  ------------------
   68|      0|        return 0;
   69|      0|    }
   70|  2.64k|    secp256k1_ge_set_gej(key, &pt);
   71|  2.64k|    return 1;
   72|  2.64k|}

secp256k1.c:secp256k1_ecmult:
  365|  44.1k|static void secp256k1_ecmult(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) {
  366|  44.1k|    secp256k1_fe aux[ECMULT_TABLE_SIZE(WINDOW_A)];
  367|  44.1k|    secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)];
  368|  44.1k|    struct secp256k1_strauss_point_state ps[1];
  369|  44.1k|    struct secp256k1_strauss_state state;
  370|       |
  371|  44.1k|    state.aux = aux;
  372|  44.1k|    state.pre_a = pre_a;
  373|  44.1k|    state.ps = ps;
  374|  44.1k|    secp256k1_ecmult_strauss_wnaf(&state, r, 1, a, na, ng);
  375|  44.1k|}
secp256k1.c:secp256k1_ecmult_strauss_wnaf:
  252|  44.1k|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) {
  253|  44.1k|    secp256k1_ge tmpa;
  254|  44.1k|    secp256k1_fe Z;
  255|       |    /* Split G factors. */
  256|  44.1k|    secp256k1_scalar ng_1, ng_128;
  257|  44.1k|    int wnaf_ng_1[129];
  258|  44.1k|    int bits_ng_1 = 0;
  259|  44.1k|    int wnaf_ng_128[129];
  260|  44.1k|    int bits_ng_128 = 0;
  261|  44.1k|    int i;
  262|  44.1k|    int bits = 0;
  263|  44.1k|    size_t np;
  264|  44.1k|    size_t no = 0;
  265|       |
  266|  44.1k|    secp256k1_fe_set_int(&Z, 1);
  ------------------
  |  |   83|  44.1k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  267|  88.3k|    for (np = 0; np < num; ++np) {
  ------------------
  |  Branch (267:18): [True: 44.1k, False: 44.1k]
  ------------------
  268|  44.1k|        secp256k1_gej tmp;
  269|  44.1k|        secp256k1_scalar na_1, na_lam;
  270|  44.1k|        if (secp256k1_scalar_is_zero(&na[np]) || secp256k1_gej_is_infinity(&a[np])) {
  ------------------
  |  Branch (270:13): [True: 11.1k, False: 33.0k]
  |  Branch (270:50): [True: 0, False: 33.0k]
  ------------------
  271|  11.1k|            continue;
  272|  11.1k|        }
  273|       |        /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */
  274|  33.0k|        secp256k1_scalar_split_lambda(&na_1, &na_lam, &na[np]);
  275|       |
  276|       |        /* build wnaf representation for na_1 and na_lam. */
  277|  33.0k|        state->ps[no].bits_na_1   = secp256k1_ecmult_wnaf_small(state->ps[no].wnaf_na_1,   129, &na_1,   WINDOW_A);
  ------------------
  |  |   32|  33.0k|#  define WINDOW_A 5
  ------------------
  278|  33.0k|        state->ps[no].bits_na_lam = secp256k1_ecmult_wnaf_small(state->ps[no].wnaf_na_lam, 129, &na_lam, WINDOW_A);
  ------------------
  |  |   32|  33.0k|#  define WINDOW_A 5
  ------------------
  279|  33.0k|        VERIFY_CHECK(state->ps[no].bits_na_1 <= 129);
  280|  33.0k|        VERIFY_CHECK(state->ps[no].bits_na_lam <= 129);
  281|  33.0k|        if (state->ps[no].bits_na_1 > bits) {
  ------------------
  |  Branch (281:13): [True: 33.0k, False: 0]
  ------------------
  282|  33.0k|            bits = state->ps[no].bits_na_1;
  283|  33.0k|        }
  284|  33.0k|        if (state->ps[no].bits_na_lam > bits) {
  ------------------
  |  Branch (284:13): [True: 11.3k, False: 21.7k]
  ------------------
  285|  11.3k|            bits = state->ps[no].bits_na_lam;
  286|  11.3k|        }
  287|       |
  288|       |        /* Calculate odd multiples of a.
  289|       |         * All multiples are brought to the same Z 'denominator', which is stored
  290|       |         * in Z. Due to secp256k1' isomorphism we can do all operations pretending
  291|       |         * that the Z coordinate was 1, use affine addition formulae, and correct
  292|       |         * the Z coordinate of the result once at the end.
  293|       |         * The exception is the precomputed G table points, which are actually
  294|       |         * affine. Compared to the base used for other points, they have a Z ratio
  295|       |         * of 1/Z, so we can use secp256k1_gej_add_zinv_var, which uses the same
  296|       |         * isomorphism to efficiently add with a known Z inverse.
  297|       |         */
  298|  33.0k|        tmp = a[np];
  299|  33.0k|        if (no) {
  ------------------
  |  Branch (299:13): [True: 0, False: 33.0k]
  ------------------
  300|      0|            secp256k1_gej_rescale(&tmp, &Z);
  301|      0|        }
  302|  33.0k|        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|  33.0k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((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|  33.0k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((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|  33.0k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  303|  33.0k|        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) ((size_t)1 << ((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) ((size_t)1 << ((w)-2))
  ------------------
  |  Branch (303:13): [True: 0, False: 33.0k]
  ------------------
  304|       |
  305|  33.0k|        ++no;
  306|  33.0k|    }
  307|       |
  308|       |    /* Bring them to the same Z denominator. */
  309|  44.1k|    if (no) {
  ------------------
  |  Branch (309:9): [True: 33.0k, False: 11.1k]
  ------------------
  310|  33.0k|        secp256k1_ge_table_set_globalz(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, state->aux);
  ------------------
  |  |   41|  33.0k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  311|  33.0k|    }
  312|       |
  313|  77.2k|    for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (313:18): [True: 33.0k, False: 44.1k]
  ------------------
  314|  33.0k|        size_t j;
  315|   297k|        for (j = 0; j < ECMULT_TABLE_SIZE(WINDOW_A); j++) {
  ------------------
  |  |   41|   297k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  |  Branch (315:21): [True: 264k, False: 33.0k]
  ------------------
  316|   264k|            secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + j], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + j].x, &secp256k1_const_beta);
  ------------------
  |  |   93|   264k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                          secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + j], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + j].x, &secp256k1_const_beta);
  ------------------
  |  |   41|   264k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
                          secp256k1_fe_mul(&state->aux[np * ECMULT_TABLE_SIZE(WINDOW_A) + j], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + j].x, &secp256k1_const_beta);
  ------------------
  |  |   41|   264k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  317|   264k|        }
  318|  33.0k|    }
  319|       |
  320|  44.1k|    if (ng) {
  ------------------
  |  Branch (320:9): [True: 2.64k, False: 41.5k]
  ------------------
  321|       |        /* 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) */
  322|  2.64k|        secp256k1_scalar_split_128(&ng_1, &ng_128, ng);
  323|       |
  324|       |        /* Build wnaf representation for ng_1 and ng_128 */
  325|  2.64k|        bits_ng_1   = secp256k1_ecmult_wnaf(wnaf_ng_1,   129, &ng_1,   WINDOW_G);
  ------------------
  |  |   31|  2.64k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  326|  2.64k|        bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, 129, &ng_128, WINDOW_G);
  ------------------
  |  |   31|  2.64k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  327|  2.64k|        if (bits_ng_1 > bits) {
  ------------------
  |  Branch (327:13): [True: 2.64k, False: 0]
  ------------------
  328|  2.64k|            bits = bits_ng_1;
  329|  2.64k|        }
  330|  2.64k|        if (bits_ng_128 > bits) {
  ------------------
  |  Branch (330:13): [True: 1.23k, False: 1.40k]
  ------------------
  331|  1.23k|            bits = bits_ng_128;
  332|  1.23k|        }
  333|  2.64k|    }
  334|       |
  335|  44.1k|    secp256k1_gej_set_infinity(r);
  336|       |
  337|  4.06M|    for (i = bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (337:24): [True: 4.02M, False: 44.1k]
  ------------------
  338|  4.02M|        int n;
  339|  4.02M|        secp256k1_gej_double_var(r, r, NULL);
  340|  8.04M|        for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (340:22): [True: 4.02M, False: 4.02M]
  ------------------
  341|  4.02M|            if (i < state->ps[np].bits_na_1 && (n = state->ps[np].wnaf_na_1[i])) {
  ------------------
  |  Branch (341:17): [True: 3.66M, False: 356k]
  |  Branch (341:48): [True: 634k, False: 3.03M]
  ------------------
  342|   634k|                secp256k1_ecmult_table_get_ge(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   41|   634k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
                              secp256k1_ecmult_table_get_ge(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   32|   634k|#  define WINDOW_A 5
  ------------------
  343|   634k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  344|   634k|            }
  345|  4.02M|            if (i < state->ps[np].bits_na_lam && (n = state->ps[np].wnaf_na_lam[i])) {
  ------------------
  |  Branch (345:17): [True: 3.65M, False: 368k]
  |  Branch (345:50): [True: 627k, False: 3.02M]
  ------------------
  346|   627k|                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|   627k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((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|   627k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((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|   627k|#  define WINDOW_A 5
  ------------------
  347|   627k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  348|   627k|            }
  349|  4.02M|        }
  350|  4.02M|        if (i < bits_ng_1 && (n = wnaf_ng_1[i])) {
  ------------------
  |  Branch (350:13): [True: 321k, False: 3.70M]
  |  Branch (350:30): [True: 22.4k, False: 299k]
  ------------------
  351|  22.4k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g, n, WINDOW_G);
  ------------------
  |  |   31|  22.4k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  352|  22.4k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  353|  22.4k|        }
  354|  4.02M|        if (i < bits_ng_128 && (n = wnaf_ng_128[i])) {
  ------------------
  |  Branch (354:13): [True: 321k, False: 3.70M]
  |  Branch (354:32): [True: 22.4k, False: 299k]
  ------------------
  355|  22.4k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g_128, n, WINDOW_G);
  ------------------
  |  |   31|  22.4k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  356|  22.4k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  357|  22.4k|        }
  358|  4.02M|    }
  359|       |
  360|  44.1k|    if (!secp256k1_gej_is_infinity(r)) {
  ------------------
  |  Branch (360:9): [True: 33.0k, False: 11.1k]
  ------------------
  361|  33.0k|        secp256k1_fe_mul(&r->z, &r->z, &Z);
  ------------------
  |  |   93|  33.0k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  362|  33.0k|    }
  363|  44.1k|}
secp256k1.c:secp256k1_ecmult_wnaf_small:
  224|  66.1k|static int secp256k1_ecmult_wnaf_small(int8_t *wnaf, int len, const secp256k1_scalar *a, int w) {
  225|  66.1k|    int wnaf_tmp[256];
  226|  66.1k|    int ret, i;
  227|       |
  228|  66.1k|    VERIFY_CHECK(2 <= w && w <= 8);
  229|  66.1k|    ret = secp256k1_ecmult_wnaf(wnaf_tmp, len, a, w);
  230|       |
  231|  8.59M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (231:17): [True: 8.53M, False: 66.1k]
  ------------------
  232|  8.53M|        wnaf[i] = (int8_t)wnaf_tmp[i];
  233|  8.53M|    }
  234|       |
  235|  66.1k|    return ret;
  236|  66.1k|}
secp256k1.c:secp256k1_ecmult_odd_multiples_table:
   73|  33.0k|static void secp256k1_ecmult_odd_multiples_table(size_t n, secp256k1_ge *pre_a, secp256k1_fe *zr, secp256k1_fe *z, const secp256k1_gej *a) {
   74|  33.0k|    secp256k1_gej d, ai;
   75|  33.0k|    secp256k1_ge d_ge;
   76|  33.0k|    size_t i;
   77|       |
   78|  33.0k|    VERIFY_CHECK(!secp256k1_gej_is_infinity(a));
   79|       |
   80|  33.0k|    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|  33.0k|    secp256k1_ge_set_xy(&d_ge, &d.x, &d.y);
   96|  33.0k|    secp256k1_ge_set_gej_zinv(&pre_a[0], a, &d.z);
   97|  33.0k|    secp256k1_gej_set_ge(&ai, &pre_a[0]);
   98|  33.0k|    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|  33.0k|    zr[0] = d.z;
  104|       |
  105|   264k|    for (i = 1; i < n; i++) {
  ------------------
  |  Branch (105:17): [True: 231k, False: 33.0k]
  ------------------
  106|   231k|        secp256k1_gej_add_ge_var(&ai, &ai, &d_ge, &zr[i]);
  107|   231k|        secp256k1_ge_set_xy(&pre_a[i], &ai.x, &ai.y);
  108|   231k|    }
  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|  33.0k|    secp256k1_fe_mul(z, &ai.z, &d.z);
  ------------------
  |  |   93|  33.0k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  115|  33.0k|}
secp256k1.c:secp256k1_ecmult_wnaf:
  162|  71.4k|static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a, int w) {
  163|  71.4k|    secp256k1_scalar s;
  164|  71.4k|    int last_set_bit = -1;
  165|  71.4k|    int bit = 0;
  166|  71.4k|    int sign = 1;
  167|  71.4k|    int carry = 0;
  168|       |
  169|  71.4k|    VERIFY_CHECK(wnaf != NULL);
  170|  71.4k|    VERIFY_CHECK(0 <= len && len <= 256);
  171|  71.4k|    VERIFY_CHECK(a != NULL);
  172|  71.4k|    VERIFY_CHECK(2 <= w && w <= 31);
  173|       |
  174|  9.28M|    for (bit = 0; bit < len; bit++) {
  ------------------
  |  Branch (174:19): [True: 9.21M, False: 71.4k]
  ------------------
  175|  9.21M|        wnaf[bit] = 0;
  176|  9.21M|    }
  177|       |
  178|  71.4k|    s = *a;
  179|  71.4k|    if (secp256k1_scalar_get_bits_limb32(&s, 255, 1)) {
  ------------------
  |  Branch (179:9): [True: 29.5k, False: 41.8k]
  ------------------
  180|  29.5k|        secp256k1_scalar_negate(&s, &s);
  181|  29.5k|        sign = -1;
  182|  29.5k|    }
  183|       |
  184|  71.4k|    bit = 0;
  185|  3.69M|    while (bit < len) {
  ------------------
  |  Branch (185:12): [True: 3.62M, False: 71.4k]
  ------------------
  186|  3.62M|        int now;
  187|  3.62M|        int word;
  188|  3.62M|        if (secp256k1_scalar_get_bits_limb32(&s, bit, 1) == (unsigned int)carry) {
  ------------------
  |  Branch (188:13): [True: 2.32M, False: 1.30M]
  ------------------
  189|  2.32M|            bit++;
  190|  2.32M|            continue;
  191|  2.32M|        }
  192|       |
  193|  1.30M|        now = w;
  194|  1.30M|        if (now > len - bit) {
  ------------------
  |  Branch (194:13): [True: 32.3k, False: 1.27M]
  ------------------
  195|  32.3k|            now = len - bit;
  196|  32.3k|        }
  197|       |
  198|  1.30M|        word = secp256k1_scalar_get_bits_var(&s, bit, now) + carry;
  199|       |
  200|  1.30M|        carry = (word >> (w-1)) & 1;
  201|  1.30M|        word -= carry << w;
  202|       |
  203|  1.30M|        wnaf[bit] = sign * word;
  204|  1.30M|        last_set_bit = bit;
  205|       |
  206|  1.30M|        bit += now;
  207|  1.30M|    }
  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|  71.4k|    return last_set_bit + 1;
  221|  71.4k|}
secp256k1.c:secp256k1_ecmult_table_get_ge:
  125|   634k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge(secp256k1_ge *r, const secp256k1_ge *pre, int n, int w) {
  126|   634k|    secp256k1_ecmult_table_verify(n,w);
  127|   634k|    if (n > 0) {
  ------------------
  |  Branch (127:9): [True: 318k, False: 315k]
  ------------------
  128|   318k|        *r = pre[(n-1)/2];
  129|   318k|    } else {
  130|   315k|        *r = pre[(-n-1)/2];
  131|   315k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|   315k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   315k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   315k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 315k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   315k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 315k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   315k|    } \
  |  |  |  |   94|   315k|    stmt; \
  |  |  |  |   95|   315k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 315k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|   315k|    }
  133|   634k|}
secp256k1.c:secp256k1_ecmult_table_verify:
  117|  1.30M|SECP256K1_INLINE static void secp256k1_ecmult_table_verify(int n, int w) {
  118|  1.30M|    (void)n;
  119|  1.30M|    (void)w;
  120|  1.30M|    VERIFY_CHECK(((n) & 1) == 1);
  121|  1.30M|    VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1));
  122|  1.30M|    VERIFY_CHECK((n) <=  ((1 << ((w)-1)) - 1));
  123|  1.30M|}
secp256k1.c:secp256k1_ecmult_table_get_ge_lambda:
  135|   627k|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|   627k|    secp256k1_ecmult_table_verify(n,w);
  137|   627k|    if (n > 0) {
  ------------------
  |  Branch (137:9): [True: 316k, False: 311k]
  ------------------
  138|   316k|        secp256k1_ge_set_xy(r, &x[(n-1)/2], &pre[(n-1)/2].y);
  139|   316k|    } else {
  140|   311k|        secp256k1_ge_set_xy(r, &x[(-n-1)/2], &pre[(-n-1)/2].y);
  141|   311k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|   311k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   311k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   311k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   311k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 311k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   311k|    } \
  |  |  |  |   94|   311k|    stmt; \
  |  |  |  |   95|   311k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  142|   311k|    }
  143|   627k|}
secp256k1.c:secp256k1_ecmult_table_get_ge_storage:
  145|  44.8k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge_storage(secp256k1_ge *r, const secp256k1_ge_storage *pre, int n, int w) {
  146|  44.8k|    secp256k1_ecmult_table_verify(n,w);
  147|  44.8k|    if (n > 0) {
  ------------------
  |  Branch (147:9): [True: 24.8k, False: 20.0k]
  ------------------
  148|  24.8k|        secp256k1_ge_from_storage(r, &pre[(n-1)/2]);
  149|  24.8k|    } else {
  150|  20.0k|        secp256k1_ge_from_storage(r, &pre[(-n-1)/2]);
  151|  20.0k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|  20.0k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  20.0k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  20.0k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  20.0k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 20.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  20.0k|    } \
  |  |  |  |   94|  20.0k|    stmt; \
  |  |  |  |   95|  20.0k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|  20.0k|    }
  153|  44.8k|}
secp256k1.c:secp256k1_ecmult_multi_var:
  823|  11.1k|static int secp256k1_ecmult_multi_var(const secp256k1_callback* error_callback, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
  824|  11.1k|    size_t i;
  825|       |
  826|  11.1k|    int (*f)(const secp256k1_callback* error_callback, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, secp256k1_ecmult_multi_callback cb, void*, size_t, size_t);
  827|  11.1k|    size_t n_batches;
  828|  11.1k|    size_t n_batch_points;
  829|       |
  830|  11.1k|    secp256k1_gej_set_infinity(r);
  831|  11.1k|    if (inp_g_sc == NULL && n == 0) {
  ------------------
  |  Branch (831:9): [True: 11.1k, False: 0]
  |  Branch (831:29): [True: 0, False: 11.1k]
  ------------------
  832|      0|        return 1;
  833|  11.1k|    } else if (n == 0) {
  ------------------
  |  Branch (833:16): [True: 0, False: 11.1k]
  ------------------
  834|      0|        secp256k1_ecmult(r, r, &secp256k1_scalar_zero, inp_g_sc);
  835|      0|        return 1;
  836|      0|    }
  837|  11.1k|    if (scratch == NULL) {
  ------------------
  |  Branch (837:9): [True: 11.1k, False: 0]
  ------------------
  838|  11.1k|        return secp256k1_ecmult_multi_simple_var(r, inp_g_sc, cb, cbdata, n);
  839|  11.1k|    }
  840|       |
  841|       |    /* Compute the batch sizes for Pippenger's algorithm given a scratch space. If it's greater than
  842|       |     * a threshold use Pippenger's algorithm. Otherwise use Strauss' algorithm.
  843|       |     * As a first step check if there's enough space for Pippenger's algo (which requires less space
  844|       |     * than Strauss' algo) and if not, use the simple algorithm. */
  845|      0|    if (!secp256k1_ecmult_multi_batch_size_helper(&n_batches, &n_batch_points, secp256k1_pippenger_max_points(error_callback, scratch), n)) {
  ------------------
  |  Branch (845:9): [True: 0, False: 0]
  ------------------
  846|      0|        return secp256k1_ecmult_multi_simple_var(r, inp_g_sc, cb, cbdata, n);
  847|      0|    }
  848|      0|    if (n_batch_points >= ECMULT_PIPPENGER_THRESHOLD) {
  ------------------
  |  |   55|      0|#define ECMULT_PIPPENGER_THRESHOLD 88
  ------------------
  |  Branch (848:9): [True: 0, False: 0]
  ------------------
  849|      0|        f = secp256k1_ecmult_pippenger_batch;
  850|      0|    } else {
  851|      0|        if (!secp256k1_ecmult_multi_batch_size_helper(&n_batches, &n_batch_points, secp256k1_strauss_max_points(error_callback, scratch), n)) {
  ------------------
  |  Branch (851:13): [True: 0, False: 0]
  ------------------
  852|      0|            return secp256k1_ecmult_multi_simple_var(r, inp_g_sc, cb, cbdata, n);
  853|      0|        }
  854|      0|        f = secp256k1_ecmult_strauss_batch;
  855|      0|    }
  856|      0|    for(i = 0; i < n_batches; i++) {
  ------------------
  |  Branch (856:16): [True: 0, False: 0]
  ------------------
  857|      0|        size_t nbp = n < n_batch_points ? n : n_batch_points;
  ------------------
  |  Branch (857:22): [True: 0, False: 0]
  ------------------
  858|      0|        size_t offset = n_batch_points*i;
  859|      0|        secp256k1_gej tmp;
  860|      0|        if (!f(error_callback, scratch, &tmp, i == 0 ? inp_g_sc : NULL, cb, cbdata, nbp, offset)) {
  ------------------
  |  Branch (860:13): [True: 0, False: 0]
  |  Branch (860:47): [True: 0, False: 0]
  ------------------
  861|      0|            return 0;
  862|      0|        }
  863|      0|        secp256k1_gej_add_var(r, r, &tmp, NULL);
  864|      0|        n -= nbp;
  865|      0|    }
  866|      0|    return 1;
  867|      0|}
secp256k1.c:secp256k1_ecmult_multi_simple_var:
  779|  11.1k|static int secp256k1_ecmult_multi_simple_var(secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n_points) {
  780|  11.1k|    size_t point_idx;
  781|  11.1k|    secp256k1_gej tmpj;
  782|       |
  783|  11.1k|    secp256k1_gej_set_infinity(r);
  784|  11.1k|    secp256k1_gej_set_infinity(&tmpj);
  785|       |    /* r = inp_g_sc*G */
  786|  11.1k|    secp256k1_ecmult(r, &tmpj, &secp256k1_scalar_zero, inp_g_sc);
  787|  41.5k|    for (point_idx = 0; point_idx < n_points; point_idx++) {
  ------------------
  |  Branch (787:25): [True: 30.4k, False: 11.1k]
  ------------------
  788|  30.4k|        secp256k1_ge point;
  789|  30.4k|        secp256k1_gej pointj;
  790|  30.4k|        secp256k1_scalar scalar;
  791|  30.4k|        if (!cb(&scalar, &point, point_idx, cbdata)) {
  ------------------
  |  Branch (791:13): [True: 0, False: 30.4k]
  ------------------
  792|      0|            return 0;
  793|      0|        }
  794|       |        /* r += scalar*point */
  795|  30.4k|        secp256k1_gej_set_ge(&pointj, &point);
  796|  30.4k|        secp256k1_ecmult(&tmpj, &pointj, &scalar, NULL);
  797|  30.4k|        secp256k1_gej_add_var(r, r, &tmpj, NULL);
  798|  30.4k|    }
  799|  11.1k|    return 1;
  800|  11.1k|}

secp256k1.c:secp256k1_fe_impl_sqr:
  317|  47.8M|SECP256K1_FORCE_INLINE static void secp256k1_fe_impl_sqr(secp256k1_fe *r, const secp256k1_fe *a) {
  318|  47.8M|    secp256k1_fe_sqr_inner(r->n, a->n);
  319|  47.8M|}
secp256k1.c:secp256k1_fe_impl_mul:
  313|  27.2M|SECP256K1_FORCE_INLINE static void secp256k1_fe_impl_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) {
  314|  27.2M|    secp256k1_fe_mul_inner(r->n, a->n, b->n);
  315|  27.2M|}
secp256k1.c:secp256k1_fe_impl_add_int:
  301|   105k|SECP256K1_INLINE static void secp256k1_fe_impl_add_int(secp256k1_fe *r, int a) {
  302|   105k|    r->n[0] += a;
  303|   105k|}
secp256k1.c:secp256k1_fe_impl_is_zero:
  206|  80.7k|SECP256K1_INLINE static int secp256k1_fe_impl_is_zero(const secp256k1_fe *a) {
  207|  80.7k|    const uint64_t *t = a->n;
  208|  80.7k|    return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
  209|  80.7k|}
secp256k1.c:secp256k1_fe_impl_add:
  305|  26.8M|SECP256K1_INLINE static void secp256k1_fe_impl_add(secp256k1_fe *r, const secp256k1_fe *a) {
  306|  26.8M|    r->n[0] += a->n[0];
  307|  26.8M|    r->n[1] += a->n[1];
  308|  26.8M|    r->n[2] += a->n[2];
  309|  26.8M|    r->n[3] += a->n[3];
  310|  26.8M|    r->n[4] += a->n[4];
  311|  26.8M|}
secp256k1.c:secp256k1_fe_impl_normalize_weak:
   80|  54.8k|static void secp256k1_fe_impl_normalize_weak(secp256k1_fe *r) {
   81|  54.8k|    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|  54.8k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   85|       |
   86|       |    /* The first pass ensures the magnitude is 1, ... */
   87|  54.8k|    t0 += x * 0x1000003D1ULL;
   88|  54.8k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   89|  54.8k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   90|  54.8k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   91|  54.8k|    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|  54.8k|    VERIFY_CHECK(t4 >> 49 == 0);
   95|       |
   96|  54.8k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   97|  54.8k|}
secp256k1.c:secp256k1_fe_impl_negate_unchecked:
  278|  13.4M|SECP256K1_INLINE static void secp256k1_fe_impl_negate_unchecked(secp256k1_fe *r, const secp256k1_fe *a, int m) {
  279|       |    /* For all legal values of m (0..31), the following properties hold: */
  280|  13.4M|    VERIFY_CHECK(0xFFFFEFFFFFC2FULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  281|  13.4M|    VERIFY_CHECK(0xFFFFFFFFFFFFFULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  282|  13.4M|    VERIFY_CHECK(0x0FFFFFFFFFFFFULL * 2 * (m + 1) >= 0x0FFFFFFFFFFFFULL * 2 * m);
  283|       |
  284|       |    /* Due to the properties above, the left hand in the subtractions below is never less than
  285|       |     * the right hand. */
  286|  13.4M|    r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0];
  287|  13.4M|    r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1];
  288|  13.4M|    r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2];
  289|  13.4M|    r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3];
  290|  13.4M|    r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4];
  291|  13.4M|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero:
  137|   127k|static int secp256k1_fe_impl_normalizes_to_zero(const secp256k1_fe *r) {
  138|   127k|    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|   127k|    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|   127k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  145|       |
  146|       |    /* The first pass ensures the magnitude is 1, ... */
  147|   127k|    t0 += x * 0x1000003D1ULL;
  148|   127k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0  = t0; z1  = t0 ^ 0x1000003D0ULL;
  149|   127k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  150|   127k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  151|   127k|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  152|   127k|                                                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|   127k|    VERIFY_CHECK(t4 >> 49 == 0);
  156|       |
  157|   127k|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  158|   127k|}
secp256k1.c:secp256k1_fe_impl_set_int:
  201|   531k|SECP256K1_INLINE static void secp256k1_fe_impl_set_int(secp256k1_fe *r, int a) {
  202|   531k|    r->n[0] = a;
  203|   531k|    r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
  204|   531k|}
secp256k1.c:secp256k1_fe_impl_mul_int_unchecked:
  293|  4.02M|SECP256K1_INLINE static void secp256k1_fe_impl_mul_int_unchecked(secp256k1_fe *r, int a) {
  294|  4.02M|    r->n[0] *= a;
  295|  4.02M|    r->n[1] *= a;
  296|  4.02M|    r->n[2] *= a;
  297|  4.02M|    r->n[3] *= a;
  298|  4.02M|    r->n[4] *= a;
  299|  4.02M|}
secp256k1.c:secp256k1_fe_impl_half:
  335|  4.02M|static SECP256K1_INLINE void secp256k1_fe_impl_half(secp256k1_fe *r) {
  336|  4.02M|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
  337|  4.02M|    uint64_t one = (uint64_t)1;
  338|  4.02M|    uint64_t mask = -(t0 & one) >> 12;
  339|       |
  340|       |    /* Bounds analysis (over the rationals).
  341|       |     *
  342|       |     * Let m = r->magnitude
  343|       |     *     C = 0xFFFFFFFFFFFFFULL * 2
  344|       |     *     D = 0x0FFFFFFFFFFFFULL * 2
  345|       |     *
  346|       |     * Initial bounds: t0..t3 <= C * m
  347|       |     *                     t4 <= D * m
  348|       |     */
  349|       |
  350|  4.02M|    t0 += 0xFFFFEFFFFFC2FULL & mask;
  351|  4.02M|    t1 += mask;
  352|  4.02M|    t2 += mask;
  353|  4.02M|    t3 += mask;
  354|  4.02M|    t4 += mask >> 4;
  355|       |
  356|  4.02M|    VERIFY_CHECK((t0 & one) == 0);
  357|       |
  358|       |    /* t0..t3: added <= C/2
  359|       |     *     t4: added <= D/2
  360|       |     *
  361|       |     * Current bounds: t0..t3 <= C * (m + 1/2)
  362|       |     *                     t4 <= D * (m + 1/2)
  363|       |     */
  364|       |
  365|  4.02M|    r->n[0] = (t0 >> 1) + ((t1 & one) << 51);
  366|  4.02M|    r->n[1] = (t1 >> 1) + ((t2 & one) << 51);
  367|  4.02M|    r->n[2] = (t2 >> 1) + ((t3 & one) << 51);
  368|  4.02M|    r->n[3] = (t3 >> 1) + ((t4 & one) << 51);
  369|  4.02M|    r->n[4] = (t4 >> 1);
  370|       |
  371|       |    /* t0..t3: shifted right and added <= C/4 + 1/2
  372|       |     *     t4: shifted right
  373|       |     *
  374|       |     * Current bounds: t0..t3 <= C * (m/2 + 1/2)
  375|       |     *                     t4 <= D * (m/2 + 1/4)
  376|       |     *
  377|       |     * Therefore the output magnitude (M) has to be set such that:
  378|       |     *     t0..t3: C * M >= C * (m/2 + 1/2)
  379|       |     *         t4: D * M >= D * (m/2 + 1/4)
  380|       |     *
  381|       |     * It suffices for all limbs that, for any input magnitude m:
  382|       |     *     M >= m/2 + 1/2
  383|       |     *
  384|       |     * and since we want the smallest such integer value for M:
  385|       |     *     M == floor(m/2) + 1
  386|       |     */
  387|  4.02M|}
secp256k1.c:secp256k1_fe_impl_inv:
  453|  13.7k|static void secp256k1_fe_impl_inv(secp256k1_fe *r, const secp256k1_fe *x) {
  454|  13.7k|    secp256k1_fe tmp = *x;
  455|  13.7k|    secp256k1_modinv64_signed62 s;
  456|       |
  457|  13.7k|    secp256k1_fe_normalize(&tmp);
  ------------------
  |  |   78|  13.7k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  458|  13.7k|    secp256k1_fe_to_signed62(&s, &tmp);
  459|  13.7k|    secp256k1_modinv64(&s, &secp256k1_const_modinfo_fe);
  460|  13.7k|    secp256k1_fe_from_signed62(r, &s);
  461|  13.7k|}
secp256k1.c:secp256k1_fe_to_signed62:
  437|  13.7k|static void secp256k1_fe_to_signed62(secp256k1_modinv64_signed62 *r, const secp256k1_fe *a) {
  438|  13.7k|    const uint64_t M62 = UINT64_MAX >> 2;
  439|  13.7k|    const uint64_t a0 = a->n[0], a1 = a->n[1], a2 = a->n[2], a3 = a->n[3], a4 = a->n[4];
  440|       |
  441|  13.7k|    r->v[0] = (a0       | a1 << 52) & M62;
  442|  13.7k|    r->v[1] = (a1 >> 10 | a2 << 42) & M62;
  443|  13.7k|    r->v[2] = (a2 >> 20 | a3 << 32) & M62;
  444|  13.7k|    r->v[3] = (a3 >> 30 | a4 << 22) & M62;
  445|  13.7k|    r->v[4] =  a4 >> 40;
  446|  13.7k|}
secp256k1.c:secp256k1_fe_from_signed62:
  417|  13.7k|static void secp256k1_fe_from_signed62(secp256k1_fe *r, const secp256k1_modinv64_signed62 *a) {
  418|  13.7k|    const uint64_t M52 = UINT64_MAX >> 12;
  419|  13.7k|    const uint64_t a0 = a->v[0], a1 = a->v[1], a2 = a->v[2], a3 = a->v[3], a4 = a->v[4];
  420|       |
  421|       |    /* The output from secp256k1_modinv64{_var} should be normalized to range [0,modulus), and
  422|       |     * have limbs in [0,2^62). The modulus is < 2^256, so the top limb must be below 2^(256-62*4).
  423|       |     */
  424|  13.7k|    VERIFY_CHECK(a0 >> 62 == 0);
  425|  13.7k|    VERIFY_CHECK(a1 >> 62 == 0);
  426|  13.7k|    VERIFY_CHECK(a2 >> 62 == 0);
  427|  13.7k|    VERIFY_CHECK(a3 >> 62 == 0);
  428|  13.7k|    VERIFY_CHECK(a4 >> 8 == 0);
  429|       |
  430|  13.7k|    r->n[0] =  a0                   & M52;
  431|  13.7k|    r->n[1] = (a0 >> 52 | a1 << 10) & M52;
  432|  13.7k|    r->n[2] = (a1 >> 42 | a2 << 20) & M52;
  433|  13.7k|    r->n[3] = (a2 >> 32 | a3 << 30) & M52;
  434|  13.7k|    r->n[4] = (a3 >> 22 | a4 << 40);
  435|  13.7k|}
secp256k1.c:secp256k1_fe_impl_set_b32_limit:
  265|   105k|static int secp256k1_fe_impl_set_b32_limit(secp256k1_fe *r, const unsigned char *a) {
  266|   105k|    secp256k1_fe_impl_set_b32_mod(r, a);
  267|   105k|    return !((r->n[4] == 0x0FFFFFFFFFFFFULL) & ((r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL) & (r->n[0] >= 0xFFFFEFFFFFC2FULL));
  268|   105k|}
secp256k1.c:secp256k1_fe_impl_get_b32:
  271|  73.3k|static void secp256k1_fe_impl_get_b32(unsigned char *r, const secp256k1_fe *a) {
  272|  73.3k|    secp256k1_write_be64(&r[0], (a->n[4] << 16) | (a->n[3] >> 36));
  273|  73.3k|    secp256k1_write_be64(&r[8], (a->n[3] << 28) | (a->n[2] >> 24));
  274|  73.3k|    secp256k1_write_be64(&r[16], (a->n[2] << 40) | (a->n[1] >> 12));
  275|  73.3k|    secp256k1_write_be64(&r[24], (a->n[1] << 52) | a->n[0]);
  276|  73.3k|}
secp256k1.c:secp256k1_fe_impl_normalize_var:
   99|   258k|static void secp256k1_fe_impl_normalize_var(secp256k1_fe *r) {
  100|   258k|    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|   258k|    uint64_t m;
  104|   258k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  105|       |
  106|       |    /* The first pass ensures the magnitude is 1, ... */
  107|   258k|    t0 += x * 0x1000003D1ULL;
  108|   258k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  109|   258k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
  110|   258k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
  111|   258k|    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|   258k|    VERIFY_CHECK(t4 >> 49 == 0);
  115|       |
  116|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
  117|   258k|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
  118|   258k|        & (t0 >= 0xFFFFEFFFFFC2FULL));
  119|       |
  120|   258k|    if (x) {
  ------------------
  |  Branch (120:9): [True: 2, False: 258k]
  ------------------
  121|      2|        t0 += 0x1000003D1ULL;
  122|      2|        t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  123|      2|        t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
  124|      2|        t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
  125|      2|        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|      2|        VERIFY_CHECK(t4 >> 48 == x);
  129|       |
  130|       |        /* Mask off the possible multiple of 2^256 from the final reduction */
  131|      2|        t4 &= 0x0FFFFFFFFFFFFULL;
  132|      2|    }
  133|       |
  134|   258k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
  135|   258k|}
secp256k1.c:secp256k1_fe_impl_is_odd:
  211|   178k|SECP256K1_INLINE static int secp256k1_fe_impl_is_odd(const secp256k1_fe *a) {
  212|   178k|    return a->n[0] & 1;
  213|   178k|}
secp256k1.c:secp256k1_fe_impl_from_storage:
  409|   275k|static SECP256K1_INLINE void secp256k1_fe_impl_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) {
  410|   275k|    r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL;
  411|   275k|    r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL);
  412|   275k|    r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL);
  413|   275k|    r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL);
  414|   275k|    r->n[4] = a->n[3] >> 16;
  415|   275k|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero_var:
  160|  1.52M|static int secp256k1_fe_impl_normalizes_to_zero_var(const secp256k1_fe *r) {
  161|  1.52M|    uint64_t t0, t1, t2, t3, t4;
  162|  1.52M|    uint64_t z0, z1;
  163|  1.52M|    uint64_t x;
  164|       |
  165|  1.52M|    t0 = r->n[0];
  166|  1.52M|    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|  1.52M|    x = t4 >> 48;
  170|       |
  171|       |    /* The first pass ensures the magnitude is 1, ... */
  172|  1.52M|    t0 += x * 0x1000003D1ULL;
  173|       |
  174|       |    /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */
  175|  1.52M|    z0 = t0 & 0xFFFFFFFFFFFFFULL;
  176|  1.52M|    z1 = z0 ^ 0x1000003D0ULL;
  177|       |
  178|       |    /* Fast return path should catch the majority of cases */
  179|  1.52M|    if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) {
  ------------------
  |  Branch (179:9): [True: 1.52M, False: 245]
  ------------------
  180|  1.52M|        return 0;
  181|  1.52M|    }
  182|       |
  183|    245|    t1 = r->n[1];
  184|    245|    t2 = r->n[2];
  185|    245|    t3 = r->n[3];
  186|       |
  187|    245|    t4 &= 0x0FFFFFFFFFFFFULL;
  188|       |
  189|    245|    t1 += (t0 >> 52);
  190|    245|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  191|    245|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  192|    245|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  193|    245|                                                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|    245|    VERIFY_CHECK(t4 >> 49 == 0);
  197|       |
  198|    245|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  199|  1.52M|}
secp256k1.c:secp256k1_fe_impl_set_b32_mod:
  228|   105k|static void secp256k1_fe_impl_set_b32_mod(secp256k1_fe *r, const unsigned char *a) {
  229|   105k|    r->n[0] = (uint64_t)a[31]
  230|   105k|            | ((uint64_t)a[30] << 8)
  231|   105k|            | ((uint64_t)a[29] << 16)
  232|   105k|            | ((uint64_t)a[28] << 24)
  233|   105k|            | ((uint64_t)a[27] << 32)
  234|   105k|            | ((uint64_t)a[26] << 40)
  235|   105k|            | ((uint64_t)(a[25] & 0xF)  << 48);
  236|   105k|    r->n[1] = (uint64_t)((a[25] >> 4) & 0xF)
  237|   105k|            | ((uint64_t)a[24] << 4)
  238|   105k|            | ((uint64_t)a[23] << 12)
  239|   105k|            | ((uint64_t)a[22] << 20)
  240|   105k|            | ((uint64_t)a[21] << 28)
  241|   105k|            | ((uint64_t)a[20] << 36)
  242|   105k|            | ((uint64_t)a[19] << 44);
  243|   105k|    r->n[2] = (uint64_t)a[18]
  244|   105k|            | ((uint64_t)a[17] << 8)
  245|   105k|            | ((uint64_t)a[16] << 16)
  246|   105k|            | ((uint64_t)a[15] << 24)
  247|   105k|            | ((uint64_t)a[14] << 32)
  248|   105k|            | ((uint64_t)a[13] << 40)
  249|   105k|            | ((uint64_t)(a[12] & 0xF) << 48);
  250|   105k|    r->n[3] = (uint64_t)((a[12] >> 4) & 0xF)
  251|   105k|            | ((uint64_t)a[11] << 4)
  252|   105k|            | ((uint64_t)a[10] << 12)
  253|   105k|            | ((uint64_t)a[9]  << 20)
  254|   105k|            | ((uint64_t)a[8]  << 28)
  255|   105k|            | ((uint64_t)a[7]  << 36)
  256|   105k|            | ((uint64_t)a[6]  << 44);
  257|   105k|    r->n[4] = (uint64_t)a[5]
  258|   105k|            | ((uint64_t)a[4] << 8)
  259|   105k|            | ((uint64_t)a[3] << 16)
  260|   105k|            | ((uint64_t)a[2] << 24)
  261|   105k|            | ((uint64_t)a[1] << 32)
  262|   105k|            | ((uint64_t)a[0] << 40);
  263|   105k|}
secp256k1.c:secp256k1_fe_impl_normalize:
   43|   281k|static void secp256k1_fe_impl_normalize(secp256k1_fe *r) {
   44|   281k|    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|   281k|    uint64_t m;
   48|   281k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   49|       |
   50|       |    /* The first pass ensures the magnitude is 1, ... */
   51|   281k|    t0 += x * 0x1000003D1ULL;
   52|   281k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   53|   281k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
   54|   281k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
   55|   281k|    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|   281k|    VERIFY_CHECK(t4 >> 49 == 0);
   59|       |
   60|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
   61|   281k|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
   62|   281k|        & (t0 >= 0xFFFFEFFFFFC2FULL));
   63|       |
   64|       |    /* Apply the final reduction (for constant-time behaviour, we do it always) */
   65|   281k|    t0 += x * 0x1000003D1ULL;
   66|   281k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   67|   281k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   68|   281k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   69|   281k|    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|   281k|    VERIFY_CHECK(t4 >> 48 == x);
   73|       |
   74|       |    /* Mask off the possible multiple of 2^256 from the final reduction */
   75|   281k|    t4 &= 0x0FFFFFFFFFFFFULL;
   76|       |
   77|   281k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   78|   281k|}
secp256k1.c:secp256k1_fe_impl_to_storage:
  402|   267k|static void secp256k1_fe_impl_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) {
  403|   267k|    r->n[0] = a->n[0] | a->n[1] << 52;
  404|   267k|    r->n[1] = a->n[1] >> 12 | a->n[2] << 40;
  405|   267k|    r->n[2] = a->n[2] >> 24 | a->n[3] << 28;
  406|   267k|    r->n[3] = a->n[3] >> 36 | a->n[4] << 16;
  407|   267k|}

secp256k1.c:secp256k1_fe_sqr_inner:
  154|  47.8M|SECP256K1_FORCE_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) {
  155|  47.8M|    secp256k1_uint128 c, d;
  156|  47.8M|    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
  157|  47.8M|    uint64_t t3, t4, tx, u0;
  158|  47.8M|    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
  159|       |
  160|  47.8M|    VERIFY_BITS(a[0], 56);
  161|  47.8M|    VERIFY_BITS(a[1], 56);
  162|  47.8M|    VERIFY_BITS(a[2], 56);
  163|  47.8M|    VERIFY_BITS(a[3], 56);
  164|  47.8M|    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|  47.8M|    secp256k1_u128_mul(&d, a0*2, a3);
  172|  47.8M|    secp256k1_u128_accum_mul(&d, a1*2, a2);
  173|  47.8M|    VERIFY_BITS_128(&d, 114);
  174|       |    /* [d 0 0 0] = [p3 0 0 0] */
  175|  47.8M|    secp256k1_u128_mul(&c, a4, a4);
  176|  47.8M|    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|  47.8M|    secp256k1_u128_accum_mul(&d, R, secp256k1_u128_to_u64(&c)); secp256k1_u128_rshift(&c, 64);
  179|  47.8M|    VERIFY_BITS_128(&d, 115);
  180|  47.8M|    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|  47.8M|    t3 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  183|  47.8M|    VERIFY_BITS(t3, 52);
  184|  47.8M|    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|  47.8M|    a4 *= 2;
  188|  47.8M|    secp256k1_u128_accum_mul(&d, a0, a4);
  189|  47.8M|    secp256k1_u128_accum_mul(&d, a1*2, a3);
  190|  47.8M|    secp256k1_u128_accum_mul(&d, a2, a2);
  191|  47.8M|    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|  47.8M|    secp256k1_u128_accum_mul(&d, R << 12, secp256k1_u128_to_u64(&c));
  194|  47.8M|    VERIFY_BITS_128(&d, 116);
  195|       |    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  196|  47.8M|    t4 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  197|  47.8M|    VERIFY_BITS(t4, 52);
  198|  47.8M|    VERIFY_BITS_128(&d, 64);
  199|       |    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  200|  47.8M|    tx = (t4 >> 48); t4 &= (M >> 4);
  201|  47.8M|    VERIFY_BITS(tx, 4);
  202|  47.8M|    VERIFY_BITS(t4, 48);
  203|       |    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
  204|       |
  205|  47.8M|    secp256k1_u128_mul(&c, a0, a0);
  206|  47.8M|    VERIFY_BITS_128(&c, 112);
  207|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
  208|  47.8M|    secp256k1_u128_accum_mul(&d, a1, a4);
  209|  47.8M|    secp256k1_u128_accum_mul(&d, a2*2, a3);
  210|  47.8M|    VERIFY_BITS_128(&d, 114);
  211|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  212|  47.8M|    u0 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
  213|  47.8M|    VERIFY_BITS(u0, 52);
  214|  47.8M|    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|  47.8M|    u0 = (u0 << 4) | tx;
  218|  47.8M|    VERIFY_BITS(u0, 56);
  219|       |    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  220|  47.8M|    secp256k1_u128_accum_mul(&c, u0, R >> 4);
  221|  47.8M|    VERIFY_BITS_128(&c, 113);
  222|       |    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  223|  47.8M|    r[0] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  224|  47.8M|    VERIFY_BITS(r[0], 52);
  225|  47.8M|    VERIFY_BITS_128(&c, 61);
  226|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
  227|       |
  228|  47.8M|    a0 *= 2;
  229|  47.8M|    secp256k1_u128_accum_mul(&c, a0, a1);
  230|  47.8M|    VERIFY_BITS_128(&c, 114);
  231|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
  232|  47.8M|    secp256k1_u128_accum_mul(&d, a2, a4);
  233|  47.8M|    secp256k1_u128_accum_mul(&d, a3, a3);
  234|  47.8M|    VERIFY_BITS_128(&d, 114);
  235|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  236|  47.8M|    secp256k1_u128_accum_mul(&c, secp256k1_u128_to_u64(&d) & M, R); secp256k1_u128_rshift(&d, 52);
  237|  47.8M|    VERIFY_BITS_128(&c, 115);
  238|  47.8M|    VERIFY_BITS_128(&d, 62);
  239|       |    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  240|  47.8M|    r[1] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  241|  47.8M|    VERIFY_BITS(r[1], 52);
  242|  47.8M|    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|  47.8M|    secp256k1_u128_accum_mul(&c, a0, a2);
  246|  47.8M|    secp256k1_u128_accum_mul(&c, a1, a1);
  247|  47.8M|    VERIFY_BITS_128(&c, 114);
  248|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
  249|  47.8M|    secp256k1_u128_accum_mul(&d, a3, a4);
  250|  47.8M|    VERIFY_BITS_128(&d, 114);
  251|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  252|  47.8M|    secp256k1_u128_accum_mul(&c, R, secp256k1_u128_to_u64(&d)); secp256k1_u128_rshift(&d, 64);
  253|  47.8M|    VERIFY_BITS_128(&c, 115);
  254|  47.8M|    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|  47.8M|    r[2] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  257|  47.8M|    VERIFY_BITS(r[2], 52);
  258|  47.8M|    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|  47.8M|    secp256k1_u128_accum_mul(&c, R << 12, secp256k1_u128_to_u64(&d));
  262|  47.8M|    secp256k1_u128_accum_u64(&c, t3);
  263|  47.8M|    VERIFY_BITS_128(&c, 100);
  264|       |    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  265|  47.8M|    r[3] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  266|  47.8M|    VERIFY_BITS(r[3], 52);
  267|  47.8M|    VERIFY_BITS_128(&c, 48);
  268|       |    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  269|  47.8M|    r[4] = secp256k1_u128_to_u64(&c) + t4;
  270|  47.8M|    VERIFY_BITS(r[4], 49);
  271|       |    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  272|  47.8M|}
secp256k1.c:secp256k1_fe_mul_inner:
   18|  27.2M|SECP256K1_FORCE_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) {
   19|  27.2M|    secp256k1_uint128 c, d;
   20|  27.2M|    uint64_t t3, t4, tx, u0;
   21|  27.2M|    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
   22|  27.2M|    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
   23|       |
   24|  27.2M|    VERIFY_BITS(a[0], 56);
   25|  27.2M|    VERIFY_BITS(a[1], 56);
   26|  27.2M|    VERIFY_BITS(a[2], 56);
   27|  27.2M|    VERIFY_BITS(a[3], 56);
   28|  27.2M|    VERIFY_BITS(a[4], 52);
   29|  27.2M|    VERIFY_BITS(b[0], 56);
   30|  27.2M|    VERIFY_BITS(b[1], 56);
   31|  27.2M|    VERIFY_BITS(b[2], 56);
   32|  27.2M|    VERIFY_BITS(b[3], 56);
   33|  27.2M|    VERIFY_BITS(b[4], 52);
   34|  27.2M|    VERIFY_CHECK(r != b);
   35|  27.2M|    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|  27.2M|    secp256k1_u128_mul(&d, a0, b[3]);
   44|  27.2M|    secp256k1_u128_accum_mul(&d, a1, b[2]);
   45|  27.2M|    secp256k1_u128_accum_mul(&d, a2, b[1]);
   46|  27.2M|    secp256k1_u128_accum_mul(&d, a3, b[0]);
   47|  27.2M|    VERIFY_BITS_128(&d, 114);
   48|       |    /* [d 0 0 0] = [p3 0 0 0] */
   49|  27.2M|    secp256k1_u128_mul(&c, a4, b[4]);
   50|  27.2M|    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|  27.2M|    secp256k1_u128_accum_mul(&d, R, secp256k1_u128_to_u64(&c)); secp256k1_u128_rshift(&c, 64);
   53|  27.2M|    VERIFY_BITS_128(&d, 115);
   54|  27.2M|    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|  27.2M|    t3 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   57|  27.2M|    VERIFY_BITS(t3, 52);
   58|  27.2M|    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|  27.2M|    secp256k1_u128_accum_mul(&d, a0, b[4]);
   62|  27.2M|    secp256k1_u128_accum_mul(&d, a1, b[3]);
   63|  27.2M|    secp256k1_u128_accum_mul(&d, a2, b[2]);
   64|  27.2M|    secp256k1_u128_accum_mul(&d, a3, b[1]);
   65|  27.2M|    secp256k1_u128_accum_mul(&d, a4, b[0]);
   66|  27.2M|    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|  27.2M|    secp256k1_u128_accum_mul(&d, R << 12, secp256k1_u128_to_u64(&c));
   69|  27.2M|    VERIFY_BITS_128(&d, 116);
   70|       |    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   71|  27.2M|    t4 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   72|  27.2M|    VERIFY_BITS(t4, 52);
   73|  27.2M|    VERIFY_BITS_128(&d, 64);
   74|       |    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   75|  27.2M|    tx = (t4 >> 48); t4 &= (M >> 4);
   76|  27.2M|    VERIFY_BITS(tx, 4);
   77|  27.2M|    VERIFY_BITS(t4, 48);
   78|       |    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
   79|       |
   80|  27.2M|    secp256k1_u128_mul(&c, a0, b[0]);
   81|  27.2M|    VERIFY_BITS_128(&c, 112);
   82|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
   83|  27.2M|    secp256k1_u128_accum_mul(&d, a1, b[4]);
   84|  27.2M|    secp256k1_u128_accum_mul(&d, a2, b[3]);
   85|  27.2M|    secp256k1_u128_accum_mul(&d, a3, b[2]);
   86|  27.2M|    secp256k1_u128_accum_mul(&d, a4, b[1]);
   87|  27.2M|    VERIFY_BITS_128(&d, 114);
   88|       |    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   89|  27.2M|    u0 = secp256k1_u128_to_u64(&d) & M; secp256k1_u128_rshift(&d, 52);
   90|  27.2M|    VERIFY_BITS(u0, 52);
   91|  27.2M|    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|  27.2M|    u0 = (u0 << 4) | tx;
   95|  27.2M|    VERIFY_BITS(u0, 56);
   96|       |    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
   97|  27.2M|    secp256k1_u128_accum_mul(&c, u0, R >> 4);
   98|  27.2M|    VERIFY_BITS_128(&c, 113);
   99|       |    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
  100|  27.2M|    r[0] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  101|  27.2M|    VERIFY_BITS(r[0], 52);
  102|  27.2M|    VERIFY_BITS_128(&c, 61);
  103|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
  104|       |
  105|  27.2M|    secp256k1_u128_accum_mul(&c, a0, b[1]);
  106|  27.2M|    secp256k1_u128_accum_mul(&c, a1, b[0]);
  107|  27.2M|    VERIFY_BITS_128(&c, 114);
  108|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
  109|  27.2M|    secp256k1_u128_accum_mul(&d, a2, b[4]);
  110|  27.2M|    secp256k1_u128_accum_mul(&d, a3, b[3]);
  111|  27.2M|    secp256k1_u128_accum_mul(&d, a4, b[2]);
  112|  27.2M|    VERIFY_BITS_128(&d, 114);
  113|       |    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  114|  27.2M|    secp256k1_u128_accum_mul(&c, secp256k1_u128_to_u64(&d) & M, R); secp256k1_u128_rshift(&d, 52);
  115|  27.2M|    VERIFY_BITS_128(&c, 115);
  116|  27.2M|    VERIFY_BITS_128(&d, 62);
  117|       |    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
  118|  27.2M|    r[1] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  119|  27.2M|    VERIFY_BITS(r[1], 52);
  120|  27.2M|    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|  27.2M|    secp256k1_u128_accum_mul(&c, a0, b[2]);
  124|  27.2M|    secp256k1_u128_accum_mul(&c, a1, b[1]);
  125|  27.2M|    secp256k1_u128_accum_mul(&c, a2, b[0]);
  126|  27.2M|    VERIFY_BITS_128(&c, 114);
  127|       |    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
  128|  27.2M|    secp256k1_u128_accum_mul(&d, a3, b[4]);
  129|  27.2M|    secp256k1_u128_accum_mul(&d, a4, b[3]);
  130|  27.2M|    VERIFY_BITS_128(&d, 114);
  131|       |    /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  132|  27.2M|    secp256k1_u128_accum_mul(&c, R, secp256k1_u128_to_u64(&d)); secp256k1_u128_rshift(&d, 64);
  133|  27.2M|    VERIFY_BITS_128(&c, 115);
  134|  27.2M|    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|  27.2M|    r[2] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  138|  27.2M|    VERIFY_BITS(r[2], 52);
  139|  27.2M|    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|  27.2M|    secp256k1_u128_accum_mul(&c, R << 12, secp256k1_u128_to_u64(&d));
  142|  27.2M|    secp256k1_u128_accum_u64(&c, t3);
  143|  27.2M|    VERIFY_BITS_128(&c, 100);
  144|       |    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  145|  27.2M|    r[3] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
  146|  27.2M|    VERIFY_BITS(r[3], 52);
  147|  27.2M|    VERIFY_BITS_128(&c, 48);
  148|       |    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  149|  27.2M|    r[4] = secp256k1_u128_to_u64(&c) + t4;
  150|  27.2M|    VERIFY_BITS(r[4], 49);
  151|       |    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
  152|  27.2M|}

secp256k1.c:secp256k1_fe_verify:
  149|  68.8M|static void secp256k1_fe_verify(const secp256k1_fe *a) { (void)a; }
secp256k1.c:secp256k1_fe_verify_magnitude:
  150|  66.4M|static void secp256k1_fe_verify_magnitude(const secp256k1_fe *a, int m) { (void)a; (void)m; }
secp256k1.c:secp256k1_fe_sqrt:
   37|   105k|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|   105k|    secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1;
   48|   105k|    int j, ret;
   49|       |
   50|   105k|    VERIFY_CHECK(r != a);
   51|   105k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  345|   105k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   52|   105k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 8);
  ------------------
  |  |  349|   105k|#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|   105k|    secp256k1_fe_sqr(&x2, a);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   60|   105k|    secp256k1_fe_mul(&x2, &x2, a);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   61|       |
   62|   105k|    secp256k1_fe_sqr(&x3, &x2);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   63|   105k|    secp256k1_fe_mul(&x3, &x3, a);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   64|       |
   65|   105k|    x6 = x3;
   66|   421k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (66:15): [True: 316k, False: 105k]
  ------------------
   67|   316k|        secp256k1_fe_sqr(&x6, &x6);
  ------------------
  |  |   94|   316k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   68|   316k|    }
   69|   105k|    secp256k1_fe_mul(&x6, &x6, &x3);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   70|       |
   71|   105k|    x9 = x6;
   72|   421k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (72:15): [True: 316k, False: 105k]
  ------------------
   73|   316k|        secp256k1_fe_sqr(&x9, &x9);
  ------------------
  |  |   94|   316k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   74|   316k|    }
   75|   105k|    secp256k1_fe_mul(&x9, &x9, &x3);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   76|       |
   77|   105k|    x11 = x9;
   78|   316k|    for (j=0; j<2; j++) {
  ------------------
  |  Branch (78:15): [True: 210k, False: 105k]
  ------------------
   79|   210k|        secp256k1_fe_sqr(&x11, &x11);
  ------------------
  |  |   94|   210k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   80|   210k|    }
   81|   105k|    secp256k1_fe_mul(&x11, &x11, &x2);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   82|       |
   83|   105k|    x22 = x11;
   84|  1.26M|    for (j=0; j<11; j++) {
  ------------------
  |  Branch (84:15): [True: 1.15M, False: 105k]
  ------------------
   85|  1.15M|        secp256k1_fe_sqr(&x22, &x22);
  ------------------
  |  |   94|  1.15M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   86|  1.15M|    }
   87|   105k|    secp256k1_fe_mul(&x22, &x22, &x11);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   88|       |
   89|   105k|    x44 = x22;
   90|  2.42M|    for (j=0; j<22; j++) {
  ------------------
  |  Branch (90:15): [True: 2.31M, False: 105k]
  ------------------
   91|  2.31M|        secp256k1_fe_sqr(&x44, &x44);
  ------------------
  |  |   94|  2.31M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   92|  2.31M|    }
   93|   105k|    secp256k1_fe_mul(&x44, &x44, &x22);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   94|       |
   95|   105k|    x88 = x44;
   96|  4.74M|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (96:15): [True: 4.63M, False: 105k]
  ------------------
   97|  4.63M|        secp256k1_fe_sqr(&x88, &x88);
  ------------------
  |  |   94|  4.63M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   98|  4.63M|    }
   99|   105k|    secp256k1_fe_mul(&x88, &x88, &x44);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  100|       |
  101|   105k|    x176 = x88;
  102|  9.38M|    for (j=0; j<88; j++) {
  ------------------
  |  Branch (102:15): [True: 9.27M, False: 105k]
  ------------------
  103|  9.27M|        secp256k1_fe_sqr(&x176, &x176);
  ------------------
  |  |   94|  9.27M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  104|  9.27M|    }
  105|   105k|    secp256k1_fe_mul(&x176, &x176, &x88);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  106|       |
  107|   105k|    x220 = x176;
  108|  4.74M|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (108:15): [True: 4.63M, False: 105k]
  ------------------
  109|  4.63M|        secp256k1_fe_sqr(&x220, &x220);
  ------------------
  |  |   94|  4.63M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  110|  4.63M|    }
  111|   105k|    secp256k1_fe_mul(&x220, &x220, &x44);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  112|       |
  113|   105k|    x223 = x220;
  114|   421k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (114:15): [True: 316k, False: 105k]
  ------------------
  115|   316k|        secp256k1_fe_sqr(&x223, &x223);
  ------------------
  |  |   94|   316k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  116|   316k|    }
  117|   105k|    secp256k1_fe_mul(&x223, &x223, &x3);
  ------------------
  |  |   93|   105k|#  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|   105k|    t1 = x223;
  122|  2.53M|    for (j=0; j<23; j++) {
  ------------------
  |  Branch (122:15): [True: 2.42M, False: 105k]
  ------------------
  123|  2.42M|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|  2.42M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|  2.42M|    }
  125|   105k|    secp256k1_fe_mul(&t1, &t1, &x22);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|   738k|    for (j=0; j<6; j++) {
  ------------------
  |  Branch (126:15): [True: 632k, False: 105k]
  ------------------
  127|   632k|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|   632k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  128|   632k|    }
  129|   105k|    secp256k1_fe_mul(&t1, &t1, &x2);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  130|   105k|    secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  131|   105k|    secp256k1_fe_sqr(r, &t1);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  132|       |
  133|       |    /* Check that a square root was actually calculated */
  134|       |
  135|   105k|    secp256k1_fe_sqr(&t1, r);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  136|   105k|    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|   105k|    return ret;
  146|   105k|}
secp256k1.c:secp256k1_fe_equal:
   25|   127k|SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) {
   26|   127k|    secp256k1_fe na;
   27|   127k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  345|   127k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   28|   127k|    SECP256K1_FE_VERIFY(b);
  ------------------
  |  |  345|   127k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   29|   127k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 1);
  ------------------
  |  |  349|   127k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   30|   127k|    SECP256K1_FE_VERIFY_MAGNITUDE(b, 30);
  ------------------
  |  |  349|   127k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   31|       |
   32|   127k|    secp256k1_fe_negate(&na, a, 1);
  ------------------
  |  |  211|   127k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   127k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   127k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   127k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 127k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   127k|    } \
  |  |  |  |   94|   127k|    stmt; \
  |  |  |  |   95|   127k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   33|   127k|    secp256k1_fe_add(&na, b);
  ------------------
  |  |   92|   127k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
   34|   127k|    return secp256k1_fe_normalizes_to_zero(&na);
  ------------------
  |  |   81|   127k|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
   35|   127k|}

secp256k1.c:secp256k1_ge_set_xy:
  132|   892k|static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) {
  133|   892k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  345|   892k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  134|   892k|    SECP256K1_FE_VERIFY(y);
  ------------------
  |  |  345|   892k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  135|       |
  136|   892k|    r->infinity = 0;
  137|   892k|    r->x = *x;
  138|   892k|    r->y = *y;
  139|       |
  140|   892k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   892k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  141|   892k|}
secp256k1.c:secp256k1_ge_verify:
   78|  3.62M|static void secp256k1_ge_verify(const secp256k1_ge *a) {
   79|  3.62M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  345|  3.62M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   80|  3.62M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  345|  3.62M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   81|  3.62M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GE_X_MAGNITUDE_MAX);
  ------------------
  |  |  349|  3.62M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   82|  3.62M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GE_Y_MAGNITUDE_MAX);
  ------------------
  |  |  349|  3.62M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   83|  3.62M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   84|  3.62M|    (void)a;
   85|  3.62M|}
secp256k1.c:secp256k1_ge_is_valid_var:
  446|    173|static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
  447|    173|    secp256k1_fe y2, x3;
  448|    173|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|    173|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  449|       |
  450|    173|    if (a->infinity) {
  ------------------
  |  Branch (450:9): [True: 0, False: 173]
  ------------------
  451|      0|        return 0;
  452|      0|    }
  453|       |    /* y^2 = x^3 + 7 */
  454|    173|    secp256k1_fe_sqr(&y2, &a->y);
  ------------------
  |  |   94|    173|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  455|    173|    secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   94|    173|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
                  secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   93|    173|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  456|    173|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|    173|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|    173|#define SECP256K1_B 7
  ------------------
  457|    173|    return secp256k1_fe_equal(&y2, &x3);
  458|    173|}
secp256k1.c:secp256k1_ge_is_in_correct_subgroup:
  926|   105k|static int secp256k1_ge_is_in_correct_subgroup(const secp256k1_ge* ge) {
  927|       |#ifdef EXHAUSTIVE_TEST_ORDER
  928|       |    secp256k1_gej out;
  929|       |    int i;
  930|       |    SECP256K1_GE_VERIFY(ge);
  931|       |
  932|       |    /* A very simple EC multiplication ladder that avoids a dependency on ecmult. */
  933|       |    secp256k1_gej_set_infinity(&out);
  934|       |    for (i = 0; i < 32; ++i) {
  935|       |        secp256k1_gej_double_var(&out, &out, NULL);
  936|       |        if ((((uint32_t)EXHAUSTIVE_TEST_ORDER) >> (31 - i)) & 1) {
  937|       |            secp256k1_gej_add_ge_var(&out, &out, ge, NULL);
  938|       |        }
  939|       |    }
  940|       |    return secp256k1_gej_is_infinity(&out);
  941|       |#else
  942|   105k|    SECP256K1_GE_VERIFY(ge);
  ------------------
  |  |  212|   105k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  943|       |
  944|   105k|    (void)ge;
  945|       |    /* The real secp256k1 group has cofactor 1, so the subgroup is the entire curve. */
  946|   105k|    return 1;
  947|   105k|#endif
  948|   105k|}
secp256k1.c:secp256k1_ge_clear:
  343|   100k|static void secp256k1_ge_clear(secp256k1_ge *r) {
  344|   100k|    secp256k1_memclear_explicit(r, sizeof(secp256k1_ge));
  345|   100k|}
secp256k1.c:secp256k1_gej_verify:
   87|  19.6M|static void secp256k1_gej_verify(const secp256k1_gej *a) {
   88|  19.6M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  345|  19.6M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   89|  19.6M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  345|  19.6M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   90|  19.6M|    SECP256K1_FE_VERIFY(&a->z);
  ------------------
  |  |  345|  19.6M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   91|  19.6M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GEJ_X_MAGNITUDE_MAX);
  ------------------
  |  |  349|  19.6M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   92|  19.6M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GEJ_Y_MAGNITUDE_MAX);
  ------------------
  |  |  349|  19.6M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   93|  19.6M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->z, SECP256K1_GEJ_Z_MAGNITUDE_MAX);
  ------------------
  |  |  349|  19.6M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   94|  19.6M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   95|  19.6M|    (void)a;
   96|  19.6M|}
secp256k1.c:secp256k1_gej_set_infinity:
  322|   110k|static void secp256k1_gej_set_infinity(secp256k1_gej *r) {
  323|   110k|    r->infinity = 1;
  324|   110k|    secp256k1_fe_set_int(&r->x, 0);
  ------------------
  |  |   83|   110k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  325|   110k|    secp256k1_fe_set_int(&r->y, 0);
  ------------------
  |  |   83|   110k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  326|   110k|    secp256k1_fe_set_int(&r->z, 0);
  ------------------
  |  |   83|   110k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  327|       |
  328|   110k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   110k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  329|   110k|}
secp256k1.c:secp256k1_gej_is_infinity:
  440|  79.8k|static int secp256k1_gej_is_infinity(const secp256k1_gej *a) {
  441|  79.8k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  79.8k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  442|       |
  443|  79.8k|    return a->infinity;
  444|  79.8k|}
secp256k1.c:secp256k1_ge_set_gej:
  159|  13.7k|static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a) {
  160|  13.7k|    secp256k1_fe z2, z3;
  161|  13.7k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  13.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  162|       |
  163|  13.7k|    r->infinity = a->infinity;
  164|  13.7k|    secp256k1_fe_inv(&a->z, &a->z);
  ------------------
  |  |   98|  13.7k|#  define secp256k1_fe_inv secp256k1_fe_impl_inv
  ------------------
  165|  13.7k|    secp256k1_fe_sqr(&z2, &a->z);
  ------------------
  |  |   94|  13.7k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  166|  13.7k|    secp256k1_fe_mul(&z3, &a->z, &z2);
  ------------------
  |  |   93|  13.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  167|  13.7k|    secp256k1_fe_mul(&a->x, &a->x, &z2);
  ------------------
  |  |   93|  13.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  168|  13.7k|    secp256k1_fe_mul(&a->y, &a->y, &z3);
  ------------------
  |  |   93|  13.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  169|  13.7k|    secp256k1_fe_set_int(&a->z, 1);
  ------------------
  |  |   83|  13.7k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  170|  13.7k|    r->x = a->x;
  171|  13.7k|    r->y = a->y;
  172|       |
  173|  13.7k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  13.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  174|  13.7k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  13.7k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  175|  13.7k|}
secp256k1.c:secp256k1_ge_set_xo_var:
  347|   105k|static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) {
  348|   105k|    secp256k1_fe x2, x3;
  349|   105k|    int ret;
  350|   105k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  345|   105k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  351|       |
  352|   105k|    r->x = *x;
  353|   105k|    secp256k1_fe_sqr(&x2, x);
  ------------------
  |  |   94|   105k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  354|   105k|    secp256k1_fe_mul(&x3, x, &x2);
  ------------------
  |  |   93|   105k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  355|   105k|    r->infinity = 0;
  356|   105k|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|   105k|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|   105k|#define SECP256K1_B 7
  ------------------
  357|   105k|    ret = secp256k1_fe_sqrt(&r->y, &x3);
  358|   105k|    secp256k1_fe_normalize_var(&r->y);
  ------------------
  |  |   80|   105k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  359|   105k|    if (secp256k1_fe_is_odd(&r->y) != odd) {
  ------------------
  |  |   85|   105k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (359:9): [True: 52.7k, False: 52.6k]
  ------------------
  360|  52.7k|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|  52.7k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  52.7k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  52.7k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 52.7k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  52.7k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 52.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  52.7k|    } \
  |  |  |  |   94|  52.7k|    stmt; \
  |  |  |  |   95|  52.7k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 52.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  52.7k|    }
  362|       |
  363|   105k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   105k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  364|   105k|    return ret;
  365|   105k|}
secp256k1.c:secp256k1_gej_set_ge:
  367|  96.5k|static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a) {
  368|  96.5k|   SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  96.5k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  369|       |
  370|  96.5k|   r->infinity = a->infinity;
  371|  96.5k|   r->x = a->x;
  372|  96.5k|   r->y = a->y;
  373|  96.5k|   secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|  96.5k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  374|       |
  375|  96.5k|   SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  96.5k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  376|  96.5k|}
secp256k1.c:secp256k1_ge_set_gej_zinv:
   99|  33.0k|static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
  100|  33.0k|    secp256k1_fe zi2;
  101|  33.0k|    secp256k1_fe zi3;
  102|  33.0k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  33.0k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  103|  33.0k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  345|  33.0k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  104|  33.0k|    VERIFY_CHECK(!a->infinity);
  105|       |
  106|  33.0k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|  33.0k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  107|  33.0k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|  33.0k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  108|  33.0k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|  33.0k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  109|  33.0k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|  33.0k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  110|  33.0k|    r->infinity = a->infinity;
  111|       |
  112|  33.0k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  33.0k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  113|  33.0k|}
secp256k1.c:secp256k1_ge_table_set_globalz:
  289|  33.0k|static void secp256k1_ge_table_set_globalz(size_t len, secp256k1_ge *a, const secp256k1_fe *zr) {
  290|  33.0k|    size_t i;
  291|  33.0k|    secp256k1_fe zs;
  292|       |#ifdef VERIFY
  293|       |    for (i = 0; i < len; i++) {
  294|       |        SECP256K1_GE_VERIFY(&a[i]);
  295|       |        SECP256K1_FE_VERIFY(&zr[i]);
  296|       |    }
  297|       |#endif
  298|       |
  299|  33.0k|    if (len > 0) {
  ------------------
  |  Branch (299:9): [True: 33.0k, False: 0]
  ------------------
  300|  33.0k|        i = len - 1;
  301|       |        /* Ensure all y values are in weak normal form for fast negation of points */
  302|  33.0k|        secp256k1_fe_normalize_weak(&a[i].y);
  ------------------
  |  |   79|  33.0k|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  303|  33.0k|        zs = zr[i];
  304|       |
  305|       |        /* Work our way backwards, using the z-ratios to scale the x/y values. */
  306|   264k|        while (i > 0) {
  ------------------
  |  Branch (306:16): [True: 231k, False: 33.0k]
  ------------------
  307|   231k|            if (i != len - 1) {
  ------------------
  |  Branch (307:17): [True: 198k, False: 33.0k]
  ------------------
  308|   198k|                secp256k1_fe_mul(&zs, &zs, &zr[i]);
  ------------------
  |  |   93|   198k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  309|   198k|            }
  310|   231k|            i--;
  311|   231k|            secp256k1_ge_set_ge_zinv(&a[i], &a[i], &zs);
  312|   231k|        }
  313|  33.0k|    }
  314|       |
  315|       |#ifdef VERIFY
  316|       |    for (i = 0; i < len; i++) {
  317|       |        SECP256K1_GE_VERIFY(&a[i]);
  318|       |    }
  319|       |#endif
  320|  33.0k|}
secp256k1.c:secp256k1_ge_set_ge_zinv:
  116|   231k|static void secp256k1_ge_set_ge_zinv(secp256k1_ge *r, const secp256k1_ge *a, const secp256k1_fe *zi) {
  117|   231k|    secp256k1_fe zi2;
  118|   231k|    secp256k1_fe zi3;
  119|   231k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|   231k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  120|   231k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  345|   231k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  121|   231k|    VERIFY_CHECK(!a->infinity);
  122|       |
  123|   231k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|   231k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|   231k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|   231k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  125|   231k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|   231k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|   231k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|   231k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  127|   231k|    r->infinity = a->infinity;
  128|       |
  129|   231k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   231k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  130|   231k|}
secp256k1.c:secp256k1_gej_double_var:
  495|  4.05M|static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) {
  496|  4.05M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  4.05M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  497|       |
  498|       |    /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity,
  499|       |     *  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
  500|       |     *  y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p.
  501|       |     *
  502|       |     *  Having said this, if this function receives a point on a sextic twist, e.g. by
  503|       |     *  a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6,
  504|       |     *  since -6 does have a cube root mod p. For this point, this function will not set
  505|       |     *  the infinity flag even though the point doubles to infinity, and the result
  506|       |     *  point will be gibberish (z = 0 but infinity = 0).
  507|       |     */
  508|  4.05M|    if (a->infinity) {
  ------------------
  |  Branch (508:9): [True: 33.0k, False: 4.02M]
  ------------------
  509|  33.0k|        secp256k1_gej_set_infinity(r);
  510|  33.0k|        if (rzr != NULL) {
  ------------------
  |  Branch (510:13): [True: 0, False: 33.0k]
  ------------------
  511|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  512|      0|        }
  513|  33.0k|        return;
  514|  33.0k|    }
  515|       |
  516|  4.02M|    if (rzr != NULL) {
  ------------------
  |  Branch (516:9): [True: 0, False: 4.02M]
  ------------------
  517|      0|        *rzr = a->y;
  518|      0|        secp256k1_fe_normalize_weak(rzr);
  ------------------
  |  |   79|      0|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  519|      0|    }
  520|       |
  521|  4.02M|    secp256k1_gej_double(r, a);
  522|       |
  523|  4.02M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  4.02M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  524|  4.02M|}
secp256k1.c:secp256k1_gej_double:
  460|  4.02M|static SECP256K1_INLINE void secp256k1_gej_double(secp256k1_gej *r, const secp256k1_gej *a) {
  461|       |    /* Operations: 3 mul, 4 sqr, 8 add/half/mul_int/negate */
  462|  4.02M|    secp256k1_fe l, s, t;
  463|  4.02M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  4.02M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  464|       |
  465|  4.02M|    r->infinity = a->infinity;
  466|       |
  467|       |    /* Formula used:
  468|       |     * L = (3/2) * X1^2
  469|       |     * S = Y1^2
  470|       |     * T = -X1*S
  471|       |     * X3 = L^2 + 2*T
  472|       |     * Y3 = -(L*(X3 + T) + S^2)
  473|       |     * Z3 = Y1*Z1
  474|       |     */
  475|       |
  476|  4.02M|    secp256k1_fe_mul(&r->z, &a->z, &a->y); /* Z3 = Y1*Z1 (1) */
  ------------------
  |  |   93|  4.02M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  477|  4.02M|    secp256k1_fe_sqr(&s, &a->y);           /* S = Y1^2 (1) */
  ------------------
  |  |   94|  4.02M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  478|  4.02M|    secp256k1_fe_sqr(&l, &a->x);           /* L = X1^2 (1) */
  ------------------
  |  |   94|  4.02M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  479|  4.02M|    secp256k1_fe_mul_int(&l, 3);           /* L = 3*X1^2 (3) */
  ------------------
  |  |  233|  4.02M|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   87|  4.02M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  4.02M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 4.02M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  4.02M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 4.02M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  4.02M|    } \
  |  |  |  |   94|  4.02M|    stmt; \
  |  |  |  |   95|  4.02M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 4.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|  4.02M|    secp256k1_fe_half(&l);                 /* L = 3/2*X1^2 (2) */
  ------------------
  |  |  101|  4.02M|#  define secp256k1_fe_half secp256k1_fe_impl_half
  ------------------
  481|  4.02M|    secp256k1_fe_negate(&t, &s, 1);        /* T = -S (2) */
  ------------------
  |  |  211|  4.02M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  4.02M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  4.02M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 4.02M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  4.02M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 4.02M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  4.02M|    } \
  |  |  |  |   94|  4.02M|    stmt; \
  |  |  |  |   95|  4.02M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 4.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  482|  4.02M|    secp256k1_fe_mul(&t, &t, &a->x);       /* T = -X1*S (1) */
  ------------------
  |  |   93|  4.02M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  483|  4.02M|    secp256k1_fe_sqr(&r->x, &l);           /* X3 = L^2 (1) */
  ------------------
  |  |   94|  4.02M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  484|  4.02M|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + T (2) */
  ------------------
  |  |   92|  4.02M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  485|  4.02M|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + 2*T (3) */
  ------------------
  |  |   92|  4.02M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  486|  4.02M|    secp256k1_fe_sqr(&s, &s);              /* S' = S^2 (1) */
  ------------------
  |  |   94|  4.02M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  487|  4.02M|    secp256k1_fe_add(&t, &r->x);           /* T' = X3 + T (4) */
  ------------------
  |  |   92|  4.02M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  488|  4.02M|    secp256k1_fe_mul(&r->y, &t, &l);       /* Y3 = L*(X3 + T) (1) */
  ------------------
  |  |   93|  4.02M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  489|  4.02M|    secp256k1_fe_add(&r->y, &s);           /* Y3 = L*(X3 + T) + S^2 (2) */
  ------------------
  |  |   92|  4.02M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  490|  4.02M|    secp256k1_fe_negate(&r->y, &r->y, 2);  /* Y3 = -(L*(X3 + T) + S^2) (3) */
  ------------------
  |  |  211|  4.02M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  4.02M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  4.02M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 4.02M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  4.02M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 4.02M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  4.02M|    } \
  |  |  |  |   94|  4.02M|    stmt; \
  |  |  |  |   95|  4.02M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 4.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|       |
  492|  4.02M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  4.02M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  493|  4.02M|}
secp256k1.c:secp256k1_ge_from_storage:
  890|   137k|static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) {
  891|   137k|    secp256k1_fe_from_storage(&r->x, &a->x);
  ------------------
  |  |   97|   137k|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  892|   137k|    secp256k1_fe_from_storage(&r->y, &a->y);
  ------------------
  |  |   97|   137k|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  893|   137k|    r->infinity = 0;
  894|       |
  895|   137k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   137k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  896|   137k|}
secp256k1.c:secp256k1_gej_add_zinv_var:
  653|  44.8k|static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv) {
  654|       |    /* Operations: 9 mul, 3 sqr, 11 add/negate/normalizes_to_zero (ignoring special cases) */
  655|  44.8k|    secp256k1_fe az, z12, u1, u2, s1, s2, h, i, h2, h3, t;
  656|  44.8k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  44.8k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  657|  44.8k|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|  44.8k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  658|  44.8k|    SECP256K1_FE_VERIFY(bzinv);
  ------------------
  |  |  345|  44.8k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  659|       |
  660|  44.8k|    if (a->infinity) {
  ------------------
  |  Branch (660:9): [True: 2.64k, False: 42.2k]
  ------------------
  661|  2.64k|        secp256k1_fe bzinv2, bzinv3;
  662|  2.64k|        r->infinity = b->infinity;
  663|  2.64k|        secp256k1_fe_sqr(&bzinv2, bzinv);
  ------------------
  |  |   94|  2.64k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  664|  2.64k|        secp256k1_fe_mul(&bzinv3, &bzinv2, bzinv);
  ------------------
  |  |   93|  2.64k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  665|  2.64k|        secp256k1_fe_mul(&r->x, &b->x, &bzinv2);
  ------------------
  |  |   93|  2.64k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  666|  2.64k|        secp256k1_fe_mul(&r->y, &b->y, &bzinv3);
  ------------------
  |  |   93|  2.64k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  667|  2.64k|        secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|  2.64k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  668|  2.64k|        SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  2.64k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  669|  2.64k|        return;
  670|  2.64k|    }
  671|  42.2k|    if (b->infinity) {
  ------------------
  |  Branch (671:9): [True: 0, False: 42.2k]
  ------------------
  672|      0|        *r = *a;
  673|      0|        return;
  674|      0|    }
  675|       |
  676|       |    /** We need to calculate (rx,ry,rz) = (ax,ay,az) + (bx,by,1/bzinv). Due to
  677|       |     *  secp256k1's isomorphism we can multiply the Z coordinates on both sides
  678|       |     *  by bzinv, and get: (rx,ry,rz*bzinv) = (ax,ay,az*bzinv) + (bx,by,1).
  679|       |     *  This means that (rx,ry,rz) can be calculated as
  680|       |     *  (ax,ay,az*bzinv) + (bx,by,1), when not applying the bzinv factor to rz.
  681|       |     *  The variable az below holds the modified Z coordinate for a, which is used
  682|       |     *  for the computation of rx and ry, but not for rz.
  683|       |     */
  684|  42.2k|    secp256k1_fe_mul(&az, &a->z, bzinv);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  685|       |
  686|  42.2k|    secp256k1_fe_sqr(&z12, &az);
  ------------------
  |  |   94|  42.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  687|  42.2k|    u1 = a->x;
  688|  42.2k|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  689|  42.2k|    s1 = a->y;
  690|  42.2k|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  691|  42.2k|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|  42.2k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  42.2k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  42.2k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 42.2k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  42.2k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 42.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  42.2k|    } \
  |  |  |  |   94|  42.2k|    stmt; \
  |  |  |  |   95|  42.2k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 42.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  692|  42.2k|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|  42.2k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  42.2k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  42.2k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 42.2k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  42.2k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 42.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  42.2k|    } \
  |  |  |  |   94|  42.2k|    stmt; \
  |  |  |  |   95|  42.2k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 42.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  693|  42.2k|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|  42.2k|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (693:9): [True: 0, False: 42.2k]
  ------------------
  694|      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 (694:13): [True: 0, False: 0]
  ------------------
  695|      0|            secp256k1_gej_double_var(r, a, NULL);
  696|      0|        } else {
  697|      0|            secp256k1_gej_set_infinity(r);
  698|      0|        }
  699|      0|        return;
  700|      0|    }
  701|       |
  702|  42.2k|    r->infinity = 0;
  703|  42.2k|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  704|       |
  705|  42.2k|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|  42.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  706|  42.2k|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|  42.2k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  42.2k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  42.2k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 42.2k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  42.2k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 42.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  42.2k|    } \
  |  |  |  |   94|  42.2k|    stmt; \
  |  |  |  |   95|  42.2k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 42.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|  42.2k|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  708|  42.2k|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  709|       |
  710|  42.2k|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|  42.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  711|  42.2k|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  712|  42.2k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  713|  42.2k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  714|       |
  715|  42.2k|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  716|  42.2k|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  717|  42.2k|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|  42.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  718|  42.2k|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|  42.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  719|       |
  720|  42.2k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  42.2k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  721|  42.2k|}
secp256k1.c:secp256k1_ge_is_infinity:
  143|  41.5k|static int secp256k1_ge_is_infinity(const secp256k1_ge *a) {
  144|  41.5k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  41.5k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  145|       |
  146|  41.5k|    return a->infinity;
  147|  41.5k|}
secp256k1.c:secp256k1_ge_set_infinity:
  331|  21.3k|static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
  332|  21.3k|    r->infinity = 1;
  333|  21.3k|    secp256k1_fe_set_int(&r->x, 0);
  ------------------
  |  |   83|  21.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  334|  21.3k|    secp256k1_fe_set_int(&r->y, 0);
  ------------------
  |  |   83|  21.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  335|       |
  336|  21.3k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  21.3k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  337|  21.3k|}
secp256k1.c:secp256k1_ge_eq_var:
  398|  20.1k|static int secp256k1_ge_eq_var(const secp256k1_ge *a, const secp256k1_ge *b) {
  399|  20.1k|    secp256k1_fe tmp;
  400|  20.1k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  20.1k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  401|  20.1k|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|  20.1k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  402|       |
  403|  20.1k|    if (a->infinity != b->infinity) return 0;
  ------------------
  |  Branch (403:9): [True: 0, False: 20.1k]
  ------------------
  404|  20.1k|    if (a->infinity) return 1;
  ------------------
  |  Branch (404:9): [True: 0, False: 20.1k]
  ------------------
  405|       |
  406|  20.1k|    tmp = a->x;
  407|  20.1k|    secp256k1_fe_normalize_weak(&tmp);
  ------------------
  |  |   79|  20.1k|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  408|  20.1k|    if (!secp256k1_fe_equal(&tmp, &b->x)) return 0;
  ------------------
  |  Branch (408:9): [True: 18.5k, False: 1.60k]
  ------------------
  409|       |
  410|  1.60k|    tmp = a->y;
  411|  1.60k|    secp256k1_fe_normalize_weak(&tmp);
  ------------------
  |  |   79|  1.60k|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  412|  1.60k|    if (!secp256k1_fe_equal(&tmp, &b->y)) return 0;
  ------------------
  |  Branch (412:9): [True: 396, False: 1.20k]
  ------------------
  413|       |
  414|  1.20k|    return 1;
  415|  1.60k|}
secp256k1.c:secp256k1_ge_to_bytes_ext:
  997|  11.1k|static void secp256k1_ge_to_bytes_ext(unsigned char *data, const secp256k1_ge *ge) {
  998|  11.1k|    if (secp256k1_ge_is_infinity(ge)) {
  ------------------
  |  Branch (998:9): [True: 10.2k, False: 876]
  ------------------
  999|  10.2k|        memset(data, 0, 64);
 1000|  10.2k|    } else {
 1001|    876|        secp256k1_ge_to_bytes(data, ge);
 1002|    876|    }
 1003|  11.1k|}
secp256k1.c:secp256k1_ge_from_bytes_ext:
 1005|  11.1k|static void secp256k1_ge_from_bytes_ext(secp256k1_ge *ge, const unsigned char *data) {
 1006|  11.1k|    static const unsigned char zeros[64] = { 0 };
 1007|  11.1k|    if (secp256k1_memcmp_var(data, zeros, sizeof(zeros)) == 0) {
  ------------------
  |  Branch (1007:9): [True: 10.2k, False: 876]
  ------------------
 1008|  10.2k|        secp256k1_ge_set_infinity(ge);
 1009|  10.2k|    } else {
 1010|    876|        secp256k1_ge_from_bytes(ge, data);
 1011|    876|    }
 1012|  11.1k|}
secp256k1.c:secp256k1_gej_add_var:
  526|  30.4k|static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp256k1_fe *rzr) {
  527|       |    /* 12 mul, 4 sqr, 11 add/negate/normalizes_to_zero (ignoring special cases) */
  528|  30.4k|    secp256k1_fe z22, z12, u1, u2, s1, s2, h, i, h2, h3, t;
  529|  30.4k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  30.4k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  530|  30.4k|    SECP256K1_GEJ_VERIFY(b);
  ------------------
  |  |  216|  30.4k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  531|       |
  532|  30.4k|    if (a->infinity) {
  ------------------
  |  Branch (532:9): [True: 11.1k, False: 19.3k]
  ------------------
  533|  11.1k|        VERIFY_CHECK(rzr == NULL);
  534|  11.1k|        *r = *b;
  535|  11.1k|        return;
  536|  11.1k|    }
  537|  19.3k|    if (b->infinity) {
  ------------------
  |  Branch (537:9): [True: 0, False: 19.3k]
  ------------------
  538|      0|        if (rzr != NULL) {
  ------------------
  |  Branch (538:13): [True: 0, False: 0]
  ------------------
  539|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  540|      0|        }
  541|      0|        *r = *a;
  542|      0|        return;
  543|      0|    }
  544|       |
  545|  19.3k|    secp256k1_fe_sqr(&z22, &b->z);
  ------------------
  |  |   94|  19.3k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  546|  19.3k|    secp256k1_fe_sqr(&z12, &a->z);
  ------------------
  |  |   94|  19.3k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  547|  19.3k|    secp256k1_fe_mul(&u1, &a->x, &z22);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  548|  19.3k|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  549|  19.3k|    secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  550|  19.3k|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  19.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  551|  19.3k|    secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|  19.3k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  19.3k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  19.3k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 19.3k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  19.3k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 19.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  19.3k|    } \
  |  |  |  |   94|  19.3k|    stmt; \
  |  |  |  |   95|  19.3k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 19.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|  19.3k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  552|  19.3k|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|  19.3k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  19.3k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  19.3k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 19.3k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  19.3k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 19.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  19.3k|    } \
  |  |  |  |   94|  19.3k|    stmt; \
  |  |  |  |   95|  19.3k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 19.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|  19.3k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  553|  19.3k|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|  19.3k|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (553:9): [True: 89, False: 19.2k]
  ------------------
  554|     89|        if (secp256k1_fe_normalizes_to_zero_var(&i)) {
  ------------------
  |  |   82|     89|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (554:13): [True: 89, False: 0]
  ------------------
  555|     89|            secp256k1_gej_double_var(r, a, rzr);
  556|     89|        } else {
  557|      0|            if (rzr != NULL) {
  ------------------
  |  Branch (557:17): [True: 0, False: 0]
  ------------------
  558|      0|                secp256k1_fe_set_int(rzr, 0);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  559|      0|            }
  560|      0|            secp256k1_gej_set_infinity(r);
  561|      0|        }
  562|     89|        return;
  563|     89|    }
  564|       |
  565|  19.2k|    r->infinity = 0;
  566|  19.2k|    secp256k1_fe_mul(&t, &h, &b->z);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  567|  19.2k|    if (rzr != NULL) {
  ------------------
  |  Branch (567:9): [True: 0, False: 19.2k]
  ------------------
  568|      0|        *rzr = t;
  569|      0|    }
  570|  19.2k|    secp256k1_fe_mul(&r->z, &a->z, &t);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  571|       |
  572|  19.2k|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|  19.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  573|  19.2k|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|  19.2k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  19.2k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  19.2k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 19.2k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  19.2k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 19.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  19.2k|    } \
  |  |  |  |   94|  19.2k|    stmt; \
  |  |  |  |   95|  19.2k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 19.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  574|  19.2k|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  575|  19.2k|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  576|       |
  577|  19.2k|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|  19.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  578|  19.2k|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|  19.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  579|  19.2k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  19.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  580|  19.2k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  19.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  581|       |
  582|  19.2k|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|  19.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  583|  19.2k|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  584|  19.2k|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|  19.2k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  585|  19.2k|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|  19.2k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  586|       |
  587|  19.2k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  19.2k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  588|  19.2k|}
secp256k1.c:secp256k1_gej_add_ge_var:
  590|  1.49M|static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr) {
  591|       |    /* Operations: 8 mul, 3 sqr, 11 add/negate/normalizes_to_zero (ignoring special cases) */
  592|  1.49M|    secp256k1_fe z12, u1, u2, s1, s2, h, i, h2, h3, t;
  593|  1.49M|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  1.49M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  594|  1.49M|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|  1.49M|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  595|       |
  596|  1.49M|    if (a->infinity) {
  ------------------
  |  Branch (596:9): [True: 30.4k, False: 1.46M]
  ------------------
  597|  30.4k|        VERIFY_CHECK(rzr == NULL);
  598|  30.4k|        secp256k1_gej_set_ge(r, b);
  599|  30.4k|        return;
  600|  30.4k|    }
  601|  1.46M|    if (b->infinity) {
  ------------------
  |  Branch (601:9): [True: 0, False: 1.46M]
  ------------------
  602|      0|        if (rzr != NULL) {
  ------------------
  |  Branch (602:13): [True: 0, False: 0]
  ------------------
  603|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  604|      0|        }
  605|      0|        *r = *a;
  606|      0|        return;
  607|      0|    }
  608|       |
  609|  1.46M|    secp256k1_fe_sqr(&z12, &a->z);
  ------------------
  |  |   94|  1.46M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  610|  1.46M|    u1 = a->x;
  611|  1.46M|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  612|  1.46M|    s1 = a->y;
  613|  1.46M|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  614|  1.46M|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|  1.46M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  1.46M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  1.46M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 1.46M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  1.46M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 1.46M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  1.46M|    } \
  |  |  |  |   94|  1.46M|    stmt; \
  |  |  |  |   95|  1.46M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 1.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  615|  1.46M|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|  1.46M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  1.46M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  1.46M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 1.46M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  1.46M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 1.46M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  1.46M|    } \
  |  |  |  |   94|  1.46M|    stmt; \
  |  |  |  |   95|  1.46M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 1.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  616|  1.46M|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|  1.46M|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (616:9): [True: 0, False: 1.46M]
  ------------------
  617|      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 (617:13): [True: 0, False: 0]
  ------------------
  618|      0|            secp256k1_gej_double_var(r, a, rzr);
  619|      0|        } else {
  620|      0|            if (rzr != NULL) {
  ------------------
  |  Branch (620:17): [True: 0, False: 0]
  ------------------
  621|      0|                secp256k1_fe_set_int(rzr, 0);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  622|      0|            }
  623|      0|            secp256k1_gej_set_infinity(r);
  624|      0|        }
  625|      0|        return;
  626|      0|    }
  627|       |
  628|  1.46M|    r->infinity = 0;
  629|  1.46M|    if (rzr != NULL) {
  ------------------
  |  Branch (629:9): [True: 231k, False: 1.23M]
  ------------------
  630|   231k|        *rzr = h;
  631|   231k|    }
  632|  1.46M|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  633|       |
  634|  1.46M|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|  1.46M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  635|  1.46M|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|  1.46M|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  1.46M|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  1.46M|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 1.46M]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  1.46M|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 1.46M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  1.46M|    } \
  |  |  |  |   94|  1.46M|    stmt; \
  |  |  |  |   95|  1.46M|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 1.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  636|  1.46M|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  637|  1.46M|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  638|       |
  639|  1.46M|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|  1.46M|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  640|  1.46M|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  641|  1.46M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  642|  1.46M|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  643|       |
  644|  1.46M|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  645|  1.46M|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  646|  1.46M|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|  1.46M|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  647|  1.46M|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|  1.46M|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  648|       |
  649|  1.46M|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  1.46M|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  650|  1.46M|    if (rzr != NULL) SECP256K1_FE_VERIFY(rzr);
  ------------------
  |  |  345|   231k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  |  Branch (650:9): [True: 231k, False: 1.23M]
  ------------------
  651|  1.46M|}
secp256k1.c:secp256k1_ge_to_bytes:
  977|   133k|static void secp256k1_ge_to_bytes(unsigned char *buf, const secp256k1_ge *a) {
  978|   133k|    secp256k1_ge_storage s;
  979|       |
  980|       |    /* We require that the secp256k1_ge_storage type is exactly 64 bytes.
  981|       |     * This is formally not guaranteed by the C standard, but should hold on any
  982|       |     * sane compiler in the real world. */
  983|   133k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   74|   133k|#define STATIC_ASSERT(expr) do { \
  |  |   75|   133k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (75:12): [Folded, False: 0]
  |  |  ------------------
  |  |   76|   133k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 133k, False: 0]
  |  |  ------------------
  |  |   77|   133k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   78|   133k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (78:9): [True: 0, False: 133k]
  |  |  ------------------
  |  |   79|   133k|        ; \
  |  |   80|   133k|    } \
  |  |   81|   133k|} while(0)
  |  |  ------------------
  |  |  |  Branch (81:9): [Folded, False: 133k]
  |  |  ------------------
  ------------------
  984|   133k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(a));
  985|   133k|    secp256k1_ge_to_storage(&s, a);
  986|   133k|    memcpy(buf, &s, 64);
  987|   133k|}
secp256k1.c:secp256k1_ge_to_storage:
  877|   133k|static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) {
  878|   133k|    secp256k1_fe x, y;
  879|   133k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|   133k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  880|   133k|    VERIFY_CHECK(!a->infinity);
  881|       |
  882|   133k|    x = a->x;
  883|   133k|    secp256k1_fe_normalize(&x);
  ------------------
  |  |   78|   133k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  884|   133k|    y = a->y;
  885|   133k|    secp256k1_fe_normalize(&y);
  ------------------
  |  |   78|   133k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  886|   133k|    secp256k1_fe_to_storage(&r->x, &x);
  ------------------
  |  |   96|   133k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  887|   133k|    secp256k1_fe_to_storage(&r->y, &y);
  ------------------
  |  |   96|   133k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  888|   133k|}
secp256k1.c:secp256k1_ge_from_bytes:
  989|  92.7k|static void secp256k1_ge_from_bytes(secp256k1_ge *r, const unsigned char *buf) {
  990|  92.7k|    secp256k1_ge_storage s;
  991|       |
  992|  92.7k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   74|  92.7k|#define STATIC_ASSERT(expr) do { \
  |  |   75|  92.7k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (75:12): [Folded, False: 0]
  |  |  ------------------
  |  |   76|  92.7k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 92.7k, False: 0]
  |  |  ------------------
  |  |   77|  92.7k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   78|  92.7k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (78:9): [True: 0, False: 92.7k]
  |  |  ------------------
  |  |   79|  92.7k|        ; \
  |  |   80|  92.7k|    } \
  |  |   81|  92.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (81:9): [Folded, False: 92.7k]
  |  |  ------------------
  ------------------
  993|  92.7k|    memcpy(&s, buf, 64);
  994|  92.7k|    secp256k1_ge_from_storage(r, &s);
  995|  92.7k|}

secp256k1.c:secp256k1_sha256_transform:
  133|  79.7k|static void secp256k1_sha256_transform(uint32_t *state, const unsigned char *blocks64, size_t n_blocks) {
  134|   159k|    while (n_blocks--) {
  ------------------
  |  Branch (134:12): [True: 79.7k, False: 79.7k]
  ------------------
  135|  79.7k|        secp256k1_sha256_transform_impl(state, blocks64);
  136|  79.7k|        blocks64 += 64;
  137|  79.7k|    }
  138|  79.7k|}
secp256k1.c:secp256k1_sha256_transform_impl:
   51|  79.7k|static void secp256k1_sha256_transform_impl(uint32_t* s, const unsigned char* buf) {
   52|  79.7k|    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];
   53|  79.7k|    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
   54|       |
   55|  79.7k|    Round(a, b, c, d, e, f, g, h, 0x428a2f98,  w0 = secp256k1_read_be32(&buf[0]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   56|  79.7k|    Round(h, a, b, c, d, e, f, g, 0x71374491,  w1 = secp256k1_read_be32(&buf[4]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   57|  79.7k|    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf,  w2 = secp256k1_read_be32(&buf[8]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   58|  79.7k|    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5,  w3 = secp256k1_read_be32(&buf[12]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   59|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x3956c25b,  w4 = secp256k1_read_be32(&buf[16]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   60|  79.7k|    Round(d, e, f, g, h, a, b, c, 0x59f111f1,  w5 = secp256k1_read_be32(&buf[20]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   61|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x923f82a4,  w6 = secp256k1_read_be32(&buf[24]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   62|  79.7k|    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5,  w7 = secp256k1_read_be32(&buf[28]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   63|  79.7k|    Round(a, b, c, d, e, f, g, h, 0xd807aa98,  w8 = secp256k1_read_be32(&buf[32]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   64|  79.7k|    Round(h, a, b, c, d, e, f, g, 0x12835b01,  w9 = secp256k1_read_be32(&buf[36]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   65|  79.7k|    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = secp256k1_read_be32(&buf[40]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   66|  79.7k|    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = secp256k1_read_be32(&buf[44]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   67|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = secp256k1_read_be32(&buf[48]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   68|  79.7k|    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = secp256k1_read_be32(&buf[52]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   69|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = secp256k1_read_be32(&buf[56]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   70|  79.7k|    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = secp256k1_read_be32(&buf[60]));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   71|       |
   72|  79.7k|    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   73|  79.7k|    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   74|  79.7k|    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   75|  79.7k|    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   76|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   77|  79.7k|    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   78|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   79|  79.7k|    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   80|  79.7k|    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   81|  79.7k|    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   82|  79.7k|    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   83|  79.7k|    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   84|  79.7k|    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   85|  79.7k|    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   86|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   87|  79.7k|    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   88|       |
   89|  79.7k|    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   90|  79.7k|    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   91|  79.7k|    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   92|  79.7k|    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   93|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   94|  79.7k|    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   95|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   96|  79.7k|    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   97|  79.7k|    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   98|  79.7k|    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
   99|  79.7k|    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  100|  79.7k|    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  101|  79.7k|    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  102|  79.7k|    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  103|  79.7k|    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  104|  79.7k|    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  105|       |
  106|  79.7k|    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  107|  79.7k|    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  108|  79.7k|    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  109|  79.7k|    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  110|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  111|  79.7k|    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  112|  79.7k|    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  113|  79.7k|    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  114|  79.7k|    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  115|  79.7k|    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  116|  79.7k|    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  117|  79.7k|    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  118|  79.7k|    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  119|  79.7k|    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  120|  79.7k|    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  121|  79.7k|    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  79.7k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  79.7k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  79.7k|#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|  79.7k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  79.7k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  79.7k|#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|  79.7k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  79.7k|    (d) += t1; \
  |  |   28|  79.7k|    (h) = t1 + t2; \
  |  |   29|  79.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 79.7k]
  |  |  ------------------
  ------------------
  122|       |
  123|  79.7k|    s[0] += a;
  124|  79.7k|    s[1] += b;
  125|  79.7k|    s[2] += c;
  126|  79.7k|    s[3] += d;
  127|  79.7k|    s[4] += e;
  128|  79.7k|    s[5] += f;
  129|  79.7k|    s[6] += g;
  130|  79.7k|    s[7] += h;
  131|  79.7k|}
secp256k1.c:secp256k1_sha256_write:
  210|   169k|static void secp256k1_sha256_write(const secp256k1_hash_ctx *hash_ctx, secp256k1_sha256 *hash, const unsigned char *data, size_t len) {
  211|   169k|    size_t chunk_len;
  212|   169k|    size_t bufsize = hash->bytes & 0x3F;
  213|   169k|    hash->bytes += len;
  214|   169k|    VERIFY_CHECK(hash->bytes >= len);
  215|   169k|    VERIFY_CHECK(hash_ctx != NULL);
  216|   169k|    VERIFY_CHECK(hash_ctx->fn_sha256_compression != NULL);
  217|       |
  218|       |    /* If we exceed the 64-byte block size with this input, process it and wipe the buffer */
  219|   169k|    chunk_len = 64 - bufsize;
  220|   169k|    if (bufsize && len >= chunk_len) {
  ------------------
  |  Branch (220:9): [True: 129k, False: 40.4k]
  |  Branch (220:20): [True: 79.7k, False: 49.3k]
  ------------------
  221|  79.7k|        memcpy(hash->buf + bufsize, data, chunk_len);
  222|  79.7k|        data += chunk_len;
  223|  79.7k|        len -= chunk_len;
  224|  79.7k|        hash_ctx->fn_sha256_compression(hash->s, hash->buf, 1);
  225|  79.7k|        bufsize = 0;
  226|  79.7k|    }
  227|       |
  228|       |    /* If we still have data to process, invoke compression directly on the input */
  229|   169k|    if (len >= 64) {
  ------------------
  |  Branch (229:9): [True: 0, False: 169k]
  ------------------
  230|      0|        const size_t n_blocks = len / 64;
  231|      0|        const size_t advance = n_blocks * 64;
  232|      0|        hash_ctx->fn_sha256_compression(hash->s, data, n_blocks);
  233|      0|        data += advance;
  234|      0|        len -= advance;
  235|      0|    }
  236|       |
  237|       |    /* Fill the buffer with what remains */
  238|   169k|    if (len) {
  ------------------
  |  Branch (238:9): [True: 129k, False: 40.4k]
  ------------------
  239|   129k|        memcpy(hash->buf + bufsize, data, len);
  240|   129k|    }
  241|   169k|}
secp256k1.c:secp256k1_sha256_finalize:
  243|  40.3k|static void secp256k1_sha256_finalize(const secp256k1_hash_ctx *hash_ctx, secp256k1_sha256 *hash, unsigned char *out32) {
  244|  40.3k|    static const unsigned char pad[64] = {0x80};
  245|  40.3k|    unsigned char sizedesc[8];
  246|  40.3k|    int i;
  247|       |    /* The maximum message size of SHA256 is 2^64-1 bits. */
  248|  40.3k|    VERIFY_CHECK(hash->bytes < ((uint64_t)1 << 61));
  249|  40.3k|    secp256k1_write_be32(&sizedesc[0], hash->bytes >> 29);
  250|  40.3k|    secp256k1_write_be32(&sizedesc[4], hash->bytes << 3);
  251|  40.3k|    secp256k1_sha256_write(hash_ctx, hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64));
  252|  40.3k|    secp256k1_sha256_write(hash_ctx, hash, sizedesc, 8);
  253|   362k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (253:17): [True: 322k, False: 40.3k]
  ------------------
  254|   322k|        secp256k1_write_be32(&out32[4*i], hash->s[i]);
  255|   322k|        hash->s[i] = 0;
  256|   322k|    }
  257|  40.3k|}
secp256k1.c:secp256k1_sha256_initialize_midstate:
   43|  40.3k|static void secp256k1_sha256_initialize_midstate(secp256k1_sha256 *hash, uint64_t bytes, const uint32_t state[8]) {
   44|  40.3k|    VERIFY_CHECK((bytes & 0x3F) == 0);
   45|  40.3k|    VERIFY_CHECK(state != NULL);
   46|  40.3k|    memcpy(hash->s, state, sizeof(hash->s));
   47|  40.3k|    hash->bytes = bytes;
   48|  40.3k|}

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

secp256k1.c:secp256k1_modinv64_update_de_62:
  411|   137k|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|   137k|    const uint64_t M62 = UINT64_MAX >> 2;
  413|   137k|    const int64_t d0 = d->v[0], d1 = d->v[1], d2 = d->v[2], d3 = d->v[3], d4 = d->v[4];
  414|   137k|    const int64_t e0 = e->v[0], e1 = e->v[1], e2 = e->v[2], e3 = e->v[3], e4 = e->v[4];
  415|   137k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  416|   137k|    int64_t md, me, sd, se;
  417|   137k|    secp256k1_int128 cd, ce;
  418|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  419|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  420|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  421|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  422|   137k|    VERIFY_CHECK(secp256k1_modinv64_abs(u) <= (((int64_t)1 << 62) - secp256k1_modinv64_abs(v))); /* |u|+|v| <= 2^62 */
  423|   137k|    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|   137k|    sd = d4 >> 63;
  427|   137k|    se = e4 >> 63;
  428|   137k|    md = (u & sd) + (v & se);
  429|   137k|    me = (q & sd) + (r & se);
  430|       |    /* Begin computing t*[d,e]. */
  431|   137k|    secp256k1_i128_mul(&cd, u, d0);
  432|   137k|    secp256k1_i128_accum_mul(&cd, v, e0);
  433|   137k|    secp256k1_i128_mul(&ce, q, d0);
  434|   137k|    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|   137k|    md -= (modinfo->modulus_inv62 * secp256k1_i128_to_u64(&cd) + md) & M62;
  437|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[0], md);
  440|   137k|    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|   137k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cd) & M62) == 0); secp256k1_i128_rshift(&cd, 62);
  443|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cd, u, d1);
  446|   137k|    secp256k1_i128_accum_mul(&cd, v, e1);
  447|   137k|    secp256k1_i128_accum_mul(&ce, q, d1);
  448|   137k|    secp256k1_i128_accum_mul(&ce, r, e1);
  449|   137k|    if (modinfo->modulus.v[1]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (449:9): [True: 0, False: 137k]
  ------------------
  450|      0|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[1], md);
  451|      0|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[1], me);
  452|      0|    }
  453|   137k|    d->v[0] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  454|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cd, u, d2);
  457|   137k|    secp256k1_i128_accum_mul(&cd, v, e2);
  458|   137k|    secp256k1_i128_accum_mul(&ce, q, d2);
  459|   137k|    secp256k1_i128_accum_mul(&ce, r, e2);
  460|   137k|    if (modinfo->modulus.v[2]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (460:9): [True: 0, False: 137k]
  ------------------
  461|      0|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[2], md);
  462|      0|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[2], me);
  463|      0|    }
  464|   137k|    d->v[1] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  465|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cd, u, d3);
  468|   137k|    secp256k1_i128_accum_mul(&cd, v, e3);
  469|   137k|    secp256k1_i128_accum_mul(&ce, q, d3);
  470|   137k|    secp256k1_i128_accum_mul(&ce, r, e3);
  471|   137k|    if (modinfo->modulus.v[3]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (471:9): [True: 0, False: 137k]
  ------------------
  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|   137k|    d->v[2] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  476|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cd, u, d4);
  479|   137k|    secp256k1_i128_accum_mul(&cd, v, e4);
  480|   137k|    secp256k1_i128_accum_mul(&ce, q, d4);
  481|   137k|    secp256k1_i128_accum_mul(&ce, r, e4);
  482|   137k|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[4], md);
  483|   137k|    secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[4], me);
  484|   137k|    d->v[3] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  485|   137k|    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|   137k|    d->v[4] = secp256k1_i128_to_i64(&cd);
  488|   137k|    e->v[4] = secp256k1_i128_to_i64(&ce);
  489|       |
  490|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  491|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  492|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  493|   137k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  494|   137k|}
secp256k1.c:secp256k1_modinv64_normalize_62:
   88|  13.7k|static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t sign, const secp256k1_modinv64_modinfo *modinfo) {
   89|  13.7k|    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);
   90|  13.7k|    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];
   91|  13.7k|    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|  13.7k|    cond_add = r4 >> 63;
  110|  13.7k|    r0 += modinfo->modulus.v[0] & cond_add;
  111|  13.7k|    r1 += modinfo->modulus.v[1] & cond_add;
  112|  13.7k|    r2 += modinfo->modulus.v[2] & cond_add;
  113|  13.7k|    r3 += modinfo->modulus.v[3] & cond_add;
  114|  13.7k|    r4 += modinfo->modulus.v[4] & cond_add;
  115|  13.7k|    cond_negate = sign >> 63;
  116|  13.7k|    r0 = (r0 ^ cond_negate) - cond_negate;
  117|  13.7k|    r1 = (r1 ^ cond_negate) - cond_negate;
  118|  13.7k|    r2 = (r2 ^ cond_negate) - cond_negate;
  119|  13.7k|    r3 = (r3 ^ cond_negate) - cond_negate;
  120|  13.7k|    r4 = (r4 ^ cond_negate) - cond_negate;
  121|       |    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */
  122|  13.7k|    r1 += r0 >> 62; r0 &= M62;
  123|  13.7k|    r2 += r1 >> 62; r1 &= M62;
  124|  13.7k|    r3 += r2 >> 62; r2 &= M62;
  125|  13.7k|    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|  13.7k|    cond_add = r4 >> 63;
  130|  13.7k|    r0 += modinfo->modulus.v[0] & cond_add;
  131|  13.7k|    r1 += modinfo->modulus.v[1] & cond_add;
  132|  13.7k|    r2 += modinfo->modulus.v[2] & cond_add;
  133|  13.7k|    r3 += modinfo->modulus.v[3] & cond_add;
  134|  13.7k|    r4 += modinfo->modulus.v[4] & cond_add;
  135|       |    /* And propagate again. */
  136|  13.7k|    r1 += r0 >> 62; r0 &= M62;
  137|  13.7k|    r2 += r1 >> 62; r1 &= M62;
  138|  13.7k|    r3 += r2 >> 62; r2 &= M62;
  139|  13.7k|    r4 += r3 >> 62; r3 &= M62;
  140|       |
  141|  13.7k|    r->v[0] = r0;
  142|  13.7k|    r->v[1] = r1;
  143|  13.7k|    r->v[2] = r2;
  144|  13.7k|    r->v[3] = r3;
  145|  13.7k|    r->v[4] = r4;
  146|       |
  147|  13.7k|    VERIFY_CHECK(r0 >> 62 == 0);
  148|  13.7k|    VERIFY_CHECK(r1 >> 62 == 0);
  149|  13.7k|    VERIFY_CHECK(r2 >> 62 == 0);
  150|  13.7k|    VERIFY_CHECK(r3 >> 62 == 0);
  151|  13.7k|    VERIFY_CHECK(r4 >> 62 == 0);
  152|  13.7k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 0) >= 0); /* r >= 0 */
  153|  13.7k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 1) < 0); /* r < modulus */
  154|  13.7k|}
secp256k1.c:secp256k1_modinv64:
  588|  13.7k|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|  13.7k|    secp256k1_modinv64_signed62 d = {{0, 0, 0, 0, 0}};
  591|  13.7k|    secp256k1_modinv64_signed62 e = {{1, 0, 0, 0, 0}};
  592|  13.7k|    secp256k1_modinv64_signed62 f = modinfo->modulus;
  593|  13.7k|    secp256k1_modinv64_signed62 g = *x;
  594|  13.7k|    int i;
  595|  13.7k|    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|   151k|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (598:17): [True: 137k, False: 13.7k]
  ------------------
  599|       |        /* Compute transition matrix and new zeta after 59 divsteps. */
  600|   137k|        secp256k1_modinv64_trans2x2 t;
  601|   137k|        zeta = secp256k1_modinv64_divsteps_59(zeta, f.v[0], g.v[0], &t);
  602|       |        /* Update d,e using that transition matrix. */
  603|   137k|        secp256k1_modinv64_update_de_62(&d, &e, &t, modinfo);
  604|       |        /* Update f,g using that transition matrix. */
  605|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  606|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  607|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  608|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  609|       |
  610|   137k|        secp256k1_modinv64_update_fg_62(&f, &g, &t);
  611|       |
  612|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  613|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  614|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  615|   137k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  616|   137k|    }
  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|  13.7k|    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|  13.7k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, -1) == 0 ||
  626|  13.7k|                 secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, 1) == 0 ||
  627|  13.7k|                 (secp256k1_modinv64_mul_cmp_62(x, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  628|  13.7k|                  secp256k1_modinv64_mul_cmp_62(&d, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  629|  13.7k|                  secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) == 0));
  630|       |
  631|       |    /* Optionally negate d, normalize to [0,modulus), and return it. */
  632|  13.7k|    secp256k1_modinv64_normalize_62(&d, f.v[4], modinfo);
  633|  13.7k|    *x = d;
  634|  13.7k|}
secp256k1.c:secp256k1_modinv64_divsteps_59:
  167|   137k|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|   137k|    uint64_t u = 8, v = 0, q = 0, r = 8;
  176|   137k|    volatile uint64_t c1, c2;
  177|   137k|    uint64_t mask1, mask2, f = f0, g = g0, x, y, z;
  178|   137k|    int i;
  179|       |
  180|  8.25M|    for (i = 3; i < 62; ++i) {
  ------------------
  |  Branch (180:17): [True: 8.11M, False: 137k]
  ------------------
  181|  8.11M|        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */
  182|  8.11M|        VERIFY_CHECK((u * f0 + v * g0) == f << i);
  183|  8.11M|        VERIFY_CHECK((q * f0 + r * g0) == g << i);
  184|       |        /* Compute conditional masks for (zeta < 0) and for (g & 1). */
  185|  8.11M|        c1 = zeta >> 63;
  186|  8.11M|        mask1 = c1;
  187|  8.11M|        c2 = g & 1;
  188|  8.11M|        mask2 = -c2;
  189|       |        /* Compute x,y,z, conditionally negated versions of f,u,v. */
  190|  8.11M|        x = (f ^ mask1) - mask1;
  191|  8.11M|        y = (u ^ mask1) - mask1;
  192|  8.11M|        z = (v ^ mask1) - mask1;
  193|       |        /* Conditionally add x,y,z to g,q,r. */
  194|  8.11M|        g += x & mask2;
  195|  8.11M|        q += y & mask2;
  196|  8.11M|        r += z & mask2;
  197|       |        /* In what follows, c1 is a condition mask for (zeta < 0) and (g & 1). */
  198|  8.11M|        mask1 &= mask2;
  199|       |        /* Conditionally change zeta into -zeta-2 or zeta-1. */
  200|  8.11M|        zeta = (zeta ^ mask1) - 1;
  201|       |        /* Conditionally add g,q,r to f,u,v. */
  202|  8.11M|        f += g & mask1;
  203|  8.11M|        u += q & mask1;
  204|  8.11M|        v += r & mask1;
  205|       |        /* Shifts */
  206|  8.11M|        g >>= 1;
  207|  8.11M|        u <<= 1;
  208|  8.11M|        v <<= 1;
  209|       |        /* Bounds on zeta that follow from the bounds on iteration count (max 10*59 divsteps). */
  210|  8.11M|        VERIFY_CHECK(zeta >= -591 && zeta <= 591);
  211|  8.11M|    }
  212|       |    /* Return data in t and return value. */
  213|   137k|    t->u = (int64_t)u;
  214|   137k|    t->v = (int64_t)v;
  215|   137k|    t->q = (int64_t)q;
  216|   137k|    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|   137k|    VERIFY_CHECK(secp256k1_modinv64_det_check_pow2(t, 65, 0));
  225|       |
  226|   137k|    return zeta;
  227|   137k|}
secp256k1.c:secp256k1_modinv64_update_fg_62:
  500|   137k|static void secp256k1_modinv64_update_fg_62(secp256k1_modinv64_signed62 *f, secp256k1_modinv64_signed62 *g, const secp256k1_modinv64_trans2x2 *t) {
  501|   137k|    const uint64_t M62 = UINT64_MAX >> 2;
  502|   137k|    const int64_t f0 = f->v[0], f1 = f->v[1], f2 = f->v[2], f3 = f->v[3], f4 = f->v[4];
  503|   137k|    const int64_t g0 = g->v[0], g1 = g->v[1], g2 = g->v[2], g3 = g->v[3], g4 = g->v[4];
  504|   137k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  505|   137k|    secp256k1_int128 cf, cg;
  506|       |    /* Start computing t*[f,g]. */
  507|   137k|    secp256k1_i128_mul(&cf, u, f0);
  508|   137k|    secp256k1_i128_accum_mul(&cf, v, g0);
  509|   137k|    secp256k1_i128_mul(&cg, q, f0);
  510|   137k|    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|   137k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cf) & M62) == 0); secp256k1_i128_rshift(&cf, 62);
  513|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cf, u, f1);
  516|   137k|    secp256k1_i128_accum_mul(&cf, v, g1);
  517|   137k|    secp256k1_i128_accum_mul(&cg, q, f1);
  518|   137k|    secp256k1_i128_accum_mul(&cg, r, g1);
  519|   137k|    f->v[0] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  520|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cf, u, f2);
  523|   137k|    secp256k1_i128_accum_mul(&cf, v, g2);
  524|   137k|    secp256k1_i128_accum_mul(&cg, q, f2);
  525|   137k|    secp256k1_i128_accum_mul(&cg, r, g2);
  526|   137k|    f->v[1] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  527|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cf, u, f3);
  530|   137k|    secp256k1_i128_accum_mul(&cf, v, g3);
  531|   137k|    secp256k1_i128_accum_mul(&cg, q, f3);
  532|   137k|    secp256k1_i128_accum_mul(&cg, r, g3);
  533|   137k|    f->v[2] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  534|   137k|    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|   137k|    secp256k1_i128_accum_mul(&cf, u, f4);
  537|   137k|    secp256k1_i128_accum_mul(&cf, v, g4);
  538|   137k|    secp256k1_i128_accum_mul(&cg, q, f4);
  539|   137k|    secp256k1_i128_accum_mul(&cg, r, g4);
  540|   137k|    f->v[3] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  541|   137k|    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|   137k|    f->v[4] = secp256k1_i128_to_i64(&cf);
  544|   137k|    g->v[4] = secp256k1_i128_to_i64(&cg);
  545|   137k|}

secp256k1_xonly_pubkey_parse:
   29|  5.31k|int secp256k1_xonly_pubkey_parse(const secp256k1_context* ctx, secp256k1_xonly_pubkey *pubkey, const unsigned char *input32) {
   30|  5.31k|    secp256k1_ge pk;
   31|  5.31k|    secp256k1_fe x;
   32|       |
   33|  5.31k|    VERIFY_CHECK(ctx != NULL);
   34|  5.31k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  5.31k|#define ARG_CHECK(cond) do { \
  |  |   46|  5.31k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  5.31k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 5.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  5.31k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 5.31k]
  |  |  ------------------
  ------------------
   35|  5.31k|    memset(pubkey, 0, sizeof(*pubkey));
   36|  5.31k|    ARG_CHECK(input32 != NULL);
  ------------------
  |  |   45|  5.31k|#define ARG_CHECK(cond) do { \
  |  |   46|  5.31k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  5.31k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 5.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  5.31k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 5.31k]
  |  |  ------------------
  ------------------
   37|       |
   38|  5.31k|    if (!secp256k1_fe_set_b32_limit(&x, input32)) {
  ------------------
  |  |   88|  5.31k|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  |  Branch (38:9): [True: 0, False: 5.31k]
  ------------------
   39|      0|        return 0;
   40|      0|    }
   41|  5.31k|    if (!secp256k1_ge_set_xo_var(&pk, &x, 0)) {
  ------------------
  |  Branch (41:9): [True: 0, False: 5.31k]
  ------------------
   42|      0|        return 0;
   43|      0|    }
   44|  5.31k|    if (!secp256k1_ge_is_in_correct_subgroup(&pk)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 5.31k]
  ------------------
   45|      0|        return 0;
   46|      0|    }
   47|  5.31k|    secp256k1_xonly_pubkey_save(pubkey, &pk);
   48|  5.31k|    return 1;
   49|  5.31k|}
secp256k1_xonly_pubkey_serialize:
   51|  2.64k|int secp256k1_xonly_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output32, const secp256k1_xonly_pubkey *pubkey) {
   52|  2.64k|    secp256k1_ge pk;
   53|       |
   54|  2.64k|    VERIFY_CHECK(ctx != NULL);
   55|  2.64k|    ARG_CHECK(output32 != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
   56|  2.64k|    memset(output32, 0, 32);
   57|  2.64k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
   58|       |
   59|  2.64k|    if (!secp256k1_xonly_pubkey_load(ctx, &pk, pubkey)) {
  ------------------
  |  Branch (59:9): [True: 0, False: 2.64k]
  ------------------
   60|      0|        return 0;
   61|      0|    }
   62|  2.64k|    secp256k1_fe_get_b32(output32, &pk.x);
  ------------------
  |  |   89|  2.64k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   63|  2.64k|    return 1;
   64|  2.64k|}
secp256k1_xonly_pubkey_from_pubkey:
  106|  2.64k|int secp256k1_xonly_pubkey_from_pubkey(const secp256k1_context* ctx, secp256k1_xonly_pubkey *xonly_pubkey, int *pk_parity, const secp256k1_pubkey *pubkey) {
  107|  2.64k|    secp256k1_ge pk;
  108|  2.64k|    int tmp;
  109|       |
  110|  2.64k|    VERIFY_CHECK(ctx != NULL);
  111|  2.64k|    ARG_CHECK(xonly_pubkey != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  112|  2.64k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  113|       |
  114|  2.64k|    if (!secp256k1_pubkey_load(ctx, &pk, pubkey)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 2.64k]
  ------------------
  115|      0|        return 0;
  116|      0|    }
  117|  2.64k|    tmp = secp256k1_extrakeys_ge_even_y(&pk);
  118|  2.64k|    if (pk_parity != NULL) {
  ------------------
  |  Branch (118:9): [True: 2.64k, False: 0]
  ------------------
  119|  2.64k|        *pk_parity = tmp;
  120|  2.64k|    }
  121|  2.64k|    secp256k1_xonly_pubkey_save(xonly_pubkey, &pk);
  122|  2.64k|    return 1;
  123|  2.64k|}
secp256k1_xonly_pubkey_tweak_add:
  125|  2.64k|int secp256k1_xonly_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *output_pubkey, const secp256k1_xonly_pubkey *internal_pubkey, const unsigned char *tweak32) {
  126|  2.64k|    secp256k1_ge pk;
  127|       |
  128|  2.64k|    VERIFY_CHECK(ctx != NULL);
  129|  2.64k|    ARG_CHECK(output_pubkey != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  130|  2.64k|    memset(output_pubkey, 0, sizeof(*output_pubkey));
  131|  2.64k|    ARG_CHECK(internal_pubkey != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  132|  2.64k|    ARG_CHECK(tweak32 != NULL);
  ------------------
  |  |   45|  2.64k|#define ARG_CHECK(cond) do { \
  |  |   46|  2.64k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  2.64k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  2.64k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  133|       |
  134|  2.64k|    if (!secp256k1_xonly_pubkey_load(ctx, &pk, internal_pubkey)
  ------------------
  |  Branch (134:9): [True: 0, False: 2.64k]
  ------------------
  135|  2.64k|        || !secp256k1_ec_pubkey_tweak_add_helper(&pk, tweak32)) {
  ------------------
  |  Branch (135:12): [True: 0, False: 2.64k]
  ------------------
  136|      0|        return 0;
  137|      0|    }
  138|  2.64k|    secp256k1_pubkey_save(output_pubkey, &pk);
  139|  2.64k|    return 1;
  140|  2.64k|}
secp256k1.c:secp256k1_xonly_pubkey_save:
   18|  7.95k|static SECP256K1_INLINE void secp256k1_xonly_pubkey_save(secp256k1_xonly_pubkey *pubkey, secp256k1_ge *ge) {
   19|       |#ifdef VERIFY
   20|       |    /* ensure that the group element's Y coordinate is even, as per definition of x-only public keys */
   21|       |    secp256k1_fe y = ge->y;
   22|       |    secp256k1_fe_normalize_var(&y);
   23|       |    VERIFY_CHECK(!secp256k1_fe_is_odd(&y));
   24|       |#endif
   25|       |
   26|  7.95k|    secp256k1_pubkey_save((secp256k1_pubkey *) pubkey, ge);
   27|  7.95k|}
secp256k1.c:secp256k1_xonly_pubkey_load:
   14|  5.28k|static SECP256K1_INLINE int secp256k1_xonly_pubkey_load(const secp256k1_context* ctx, secp256k1_ge *ge, const secp256k1_xonly_pubkey *pubkey) {
   15|  5.28k|    return secp256k1_pubkey_load(ctx, ge, (const secp256k1_pubkey *) pubkey);
   16|  5.28k|}
secp256k1.c:secp256k1_extrakeys_ge_even_y:
   95|  2.64k|static int secp256k1_extrakeys_ge_even_y(secp256k1_ge *r) {
   96|  2.64k|    int y_parity = 0;
   97|  2.64k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(r));
   98|       |
   99|  2.64k|    if (secp256k1_fe_is_odd(&r->y)) {
  ------------------
  |  |   85|  2.64k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (99:9): [True: 1.29k, False: 1.34k]
  ------------------
  100|  1.29k|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|  1.29k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  1.29k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  1.29k|    switch(42) { \
  |  |  |  |   89|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   90|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (90:9): [True: 0, False: 1.29k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  1.29k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 1.29k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  1.29k|    } \
  |  |  |  |   94|  1.29k|    stmt; \
  |  |  |  |   95|  1.29k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  101|  1.29k|        y_parity = 1;
  102|  1.29k|    }
  103|  2.64k|    return y_parity;
  104|  2.64k|}

secp256k1_musig_pubkey_agg:
  156|  11.1k|int secp256k1_musig_pubkey_agg(const secp256k1_context* ctx, secp256k1_xonly_pubkey *agg_pk, secp256k1_musig_keyagg_cache *keyagg_cache, const secp256k1_pubkey * const* pubkeys, size_t n_pubkeys) {
  157|  11.1k|    secp256k1_musig_pubkey_agg_ecmult_data ecmult_data;
  158|  11.1k|    secp256k1_gej pkj;
  159|  11.1k|    secp256k1_ge pkp;
  160|  11.1k|    size_t i;
  161|       |
  162|  11.1k|    VERIFY_CHECK(ctx != NULL);
  163|  11.1k|    if (agg_pk != NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 11.1k]
  ------------------
  164|      0|        memset(agg_pk, 0, sizeof(*agg_pk));
  165|      0|    }
  166|  11.1k|    ARG_CHECK(pubkeys != NULL);
  ------------------
  |  |   45|  11.1k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.1k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  11.1k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.1k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  167|  11.1k|    ARG_CHECK(n_pubkeys > 0);
  ------------------
  |  |   45|  11.1k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.1k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  11.1k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.1k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  168|  41.5k|    for (i = 0; i < n_pubkeys; i++) {
  ------------------
  |  Branch (168:17): [True: 30.4k, False: 11.1k]
  ------------------
  169|  30.4k|        ARG_CHECK(pubkeys[i] != NULL);
  ------------------
  |  |   45|  30.4k|#define ARG_CHECK(cond) do { \
  |  |   46|  30.4k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  30.4k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  30.4k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
  170|  30.4k|    }
  171|       |
  172|  11.1k|    ecmult_data.ctx = ctx;
  173|  11.1k|    ecmult_data.pks = pubkeys;
  174|       |
  175|  11.1k|    secp256k1_ge_set_infinity(&ecmult_data.second_pk);
  176|  11.4k|    for (i = 1; i < n_pubkeys; i++) {
  ------------------
  |  Branch (176:17): [True: 1.23k, False: 10.2k]
  ------------------
  177|  1.23k|        if (secp256k1_memcmp_var(pubkeys[0], pubkeys[i], sizeof(*pubkeys[0])) != 0) {
  ------------------
  |  Branch (177:13): [True: 876, False: 360]
  ------------------
  178|    876|            secp256k1_ge pk;
  179|    876|            if (!secp256k1_pubkey_load(ctx, &pk, pubkeys[i])) {
  ------------------
  |  Branch (179:17): [True: 0, False: 876]
  ------------------
  180|      0|                return 0;
  181|      0|            }
  182|    876|            ecmult_data.second_pk = pk;
  183|    876|            break;
  184|    876|        }
  185|  1.23k|    }
  186|       |
  187|  11.1k|    if (!secp256k1_musig_compute_pks_hash(ctx, ecmult_data.pks_hash, pubkeys, n_pubkeys)) {
  ------------------
  |  Branch (187:9): [True: 0, False: 11.1k]
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |    /* TODO: actually use optimized ecmult_multi algorithms by providing a
  191|       |     * scratch space */
  192|  11.1k|    if (!secp256k1_ecmult_multi_var(&ctx->error_callback, NULL, &pkj, NULL, secp256k1_musig_pubkey_agg_callback, (void *) &ecmult_data, n_pubkeys)) {
  ------------------
  |  Branch (192:9): [True: 0, False: 11.1k]
  ------------------
  193|       |        /* In order to reach this line with the current implementation of
  194|       |         * ecmult_multi_var one would need to provide a callback that can
  195|       |         * fail. */
  196|      0|        return 0;
  197|      0|    }
  198|  11.1k|    secp256k1_ge_set_gej(&pkp, &pkj);
  199|  11.1k|    secp256k1_fe_normalize_var(&pkp.y);
  ------------------
  |  |   80|  11.1k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  200|       |    /* The resulting public key is infinity with negligible probability */
  201|  11.1k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(&pkp));
  202|  11.1k|    if (keyagg_cache != NULL) {
  ------------------
  |  Branch (202:9): [True: 11.1k, False: 0]
  ------------------
  203|  11.1k|        secp256k1_keyagg_cache_internal cache_i = { 0 };
  204|  11.1k|        cache_i.pk = pkp;
  205|  11.1k|        cache_i.second_pk = ecmult_data.second_pk;
  206|  11.1k|        memcpy(cache_i.pks_hash, ecmult_data.pks_hash, sizeof(cache_i.pks_hash));
  207|  11.1k|        secp256k1_keyagg_cache_save(keyagg_cache, &cache_i);
  208|  11.1k|    }
  209|       |
  210|  11.1k|    if (agg_pk != NULL) {
  ------------------
  |  Branch (210:9): [True: 0, False: 11.1k]
  ------------------
  211|      0|        secp256k1_extrakeys_ge_even_y(&pkp);
  212|      0|        secp256k1_xonly_pubkey_save(agg_pk, &pkp);
  213|      0|    }
  214|  11.1k|    return 1;
  215|  11.1k|}
secp256k1_musig_pubkey_get:
  217|  11.1k|int secp256k1_musig_pubkey_get(const secp256k1_context* ctx, secp256k1_pubkey *agg_pk, const secp256k1_musig_keyagg_cache *keyagg_cache) {
  218|  11.1k|    secp256k1_keyagg_cache_internal cache_i;
  219|  11.1k|    VERIFY_CHECK(ctx != NULL);
  220|  11.1k|    ARG_CHECK(agg_pk != NULL);
  ------------------
  |  |   45|  11.1k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.1k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  11.1k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.1k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  221|  11.1k|    memset(agg_pk, 0, sizeof(*agg_pk));
  222|  11.1k|    ARG_CHECK(keyagg_cache != NULL);
  ------------------
  |  |   45|  11.1k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.1k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  11.1k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.1k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  223|       |
  224|  11.1k|    if (!secp256k1_keyagg_cache_load(ctx, &cache_i, keyagg_cache)) {
  ------------------
  |  Branch (224:9): [True: 0, False: 11.1k]
  ------------------
  225|      0|        return 0;
  226|      0|    }
  227|  11.1k|    secp256k1_pubkey_save(agg_pk, &cache_i.pk);
  228|  11.1k|    return 1;
  229|  11.1k|}
secp256k1.c:secp256k1_musig_compute_pks_hash:
   73|  11.1k|static int secp256k1_musig_compute_pks_hash(const secp256k1_context *ctx, unsigned char *pks_hash, const secp256k1_pubkey * const* pks, size_t np) {
   74|  11.1k|    secp256k1_sha256 sha;
   75|  11.1k|    size_t i;
   76|       |
   77|  11.1k|    secp256k1_musig_keyagglist_sha256(&sha);
   78|  41.5k|    for (i = 0; i < np; i++) {
  ------------------
  |  Branch (78:17): [True: 30.4k, False: 11.1k]
  ------------------
   79|  30.4k|        unsigned char ser[33];
   80|  30.4k|        size_t ser_len = sizeof(ser);
   81|  30.4k|        if (!secp256k1_ec_pubkey_serialize(ctx, ser, &ser_len, pks[i], SECP256K1_EC_COMPRESSED)) {
  ------------------
  |  |  216|  30.4k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|  30.4k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  202|  30.4k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
  |  Branch (81:13): [True: 0, False: 30.4k]
  ------------------
   82|      0|            return 0;
   83|      0|        }
   84|  30.4k|        VERIFY_CHECK(ser_len == sizeof(ser));
   85|  30.4k|        secp256k1_sha256_write(secp256k1_get_hash_context(ctx), &sha, ser, sizeof(ser));
   86|  30.4k|    }
   87|  11.1k|    secp256k1_sha256_finalize(secp256k1_get_hash_context(ctx), &sha, pks_hash);
   88|  11.1k|    return 1;
   89|  11.1k|}
secp256k1.c:secp256k1_musig_keyagglist_sha256:
   64|  11.1k|static void secp256k1_musig_keyagglist_sha256(secp256k1_sha256 *sha) {
   65|  11.1k|    static const uint32_t midstate[8] = {
   66|  11.1k|        0xb399d5e0ul, 0xc8fff302ul, 0x6badac71ul, 0x07c5b7f1ul,
   67|  11.1k|        0x9701e2eful, 0x2a72ecf8ul, 0x201a4c7bul, 0xab148a38ul
   68|  11.1k|    };
   69|  11.1k|    secp256k1_sha256_initialize_midstate(sha, 64, midstate);
   70|  11.1k|}
secp256k1.c:secp256k1_musig_pubkey_agg_callback:
  141|  30.4k|static int secp256k1_musig_pubkey_agg_callback(secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data) {
  142|  30.4k|    secp256k1_musig_pubkey_agg_ecmult_data *ctx = (secp256k1_musig_pubkey_agg_ecmult_data *) data;
  143|  30.4k|    int ret;
  144|  30.4k|    ret = secp256k1_pubkey_load(ctx->ctx, pt, ctx->pks[idx]);
  145|       |#ifdef VERIFY
  146|       |    /* pubkey_load can't fail because the same pks have already been loaded in
  147|       |     * `musig_compute_pks_hash` (and we test this). */
  148|       |    VERIFY_CHECK(ret);
  149|       |#else
  150|  30.4k|    (void) ret;
  151|  30.4k|#endif
  152|  30.4k|    secp256k1_musig_keyaggcoef_internal(secp256k1_get_hash_context(ctx->ctx), sc, ctx->pks_hash, pt, &ctx->second_pk);
  153|  30.4k|    return 1;
  154|  30.4k|}
secp256k1.c:secp256k1_musig_keyaggcoef_internal:
  106|  30.4k|static void secp256k1_musig_keyaggcoef_internal(const secp256k1_hash_ctx *hash_ctx, secp256k1_scalar *r, const unsigned char *pks_hash, secp256k1_ge *pk, const secp256k1_ge *second_pk) {
  107|  30.4k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(pk));
  108|       |
  109|  30.4k|    if (!secp256k1_ge_is_infinity(second_pk)
  ------------------
  |  Branch (109:9): [True: 20.1k, False: 10.2k]
  ------------------
  110|  20.1k|          && secp256k1_ge_eq_var(pk, second_pk)) {
  ------------------
  |  Branch (110:14): [True: 1.20k, False: 18.9k]
  ------------------
  111|  1.20k|        secp256k1_scalar_set_int(r, 1);
  112|  29.2k|    } else {
  113|  29.2k|        secp256k1_sha256 sha;
  114|  29.2k|        unsigned char buf[33];
  115|  29.2k|        secp256k1_musig_keyaggcoef_sha256(&sha);
  116|  29.2k|        secp256k1_sha256_write(hash_ctx, &sha, pks_hash, 32);
  117|       |        /* Serialization does not fail since the pk is not the point at infinity
  118|       |         * (according to this function's precondition). */
  119|  29.2k|        secp256k1_eckey_pubkey_serialize33(pk, buf);
  120|  29.2k|        secp256k1_sha256_write(hash_ctx, &sha, buf, sizeof(buf));
  121|  29.2k|        secp256k1_sha256_finalize(hash_ctx, &sha, buf);
  122|       |        secp256k1_scalar_set_b32(r, buf, NULL);
  123|  29.2k|    }
  124|  30.4k|}
secp256k1.c:secp256k1_musig_keyaggcoef_sha256:
   93|  29.2k|static void secp256k1_musig_keyaggcoef_sha256(secp256k1_sha256 *sha) {
   94|  29.2k|    static const uint32_t midstate[8] = {
   95|  29.2k|        0x6ef02c5aul, 0x06a480deul, 0x1f298665ul, 0x1d1134f2ul,
   96|  29.2k|        0x56a0b063ul, 0x52da4147ul, 0xf280d9d4ul, 0x4484be15ul
   97|  29.2k|    };
   98|  29.2k|    secp256k1_sha256_initialize_midstate(sha, 64, midstate);
   99|  29.2k|}
secp256k1.c:secp256k1_keyagg_cache_save:
   31|  11.1k|static void secp256k1_keyagg_cache_save(secp256k1_musig_keyagg_cache *cache, const secp256k1_keyagg_cache_internal *cache_i) {
   32|  11.1k|    unsigned char *ptr = cache->data;
   33|  11.1k|    memcpy(ptr, secp256k1_musig_keyagg_cache_magic, 4);
   34|  11.1k|    ptr += 4;
   35|  11.1k|    secp256k1_ge_to_bytes(ptr, &cache_i->pk);
   36|  11.1k|    ptr += 64;
   37|  11.1k|    secp256k1_ge_to_bytes_ext(ptr, &cache_i->second_pk);
   38|  11.1k|    ptr += 64;
   39|  11.1k|    memcpy(ptr, cache_i->pks_hash, 32);
   40|  11.1k|    ptr += 32;
   41|  11.1k|    *ptr = cache_i->parity_acc;
   42|  11.1k|    ptr += 1;
   43|  11.1k|    secp256k1_scalar_get_b32(ptr, &cache_i->tweak);
   44|  11.1k|}
secp256k1.c:secp256k1_keyagg_cache_load:
   46|  11.1k|static int secp256k1_keyagg_cache_load(const secp256k1_context* ctx, secp256k1_keyagg_cache_internal *cache_i, const secp256k1_musig_keyagg_cache *cache) {
   47|  11.1k|    const unsigned char *ptr = cache->data;
   48|  11.1k|    ARG_CHECK(secp256k1_memcmp_var(ptr, secp256k1_musig_keyagg_cache_magic, 4) == 0);
  ------------------
  |  |   45|  11.1k|#define ARG_CHECK(cond) do { \
  |  |   46|  11.1k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  11.1k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  11.1k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
   49|  11.1k|    ptr += 4;
   50|  11.1k|    secp256k1_ge_from_bytes(&cache_i->pk, ptr);
   51|  11.1k|    ptr += 64;
   52|  11.1k|    secp256k1_ge_from_bytes_ext(&cache_i->second_pk, ptr);
   53|  11.1k|    ptr += 64;
   54|  11.1k|    memcpy(cache_i->pks_hash, ptr, 32);
   55|  11.1k|    ptr += 32;
   56|  11.1k|    cache_i->parity_acc = *ptr & 1;
   57|  11.1k|    ptr += 1;
   58|       |    secp256k1_scalar_set_b32(&cache_i->tweak, ptr, NULL);
   59|  11.1k|    return 1;
   60|  11.1k|}

secp256k1.c:secp256k1_scalar_set_b32:
  147|  42.9k|static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) {
  148|  42.9k|    int over;
  149|  42.9k|    r->d[0] = secp256k1_read_be64(&b32[24]);
  150|  42.9k|    r->d[1] = secp256k1_read_be64(&b32[16]);
  151|  42.9k|    r->d[2] = secp256k1_read_be64(&b32[8]);
  152|  42.9k|    r->d[3] = secp256k1_read_be64(&b32[0]);
  153|  42.9k|    over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r));
  154|  42.9k|    if (overflow) {
  ------------------
  |  Branch (154:9): [True: 2.64k, False: 40.3k]
  ------------------
  155|  2.64k|        *overflow = over;
  156|  2.64k|    }
  157|       |
  158|  42.9k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  42.9k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  159|  42.9k|}
secp256k1.c:secp256k1_scalar_reduce:
   76|   208k|SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, unsigned int overflow) {
   77|   208k|    secp256k1_uint128 t;
   78|   208k|    VERIFY_CHECK(overflow <= 1);
   79|       |
   80|   208k|    secp256k1_u128_from_u64(&t, r->d[0]);
   81|   208k|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_0);
  ------------------
  |  |   22|   208k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|   208k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
   82|   208k|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   83|   208k|    secp256k1_u128_accum_u64(&t, r->d[1]);
   84|   208k|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_1);
  ------------------
  |  |   23|   208k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|   208k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
   85|   208k|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   86|   208k|    secp256k1_u128_accum_u64(&t, r->d[2]);
   87|   208k|    secp256k1_u128_accum_u64(&t, overflow * SECP256K1_N_C_2);
  ------------------
  |  |   24|   208k|#define SECP256K1_N_C_2 (1)
  ------------------
   88|   208k|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
   89|   208k|    secp256k1_u128_accum_u64(&t, r->d[3]);
   90|   208k|    r->d[3] = secp256k1_u128_to_u64(&t);
   91|       |
   92|   208k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|   208k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   93|   208k|    return overflow;
   94|   208k|}
secp256k1.c:secp256k1_scalar_check_overflow:
   64|   208k|SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) {
   65|   208k|    int yes = 0;
   66|   208k|    int no = 0;
   67|   208k|    no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */
  ------------------
  |  |   19|   208k|#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
   68|   208k|    no |= (a->d[2] < SECP256K1_N_2);
  ------------------
  |  |   18|   208k|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
   69|   208k|    yes |= (a->d[2] > SECP256K1_N_2) & ~no;
  ------------------
  |  |   18|   208k|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
   70|   208k|    no |= (a->d[1] < SECP256K1_N_1);
  ------------------
  |  |   17|   208k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
   71|   208k|    yes |= (a->d[1] > SECP256K1_N_1) & ~no;
  ------------------
  |  |   17|   208k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
   72|   208k|    yes |= (a->d[0] >= SECP256K1_N_0) & ~no;
  ------------------
  |  |   16|   208k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  ------------------
   73|   208k|    return yes;
   74|   208k|}
secp256k1.c:secp256k1_scalar_get_b32:
  161|  11.1k|static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) {
  162|  11.1k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  11.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  163|       |
  164|  11.1k|    secp256k1_write_be64(&bin[0],  a->d[3]);
  165|  11.1k|    secp256k1_write_be64(&bin[8],  a->d[2]);
  166|  11.1k|    secp256k1_write_be64(&bin[16], a->d[1]);
  167|  11.1k|    secp256k1_write_be64(&bin[24], a->d[0]);
  168|  11.1k|}
secp256k1.c:secp256k1_scalar_negate:
  176|  62.6k|static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) {
  177|  62.6k|    uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0);
  178|  62.6k|    secp256k1_uint128 t;
  179|  62.6k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  180|       |
  181|  62.6k|    secp256k1_u128_from_u64(&t, ~a->d[0]);
  182|  62.6k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_0 + 1);
  ------------------
  |  |   16|  62.6k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  ------------------
  183|  62.6k|    r->d[0] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  184|  62.6k|    secp256k1_u128_accum_u64(&t, ~a->d[1]);
  185|  62.6k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_1);
  ------------------
  |  |   17|  62.6k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  ------------------
  186|  62.6k|    r->d[1] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  187|  62.6k|    secp256k1_u128_accum_u64(&t, ~a->d[2]);
  188|  62.6k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_2);
  ------------------
  |  |   18|  62.6k|#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
  ------------------
  189|  62.6k|    r->d[2] = secp256k1_u128_to_u64(&t) & nonzero; secp256k1_u128_rshift(&t, 64);
  190|  62.6k|    secp256k1_u128_accum_u64(&t, ~a->d[3]);
  191|  62.6k|    secp256k1_u128_accum_u64(&t, SECP256K1_N_3);
  ------------------
  |  |   19|  62.6k|#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
  ------------------
  192|  62.6k|    r->d[3] = secp256k1_u128_to_u64(&t) & nonzero;
  193|       |
  194|  62.6k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  62.6k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  195|  62.6k|}
secp256k1.c:secp256k1_scalar_mul_shift_var:
  893|  66.1k|SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) {
  894|  66.1k|    uint64_t l[8];
  895|  66.1k|    unsigned int shiftlimbs;
  896|  66.1k|    unsigned int shiftlow;
  897|  66.1k|    unsigned int shifthigh;
  898|  66.1k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  899|  66.1k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  900|  66.1k|    VERIFY_CHECK(shift >= 256);
  901|       |
  902|  66.1k|    secp256k1_scalar_mul_512(l, a, b);
  903|  66.1k|    shiftlimbs = shift >> 6;
  904|  66.1k|    shiftlow = shift & 0x3F;
  905|  66.1k|    shifthigh = 64 - shiftlow;
  906|  66.1k|    r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (906:15): [True: 66.1k, False: 0]
  |  Branch (906:63): [True: 66.1k, False: 0]
  |  Branch (906:78): [True: 0, False: 66.1k]
  ------------------
  907|  66.1k|    r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (907:15): [True: 66.1k, False: 0]
  |  Branch (907:63): [True: 0, False: 66.1k]
  |  Branch (907:78): [True: 0, False: 0]
  ------------------
  908|  66.1k|    r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0;
  ------------------
  |  Branch (908:15): [True: 0, False: 66.1k]
  |  Branch (908:63): [True: 0, False: 0]
  |  Branch (908:78): [True: 0, False: 0]
  ------------------
  909|  66.1k|    r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0;
  ------------------
  |  Branch (909:15): [True: 0, False: 66.1k]
  ------------------
  910|  66.1k|    secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1);
  911|       |
  912|  66.1k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  913|  66.1k|}
secp256k1.c:secp256k1_scalar_mul_512:
  682|   165k|static void secp256k1_scalar_mul_512(uint64_t *l8, const secp256k1_scalar *a, const secp256k1_scalar *b) {
  683|   165k|#ifdef USE_ASM_X86_64
  684|   165k|    const uint64_t *pb = b->d;
  685|   165k|    __asm__ __volatile__(
  686|       |    /* Preload */
  687|   165k|    "movq 0(%%rdi), %%r15\n"
  688|   165k|    "movq 8(%%rdi), %%rbx\n"
  689|   165k|    "movq 16(%%rdi), %%rcx\n"
  690|   165k|    "movq 0(%%rdx), %%r11\n"
  691|   165k|    "movq 8(%%rdx), %%r12\n"
  692|   165k|    "movq 16(%%rdx), %%r13\n"
  693|   165k|    "movq 24(%%rdx), %%r14\n"
  694|       |    /* (rax,rdx) = a0 * b0 */
  695|   165k|    "movq %%r15, %%rax\n"
  696|   165k|    "mulq %%r11\n"
  697|       |    /* Extract l8[0] */
  698|   165k|    "movq %%rax, 0(%%rsi)\n"
  699|       |    /* (r8,r9,r10) = (rdx) */
  700|   165k|    "movq %%rdx, %%r8\n"
  701|   165k|    "xorq %%r9, %%r9\n"
  702|   165k|    "xorq %%r10, %%r10\n"
  703|       |    /* (r8,r9,r10) += a0 * b1 */
  704|   165k|    "movq %%r15, %%rax\n"
  705|   165k|    "mulq %%r12\n"
  706|   165k|    "addq %%rax, %%r8\n"
  707|   165k|    "adcq %%rdx, %%r9\n"
  708|   165k|    "adcq $0, %%r10\n"
  709|       |    /* (r8,r9,r10) += a1 * b0 */
  710|   165k|    "movq %%rbx, %%rax\n"
  711|   165k|    "mulq %%r11\n"
  712|   165k|    "addq %%rax, %%r8\n"
  713|   165k|    "adcq %%rdx, %%r9\n"
  714|   165k|    "adcq $0, %%r10\n"
  715|       |    /* Extract l8[1] */
  716|   165k|    "movq %%r8, 8(%%rsi)\n"
  717|   165k|    "xorq %%r8, %%r8\n"
  718|       |    /* (r9,r10,r8) += a0 * b2 */
  719|   165k|    "movq %%r15, %%rax\n"
  720|   165k|    "mulq %%r13\n"
  721|   165k|    "addq %%rax, %%r9\n"
  722|   165k|    "adcq %%rdx, %%r10\n"
  723|   165k|    "adcq $0, %%r8\n"
  724|       |    /* (r9,r10,r8) += a1 * b1 */
  725|   165k|    "movq %%rbx, %%rax\n"
  726|   165k|    "mulq %%r12\n"
  727|   165k|    "addq %%rax, %%r9\n"
  728|   165k|    "adcq %%rdx, %%r10\n"
  729|   165k|    "adcq $0, %%r8\n"
  730|       |    /* (r9,r10,r8) += a2 * b0 */
  731|   165k|    "movq %%rcx, %%rax\n"
  732|   165k|    "mulq %%r11\n"
  733|   165k|    "addq %%rax, %%r9\n"
  734|   165k|    "adcq %%rdx, %%r10\n"
  735|   165k|    "adcq $0, %%r8\n"
  736|       |    /* Extract l8[2] */
  737|   165k|    "movq %%r9, 16(%%rsi)\n"
  738|   165k|    "xorq %%r9, %%r9\n"
  739|       |    /* (r10,r8,r9) += a0 * b3 */
  740|   165k|    "movq %%r15, %%rax\n"
  741|   165k|    "mulq %%r14\n"
  742|   165k|    "addq %%rax, %%r10\n"
  743|   165k|    "adcq %%rdx, %%r8\n"
  744|   165k|    "adcq $0, %%r9\n"
  745|       |    /* Preload a3 */
  746|   165k|    "movq 24(%%rdi), %%r15\n"
  747|       |    /* (r10,r8,r9) += a1 * b2 */
  748|   165k|    "movq %%rbx, %%rax\n"
  749|   165k|    "mulq %%r13\n"
  750|   165k|    "addq %%rax, %%r10\n"
  751|   165k|    "adcq %%rdx, %%r8\n"
  752|   165k|    "adcq $0, %%r9\n"
  753|       |    /* (r10,r8,r9) += a2 * b1 */
  754|   165k|    "movq %%rcx, %%rax\n"
  755|   165k|    "mulq %%r12\n"
  756|   165k|    "addq %%rax, %%r10\n"
  757|   165k|    "adcq %%rdx, %%r8\n"
  758|   165k|    "adcq $0, %%r9\n"
  759|       |    /* (r10,r8,r9) += a3 * b0 */
  760|   165k|    "movq %%r15, %%rax\n"
  761|   165k|    "mulq %%r11\n"
  762|   165k|    "addq %%rax, %%r10\n"
  763|   165k|    "adcq %%rdx, %%r8\n"
  764|   165k|    "adcq $0, %%r9\n"
  765|       |    /* Extract l8[3] */
  766|   165k|    "movq %%r10, 24(%%rsi)\n"
  767|   165k|    "xorq %%r10, %%r10\n"
  768|       |    /* (r8,r9,r10) += a1 * b3 */
  769|   165k|    "movq %%rbx, %%rax\n"
  770|   165k|    "mulq %%r14\n"
  771|   165k|    "addq %%rax, %%r8\n"
  772|   165k|    "adcq %%rdx, %%r9\n"
  773|   165k|    "adcq $0, %%r10\n"
  774|       |    /* (r8,r9,r10) += a2 * b2 */
  775|   165k|    "movq %%rcx, %%rax\n"
  776|   165k|    "mulq %%r13\n"
  777|   165k|    "addq %%rax, %%r8\n"
  778|   165k|    "adcq %%rdx, %%r9\n"
  779|   165k|    "adcq $0, %%r10\n"
  780|       |    /* (r8,r9,r10) += a3 * b1 */
  781|   165k|    "movq %%r15, %%rax\n"
  782|   165k|    "mulq %%r12\n"
  783|   165k|    "addq %%rax, %%r8\n"
  784|   165k|    "adcq %%rdx, %%r9\n"
  785|   165k|    "adcq $0, %%r10\n"
  786|       |    /* Extract l8[4] */
  787|   165k|    "movq %%r8, 32(%%rsi)\n"
  788|   165k|    "xorq %%r8, %%r8\n"
  789|       |    /* (r9,r10,r8) += a2 * b3 */
  790|   165k|    "movq %%rcx, %%rax\n"
  791|   165k|    "mulq %%r14\n"
  792|   165k|    "addq %%rax, %%r9\n"
  793|   165k|    "adcq %%rdx, %%r10\n"
  794|   165k|    "adcq $0, %%r8\n"
  795|       |    /* (r9,r10,r8) += a3 * b2 */
  796|   165k|    "movq %%r15, %%rax\n"
  797|   165k|    "mulq %%r13\n"
  798|   165k|    "addq %%rax, %%r9\n"
  799|   165k|    "adcq %%rdx, %%r10\n"
  800|   165k|    "adcq $0, %%r8\n"
  801|       |    /* Extract l8[5] */
  802|   165k|    "movq %%r9, 40(%%rsi)\n"
  803|       |    /* (r10,r8) += a3 * b3 */
  804|   165k|    "movq %%r15, %%rax\n"
  805|   165k|    "mulq %%r14\n"
  806|   165k|    "addq %%rax, %%r10\n"
  807|   165k|    "adcq %%rdx, %%r8\n"
  808|       |    /* Extract l8[6] */
  809|   165k|    "movq %%r10, 48(%%rsi)\n"
  810|       |    /* Extract l8[7] */
  811|   165k|    "movq %%r8, 56(%%rsi)\n"
  812|   165k|    : "+d"(pb)
  813|   165k|    : "S"(l8), "D"(a->d)
  814|   165k|    : "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc", "memory");
  815|       |
  816|   165k|    SECP256K1_CHECKMEM_MSAN_DEFINE(l8, sizeof(*l8) * 8);
  ------------------
  |  |   70|   165k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|   165k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 165k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  817|       |
  818|       |#else
  819|       |    /* 160 bit accumulator. */
  820|       |    uint64_t c0 = 0, c1 = 0;
  821|       |    uint32_t c2 = 0;
  822|       |
  823|       |    /* l8[0..7] = a[0..3] * b[0..3]. */
  824|       |    muladd_fast(a->d[0], b->d[0]);
  825|       |    extract_fast(l8[0]);
  826|       |    muladd(a->d[0], b->d[1]);
  827|       |    muladd(a->d[1], b->d[0]);
  828|       |    extract(l8[1]);
  829|       |    muladd(a->d[0], b->d[2]);
  830|       |    muladd(a->d[1], b->d[1]);
  831|       |    muladd(a->d[2], b->d[0]);
  832|       |    extract(l8[2]);
  833|       |    muladd(a->d[0], b->d[3]);
  834|       |    muladd(a->d[1], b->d[2]);
  835|       |    muladd(a->d[2], b->d[1]);
  836|       |    muladd(a->d[3], b->d[0]);
  837|       |    extract(l8[3]);
  838|       |    muladd(a->d[1], b->d[3]);
  839|       |    muladd(a->d[2], b->d[2]);
  840|       |    muladd(a->d[3], b->d[1]);
  841|       |    extract(l8[4]);
  842|       |    muladd(a->d[2], b->d[3]);
  843|       |    muladd(a->d[3], b->d[2]);
  844|       |    extract(l8[5]);
  845|       |    muladd_fast(a->d[3], b->d[3]);
  846|       |    extract_fast(l8[6]);
  847|       |    VERIFY_CHECK(c1 == 0);
  848|       |    l8[7] = c0;
  849|       |#endif
  850|   165k|}
secp256k1.c:secp256k1_scalar_cadd_bit:
  122|  66.1k|static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) {
  123|  66.1k|    secp256k1_uint128 t;
  124|  66.1k|    volatile int vflag = flag;
  125|  66.1k|    VERIFY_CHECK(flag == 0 || flag == 1);
  126|  66.1k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  127|  66.1k|    VERIFY_CHECK(bit < 256);
  128|       |
  129|  66.1k|    bit += ((uint32_t) vflag - 1) & 0x100;  /* forcing (bit >> 6) > 3 makes this a noop */
  130|  66.1k|    secp256k1_u128_from_u64(&t, r->d[0]);
  131|  66.1k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F));
  132|  66.1k|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  133|  66.1k|    secp256k1_u128_accum_u64(&t, r->d[1]);
  134|  66.1k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F));
  135|  66.1k|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  136|  66.1k|    secp256k1_u128_accum_u64(&t, r->d[2]);
  137|  66.1k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F));
  138|  66.1k|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  139|  66.1k|    secp256k1_u128_accum_u64(&t, r->d[3]);
  140|  66.1k|    secp256k1_u128_accum_u64(&t, ((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F));
  141|  66.1k|    r->d[3] = secp256k1_u128_to_u64(&t);
  142|       |
  143|  66.1k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  144|  66.1k|    VERIFY_CHECK(secp256k1_u128_hi_u64(&t) == 0);
  145|  66.1k|}
secp256k1.c:secp256k1_scalar_split_128:
  870|  2.64k|static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *k) {
  871|  2.64k|    SECP256K1_SCALAR_VERIFY(k);
  ------------------
  |  |  103|  2.64k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  872|       |
  873|  2.64k|    r1->d[0] = k->d[0];
  874|  2.64k|    r1->d[1] = k->d[1];
  875|  2.64k|    r1->d[2] = 0;
  876|  2.64k|    r1->d[3] = 0;
  877|  2.64k|    r2->d[0] = k->d[2];
  878|  2.64k|    r2->d[1] = k->d[3];
  879|  2.64k|    r2->d[2] = 0;
  880|  2.64k|    r2->d[3] = 0;
  881|       |
  882|  2.64k|    SECP256K1_SCALAR_VERIFY(r1);
  ------------------
  |  |  103|  2.64k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  883|  2.64k|    SECP256K1_SCALAR_VERIFY(r2);
  ------------------
  |  |  103|  2.64k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  884|  2.64k|}
secp256k1.c:secp256k1_scalar_get_bits_limb32:
   41|  3.69M|SECP256K1_INLINE static uint32_t secp256k1_scalar_get_bits_limb32(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
   42|  3.69M|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  3.69M|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   43|  3.69M|    VERIFY_CHECK(count > 0 && count <= 32);
   44|  3.69M|    VERIFY_CHECK(offset <= 256 - count);
   45|  3.69M|    VERIFY_CHECK((offset + count - 1) >> 5 == offset >> 5);
   46|       |
   47|  3.69M|    return (a->d[offset >> 6] >> (offset & 0x3F)) & (0xFFFFFFFF >> (32 - count));
   48|  3.69M|}
secp256k1.c:secp256k1_scalar_get_bits_var:
   50|  1.30M|SECP256K1_INLINE static uint32_t secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
   51|  1.30M|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  1.30M|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   52|  1.30M|    VERIFY_CHECK(count > 0 && count <= 32);
   53|  1.30M|    VERIFY_CHECK(offset <= 256 - count);
   54|       |
   55|  1.30M|    if ((offset + count - 1) >> 6 == offset >> 6) {
  ------------------
  |  Branch (55:9): [True: 1.22M, False: 86.7k]
  ------------------
   56|  1.22M|        return (a->d[offset >> 6] >> (offset & 0x3F)) & (0xFFFFFFFF >> (32 - count));
   57|  1.22M|    } else {
   58|  86.7k|        VERIFY_CHECK((offset >> 6) + 1 < 4);
   59|  86.7k|        VERIFY_CHECK((offset & 0x3F) > 0);
   60|  86.7k|        return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & (0xFFFFFFFF >> (32 - count));
   61|  86.7k|    }
   62|  1.30M|}
secp256k1.c:secp256k1_scalar_set_int:
   32|  1.20k|SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) {
   33|  1.20k|    r->d[0] = v;
   34|  1.20k|    r->d[1] = 0;
   35|  1.20k|    r->d[2] = 0;
   36|  1.20k|    r->d[3] = 0;
   37|       |
   38|  1.20k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  1.20k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
   39|  1.20k|}
secp256k1.c:secp256k1_scalar_is_zero:
  170|   106k|SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) {
  171|   106k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|   106k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  172|       |
  173|   106k|    return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0;
  174|   106k|}
secp256k1.c:secp256k1_scalar_mul:
  859|  99.1k|static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
  860|  99.1k|    uint64_t l[8];
  861|  99.1k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  99.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  862|  99.1k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|  99.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  863|       |
  864|  99.1k|    secp256k1_scalar_mul_512(l, a, b);
  865|  99.1k|    secp256k1_scalar_reduce_512(r, l);
  866|       |
  867|  99.1k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  99.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  868|  99.1k|}
secp256k1.c:secp256k1_scalar_reduce_512:
  351|  99.1k|static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) {
  352|  99.1k|#ifdef USE_ASM_X86_64
  353|       |    /* Reduce 512 bits into 385. */
  354|  99.1k|    uint64_t m0, m1, m2, m3, m4, m5, m6;
  355|  99.1k|    uint64_t p0, p1, p2, p3, p4;
  356|  99.1k|    uint64_t c;
  357|       |
  358|  99.1k|    __asm__ __volatile__(
  359|       |    /* Preload. */
  360|  99.1k|    "movq 32(%%rsi), %%r11\n"
  361|  99.1k|    "movq 40(%%rsi), %%r12\n"
  362|  99.1k|    "movq 48(%%rsi), %%r13\n"
  363|  99.1k|    "movq 56(%%rsi), %%r14\n"
  364|       |    /* Initialize r8,r9,r10 */
  365|  99.1k|    "movq 0(%%rsi), %%r8\n"
  366|  99.1k|    "xorq %%r9, %%r9\n"
  367|  99.1k|    "xorq %%r10, %%r10\n"
  368|       |    /* (r8,r9) += n0 * c0 */
  369|  99.1k|    "movq %8, %%rax\n"
  370|  99.1k|    "mulq %%r11\n"
  371|  99.1k|    "addq %%rax, %%r8\n"
  372|  99.1k|    "adcq %%rdx, %%r9\n"
  373|       |    /* extract m0 */
  374|  99.1k|    "movq %%r8, %q0\n"
  375|  99.1k|    "xorq %%r8, %%r8\n"
  376|       |    /* (r9,r10) += l1 */
  377|  99.1k|    "addq 8(%%rsi), %%r9\n"
  378|  99.1k|    "adcq $0, %%r10\n"
  379|       |    /* (r9,r10,r8) += n1 * c0 */
  380|  99.1k|    "movq %8, %%rax\n"
  381|  99.1k|    "mulq %%r12\n"
  382|  99.1k|    "addq %%rax, %%r9\n"
  383|  99.1k|    "adcq %%rdx, %%r10\n"
  384|  99.1k|    "adcq $0, %%r8\n"
  385|       |    /* (r9,r10,r8) += n0 * c1 */
  386|  99.1k|    "movq %9, %%rax\n"
  387|  99.1k|    "mulq %%r11\n"
  388|  99.1k|    "addq %%rax, %%r9\n"
  389|  99.1k|    "adcq %%rdx, %%r10\n"
  390|  99.1k|    "adcq $0, %%r8\n"
  391|       |    /* extract m1 */
  392|  99.1k|    "movq %%r9, %q1\n"
  393|  99.1k|    "xorq %%r9, %%r9\n"
  394|       |    /* (r10,r8,r9) += l2 */
  395|  99.1k|    "addq 16(%%rsi), %%r10\n"
  396|  99.1k|    "adcq $0, %%r8\n"
  397|  99.1k|    "adcq $0, %%r9\n"
  398|       |    /* (r10,r8,r9) += n2 * c0 */
  399|  99.1k|    "movq %8, %%rax\n"
  400|  99.1k|    "mulq %%r13\n"
  401|  99.1k|    "addq %%rax, %%r10\n"
  402|  99.1k|    "adcq %%rdx, %%r8\n"
  403|  99.1k|    "adcq $0, %%r9\n"
  404|       |    /* (r10,r8,r9) += n1 * c1 */
  405|  99.1k|    "movq %9, %%rax\n"
  406|  99.1k|    "mulq %%r12\n"
  407|  99.1k|    "addq %%rax, %%r10\n"
  408|  99.1k|    "adcq %%rdx, %%r8\n"
  409|  99.1k|    "adcq $0, %%r9\n"
  410|       |    /* (r10,r8,r9) += n0 */
  411|  99.1k|    "addq %%r11, %%r10\n"
  412|  99.1k|    "adcq $0, %%r8\n"
  413|  99.1k|    "adcq $0, %%r9\n"
  414|       |    /* extract m2 */
  415|  99.1k|    "movq %%r10, %q2\n"
  416|  99.1k|    "xorq %%r10, %%r10\n"
  417|       |    /* (r8,r9,r10) += l3 */
  418|  99.1k|    "addq 24(%%rsi), %%r8\n"
  419|  99.1k|    "adcq $0, %%r9\n"
  420|  99.1k|    "adcq $0, %%r10\n"
  421|       |    /* (r8,r9,r10) += n3 * c0 */
  422|  99.1k|    "movq %8, %%rax\n"
  423|  99.1k|    "mulq %%r14\n"
  424|  99.1k|    "addq %%rax, %%r8\n"
  425|  99.1k|    "adcq %%rdx, %%r9\n"
  426|  99.1k|    "adcq $0, %%r10\n"
  427|       |    /* (r8,r9,r10) += n2 * c1 */
  428|  99.1k|    "movq %9, %%rax\n"
  429|  99.1k|    "mulq %%r13\n"
  430|  99.1k|    "addq %%rax, %%r8\n"
  431|  99.1k|    "adcq %%rdx, %%r9\n"
  432|  99.1k|    "adcq $0, %%r10\n"
  433|       |    /* (r8,r9,r10) += n1 */
  434|  99.1k|    "addq %%r12, %%r8\n"
  435|  99.1k|    "adcq $0, %%r9\n"
  436|  99.1k|    "adcq $0, %%r10\n"
  437|       |    /* extract m3 */
  438|  99.1k|    "movq %%r8, %q3\n"
  439|  99.1k|    "xorq %%r8, %%r8\n"
  440|       |    /* (r9,r10,r8) += n3 * c1 */
  441|  99.1k|    "movq %9, %%rax\n"
  442|  99.1k|    "mulq %%r14\n"
  443|  99.1k|    "addq %%rax, %%r9\n"
  444|  99.1k|    "adcq %%rdx, %%r10\n"
  445|  99.1k|    "adcq $0, %%r8\n"
  446|       |    /* (r9,r10,r8) += n2 */
  447|  99.1k|    "addq %%r13, %%r9\n"
  448|  99.1k|    "adcq $0, %%r10\n"
  449|  99.1k|    "adcq $0, %%r8\n"
  450|       |    /* extract m4 */
  451|  99.1k|    "movq %%r9, %q4\n"
  452|       |    /* (r10,r8) += n3 */
  453|  99.1k|    "addq %%r14, %%r10\n"
  454|  99.1k|    "adcq $0, %%r8\n"
  455|       |    /* extract m5 */
  456|  99.1k|    "movq %%r10, %q5\n"
  457|       |    /* extract m6 */
  458|  99.1k|    "movq %%r8, %q6\n"
  459|  99.1k|    : "=&g"(m0), "=&g"(m1), "=&g"(m2), "=g"(m3), "=g"(m4), "=g"(m5), "=g"(m6)
  460|  99.1k|    : "S"(l), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   22|  99.1k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|  99.1k|#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
  |  |  ------------------
  ------------------
                  : "S"(l), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   23|  99.1k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|  99.1k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  461|  99.1k|    : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc");
  462|       |
  463|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m0, sizeof(m0));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  464|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m1, sizeof(m1));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  465|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m2, sizeof(m2));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m3, sizeof(m3));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  467|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m4, sizeof(m4));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  468|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m5, sizeof(m5));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&m6, sizeof(m6));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|       |
  471|       |    /* Reduce 385 bits into 258. */
  472|  99.1k|    __asm__ __volatile__(
  473|       |    /* Preload */
  474|  99.1k|    "movq %q9, %%r11\n"
  475|  99.1k|    "movq %q10, %%r12\n"
  476|  99.1k|    "movq %q11, %%r13\n"
  477|       |    /* Initialize (r8,r9,r10) */
  478|  99.1k|    "movq %q5, %%r8\n"
  479|  99.1k|    "xorq %%r9, %%r9\n"
  480|  99.1k|    "xorq %%r10, %%r10\n"
  481|       |    /* (r8,r9) += m4 * c0 */
  482|  99.1k|    "movq %12, %%rax\n"
  483|  99.1k|    "mulq %%r11\n"
  484|  99.1k|    "addq %%rax, %%r8\n"
  485|  99.1k|    "adcq %%rdx, %%r9\n"
  486|       |    /* extract p0 */
  487|  99.1k|    "movq %%r8, %q0\n"
  488|  99.1k|    "xorq %%r8, %%r8\n"
  489|       |    /* (r9,r10) += m1 */
  490|  99.1k|    "addq %q6, %%r9\n"
  491|  99.1k|    "adcq $0, %%r10\n"
  492|       |    /* (r9,r10,r8) += m5 * c0 */
  493|  99.1k|    "movq %12, %%rax\n"
  494|  99.1k|    "mulq %%r12\n"
  495|  99.1k|    "addq %%rax, %%r9\n"
  496|  99.1k|    "adcq %%rdx, %%r10\n"
  497|  99.1k|    "adcq $0, %%r8\n"
  498|       |    /* (r9,r10,r8) += m4 * c1 */
  499|  99.1k|    "movq %13, %%rax\n"
  500|  99.1k|    "mulq %%r11\n"
  501|  99.1k|    "addq %%rax, %%r9\n"
  502|  99.1k|    "adcq %%rdx, %%r10\n"
  503|  99.1k|    "adcq $0, %%r8\n"
  504|       |    /* extract p1 */
  505|  99.1k|    "movq %%r9, %q1\n"
  506|  99.1k|    "xorq %%r9, %%r9\n"
  507|       |    /* (r10,r8,r9) += m2 */
  508|  99.1k|    "addq %q7, %%r10\n"
  509|  99.1k|    "adcq $0, %%r8\n"
  510|  99.1k|    "adcq $0, %%r9\n"
  511|       |    /* (r10,r8,r9) += m6 * c0 */
  512|  99.1k|    "movq %12, %%rax\n"
  513|  99.1k|    "mulq %%r13\n"
  514|  99.1k|    "addq %%rax, %%r10\n"
  515|  99.1k|    "adcq %%rdx, %%r8\n"
  516|  99.1k|    "adcq $0, %%r9\n"
  517|       |    /* (r10,r8,r9) += m5 * c1 */
  518|  99.1k|    "movq %13, %%rax\n"
  519|  99.1k|    "mulq %%r12\n"
  520|  99.1k|    "addq %%rax, %%r10\n"
  521|  99.1k|    "adcq %%rdx, %%r8\n"
  522|  99.1k|    "adcq $0, %%r9\n"
  523|       |    /* (r10,r8,r9) += m4 */
  524|  99.1k|    "addq %%r11, %%r10\n"
  525|  99.1k|    "adcq $0, %%r8\n"
  526|  99.1k|    "adcq $0, %%r9\n"
  527|       |    /* extract p2 */
  528|  99.1k|    "movq %%r10, %q2\n"
  529|       |    /* (r8,r9) += m3 */
  530|  99.1k|    "addq %q8, %%r8\n"
  531|  99.1k|    "adcq $0, %%r9\n"
  532|       |    /* (r8,r9) += m6 * c1 */
  533|  99.1k|    "movq %13, %%rax\n"
  534|  99.1k|    "mulq %%r13\n"
  535|  99.1k|    "addq %%rax, %%r8\n"
  536|  99.1k|    "adcq %%rdx, %%r9\n"
  537|       |    /* (r8,r9) += m5 */
  538|  99.1k|    "addq %%r12, %%r8\n"
  539|  99.1k|    "adcq $0, %%r9\n"
  540|       |    /* extract p3 */
  541|  99.1k|    "movq %%r8, %q3\n"
  542|       |    /* (r9) += m6 */
  543|  99.1k|    "addq %%r13, %%r9\n"
  544|       |    /* extract p4 */
  545|  99.1k|    "movq %%r9, %q4\n"
  546|  99.1k|    : "=&g"(p0), "=&g"(p1), "=&g"(p2), "=g"(p3), "=g"(p4)
  547|  99.1k|    : "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|  99.1k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|  99.1k|#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|  99.1k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|  99.1k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  548|  99.1k|    : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc");
  549|       |
  550|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p0, sizeof(p0));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p1, sizeof(p1));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  552|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p2, sizeof(p2));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p3, sizeof(p3));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  554|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&p4, sizeof(p4));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  555|       |
  556|       |    /* Reduce 258 bits into 256. */
  557|  99.1k|    __asm__ __volatile__(
  558|       |    /* Preload */
  559|  99.1k|    "movq %q5, %%r10\n"
  560|       |    /* (rax,rdx) = p4 * c0 */
  561|  99.1k|    "movq %7, %%rax\n"
  562|  99.1k|    "mulq %%r10\n"
  563|       |    /* (rax,rdx) += p0 */
  564|  99.1k|    "addq %q1, %%rax\n"
  565|  99.1k|    "adcq $0, %%rdx\n"
  566|       |    /* extract r0 */
  567|  99.1k|    "movq %%rax, 0(%q6)\n"
  568|       |    /* Move to (r8,r9) */
  569|  99.1k|    "movq %%rdx, %%r8\n"
  570|  99.1k|    "xorq %%r9, %%r9\n"
  571|       |    /* (r8,r9) += p1 */
  572|  99.1k|    "addq %q2, %%r8\n"
  573|  99.1k|    "adcq $0, %%r9\n"
  574|       |    /* (r8,r9) += p4 * c1 */
  575|  99.1k|    "movq %8, %%rax\n"
  576|  99.1k|    "mulq %%r10\n"
  577|  99.1k|    "addq %%rax, %%r8\n"
  578|  99.1k|    "adcq %%rdx, %%r9\n"
  579|       |    /* Extract r1 */
  580|  99.1k|    "movq %%r8, 8(%q6)\n"
  581|  99.1k|    "xorq %%r8, %%r8\n"
  582|       |    /* (r9,r8) += p4 */
  583|  99.1k|    "addq %%r10, %%r9\n"
  584|  99.1k|    "adcq $0, %%r8\n"
  585|       |    /* (r9,r8) += p2 */
  586|  99.1k|    "addq %q3, %%r9\n"
  587|  99.1k|    "adcq $0, %%r8\n"
  588|       |    /* Extract r2 */
  589|  99.1k|    "movq %%r9, 16(%q6)\n"
  590|  99.1k|    "xorq %%r9, %%r9\n"
  591|       |    /* (r8,r9) += p3 */
  592|  99.1k|    "addq %q4, %%r8\n"
  593|  99.1k|    "adcq $0, %%r9\n"
  594|       |    /* Extract r3 */
  595|  99.1k|    "movq %%r8, 24(%q6)\n"
  596|       |    /* Extract c */
  597|  99.1k|    "movq %%r9, %q0\n"
  598|  99.1k|    : "=g"(c)
  599|  99.1k|    : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "i"(SECP256K1_N_C_0), "i"(SECP256K1_N_C_1)
  ------------------
  |  |   22|  99.1k|#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
  |  |  ------------------
  |  |  |  |   16|  99.1k|#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|  99.1k|#define SECP256K1_N_C_1 (~SECP256K1_N_1)
  |  |  ------------------
  |  |  |  |   17|  99.1k|#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
  |  |  ------------------
  ------------------
  600|  99.1k|    : "rax", "rdx", "r8", "r9", "r10", "cc", "memory");
  601|       |
  602|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(r, sizeof(*r));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  603|  99.1k|    SECP256K1_CHECKMEM_MSAN_DEFINE(&c, sizeof(c));
  ------------------
  |  |   70|  99.1k|#  define SECP256K1_CHECKMEM_MSAN_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  99.1k|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 99.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  604|       |
  605|       |#else
  606|       |    secp256k1_uint128 c128;
  607|       |    uint64_t c, c0, c1, c2;
  608|       |    uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7];
  609|       |    uint64_t m0, m1, m2, m3, m4, m5;
  610|       |    uint32_t m6;
  611|       |    uint64_t p0, p1, p2, p3;
  612|       |    uint32_t p4;
  613|       |
  614|       |    /* Reduce 512 bits into 385. */
  615|       |    /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */
  616|       |    c0 = l[0]; c1 = 0; c2 = 0;
  617|       |    muladd_fast(n0, SECP256K1_N_C_0);
  618|       |    extract_fast(m0);
  619|       |    sumadd_fast(l[1]);
  620|       |    muladd(n1, SECP256K1_N_C_0);
  621|       |    muladd(n0, SECP256K1_N_C_1);
  622|       |    extract(m1);
  623|       |    sumadd(l[2]);
  624|       |    muladd(n2, SECP256K1_N_C_0);
  625|       |    muladd(n1, SECP256K1_N_C_1);
  626|       |    sumadd(n0);
  627|       |    extract(m2);
  628|       |    sumadd(l[3]);
  629|       |    muladd(n3, SECP256K1_N_C_0);
  630|       |    muladd(n2, SECP256K1_N_C_1);
  631|       |    sumadd(n1);
  632|       |    extract(m3);
  633|       |    muladd(n3, SECP256K1_N_C_1);
  634|       |    sumadd(n2);
  635|       |    extract(m4);
  636|       |    sumadd_fast(n3);
  637|       |    extract_fast(m5);
  638|       |    VERIFY_CHECK(c0 <= 1);
  639|       |    m6 = c0;
  640|       |
  641|       |    /* Reduce 385 bits into 258. */
  642|       |    /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */
  643|       |    c0 = m0; c1 = 0; c2 = 0;
  644|       |    muladd_fast(m4, SECP256K1_N_C_0);
  645|       |    extract_fast(p0);
  646|       |    sumadd_fast(m1);
  647|       |    muladd(m5, SECP256K1_N_C_0);
  648|       |    muladd(m4, SECP256K1_N_C_1);
  649|       |    extract(p1);
  650|       |    sumadd(m2);
  651|       |    muladd(m6, SECP256K1_N_C_0);
  652|       |    muladd(m5, SECP256K1_N_C_1);
  653|       |    sumadd(m4);
  654|       |    extract(p2);
  655|       |    sumadd_fast(m3);
  656|       |    muladd_fast(m6, SECP256K1_N_C_1);
  657|       |    sumadd_fast(m5);
  658|       |    extract_fast(p3);
  659|       |    p4 = c0 + m6;
  660|       |    VERIFY_CHECK(p4 <= 2);
  661|       |
  662|       |    /* Reduce 258 bits into 256. */
  663|       |    /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */
  664|       |    secp256k1_u128_from_u64(&c128, p0);
  665|       |    secp256k1_u128_accum_mul(&c128, SECP256K1_N_C_0, p4);
  666|       |    r->d[0] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  667|       |    secp256k1_u128_accum_u64(&c128, p1);
  668|       |    secp256k1_u128_accum_mul(&c128, SECP256K1_N_C_1, p4);
  669|       |    r->d[1] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  670|       |    secp256k1_u128_accum_u64(&c128, p2);
  671|       |    secp256k1_u128_accum_u64(&c128, p4);
  672|       |    r->d[2] = secp256k1_u128_to_u64(&c128); secp256k1_u128_rshift(&c128, 64);
  673|       |    secp256k1_u128_accum_u64(&c128, p3);
  674|       |    r->d[3] = secp256k1_u128_to_u64(&c128);
  675|       |    c = secp256k1_u128_hi_u64(&c128);
  676|       |#endif
  677|       |
  678|       |    /* Final reduction of r. */
  679|  99.1k|    secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
  680|  99.1k|}
secp256k1.c:secp256k1_scalar_add:
   96|  66.1k|static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
   97|  66.1k|    int overflow;
   98|  66.1k|    secp256k1_uint128 t;
   99|  66.1k|    SECP256K1_SCALAR_VERIFY(a);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  100|  66.1k|    SECP256K1_SCALAR_VERIFY(b);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  101|       |
  102|  66.1k|    secp256k1_u128_from_u64(&t, a->d[0]);
  103|  66.1k|    secp256k1_u128_accum_u64(&t, b->d[0]);
  104|  66.1k|    r->d[0] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  105|  66.1k|    secp256k1_u128_accum_u64(&t, a->d[1]);
  106|  66.1k|    secp256k1_u128_accum_u64(&t, b->d[1]);
  107|  66.1k|    r->d[1] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  108|  66.1k|    secp256k1_u128_accum_u64(&t, a->d[2]);
  109|  66.1k|    secp256k1_u128_accum_u64(&t, b->d[2]);
  110|  66.1k|    r->d[2] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  111|  66.1k|    secp256k1_u128_accum_u64(&t, a->d[3]);
  112|  66.1k|    secp256k1_u128_accum_u64(&t, b->d[3]);
  113|  66.1k|    r->d[3] = secp256k1_u128_to_u64(&t); secp256k1_u128_rshift(&t, 64);
  114|  66.1k|    overflow = secp256k1_u128_to_u64(&t) + secp256k1_scalar_check_overflow(r);
  115|  66.1k|    VERIFY_CHECK(overflow == 0 || overflow == 1);
  116|  66.1k|    secp256k1_scalar_reduce(r, overflow);
  117|       |
  118|  66.1k|    SECP256K1_SCALAR_VERIFY(r);
  ------------------
  |  |  103|  66.1k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  119|  66.1k|    return overflow;
  120|  66.1k|}

secp256k1.c:secp256k1_scalar_verify:
   42|  6.43M|static void secp256k1_scalar_verify(const secp256k1_scalar *r) {
   43|  6.43M|    VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0);
   44|       |
   45|  6.43M|    (void)r;
   46|  6.43M|}
secp256k1.c:secp256k1_scalar_split_lambda:
  142|  33.0k|static void secp256k1_scalar_split_lambda(secp256k1_scalar * SECP256K1_RESTRICT r1, secp256k1_scalar * SECP256K1_RESTRICT r2, const secp256k1_scalar * SECP256K1_RESTRICT k) {
  143|  33.0k|    secp256k1_scalar c1, c2;
  144|  33.0k|    static const secp256k1_scalar minus_b1 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  33.0k|#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|  33.0k|        0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
  146|  33.0k|        0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL
  147|  33.0k|    );
  148|  33.0k|    static const secp256k1_scalar minus_b2 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  33.0k|#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|  33.0k|        0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL,
  150|  33.0k|        0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL
  151|  33.0k|    );
  152|  33.0k|    static const secp256k1_scalar g1 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  33.0k|#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|  33.0k|        0x3086D221UL, 0xA7D46BCDUL, 0xE86C90E4UL, 0x9284EB15UL,
  154|  33.0k|        0x3DAA8A14UL, 0x71E8CA7FUL, 0xE893209AUL, 0x45DBB031UL
  155|  33.0k|    );
  156|  33.0k|    static const secp256k1_scalar g2 = SECP256K1_SCALAR_CONST(
  ------------------
  |  |   17|  33.0k|#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|  33.0k|        0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C4UL,
  158|  33.0k|        0x221208ACUL, 0x9DF506C6UL, 0x1571B4AEUL, 0x8AC47F71UL
  159|  33.0k|    );
  160|  33.0k|    SECP256K1_SCALAR_VERIFY(k);
  ------------------
  |  |  103|  33.0k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  161|  33.0k|    VERIFY_CHECK(r1 != k);
  162|  33.0k|    VERIFY_CHECK(r2 != k);
  163|  33.0k|    VERIFY_CHECK(r1 != r2);
  164|       |
  165|       |    /* these _var calls are constant time since the shift amount is constant */
  166|  33.0k|    secp256k1_scalar_mul_shift_var(&c1, k, &g1, 384);
  167|  33.0k|    secp256k1_scalar_mul_shift_var(&c2, k, &g2, 384);
  168|  33.0k|    secp256k1_scalar_mul(&c1, &c1, &minus_b1);
  169|  33.0k|    secp256k1_scalar_mul(&c2, &c2, &minus_b2);
  170|  33.0k|    secp256k1_scalar_add(r2, &c1, &c2);
  171|  33.0k|    secp256k1_scalar_mul(r1, r2, &secp256k1_const_lambda);
  172|  33.0k|    secp256k1_scalar_negate(r1, r1);
  173|  33.0k|    secp256k1_scalar_add(r1, r1, k);
  174|       |
  175|  33.0k|    SECP256K1_SCALAR_VERIFY(r1);
  ------------------
  |  |  103|  33.0k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  176|  33.0k|    SECP256K1_SCALAR_VERIFY(r2);
  ------------------
  |  |  103|  33.0k|#define SECP256K1_SCALAR_VERIFY(r) secp256k1_scalar_verify(r)
  ------------------
  177|       |#ifdef VERIFY
  178|       |    secp256k1_scalar_split_lambda_verify(r1, r2, k);
  179|       |#endif
  180|  33.0k|}

secp256k1_ec_pubkey_parse:
  268|   100k|int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) {
  269|   100k|    secp256k1_ge Q;
  270|       |
  271|   100k|    VERIFY_CHECK(ctx != NULL);
  272|   100k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|   100k|#define ARG_CHECK(cond) do { \
  |  |   46|   100k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|   100k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 100k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   100k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  273|   100k|    memset(pubkey, 0, sizeof(*pubkey));
  274|   100k|    ARG_CHECK(input != NULL);
  ------------------
  |  |   45|   100k|#define ARG_CHECK(cond) do { \
  |  |   46|   100k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|   100k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 100k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|   100k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  275|   100k|    if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) {
  ------------------
  |  Branch (275:9): [True: 272, False: 100k]
  ------------------
  276|    272|        return 0;
  277|    272|    }
  278|   100k|    if (!secp256k1_ge_is_in_correct_subgroup(&Q)) {
  ------------------
  |  Branch (278:9): [True: 0, False: 100k]
  ------------------
  279|      0|        return 0;
  280|      0|    }
  281|   100k|    secp256k1_pubkey_save(pubkey, &Q);
  282|   100k|    secp256k1_ge_clear(&Q);
  283|   100k|    return 1;
  284|   100k|}
secp256k1_ec_pubkey_serialize:
  286|  41.5k|int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
  287|  41.5k|    secp256k1_ge Q;
  288|  41.5k|    size_t len;
  289|       |
  290|  41.5k|    VERIFY_CHECK(ctx != NULL);
  291|  41.5k|    ARG_CHECK(outputlen != NULL);
  ------------------
  |  |   45|  41.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  41.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  41.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 41.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  41.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 41.5k]
  |  |  ------------------
  ------------------
  292|  41.5k|    ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33u : 65u));
  ------------------
  |  |   45|  41.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  41.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  83.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 41.5k]
  |  |  |  |  |  Branch (146:39): [True: 41.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  41.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 41.5k]
  |  |  ------------------
  ------------------
  293|  41.5k|    len = *outputlen;
  294|  41.5k|    *outputlen = 0;
  295|  41.5k|    ARG_CHECK(output != NULL);
  ------------------
  |  |   45|  41.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  41.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  41.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 41.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  41.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 41.5k]
  |  |  ------------------
  ------------------
  296|  41.5k|    memset(output, 0, len);
  297|  41.5k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  41.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  41.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  41.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 41.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  41.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 41.5k]
  |  |  ------------------
  ------------------
  298|  41.5k|    ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION);
  ------------------
  |  |   45|  41.5k|#define ARG_CHECK(cond) do { \
  |  |   46|  41.5k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  41.5k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 41.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  41.5k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 41.5k]
  |  |  ------------------
  ------------------
  299|  41.5k|    if (secp256k1_pubkey_load(ctx, &Q, pubkey)) {
  ------------------
  |  Branch (299:9): [True: 41.5k, False: 0]
  ------------------
  300|  41.5k|        if (flags & SECP256K1_FLAGS_BIT_COMPRESSION) {
  ------------------
  |  |  202|  41.5k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  ------------------
  |  Branch (300:13): [True: 41.5k, False: 0]
  ------------------
  301|  41.5k|            secp256k1_eckey_pubkey_serialize33(&Q, output);
  302|  41.5k|            *outputlen = 33;
  303|  41.5k|        } else {
  304|      0|            secp256k1_eckey_pubkey_serialize65(&Q, output);
  305|      0|            *outputlen = 65;
  306|      0|        }
  307|  41.5k|        return 1;
  308|  41.5k|    }
  309|      0|    return 0;
  310|  41.5k|}
secp256k1.c:secp256k1_pubkey_save:
  264|   121k|static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) {
  265|   121k|    secp256k1_ge_to_bytes(pubkey->data, ge);
  266|   121k|}
secp256k1.c:secp256k1_pubkey_load:
  258|  80.7k|static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) {
  259|  80.7k|    secp256k1_ge_from_bytes(ge, pubkey->data);
  260|  80.7k|    ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));
  ------------------
  |  |   45|  80.7k|#define ARG_CHECK(cond) do { \
  |  |   46|  80.7k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  80.7k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 80.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  80.7k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 80.7k]
  |  |  ------------------
  ------------------
  261|  80.7k|    return 1;
  262|  80.7k|}
secp256k1.c:secp256k1_ec_pubkey_tweak_add_helper:
  712|  2.64k|static int secp256k1_ec_pubkey_tweak_add_helper(secp256k1_ge *p, const unsigned char *tweak32) {
  713|  2.64k|    secp256k1_scalar term;
  714|  2.64k|    int overflow = 0;
  715|  2.64k|    secp256k1_scalar_set_b32(&term, tweak32, &overflow);
  716|  2.64k|    return !overflow && secp256k1_eckey_pubkey_tweak_add(p, &term);
  ------------------
  |  Branch (716:12): [True: 2.64k, False: 0]
  |  Branch (716:25): [True: 2.64k, False: 0]
  ------------------
  717|  2.64k|}
secp256k1.c:secp256k1_get_hash_context:
  237|  71.9k|static SECP256K1_INLINE const secp256k1_hash_ctx* secp256k1_get_hash_context(const secp256k1_context *ctx) {
  238|  71.9k|    return &ctx->hash_ctx;
  239|  71.9k|}

secp256k1.c:secp256k1_read_be32:
  428|  1.27M|SECP256K1_INLINE static uint32_t secp256k1_read_be32(const unsigned char* p) {
  429|  1.27M|    return (uint32_t)p[0] << 24 |
  430|  1.27M|           (uint32_t)p[1] << 16 |
  431|  1.27M|           (uint32_t)p[2] << 8  |
  432|  1.27M|           (uint32_t)p[3];
  433|  1.27M|}
secp256k1.c:secp256k1_memcmp_var:
  281|  23.4k|static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2, size_t n) {
  282|  23.4k|    const unsigned char *p1 = s1, *p2 = s2;
  283|  23.4k|    size_t i;
  284|       |
  285|   750k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (285:17): [True: 729k, False: 21.7k]
  ------------------
  286|   729k|        int diff = p1[i] - p2[i];
  287|   729k|        if (diff != 0) {
  ------------------
  |  Branch (287:13): [True: 1.75k, False: 727k]
  ------------------
  288|  1.75k|            return diff;
  289|  1.75k|        }
  290|   729k|    }
  291|  21.7k|    return 0;
  292|  23.4k|}
secp256k1.c:secp256k1_read_be64:
  444|   171k|SECP256K1_INLINE static uint64_t secp256k1_read_be64(const unsigned char* p) {
  445|   171k|    return (uint64_t)p[0] << 56 |
  446|   171k|           (uint64_t)p[1] << 48 |
  447|   171k|           (uint64_t)p[2] << 40 |
  448|   171k|           (uint64_t)p[3] << 32 |
  449|   171k|           (uint64_t)p[4] << 24 |
  450|   171k|           (uint64_t)p[5] << 16 |
  451|   171k|           (uint64_t)p[6] << 8  |
  452|   171k|           (uint64_t)p[7];
  453|   171k|}
secp256k1.c:secp256k1_write_be64:
  456|   338k|SECP256K1_INLINE static void secp256k1_write_be64(unsigned char* p, uint64_t x) {
  457|   338k|    p[7] = x;
  458|   338k|    p[6] = x >>  8;
  459|   338k|    p[5] = x >> 16;
  460|   338k|    p[4] = x >> 24;
  461|   338k|    p[3] = x >> 32;
  462|   338k|    p[2] = x >> 40;
  463|   338k|    p[1] = x >> 48;
  464|   338k|    p[0] = x >> 56;
  465|   338k|}
secp256k1.c:secp256k1_memclear_explicit:
  268|   100k|static SECP256K1_INLINE void secp256k1_memclear_explicit(void *ptr, size_t len) {
  269|       |    /* The current implementation zeroes, but callers must not rely on this */
  270|   100k|    secp256k1_memzero_explicit(ptr, len);
  271|       |#ifdef VERIFY
  272|       |    SECP256K1_CHECKMEM_UNDEFINE(ptr, len);
  273|       |#endif
  274|   100k|}
secp256k1.c:secp256k1_memzero_explicit:
  236|   100k|static SECP256K1_INLINE void secp256k1_memzero_explicit(void *ptr, size_t len) {
  237|       |#if defined(_MSC_VER)
  238|       |    /* SecureZeroMemory is guaranteed not to be optimized out by MSVC. */
  239|       |    SecureZeroMemory(ptr, len);
  240|       |#elif defined(__GNUC__)
  241|       |    /* We use a memory barrier that scares the compiler away from optimizing out the memset.
  242|       |     *
  243|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
  244|       |     * in BoringSSL (ISC License):
  245|       |     *    As best as we can tell, this is sufficient to break any optimisations that
  246|       |     *    might try to eliminate "superfluous" memsets.
  247|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
  248|       |     * is pretty efficient, because the compiler can still implement the memset() efficiently,
  249|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
  250|       |     * Yang et al. (USENIX Security 2017) for more background.
  251|       |     */
  252|   100k|    memset(ptr, 0, len);
  253|   100k|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
  254|       |#else
  255|       |    void *(*volatile const volatile_memset)(void *, int, size_t) = memset;
  256|       |    volatile_memset(ptr, 0, len);
  257|       |#endif
  258|   100k|}
secp256k1.c:secp256k1_write_be32:
  436|   403k|SECP256K1_INLINE static void secp256k1_write_be32(unsigned char* p, uint32_t x) {
  437|   403k|    p[3] = x;
  438|   403k|    p[2] = x >>  8;
  439|   403k|    p[1] = x >> 16;
  440|   403k|    p[0] = x >> 24;
  441|   403k|}

_Z16WriteCompactSizeI10HashWriterEvRT_m:
  303|  1.90k|{
  304|  1.90k|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 988, False: 921]
  ------------------
  305|    988|    {
  306|    988|        ser_writedata8(os, nSize);
  307|    988|    }
  308|    921|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 921, False: 0]
  ------------------
  309|    921|    {
  310|    921|        ser_writedata8(os, 253);
  311|    921|        ser_writedata16(os, nSize);
  312|    921|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|  1.90k|    return;
  324|  1.90k|}
_Z14ser_writedata8I10HashWriterEvRT_h:
   58|  3.81k|{
   59|  3.81k|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|  3.81k|}
_Z15ser_writedata16I10HashWriterEvRT_t:
   62|    921|{
   63|    921|    obj = htole16_internal(obj);
   64|    921|    s.write(std::as_bytes(std::span{&obj, 1}));
   65|    921|}
_ZN17CompactSizeWriterC2Em:
  623|  1.90k|    explicit CompactSizeWriter(uint64_t n_in) : n(n_in) { }
_Z20GetSizeOfCompactSizem:
  292|   124k|{
  293|   124k|    if (nSize < 253)             return sizeof(unsigned char);
  ------------------
  |  Branch (293:9): [True: 0, False: 124k]
  ------------------
  294|   124k|    else if (nSize <= std::numeric_limits<uint16_t>::max()) return sizeof(unsigned char) + sizeof(uint16_t);
  ------------------
  |  Branch (294:14): [True: 0, False: 124k]
  ------------------
  295|   124k|    else if (nSize <= std::numeric_limits<unsigned int>::max())  return sizeof(unsigned char) + sizeof(unsigned int);
  ------------------
  |  Branch (295:14): [True: 124k, False: 0]
  ------------------
  296|      0|    else                         return sizeof(unsigned char) + sizeof(uint64_t);
  297|   124k|}
_Z9SerializeI10HashWriterTk9BasicByteKhLm32EEvRT_NSt3__14spanIT0_XT1_EEE:
  260|  4.00k|template <typename Stream, BasicByte B, size_t N> void Serialize(Stream& s, std::span<B, N> span)      { s.write(std::as_bytes(span)); }
_Z9SerializeI10HashWriter7uint256Q12SerializableIT0_T_EEvRS3_RKS2_:
  767|  4.00k|{
  768|  4.00k|    a.Serialize(os);
  769|  4.00k|}
_Z9SerializeI10HashWriterEvRT_h:
  250|  1.90k|template <typename Stream> void Serialize(Stream& s, uint8_t a)   { ser_writedata8(s, a); }
_Z9SerializeI10HashWriter17CompactSizeWriterQ12SerializableIT0_T_EEvRS3_RKS2_:
  767|  1.90k|{
  768|  1.90k|    a.Serialize(os);
  769|  1.90k|}
_ZNK17CompactSizeWriter9SerializeI10HashWriterEEvRT_:
  626|  1.90k|    void Serialize(Stream &s) const {
  627|  1.90k|        WriteCompactSize<Stream>(s, n);
  628|  1.90k|    }
_Z9SerializeI10HashWriterTk9BasicByteKhEvRT_NSt3__14spanIT0_Lm18446744073709551615EEE:
  261|  2.99k|template <typename Stream, BasicByte B>           void Serialize(Stream& s, std::span<B> span)         { s.write(std::as_bytes(span)); }

_Z13MakeUCharSpanINSt3__14spanIhLm18446744073709551615EEEEDTcl13UCharSpanCasttlS1_fp_EEERKT_:
  111|    126|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z13UCharSpanCastIhLm18446744073709551615EEDaNSt3__14spanIT_XT0_EEE:
  108|    126|template <typename T, size_t N> constexpr auto UCharSpanCast(std::span<T, N> s) { return std::span<std::remove_pointer_t<decltype(UCharCast(s.data()))>, N>{UCharCast(s.data()), s.size()}; }
_Z13MakeUCharSpanI11XOnlyPubKeyEDTcl13UCharSpanCasttlNSt3__14spanEfp_EEERKT_:
  111|  1.01k|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z9UCharCastPh:
   96|    126|inline unsigned char* UCharCast(unsigned char* c) { return c; }
_Z13MakeUCharSpanINSt3__14spanIKhLm18446744073709551615EEEEDTcl13UCharSpanCasttlS1_fp_EEERKT_:
  111|   160k|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z13UCharSpanCastIKhLm18446744073709551615EEDaNSt3__14spanIT_XT0_EEE:
  108|   161k|template <typename T, size_t N> constexpr auto UCharSpanCast(std::span<T, N> s) { return std::span<std::remove_pointer_t<decltype(UCharCast(s.data()))>, N>{UCharCast(s.data()), s.size()}; }
_Z13MakeUCharSpanI7CScriptEDTcl13UCharSpanCasttlNSt3__14spanEfp_EEERKT_:
  111|    571|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z9UCharCastPKh:
  100|   161k|inline const unsigned char* UCharCast(const unsigned char* c) { return c; }
_Z9UCharCastPKSt4byte:
  102|  11.7k|inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }

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

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

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

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

_ZN14AnnotatedMixinINSt3__115recursive_mutexEED2Ev:
   96|      2|    ~AnnotatedMixin() {
   97|      2|        DeleteLock((void*)this);
   98|      2|    }
_ZN14AnnotatedMixinINSt3__15mutexEED2Ev:
   96|     64|    ~AnnotatedMixin() {
   97|     64|        DeleteLock((void*)this);
   98|     64|    }
_Z10DeleteLockPv:
   74|     66|inline void DeleteLock(void* cs) {}
_Z17MaybeCheckNotHeldR14AnnotatedMixinINSt3__15mutexEE:
  258|     30|inline Mutex& MaybeCheckNotHeld(Mutex& cs) EXCLUSIVE_LOCKS_REQUIRED(!cs) LOCK_RETURNED(cs) { return cs; }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEEC2ERS3_PKcS7_ib:
  181|     30|    UniqueLock(MutexType& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)
  182|     30|    {
  183|     30|        if (fTry)
  ------------------
  |  Branch (183:13): [True: 0, False: 30]
  ------------------
  184|      0|            TryEnter(pszName, pszFile, nLine);
  185|     30|        else
  186|     30|            Enter(pszName, pszFile, nLine);
  187|     30|    }
_Z13EnterCriticalINSt3__15mutexEEvPKcS3_iPT_b:
   67|     30|inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, MutexType* cs, bool fTry = false) {}
_Z13LeaveCriticalv:
   68|     30|inline void LeaveCritical() {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEE5EnterEPKcS6_i:
  159|     30|    {
  160|     30|        EnterCritical(pszName, pszFile, nLine, Base::mutex());
  161|       |#ifdef DEBUG_LOCKCONTENTION
  162|       |        if (!Base::try_lock()) {
  163|       |            ContendedLock(pszName, pszFile, nLine, static_cast<Base&>(*this));
  164|       |        }
  165|       |#else
  166|     30|        Base::lock();
  167|     30|#endif
  168|     30|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__15mutexEEED2Ev:
  201|     30|    {
  202|     30|        if (Base::owns_lock())
  ------------------
  |  Branch (202:13): [True: 30, False: 0]
  ------------------
  203|     30|            LeaveCritical();
  204|     30|    }

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

_Z26parse_univalue_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
   20|  11.9k|{
   21|  11.9k|    const std::string random_string(buffer.begin(), buffer.end());
   22|  11.9k|    bool valid = true;
   23|  11.9k|    const UniValue univalue = [&] {
   24|  11.9k|        UniValue uv;
   25|  11.9k|        if (!uv.read(random_string)) valid = false;
   26|  11.9k|        return valid ? uv : UniValue{};
   27|  11.9k|    }();
   28|  11.9k|    if (!valid) {
  ------------------
  |  Branch (28:9): [True: 1.16k, False: 10.7k]
  ------------------
   29|  1.16k|        return;
   30|  1.16k|    }
   31|  10.7k|    try {
   32|  10.7k|        (void)ParseHashO(univalue, "A");
   33|  10.7k|    } catch (const UniValue&) {
   34|  10.7k|    } catch (const std::runtime_error&) {
   35|  10.7k|    }
   36|  10.7k|    try {
   37|  10.7k|        (void)ParseHashO(univalue, random_string);
   38|  10.7k|    } catch (const UniValue&) {
   39|  10.7k|    } catch (const std::runtime_error&) {
   40|  10.7k|    }
   41|  10.7k|    try {
   42|  10.7k|        (void)ParseHashV(univalue, "A");
   43|  10.7k|    } catch (const UniValue&) {
   44|  9.35k|    } catch (const std::runtime_error&) {
   45|  1.43k|    }
   46|  10.7k|    try {
   47|  10.7k|        (void)ParseHashV(univalue, random_string);
   48|  10.7k|    } catch (const UniValue&) {
   49|  9.35k|    } catch (const std::runtime_error&) {
   50|  1.43k|    }
   51|  10.7k|    try {
   52|  10.7k|        (void)ParseHexO(univalue, "A");
   53|  10.7k|    } catch (const UniValue&) {
   54|  10.7k|    }
   55|  10.7k|    try {
   56|  10.7k|        (void)ParseHexO(univalue, random_string);
   57|  10.7k|    } catch (const UniValue&) {
   58|  10.7k|    }
   59|  10.7k|    try {
   60|  10.7k|        (void)ParseHexV(univalue, "A");
   61|  10.7k|    } catch (const UniValue&) {
   62|  10.7k|    } catch (const std::runtime_error&) {
   63|      0|    }
   64|  10.7k|    try {
   65|  10.7k|        (void)ParseHexV(univalue, random_string);
   66|  10.7k|    } catch (const UniValue&) {
   67|  10.7k|    } catch (const std::runtime_error&) {
   68|      0|    }
   69|  10.7k|    try {
   70|  10.7k|        if (univalue.isNull() || univalue.isStr()) (void)ParseSighashString(univalue);
  ------------------
  |  Branch (70:13): [True: 1, False: 10.7k]
  |  Branch (70:34): [True: 9.35k, False: 1.43k]
  ------------------
   71|  10.7k|    } catch (const UniValue&) {
   72|  9.35k|    }
   73|  10.7k|    try {
   74|  10.7k|        (void)AmountFromValue(univalue);
   75|  10.7k|    } catch (const UniValue&) {
   76|  10.5k|    } catch (const std::runtime_error&) {
   77|      0|    }
   78|  10.7k|    try {
   79|  10.7k|        FlatSigningProvider provider;
   80|  10.7k|        if (buffer.size() < 10'000) (void)EvalDescriptorStringOrObject(univalue, provider);
  ------------------
  |  Branch (80:13): [True: 10.6k, False: 132]
  ------------------
   81|  10.7k|    } catch (const UniValue&) {
   82|  7.54k|    } catch (const std::runtime_error&) {
   83|      4|    }
   84|  10.7k|    try {
   85|  10.7k|        (void)ParseConfirmTarget(univalue, std::numeric_limits<unsigned int>::max());
   86|  10.7k|    } catch (const UniValue&) {
   87|  10.5k|    } catch (const std::runtime_error&) {
   88|  10.5k|    }
   89|  10.7k|    try {
   90|  10.7k|        (void)ParseDescriptorRange(univalue);
   91|  10.7k|    } catch (const UniValue&) {
   92|  10.1k|    } catch (const std::runtime_error&) {
   93|    598|    }
   94|  10.7k|}
parse_univalue.cpp:_ZZ26parse_univalue_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEv:
   23|  11.9k|    const UniValue univalue = [&] {
   24|  11.9k|        UniValue uv;
   25|  11.9k|        if (!uv.read(random_string)) valid = false;
  ------------------
  |  Branch (25:13): [True: 1.16k, False: 10.7k]
  ------------------
   26|  11.9k|        return valid ? uv : UniValue{};
  ------------------
  |  Branch (26:16): [True: 10.7k, False: 1.16k]
  ------------------
   27|  11.9k|    }();

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

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

_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjmNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEES9_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  18.7k|{
 1089|  18.7k|    std::ostringstream oss;
 1090|  18.7k|    format(oss, fmt, args...);
 1091|  18.7k|    return oss.str();
 1092|  18.7k|}
_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjmNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  18.7k|{
 1081|  18.7k|    vformat(out, fmt, makeFormatList(args...));
 1082|  18.7k|}
_ZN10tinyformat14makeFormatListIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjmNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  18.7k|{
 1045|  18.7k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  18.7k|}
_ZN10tinyformat6detail11FormatListNILi4EEC2IJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEjmNS4_12basic_stringIcS7_NS4_9allocatorIcEEEEEEEDpRKT_:
  990|  18.7k|            : FormatList(&m_formatterStore[0], N),
  991|  18.7k|            m_formatterStore { FormatArg(args)... }
  992|  18.7k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJcEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     17|{
 1089|     17|    std::ostringstream oss;
 1090|     17|    format(oss, fmt, args...);
 1091|     17|    return oss.str();
 1092|     17|}
_ZN10tinyformat6formatIJcEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     17|{
 1081|     17|    vformat(out, fmt, makeFormatList(args...));
 1082|     17|}
_ZN10tinyformat14makeFormatListIJcEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     17|{
 1045|     17|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     17|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJcEEEDpRKT_:
  990|     17|            : FormatList(&m_formatterStore[0], N),
  991|     17|            m_formatterStore { FormatArg(args)... }
  992|     17|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2IcEERKT_:
  534|     17|            : m_value(static_cast<const void*>(&value)),
  535|     17|            m_formatImpl(&formatImpl<T>),
  536|     17|            m_toIntImpl(&toIntImpl<T>)
  537|     17|        { }
_ZN10tinyformat6detail9FormatArg10formatImplIcEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|     17|        {
  559|     17|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     17|        }
_ZN10tinyformat11formatValueERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcS7_ic:
  385|     17|                        const char* fmtEnd, int /**/, charType value) \
  386|     17|{                                                                     \
  387|     17|    switch (*(fmtEnd-1)) {                                            \
  388|      0|        case 'u': case 'd': case 'i': case 'o': case 'X': case 'x':   \
  ------------------
  |  Branch (388:9): [True: 0, False: 17]
  |  Branch (388:19): [True: 0, False: 17]
  |  Branch (388:29): [True: 0, False: 17]
  |  Branch (388:39): [True: 0, False: 17]
  |  Branch (388:49): [True: 0, False: 17]
  |  Branch (388:59): [True: 0, False: 17]
  ------------------
  389|      0|            out << static_cast<int>(value); break;                    \
  390|     17|        default:                                                      \
  ------------------
  |  Branch (390:9): [True: 17, False: 0]
  ------------------
  391|     17|            out << value;                   break;                    \
  392|     17|    }                                                                 \
  393|     17|}
_ZN10tinyformat6formatIJmiEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|      7|{
 1089|      7|    std::ostringstream oss;
 1090|      7|    format(oss, fmt, args...);
 1091|      7|    return oss.str();
 1092|      7|}
_ZN10tinyformat6formatIJmiEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|      7|{
 1081|      7|    vformat(out, fmt, makeFormatList(args...));
 1082|      7|}
_ZN10tinyformat14makeFormatListIJmiEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|      7|{
 1045|      7|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|      7|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJmiEEEDpRKT_:
  990|      7|            : FormatList(&m_formatterStore[0], N),
  991|      7|            m_formatterStore { FormatArg(args)... }
  992|      7|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJjmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     35|{
 1089|     35|    std::ostringstream oss;
 1090|     35|    format(oss, fmt, args...);
 1091|     35|    return oss.str();
 1092|     35|}
_ZN10tinyformat6formatIJjmEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     35|{
 1081|     35|    vformat(out, fmt, makeFormatList(args...));
 1082|     35|}
_ZN10tinyformat14makeFormatListIJjmEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     35|{
 1045|     35|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     35|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJjmEEEDpRKT_:
  990|     35|            : FormatList(&m_formatterStore[0], N),
  991|     35|            m_formatterStore { FormatArg(args)... }
  992|     35|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     44|{
 1089|     44|    std::ostringstream oss;
 1090|     44|    format(oss, fmt, args...);
 1091|     44|    return oss.str();
 1092|     44|}
_ZN10tinyformat6formatIJEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     44|{
 1081|     44|    vformat(out, fmt, makeFormatList(args...));
 1082|     44|}
_ZN10tinyformat14makeFormatListIJEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     44|{
 1045|     44|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     44|}
_ZN10tinyformat17FormatStringCheckILj0EEcvPKcEv:
  197|     44|    operator const char*() { return fmt; }
_ZN10tinyformat6formatIJjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  10.1k|{
 1089|  10.1k|    std::ostringstream oss;
 1090|  10.1k|    format(oss, fmt, args...);
 1091|  10.1k|    return oss.str();
 1092|  10.1k|}
_ZN10tinyformat6formatIJjEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  10.1k|{
 1081|  10.1k|    vformat(out, fmt, makeFormatList(args...));
 1082|  10.1k|}
_ZN10tinyformat14makeFormatListIJjEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  10.1k|{
 1045|  10.1k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  10.1k|}
_ZN10tinyformat6detail9FormatArg10formatImplIjEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  28.9k|        {
  559|  28.9k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  28.9k|        }
_ZN10tinyformat11formatValueIjEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  28.9k|{
  352|  28.9k|#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|  28.9k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  28.9k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  28.9k|#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|  28.9k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  28.9k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  28.9k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 28.9k, Folded]
  |  Branch (365:29): [True: 0, False: 28.9k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  28.9k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 28.9k]
  |  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|  28.9k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|    else
  378|  28.9k|        out << value;
  379|  28.9k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     10|{
 1089|     10|    std::ostringstream oss;
 1090|     10|    format(oss, fmt, args...);
 1091|     10|    return oss.str();
 1092|     10|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     10|{
 1081|     10|    vformat(out, fmt, makeFormatList(args...));
 1082|     10|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     10|{
 1045|     10|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     10|}
_ZN10tinyformat6formatIJijEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     79|{
 1089|     79|    std::ostringstream oss;
 1090|     79|    format(oss, fmt, args...);
 1091|     79|    return oss.str();
 1092|     79|}
_ZN10tinyformat6formatIJijEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     79|{
 1081|     79|    vformat(out, fmt, makeFormatList(args...));
 1082|     79|}
_ZN10tinyformat14makeFormatListIJijEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     79|{
 1045|     79|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     79|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJijEEEDpRKT_:
  990|     79|            : FormatList(&m_formatterStore[0], N),
  991|     79|            m_formatterStore { FormatArg(args)... }
  992|     79|        { 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"); }
_ZN10tinyformat17FormatStringCheckILj2EEcvPKcEv:
  197|  43.2k|    operator const char*() { return fmt; }
_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEES9_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  43.0k|{
 1089|  43.0k|    std::ostringstream oss;
 1090|  43.0k|    format(oss, fmt, args...);
 1091|  43.0k|    return oss.str();
 1092|  43.0k|}
_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  43.0k|{
 1081|  43.0k|    vformat(out, fmt, makeFormatList(args...));
 1082|  43.0k|}
_ZN10tinyformat14makeFormatListIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  43.0k|{
 1045|  43.0k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  43.0k|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEENS4_12basic_stringIcS7_NS4_9allocatorIcEEEEEEEDpRKT_:
  990|  43.0k|            : FormatList(&m_formatterStore[0], N),
  991|  43.0k|            m_formatterStore { FormatArg(args)... }
  992|  43.0k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSE_iPKv:
  558|  65.3k|        {
  559|  65.3k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  65.3k|        }
_ZN10tinyformat11formatValueINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSC_iRKT_:
  351|  65.3k|{
  352|  65.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|  65.3k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  65.3k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  65.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|  65.3k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  65.3k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  65.3k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 65.3k]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  65.3k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 65.3k]
  |  Branch (367:37): [True: 0, False: 0]
  ------------------
  368|      0|        detail::formatValueAsType<T, const void*>::invoke(out, value);
  369|       |#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
  370|       |    else if (detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
  371|       |#endif
  372|  65.3k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 65.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|  65.3k|    else
  378|  65.3k|        out << value;
  379|  65.3k|}
_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     73|{
 1089|     73|    std::ostringstream oss;
 1090|     73|    format(oss, fmt, args...);
 1091|     73|    return oss.str();
 1092|     73|}
_ZN10tinyformat6formatIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     73|{
 1081|     73|    vformat(out, fmt, makeFormatList(args...));
 1082|     73|}
_ZN10tinyformat14makeFormatListIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     73|{
 1045|     73|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     73|}
_ZN10tinyformat6detail11FormatListNILi1EEC2IJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEDpRKT_:
  990|     73|            : FormatList(&m_formatterStore[0], N),
  991|     73|            m_formatterStore { FormatArg(args)... }
  992|     73|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2INSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEERKT_:
  534|  61.8k|            : m_value(static_cast<const void*>(&value)),
  535|  61.8k|            m_formatImpl(&formatImpl<T>),
  536|  61.8k|            m_toIntImpl(&toIntImpl<T>)
  537|  61.8k|        { }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSC_iPKv:
  558|  61.8k|        {
  559|  61.8k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  61.8k|        }
_ZN10tinyformat11formatValueINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSA_iRKT_:
  351|  61.8k|{
  352|  61.8k|#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|  61.8k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  61.8k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  61.8k|#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|  61.8k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  61.8k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  61.8k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 61.8k]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  61.8k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 61.8k]
  |  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|  61.8k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 61.8k]
  ------------------
  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|  61.8k|    else
  378|  61.8k|        out << value;
  379|  61.8k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|  3.54k|{
 1089|  3.54k|    std::ostringstream oss;
 1090|  3.54k|    format(oss, fmt, args...);
 1091|  3.54k|    return oss.str();
 1092|  3.54k|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|  3.54k|{
 1081|  3.54k|    vformat(out, fmt, makeFormatList(args...));
 1082|  3.54k|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|  3.54k|{
 1045|  3.54k|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|  3.54k|}
_ZN10tinyformat17FormatStringCheckILj1EEcvPKcEv:
  197|  13.8k|    operator const char*() { return fmt; }
_ZN10tinyformat17FormatStringCheckILj4EEcvPKcEv:
  197|  18.7k|    operator const char*() { return fmt; }
_ZNK10tinyformat6detail9FormatArg6formatERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEPKcS9_i:
  541|   175k|        {
  542|   175k|            TINYFORMAT_ASSERT(m_value);
  ------------------
  |  |  153|   175k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (542:13): [True: 175k, False: 0]
  ------------------
  543|   175k|            TINYFORMAT_ASSERT(m_formatImpl);
  ------------------
  |  |  153|   175k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (543:13): [True: 175k, False: 0]
  ------------------
  544|   175k|            m_formatImpl(out, fmtBegin, fmtEnd, ntrunc, m_value);
  545|   175k|        }
_ZN10tinyformat10FormatListC2EPNS_6detail9FormatArgEi:
  966|  75.8k|            : m_args(args), m_N(N) { }
_ZN10tinyformat6detail21parseWidthOrPrecisionERiRPKcbPKNS0_9FormatArgES1_i:
  593|   175k|{
  594|   175k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (594:9): [True: 175k, False: 0]
  |  Branch (594:22): [True: 0, False: 175k]
  ------------------
  595|      0|        n = parseIntAndAdvance(c);
  596|      0|    }
  597|   175k|    else if (*c == '*') {
  ------------------
  |  Branch (597:14): [True: 0, False: 175k]
  ------------------
  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|   175k|    else {
  618|   175k|        return false;
  619|   175k|    }
  620|      0|    return true;
  621|   175k|}
_ZN10tinyformat6detail24printFormatStringLiteralERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKc:
  629|   250k|{
  630|   250k|    const char* c = fmt;
  631|  2.56M|    for (;; ++c) {
  632|  2.56M|        if (*c == '\0') {
  ------------------
  |  Branch (632:13): [True: 75.8k, False: 2.49M]
  ------------------
  633|  75.8k|            out.write(fmt, c - fmt);
  634|  75.8k|            return c;
  635|  75.8k|        }
  636|  2.49M|        else if (*c == '%') {
  ------------------
  |  Branch (636:18): [True: 175k, False: 2.31M]
  ------------------
  637|   175k|            out.write(fmt, c - fmt);
  638|   175k|            if (*(c+1) != '%')
  ------------------
  |  Branch (638:17): [True: 175k, False: 0]
  ------------------
  639|   175k|                return c;
  640|       |            // for "%%", tack trailing % onto next literal section.
  641|      0|            fmt = ++c;
  642|      0|        }
  643|  2.56M|    }
  644|   250k|}
_ZN10tinyformat6detail21streamStateFromFormatERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERbS7_RiPKcPKNS0_9FormatArgES8_i:
  685|   175k|{
  686|   175k|    TINYFORMAT_ASSERT(*fmtStart == '%');
  ------------------
  |  |  153|   175k|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (686:5): [True: 175k, False: 0]
  ------------------
  687|       |    // Reset stream state to defaults.
  688|   175k|    out.width(0);
  689|   175k|    out.precision(6);
  690|   175k|    out.fill(' ');
  691|       |    // Reset most flags; ignore irrelevant unitbuf & skipws.
  692|   175k|    out.unsetf(std::ios::adjustfield | std::ios::basefield |
  693|   175k|               std::ios::floatfield | std::ios::showbase | std::ios::boolalpha |
  694|   175k|               std::ios::showpoint | std::ios::showpos | std::ios::uppercase);
  695|   175k|    bool precisionSet = false;
  696|   175k|    bool widthSet = false;
  697|   175k|    int widthExtra = 0;
  698|   175k|    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|   175k|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (702:9): [True: 175k, False: 0]
  |  Branch (702:22): [True: 0, False: 175k]
  ------------------
  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|   175k|    else if (positionalMode) {
  ------------------
  |  Branch (731:14): [True: 0, False: 175k]
  ------------------
  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|   175k|    if (!widthSet) {
  ------------------
  |  Branch (735:9): [True: 175k, False: 0]
  ------------------
  736|       |        // Parse flags
  737|   175k|        for (;; ++c) {
  738|   175k|            switch (*c) {
  739|      0|                case '#':
  ------------------
  |  Branch (739:17): [True: 0, False: 175k]
  ------------------
  740|      0|                    out.setf(std::ios::showpoint | std::ios::showbase);
  741|      0|                    continue;
  742|      0|                case '0':
  ------------------
  |  Branch (742:17): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  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: 175k]
  ------------------
  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: 175k]
  ------------------
  761|      0|                    out.setf(std::ios::showpos);
  762|      0|                    spacePadPositive = false;
  763|      0|                    widthExtra = 1;
  764|      0|                    continue;
  765|   175k|                default:
  ------------------
  |  Branch (765:17): [True: 175k, False: 0]
  ------------------
  766|   175k|                    break;
  767|   175k|            }
  768|   175k|            break;
  769|   175k|        }
  770|       |        // Parse width
  771|   175k|        int width = 0;
  772|   175k|        widthSet = parseWidthOrPrecision(width, c, positionalMode,
  773|   175k|                                         args, argIndex, numArgs);
  774|   175k|        if (widthSet) {
  ------------------
  |  Branch (774:13): [True: 0, False: 175k]
  ------------------
  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|   175k|    }
  784|       |    // 3) Parse precision
  785|   175k|    if (*c == '.') {
  ------------------
  |  Branch (785:9): [True: 0, False: 175k]
  ------------------
  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|   175k|    while (*c == 'l' || *c == 'h' || *c == 'L' ||
  ------------------
  |  Branch (797:12): [True: 0, False: 175k]
  |  Branch (797:25): [True: 0, False: 175k]
  |  Branch (797:38): [True: 0, False: 175k]
  ------------------
  798|   175k|           *c == 'j' || *c == 'z' || *c == 't') {
  ------------------
  |  Branch (798:12): [True: 0, False: 175k]
  |  Branch (798:25): [True: 0, False: 175k]
  |  Branch (798:38): [True: 0, False: 175k]
  ------------------
  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|   175k|    bool intConversion = false;
  805|   175k|    switch (*c) {
  806|  47.8k|        case 'u': case 'd': case 'i':
  ------------------
  |  Branch (806:9): [True: 349, False: 174k]
  |  Branch (806:19): [True: 37.4k, False: 137k]
  |  Branch (806:29): [True: 10.0k, False: 165k]
  ------------------
  807|  47.8k|            out.setf(std::ios::dec, std::ios::basefield);
  808|  47.8k|            intConversion = true;
  809|  47.8k|            break;
  810|      0|        case 'o':
  ------------------
  |  Branch (810:9): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  815|      0|            out.setf(std::ios::uppercase);
  816|      0|            [[fallthrough]];
  817|      0|        case 'x': case 'p':
  ------------------
  |  Branch (817:9): [True: 0, False: 175k]
  |  Branch (817:19): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  822|      0|            out.setf(std::ios::uppercase);
  823|      0|            [[fallthrough]];
  824|      0|        case 'e':
  ------------------
  |  Branch (824:9): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  829|      0|            out.setf(std::ios::uppercase);
  830|      0|            [[fallthrough]];
  831|      0|        case 'f':
  ------------------
  |  Branch (831:9): [True: 0, False: 175k]
  ------------------
  832|      0|            out.setf(std::ios::fixed, std::ios::floatfield);
  833|      0|            break;
  834|      0|        case 'A':
  ------------------
  |  Branch (834:9): [True: 0, False: 175k]
  ------------------
  835|      0|            out.setf(std::ios::uppercase);
  836|      0|            [[fallthrough]];
  837|      0|        case 'a':
  ------------------
  |  Branch (837:9): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  847|      0|            out.setf(std::ios::uppercase);
  848|      0|            [[fallthrough]];
  849|      0|        case 'g':
  ------------------
  |  Branch (849:9): [True: 0, False: 175k]
  ------------------
  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|     17|        case 'c':
  ------------------
  |  Branch (854:9): [True: 17, False: 175k]
  ------------------
  855|       |            // Handled as special case inside formatValue()
  856|     17|            break;
  857|   127k|        case 's':
  ------------------
  |  Branch (857:9): [True: 127k, False: 47.8k]
  ------------------
  858|   127k|            if (precisionSet)
  ------------------
  |  Branch (858:17): [True: 0, False: 127k]
  ------------------
  859|      0|                ntrunc = static_cast<int>(out.precision());
  860|       |            // Make %s print Booleans as "true" and "false"
  861|   127k|            out.setf(std::ios::boolalpha);
  862|   127k|            break;
  863|      0|        case 'n':
  ------------------
  |  Branch (863:9): [True: 0, False: 175k]
  ------------------
  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: 175k]
  ------------------
  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: 175k]
  ------------------
  872|      0|            break;
  873|   175k|    }
  874|   175k|    if (intConversion && precisionSet && !widthSet) {
  ------------------
  |  Branch (874:9): [True: 47.8k, False: 127k]
  |  Branch (874:26): [True: 0, False: 47.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|   175k|    return c+1;
  884|   175k|}
_ZN10tinyformat6detail10formatImplERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcPKNS0_9FormatArgEi:
  891|  75.8k|{
  892|       |    // Saved stream state
  893|  75.8k|    std::streamsize origWidth = out.width();
  894|  75.8k|    std::streamsize origPrecision = out.precision();
  895|  75.8k|    std::ios::fmtflags origFlags = out.flags();
  896|  75.8k|    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|  75.8k|    bool positionalMode = false;
  901|  75.8k|    int argIndex = 0;
  902|   250k|    while (true) {
  ------------------
  |  Branch (902:12): [True: 250k, Folded]
  ------------------
  903|   250k|        fmt = printFormatStringLiteral(out, fmt);
  904|   250k|        if (*fmt == '\0') {
  ------------------
  |  Branch (904:13): [True: 75.8k, False: 175k]
  ------------------
  905|  75.8k|            if (!positionalMode && argIndex < numArgs) {
  ------------------
  |  Branch (905:17): [True: 75.8k, False: 0]
  |  Branch (905:36): [True: 0, False: 75.8k]
  ------------------
  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|  75.8k|            break;
  909|  75.8k|        }
  910|   175k|        bool spacePadPositive = false;
  911|   175k|        int ntrunc = -1;
  912|   175k|        const char* fmtEnd = streamStateFromFormat(out, positionalMode, spacePadPositive, ntrunc, fmt,
  913|   175k|                                                   args, argIndex, numArgs);
  914|       |        // NB: argIndex may be incremented by reading variable width/precision
  915|       |        // in `streamStateFromFormat`, so do the bounds check here.
  916|   175k|        if (argIndex >= numArgs) {
  ------------------
  |  Branch (916:13): [True: 0, False: 175k]
  ------------------
  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|   175k|        const FormatArg& arg = args[argIndex];
  921|       |        // Format the arg into the stream.
  922|   175k|        if (!spacePadPositive) {
  ------------------
  |  Branch (922:13): [True: 175k, False: 0]
  ------------------
  923|   175k|            arg.format(out, fmt, fmtEnd, ntrunc);
  924|   175k|        }
  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|   175k|        if (!positionalMode)
  ------------------
  |  Branch (941:13): [True: 175k, False: 0]
  ------------------
  942|   175k|            ++argIndex;
  943|   175k|        fmt = fmtEnd;
  944|   175k|    }
  945|       |
  946|       |    // Restore stream state
  947|  75.8k|    out.width(origWidth);
  948|  75.8k|    out.precision(origPrecision);
  949|  75.8k|    out.flags(origFlags);
  950|  75.8k|    out.fill(origFill);
  951|  75.8k|}
_ZN10tinyformat7vformatERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcRKNS_10FormatListE:
 1070|  75.8k|{
 1071|  75.8k|    detail::formatImpl(out, fmt, list.m_args, list.m_N);
 1072|  75.8k|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEDpRKT_:
  990|     10|            : FormatList(&m_formatterStore[0], N),
  991|     10|            m_formatterStore { FormatArg(args)... }
  992|     10|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail11FormatListNILi0EEC2Ev:
 1025|     44|    FormatListN() : FormatList(nullptr, 0) {}
_ZN10tinyformat6detail9FormatArg10formatImplImEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|  18.7k|        {
  559|  18.7k|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|  18.7k|        }
_ZN10tinyformat11formatValueImEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|  18.7k|{
  352|  18.7k|#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|  18.7k|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|  18.7k|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|  18.7k|#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|  18.7k|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|  18.7k|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|  18.7k|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 18.7k, Folded]
  |  Branch (365:29): [True: 0, False: 18.7k]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|  18.7k|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 18.7k]
  |  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|  18.7k|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 18.7k]
  ------------------
  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|  18.7k|    else
  378|  18.7k|        out << value;
  379|  18.7k|}
_ZN10tinyformat6detail9FormatArg10formatImplIiEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|     86|        {
  559|     86|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     86|        }
_ZN10tinyformat11formatValueIiEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|     86|{
  352|     86|#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|     86|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|     86|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|     86|#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|     86|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|     86|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|     86|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 86, Folded]
  |  Branch (365:29): [True: 0, False: 86]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|     86|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 86]
  |  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|     86|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 86]
  ------------------
  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|     86|    else
  378|     86|        out << value;
  379|     86|}
_ZN10tinyformat6formatIJmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     39|{
 1089|     39|    std::ostringstream oss;
 1090|     39|    format(oss, fmt, args...);
 1091|     39|    return oss.str();
 1092|     39|}
_ZN10tinyformat6formatIJmEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     39|{
 1081|     39|    vformat(out, fmt, makeFormatList(args...));
 1082|     39|}
_ZN10tinyformat14makeFormatListIJmEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     39|{
 1045|     39|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     39|}
_ZN10tinyformat6detail9FormatArgC2IiEERKT_:
  534|     86|            : m_value(static_cast<const void*>(&value)),
  535|     86|            m_formatImpl(&formatImpl<T>),
  536|     86|            m_toIntImpl(&toIntImpl<T>)
  537|     86|        { }
_ZN10tinyformat6detail9FormatArgC2INSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEERKT_:
  534|  65.3k|            : m_value(static_cast<const void*>(&value)),
  535|  65.3k|            m_formatImpl(&formatImpl<T>),
  536|  65.3k|            m_toIntImpl(&toIntImpl<T>)
  537|  65.3k|        { }
_ZN10tinyformat6detail9FormatArgC2IjEERKT_:
  534|  28.9k|            : m_value(static_cast<const void*>(&value)),
  535|  28.9k|            m_formatImpl(&formatImpl<T>),
  536|  28.9k|            m_toIntImpl(&toIntImpl<T>)
  537|  28.9k|        { }
_ZN10tinyformat6detail11FormatListNILi1EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEDpRKT_:
  990|  3.54k|            : FormatList(&m_formatterStore[0], N),
  991|  3.54k|            m_formatterStore { FormatArg(args)... }
  992|  3.54k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail11FormatListNILi1EEC2IJjEEEDpRKT_:
  990|  10.1k|            : FormatList(&m_formatterStore[0], N),
  991|  10.1k|            m_formatterStore { FormatArg(args)... }
  992|  10.1k|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail11FormatListNILi1EEC2IJmEEEDpRKT_:
  990|     39|            : FormatList(&m_formatterStore[0], N),
  991|     39|            m_formatterStore { FormatArg(args)... }
  992|     39|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail9FormatArgC2ImEERKT_:
  534|  18.7k|            : m_value(static_cast<const void*>(&value)),
  535|  18.7k|            m_formatImpl(&formatImpl<T>),
  536|  18.7k|            m_toIntImpl(&toIntImpl<T>)
  537|  18.7k|        { }

_ZNK9base_blobILj160EE3endEv:
  105|    142|    constexpr const unsigned char* end() const { return m_data.data() + WIDTH; }
_ZN9base_blobILj160EE3endEv:
  102|    148|    constexpr unsigned char* end() { return m_data.data() + WIDTH; }
_ZN9base_blobILj160EE5beginEv:
  101|    148|    constexpr unsigned char* begin() { return m_data.data(); }
_ZN7uint2567FromHexENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  198|  18.7k|    static std::optional<uint256> FromHex(std::string_view str) { return detail::FromHex<uint256>(str); }
_ZN6detail7FromHexI7uint256EENSt3__18optionalIT_EENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
  144|  18.7k|{
  145|  18.7k|    if (uintN_t::size() * 2 != str.size() || !IsHex(str)) return std::nullopt;
  ------------------
  |  Branch (145:9): [True: 18.7k, False: 14]
  |  Branch (145:46): [True: 9, False: 5]
  ------------------
  146|      5|    uintN_t rv;
  147|      5|    unsigned char* p1 = rv.begin();
  148|      5|    unsigned char* pend = rv.end();
  149|      5|    size_t digits = str.size();
  150|    165|    while (digits > 0 && p1 < pend) {
  ------------------
  |  Branch (150:12): [True: 160, False: 5]
  |  Branch (150:26): [True: 160, False: 0]
  ------------------
  151|    160|        *p1 = ::HexDigit(str[--digits]);
  152|    160|        if (digits > 0) {
  ------------------
  |  Branch (152:13): [True: 160, False: 0]
  ------------------
  153|    160|            *p1 |= ((unsigned char)::HexDigit(str[--digits]) << 4);
  154|    160|            p1++;
  155|    160|        }
  156|    160|    }
  157|      5|    return rv;
  158|  18.7k|}
_ZN9base_blobILj256EE3endEv:
  102|      5|    constexpr unsigned char* end() { return m_data.data() + WIDTH; }
_ZNK9base_blobILj160EEssERKS0_:
   68|  4.67M|    constexpr std::strong_ordering operator<=>(const base_blob& other) const = default;
_ZNK9base_blobILj256EEssERKS0_:
   68|  4.31M|    constexpr std::strong_ordering operator<=>(const base_blob& other) const = default;
_ZNK9base_blobILj256EE5beginEv:
  104|  39.7k|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZNK9base_blobILj256EE3endEv:
  105|  36.1k|    constexpr const unsigned char* end() const { return m_data.data() + WIDTH; }
_ZNK9base_blobILj160EE5beginEv:
  104|   152k|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZN7uint256C2ENSt3__14spanIKhLm18446744073709551615EEE:
  203|  36.8k|    constexpr explicit uint256(std::span<const unsigned char> vch) : base_blob<256>(vch) {}
_ZN9base_blobILj256EEC2ENSt3__14spanIKhLm18446744073709551615EEE:
   43|  36.8k|    {
   44|  36.8k|        assert(vch.size() == WIDTH);
  ------------------
  |  Branch (44:9): [True: 36.8k, False: 0]
  ------------------
   45|  36.8k|        std::copy(vch.begin(), vch.end(), m_data.begin());
   46|  36.8k|    }
_ZN9base_blobILj256EE4dataEv:
   99|  4.34k|    constexpr unsigned char* data() { return m_data.data(); }
_ZNK9base_blobILj256EE9SerializeI10HashWriterEEvRT_:
  113|  4.00k|    {
  114|  4.00k|        s << std::span(m_data);
  115|  4.00k|    }
_ZN7uint160C2Ev:
  187|   162k|    constexpr uint160() = default;
_ZN9base_blobILj160EEC2Ev:
   37|   162k|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj160EE4dataEv:
   99|   161k|    constexpr unsigned char* data() { return m_data.data(); }
_ZN9base_blobILj160EE4sizeEv:
  107|   161k|    static constexpr unsigned int size() { return WIDTH; }
_ZN7uint256C2Ev:
  200|  21.2k|    constexpr uint256() = default;
_ZN9base_blobILj256EEC2Ev:
   37|  21.6k|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj256EE5beginEv:
  101|  8.05k|    constexpr unsigned char* begin() { return m_data.data(); }
_ZNK9base_blobILj256EE4dataEv:
   98|  2.67k|    constexpr const unsigned char* data() const { return m_data.data(); }
_ZN9base_blobILj256EE4sizeEv:
  107|  40.1k|    static constexpr unsigned int size() { return WIDTH; }

univalue_read.cpp:_ZL12json_isspacei:
  193|  5.90M|{
  194|  5.90M|    switch (ch) {
  195|  9.98k|    case 0x20:
  ------------------
  |  Branch (195:5): [True: 9.98k, False: 5.89M]
  ------------------
  196|  10.1k|    case 0x09:
  ------------------
  |  Branch (196:5): [True: 174, False: 5.90M]
  ------------------
  197|  10.1k|    case 0x0a:
  ------------------
  |  Branch (197:5): [True: 24, False: 5.90M]
  ------------------
  198|  10.7k|    case 0x0d:
  ------------------
  |  Branch (198:5): [True: 563, False: 5.89M]
  ------------------
  199|  10.7k|        return true;
  200|       |
  201|  5.88M|    default:
  ------------------
  |  Branch (201:5): [True: 5.88M, False: 10.7k]
  ------------------
  202|  5.88M|        return false;
  203|  5.90M|    }
  204|       |
  205|       |    // not reached
  206|  5.90M|}
univalue_read.cpp:_ZL16jsonTokenIsValue10jtokentype:
  176|  5.78M|{
  177|  5.78M|    switch (jtt) {
  178|    326|    case JTOK_KW_NULL:
  ------------------
  |  Branch (178:5): [True: 326, False: 5.78M]
  ------------------
  179|    934|    case JTOK_KW_TRUE:
  ------------------
  |  Branch (179:5): [True: 608, False: 5.78M]
  ------------------
  180|  1.37k|    case JTOK_KW_FALSE:
  ------------------
  |  Branch (180:5): [True: 436, False: 5.78M]
  ------------------
  181|  2.06M|    case JTOK_NUMBER:
  ------------------
  |  Branch (181:5): [True: 2.06M, False: 3.72M]
  ------------------
  182|  2.88M|    case JTOK_STRING:
  ------------------
  |  Branch (182:5): [True: 822k, False: 4.96M]
  ------------------
  183|  2.88M|        return true;
  184|       |
  185|  2.90M|    default:
  ------------------
  |  Branch (185:5): [True: 2.90M, False: 2.88M]
  ------------------
  186|  2.90M|        return false;
  187|  5.78M|    }
  188|       |
  189|       |    // not reached
  190|  5.78M|}
_ZNK8UniValue7getTypeEv:
   67|  2.88M|    enum VType getType() const { return typ; }
_ZNK8UniValue9getValStrEv:
   68|  66.5k|    const std::string& getValStr() const { return val; }
_ZNK8UniValue6getIntIlEET_v:
  144|  1.34k|{
  145|  1.34k|    static_assert(std::is_integral_v<Int>);
  146|  1.34k|    checkType(VNUM);
  147|  1.34k|    Int result;
  148|  1.34k|    const auto [first_nonmatching, error_condition] = std::from_chars(val.data(), val.data() + val.size(), result);
  149|  1.34k|    if (first_nonmatching != val.data() + val.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (149:9): [True: 486, False: 862]
  |  Branch (149:57): [True: 112, False: 750]
  ------------------
  150|    598|        throw std::runtime_error("JSON integer out of range");
  151|    598|    }
  152|    750|    return result;
  153|  1.34k|}
_ZNK8UniValue5isStrEv:
   85|  74.2k|    bool isStr() const { return (typ == VSTR); }
_ZN8UniValueC2IRiiTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_:
   40|  99.4k|    {
   41|       |        if constexpr (std::is_floating_point_v<T>) {
   42|       |            setFloat(val);
   43|       |        } else if constexpr (std::is_same_v<bool, T>) {
   44|       |            setBool(val);
   45|  99.4k|        } else if constexpr (std::is_signed_v<T>) {
   46|  99.4k|            setInt(int64_t{val});
   47|       |        } else if constexpr (std::is_unsigned_v<T>) {
   48|       |            setInt(uint64_t{val});
   49|       |        } else {
   50|       |            setStr(std::string{std::forward<Ref>(val)});
   51|       |        }
   52|  99.4k|    }
_ZN8UniValueC2Ev:
   31|  26.4k|    UniValue() { typ = VNULL; }
_ZNK8UniValue5isNumEv:
   86|  21.8k|    bool isNum() const { return (typ == VNUM); }
_ZNK8UniValue6getIntIiEET_v:
  144|  10.7k|{
  145|  10.7k|    static_assert(std::is_integral_v<Int>);
  146|  10.7k|    checkType(VNUM);
  147|  10.7k|    Int result;
  148|  10.7k|    const auto [first_nonmatching, error_condition] = std::from_chars(val.data(), val.data() + val.size(), result);
  149|  10.7k|    if (first_nonmatching != val.data() + val.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (149:9): [True: 10.1k, False: 622]
  |  Branch (149:57): [True: 393, False: 229]
  ------------------
  150|    878|        throw std::runtime_error("JSON integer out of range");
  151|    878|    }
  152|  9.91k|    return result;
  153|  10.7k|}
_ZNK8UniValue8isObjectEv:
   88|  1.37k|    bool isObject() const { return (typ == VOBJ); }
_ZNK8UniValue7isArrayEv:
   87|  9.68k|    bool isArray() const { return (typ == VARR); }
_ZN8UniValueC2IRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSB_Esr3stdE11is_signed_vISB_Esr3stdE13is_unsigned_vISB_Esr3stdE18is_constructible_vIS7_SB_EEbE4typeELb1EEEOT_:
   40|  99.4k|    {
   41|       |        if constexpr (std::is_floating_point_v<T>) {
   42|       |            setFloat(val);
   43|       |        } else if constexpr (std::is_same_v<bool, T>) {
   44|       |            setBool(val);
   45|       |        } else if constexpr (std::is_signed_v<T>) {
   46|       |            setInt(int64_t{val});
   47|       |        } else if constexpr (std::is_unsigned_v<T>) {
   48|       |            setInt(uint64_t{val});
   49|  99.4k|        } else {
   50|  99.4k|            setStr(std::string{std::forward<Ref>(val)});
   51|  99.4k|        }
   52|  99.4k|    }
_ZNK8UniValue4sizeEv:
   71|    208|    size_t size() const { return values.size(); }
_ZNK8UniValue6isNullEv:
   81|  20.2k|    bool isNull() const { return (typ == VNULL); }
_ZN8UniValueC2ENS_5VTypeENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   32|  2.19M|    UniValue(UniValue::VType type, std::string str = {}) : typ{type}, val{std::move(str)} {}

_ZN20JSONUTF8StringFilterC2ERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   17|   822k|        : str(s)
   18|   822k|    {
   19|   822k|    }
_ZN20JSONUTF8StringFilter9push_backEh:
   22|  28.8M|    {
   23|  28.8M|        if (state == 0) {
  ------------------
  |  Branch (23:13): [True: 28.7M, False: 82.0k]
  ------------------
   24|  28.7M|            if (ch < 0x80) // 7-bit ASCII, fast direct pass-through
  ------------------
  |  Branch (24:17): [True: 28.7M, False: 48.7k]
  ------------------
   25|  28.7M|                str.push_back(ch);
   26|  48.7k|            else if (ch < 0xc0) // Mid-sequence character, invalid in this state
  ------------------
  |  Branch (26:22): [True: 221, False: 48.5k]
  ------------------
   27|    221|                is_valid = false;
   28|  48.5k|            else if (ch < 0xe0) { // Start of 2-byte sequence
  ------------------
  |  Branch (28:22): [True: 30.4k, False: 18.1k]
  ------------------
   29|  30.4k|                codepoint = (ch & 0x1f) << 6;
   30|  30.4k|                state = 6;
   31|  30.4k|            } else if (ch < 0xf0) { // Start of 3-byte sequence
  ------------------
  |  Branch (31:24): [True: 1.99k, False: 16.1k]
  ------------------
   32|  1.99k|                codepoint = (ch & 0x0f) << 12;
   33|  1.99k|                state = 12;
   34|  16.1k|            } else if (ch < 0xf8) { // Start of 4-byte sequence
  ------------------
  |  Branch (34:24): [True: 15.9k, False: 243]
  ------------------
   35|  15.9k|                codepoint = (ch & 0x07) << 18;
   36|  15.9k|                state = 18;
   37|  15.9k|            } else // Reserved, invalid
   38|    243|                is_valid = false;
   39|  28.7M|        } else {
   40|  82.0k|            if ((ch & 0xc0) != 0x80) // Not a continuation, invalid
  ------------------
  |  Branch (40:17): [True: 6.10k, False: 75.9k]
  ------------------
   41|  6.10k|                is_valid = false;
   42|  82.0k|            state -= 6;
   43|  82.0k|            codepoint |= (ch & 0x3f) << state;
   44|  82.0k|            if (state == 0)
  ------------------
  |  Branch (44:17): [True: 48.2k, False: 33.7k]
  ------------------
   45|  48.2k|                push_back_u(codepoint);
   46|  82.0k|        }
   47|  28.8M|    }
_ZN20JSONUTF8StringFilter11push_back_uEj:
   50|  50.5k|    {
   51|  50.5k|        if (state) // Only accept full codepoints in open state
  ------------------
  |  Branch (51:13): [True: 559, False: 49.9k]
  ------------------
   52|    559|            is_valid = false;
   53|  50.5k|        if (codepoint_ >= 0xD800 && codepoint_ < 0xDC00) { // First half of surrogate pair
  ------------------
  |  Branch (53:13): [True: 18.9k, False: 31.5k]
  |  Branch (53:37): [True: 1.28k, False: 17.6k]
  ------------------
   54|  1.28k|            if (surpair) // Two subsequent surrogate pair openers - fail
  ------------------
  |  Branch (54:17): [True: 501, False: 785]
  ------------------
   55|    501|                is_valid = false;
   56|    785|            else
   57|    785|                surpair = codepoint_;
   58|  49.2k|        } else if (codepoint_ >= 0xDC00 && codepoint_ < 0xE000) { // Second half of surrogate pair
  ------------------
  |  Branch (58:20): [True: 17.6k, False: 31.5k]
  |  Branch (58:44): [True: 1.31k, False: 16.3k]
  ------------------
   59|  1.31k|            if (surpair) { // Open surrogate pair, expect second half
  ------------------
  |  Branch (59:17): [True: 673, False: 641]
  ------------------
   60|       |                // Compute code point from UTF-16 surrogate pair
   61|    673|                append_codepoint(0x10000 | ((surpair - 0xD800)<<10) | (codepoint_ - 0xDC00));
   62|    673|                surpair = 0;
   63|    673|            } else // Second half doesn't follow a first half - fail
   64|    641|                is_valid = false;
   65|  47.9k|        } else {
   66|  47.9k|            if (surpair) // First half of surrogate pair not followed by second - fail
  ------------------
  |  Branch (66:17): [True: 592, False: 47.3k]
  ------------------
   67|    592|                is_valid = false;
   68|  47.3k|            else
   69|  47.3k|                append_codepoint(codepoint_);
   70|  47.9k|        }
   71|  50.5k|    }
_ZN20JSONUTF8StringFilter16append_codepointEj:
  100|  48.0k|    {
  101|  48.0k|        if (codepoint_ <= 0x7f)
  ------------------
  |  Branch (101:13): [True: 612, False: 47.4k]
  ------------------
  102|    612|            str.push_back((char)codepoint_);
  103|  47.4k|        else if (codepoint_ <= 0x7FF) {
  ------------------
  |  Branch (103:18): [True: 29.7k, False: 17.6k]
  ------------------
  104|  29.7k|            str.push_back((char)(0xC0 | (codepoint_ >> 6)));
  105|  29.7k|            str.push_back((char)(0x80 | (codepoint_ & 0x3F)));
  106|  29.7k|        } else if (codepoint_ <= 0xFFFF) {
  ------------------
  |  Branch (106:20): [True: 1.06k, False: 16.5k]
  ------------------
  107|  1.06k|            str.push_back((char)(0xE0 | (codepoint_ >> 12)));
  108|  1.06k|            str.push_back((char)(0x80 | ((codepoint_ >> 6) & 0x3F)));
  109|  1.06k|            str.push_back((char)(0x80 | (codepoint_ & 0x3F)));
  110|  16.5k|        } else if (codepoint_ <= 0x1FFFFF) {
  ------------------
  |  Branch (110:20): [True: 16.5k, False: 0]
  ------------------
  111|  16.5k|            str.push_back((char)(0xF0 | (codepoint_ >> 18)));
  112|  16.5k|            str.push_back((char)(0x80 | ((codepoint_ >> 12) & 0x3F)));
  113|  16.5k|            str.push_back((char)(0x80 | ((codepoint_ >> 6) & 0x3F)));
  114|  16.5k|            str.push_back((char)(0x80 | (codepoint_ & 0x3F)));
  115|  16.5k|        }
  116|  48.0k|    }
_ZN20JSONUTF8StringFilter8finalizeEv:
   75|   822k|    {
   76|   822k|        if (state || surpair)
  ------------------
  |  Branch (76:13): [True: 1, False: 822k]
  |  Branch (76:22): [True: 14, False: 822k]
  ------------------
   77|     15|            is_valid = false;
   78|   822k|        return is_valid;
   79|   822k|    }

_ZN8UniValue5clearEv:
   18|   213k|{
   19|   213k|    typ = VNULL;
   20|   213k|    val.clear();
   21|   213k|    keys.clear();
   22|   213k|    values.clear();
   23|   213k|}
_ZN8UniValue7setNullEv:
   26|  1.16k|{
   27|  1.16k|    clear();
   28|  1.16k|}
_ZN8UniValue7setBoolEb:
   31|  1.04k|{
   32|  1.04k|    clear();
   33|  1.04k|    typ = VBOOL;
   34|  1.04k|    if (val_)
  ------------------
  |  Branch (34:9): [True: 606, False: 435]
  ------------------
   35|    606|        val = "1";
   36|  1.04k|}
_ZN8UniValue9setNumStrENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   47|  99.4k|{
   48|  99.4k|    if (!validNumStr(str)) {
  ------------------
  |  Branch (48:9): [True: 0, False: 99.4k]
  ------------------
   49|      0|        throw std::runtime_error{"The string '" + str + "' is not a valid JSON number"};
   50|      0|    }
   51|       |
   52|  99.4k|    clear();
   53|  99.4k|    typ = VNUM;
   54|  99.4k|    val = std::move(str);
   55|  99.4k|}
_ZN8UniValue6setIntEl:
   67|  99.4k|{
   68|  99.4k|    std::ostringstream oss;
   69|       |
   70|  99.4k|    oss << val_;
   71|       |
   72|  99.4k|    return setNumStr(oss.str());
   73|  99.4k|}
_ZN8UniValue6setStrENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   85|  99.4k|{
   86|  99.4k|    clear();
   87|  99.4k|    typ = VSTR;
   88|  99.4k|    val = std::move(str);
   89|  99.4k|}
_ZN8UniValue8setArrayEv:
   92|    579|{
   93|    579|    clear();
   94|    579|    typ = VARR;
   95|    579|}
_ZN8UniValue9setObjectEv:
   98|    215|{
   99|    215|    clear();
  100|    215|    typ = VOBJ;
  101|    215|}
_ZN8UniValue9pushKVEndENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES_:
  118|   198k|{
  119|   198k|    checkType(VOBJ);
  120|       |
  121|   198k|    keys.push_back(std::move(key));
  122|   198k|    values.push_back(std::move(val));
  123|   198k|}
_ZN8UniValue6pushKVENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES_:
  126|   198k|{
  127|   198k|    checkType(VOBJ);
  128|       |
  129|   198k|    size_t idx;
  130|   198k|    if (findKey(key, idx))
  ------------------
  |  Branch (130:9): [True: 0, False: 198k]
  ------------------
  131|      0|        values[idx] = std::move(val);
  132|   198k|    else
  133|   198k|        pushKVEnd(std::move(key), std::move(val));
  134|   198k|}
_ZNK8UniValue7findKeyERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERm:
  156|   198k|{
  157|   298k|    for (size_t i = 0; i < keys.size(); i++) {
  ------------------
  |  Branch (157:24): [True: 99.4k, False: 198k]
  ------------------
  158|  99.4k|        if (keys[i] == key) {
  ------------------
  |  Branch (158:13): [True: 0, False: 99.4k]
  ------------------
  159|      0|            retIdx = i;
  160|      0|            return true;
  161|      0|        }
  162|  99.4k|    }
  163|       |
  164|   198k|    return false;
  165|   198k|}
_ZNK8UniValueixEm:
  200|    495|{
  201|    495|    if (typ != VOBJ && typ != VARR)
  ------------------
  |  Branch (201:9): [True: 495, False: 0]
  |  Branch (201:24): [True: 0, False: 495]
  ------------------
  202|      0|        return NullUniValue;
  203|    495|    if (index >= values.size())
  ------------------
  |  Branch (203:9): [True: 0, False: 495]
  ------------------
  204|      0|        return NullUniValue;
  205|       |
  206|    495|    return values.at(index);
  207|    495|}
_ZNK8UniValue9checkTypeERKNS_5VTypeE:
  210|   490k|{
  211|   490k|    if (typ != expected) {
  ------------------
  |  Branch (211:9): [True: 34.1k, False: 456k]
  ------------------
  212|  34.1k|        throw type_error{"JSON value of type " + std::string{uvTypeName(typ)} + " is not of expected type " +
  213|  34.1k|                                 std::string{uvTypeName(expected)}};
  214|  34.1k|    }
  215|   490k|}
_Z10uvTypeNameN8UniValue5VTypeE:
  218|  68.2k|{
  219|  68.2k|    switch (t) {
  ------------------
  |  Branch (219:13): [True: 68.2k, False: 0]
  ------------------
  220|  21.5k|    case UniValue::VNULL: return "null";
  ------------------
  |  Branch (220:5): [True: 21.5k, False: 46.7k]
  ------------------
  221|      6|    case UniValue::VBOOL: return "bool";
  ------------------
  |  Branch (221:5): [True: 6, False: 68.2k]
  ------------------
  222|    353|    case UniValue::VOBJ: return "object";
  ------------------
  |  Branch (222:5): [True: 353, False: 67.9k]
  ------------------
  223|    624|    case UniValue::VARR: return "array";
  ------------------
  |  Branch (223:5): [True: 624, False: 67.6k]
  ------------------
  224|  33.8k|    case UniValue::VSTR: return "string";
  ------------------
  |  Branch (224:5): [True: 33.8k, False: 34.4k]
  ------------------
  225|  11.9k|    case UniValue::VNUM: return "number";
  ------------------
  |  Branch (225:5): [True: 11.9k, False: 56.3k]
  ------------------
  226|  68.2k|    }
  227|       |
  228|       |    // not reached
  229|      0|    return nullptr;
  230|  68.2k|}
_ZNK8UniValue10find_valueENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  233|  43.2k|{
  234|  1.25M|    for (unsigned int i = 0; i < keys.size(); ++i) {
  ------------------
  |  Branch (234:30): [True: 1.21M, False: 43.1k]
  ------------------
  235|  1.21M|        if (keys[i] == key) {
  ------------------
  |  Branch (235:13): [True: 90, False: 1.21M]
  ------------------
  236|     90|            return values.at(i);
  237|     90|        }
  238|  1.21M|    }
  239|  43.1k|    return NullUniValue;
  240|  43.2k|}
univalue.cpp:_ZL11validNumStrRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   39|  99.4k|{
   40|  99.4k|    std::string tokenVal;
   41|  99.4k|    unsigned int consumed;
   42|  99.4k|    enum jtokentype tt = getJsonToken(tokenVal, consumed, s.data(), s.data() + s.size());
   43|  99.4k|    return (tt == JTOK_NUMBER);
   44|  99.4k|}

_ZNK8UniValue7get_strEv:
   66|  80.5k|{
   67|  80.5k|    checkType(VSTR);
   68|  80.5k|    return getValStr();
   69|  80.5k|}

_Z12getJsonTokenRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERjPKcS9_:
   58|  5.90M|{
   59|  5.90M|    tokenVal.clear();
   60|  5.90M|    consumed = 0;
   61|       |
   62|  5.90M|    const char *rawStart = raw;
   63|       |
   64|  5.91M|    while (raw < end && (json_isspace(*raw)))          // skip whitespace
  ------------------
  |  Branch (64:12): [True: 5.90M, False: 11.1k]
  |  Branch (64:25): [True: 10.7k, False: 5.88M]
  ------------------
   65|  10.7k|        raw++;
   66|       |
   67|  5.90M|    if (raw >= end)
  ------------------
  |  Branch (67:9): [True: 11.1k, False: 5.88M]
  ------------------
   68|  11.1k|        return JTOK_NONE;
   69|       |
   70|  5.88M|    switch (*raw) {
   71|       |
   72|  3.36k|    case '{':
  ------------------
  |  Branch (72:5): [True: 3.36k, False: 5.88M]
  ------------------
   73|  3.36k|        raw++;
   74|  3.36k|        consumed = (raw - rawStart);
   75|  3.36k|        return JTOK_OBJ_OPEN;
   76|  2.21k|    case '}':
  ------------------
  |  Branch (76:5): [True: 2.21k, False: 5.88M]
  ------------------
   77|  2.21k|        raw++;
   78|  2.21k|        consumed = (raw - rawStart);
   79|  2.21k|        return JTOK_OBJ_CLOSE;
   80|  14.1k|    case '[':
  ------------------
  |  Branch (80:5): [True: 14.1k, False: 5.87M]
  ------------------
   81|  14.1k|        raw++;
   82|  14.1k|        consumed = (raw - rawStart);
   83|  14.1k|        return JTOK_ARR_OPEN;
   84|  4.71k|    case ']':
  ------------------
  |  Branch (84:5): [True: 4.71k, False: 5.88M]
  ------------------
   85|  4.71k|        raw++;
   86|  4.71k|        consumed = (raw - rawStart);
   87|  4.71k|        return JTOK_ARR_CLOSE;
   88|       |
   89|   809k|    case ':':
  ------------------
  |  Branch (89:5): [True: 809k, False: 5.08M]
  ------------------
   90|   809k|        raw++;
   91|   809k|        consumed = (raw - rawStart);
   92|   809k|        return JTOK_COLON;
   93|  2.06M|    case ',':
  ------------------
  |  Branch (93:5): [True: 2.06M, False: 3.82M]
  ------------------
   94|  2.06M|        raw++;
   95|  2.06M|        consumed = (raw - rawStart);
   96|  2.06M|        return JTOK_COMMA;
   97|       |
   98|    359|    case 'n':
  ------------------
  |  Branch (98:5): [True: 359, False: 5.88M]
  ------------------
   99|  1.00k|    case 't':
  ------------------
  |  Branch (99:5): [True: 642, False: 5.88M]
  ------------------
  100|  1.47k|    case 'f':
  ------------------
  |  Branch (100:5): [True: 471, False: 5.88M]
  ------------------
  101|  1.47k|        if (!strncmp(raw, "null", 4)) {
  ------------------
  |  Branch (101:13): [True: 327, False: 1.14k]
  ------------------
  102|    327|            raw += 4;
  103|    327|            consumed = (raw - rawStart);
  104|    327|            return JTOK_KW_NULL;
  105|  1.14k|        } else if (!strncmp(raw, "true", 4)) {
  ------------------
  |  Branch (105:20): [True: 609, False: 536]
  ------------------
  106|    609|            raw += 4;
  107|    609|            consumed = (raw - rawStart);
  108|    609|            return JTOK_KW_TRUE;
  109|    609|        } else if (!strncmp(raw, "false", 5)) {
  ------------------
  |  Branch (109:20): [True: 437, False: 99]
  ------------------
  110|    437|            raw += 5;
  111|    437|            consumed = (raw - rawStart);
  112|    437|            return JTOK_KW_FALSE;
  113|    437|        } else
  114|     99|            return JTOK_ERR;
  115|       |
  116|   111k|    case '-':
  ------------------
  |  Branch (116:5): [True: 111k, False: 5.77M]
  ------------------
  117|   293k|    case '0':
  ------------------
  |  Branch (117:5): [True: 181k, False: 5.70M]
  ------------------
  118|   324k|    case '1':
  ------------------
  |  Branch (118:5): [True: 31.3k, False: 5.85M]
  ------------------
  119|   381k|    case '2':
  ------------------
  |  Branch (119:5): [True: 57.0k, False: 5.83M]
  ------------------
  120|   567k|    case '3':
  ------------------
  |  Branch (120:5): [True: 185k, False: 5.70M]
  ------------------
  121|   661k|    case '4':
  ------------------
  |  Branch (121:5): [True: 94.1k, False: 5.79M]
  ------------------
  122|   686k|    case '5':
  ------------------
  |  Branch (122:5): [True: 25.2k, False: 5.86M]
  ------------------
  123|  1.57M|    case '6':
  ------------------
  |  Branch (123:5): [True: 883k, False: 5.00M]
  ------------------
  124|  1.69M|    case '7':
  ------------------
  |  Branch (124:5): [True: 124k, False: 5.76M]
  ------------------
  125|  1.98M|    case '8':
  ------------------
  |  Branch (125:5): [True: 289k, False: 5.59M]
  ------------------
  126|  2.16M|    case '9': {
  ------------------
  |  Branch (126:5): [True: 178k, False: 5.71M]
  ------------------
  127|       |        // part 1: int
  128|  2.16M|        std::string numStr;
  129|       |
  130|  2.16M|        const char *first = raw;
  131|       |
  132|  2.16M|        const char *firstDigit = first;
  133|  2.16M|        if (!json_isdigit(*firstDigit))
  ------------------
  |  Branch (133:13): [True: 111k, False: 2.05M]
  ------------------
  134|   111k|            firstDigit++;
  135|  2.16M|        if ((*firstDigit == '0') && json_isdigit(firstDigit[1]))
  ------------------
  |  Branch (135:13): [True: 181k, False: 1.98M]
  |  Branch (135:37): [True: 4, False: 181k]
  ------------------
  136|      4|            return JTOK_ERR;
  137|       |
  138|  2.16M|        numStr += *raw;                       // copy first char
  139|  2.16M|        raw++;
  140|       |
  141|  2.16M|        if ((*first == '-') && (raw < end) && (!json_isdigit(*raw)))
  ------------------
  |  Branch (141:13): [True: 111k, False: 2.05M]
  |  Branch (141:32): [True: 111k, False: 8]
  |  Branch (141:47): [True: 14, False: 111k]
  ------------------
  142|     14|            return JTOK_ERR;
  143|       |
  144|  7.29M|        while (raw < end && json_isdigit(*raw)) {  // copy digits
  ------------------
  |  Branch (144:16): [True: 7.19M, False: 100k]
  |  Branch (144:29): [True: 5.12M, False: 2.06M]
  ------------------
  145|  5.12M|            numStr += *raw;
  146|  5.12M|            raw++;
  147|  5.12M|        }
  148|       |
  149|       |        // part 2: frac
  150|  2.16M|        if (raw < end && *raw == '.') {
  ------------------
  |  Branch (150:13): [True: 2.06M, False: 100k]
  |  Branch (150:26): [True: 1.45k, False: 2.06M]
  ------------------
  151|  1.45k|            numStr += *raw;                   // copy .
  152|  1.45k|            raw++;
  153|       |
  154|  1.45k|            if (raw >= end || !json_isdigit(*raw))
  ------------------
  |  Branch (154:17): [True: 4, False: 1.45k]
  |  Branch (154:31): [True: 11, False: 1.44k]
  ------------------
  155|     15|                return JTOK_ERR;
  156|  7.25M|            while (raw < end && json_isdigit(*raw)) { // copy digits
  ------------------
  |  Branch (156:20): [True: 7.25M, False: 198]
  |  Branch (156:33): [True: 7.25M, False: 1.24k]
  ------------------
  157|  7.25M|                numStr += *raw;
  158|  7.25M|                raw++;
  159|  7.25M|            }
  160|  1.44k|        }
  161|       |
  162|       |        // part 3: exp
  163|  2.16M|        if (raw < end && (*raw == 'e' || *raw == 'E')) {
  ------------------
  |  Branch (163:13): [True: 2.06M, False: 100k]
  |  Branch (163:27): [True: 1.15k, False: 2.06M]
  |  Branch (163:42): [True: 894, False: 2.06M]
  ------------------
  164|  2.05k|            numStr += *raw;                   // copy E
  165|  2.05k|            raw++;
  166|       |
  167|  2.05k|            if (raw < end && (*raw == '-' || *raw == '+')) { // copy +/-
  ------------------
  |  Branch (167:17): [True: 2.03k, False: 14]
  |  Branch (167:31): [True: 480, False: 1.55k]
  |  Branch (167:46): [True: 285, False: 1.27k]
  ------------------
  168|    765|                numStr += *raw;
  169|    765|                raw++;
  170|    765|            }
  171|       |
  172|  2.05k|            if (raw >= end || !json_isdigit(*raw))
  ------------------
  |  Branch (172:17): [True: 26, False: 2.02k]
  |  Branch (172:31): [True: 13, False: 2.01k]
  ------------------
  173|     39|                return JTOK_ERR;
  174|   856k|            while (raw < end && json_isdigit(*raw)) { // copy digits
  ------------------
  |  Branch (174:20): [True: 856k, False: 296]
  |  Branch (174:33): [True: 854k, False: 1.71k]
  ------------------
  175|   854k|                numStr += *raw;
  176|   854k|                raw++;
  177|   854k|            }
  178|  2.01k|        }
  179|       |
  180|  2.16M|        tokenVal = numStr;
  181|  2.16M|        consumed = (raw - rawStart);
  182|  2.16M|        return JTOK_NUMBER;
  183|  2.16M|        }
  184|       |
  185|   822k|    case '"': {
  ------------------
  |  Branch (185:5): [True: 822k, False: 5.06M]
  ------------------
  186|   822k|        raw++;                                // skip "
  187|       |
  188|   822k|        std::string valStr;
  189|   822k|        JSONUTF8StringFilter writer(valStr);
  190|       |
  191|  29.6M|        while (true) {
  ------------------
  |  Branch (191:16): [True: 29.6M, Folded]
  ------------------
  192|  29.6M|            if (raw >= end || (unsigned char)*raw < 0x20)
  ------------------
  |  Branch (192:17): [True: 435, False: 29.6M]
  |  Branch (192:31): [True: 17, False: 29.6M]
  ------------------
  193|    452|                return JTOK_ERR;
  194|       |
  195|  29.6M|            else if (*raw == '\\') {
  ------------------
  |  Branch (195:22): [True: 3.96k, False: 29.6M]
  ------------------
  196|  3.96k|                raw++;                        // skip backslash
  197|       |
  198|  3.96k|                if (raw >= end)
  ------------------
  |  Branch (198:21): [True: 14, False: 3.95k]
  ------------------
  199|     14|                    return JTOK_ERR;
  200|       |
  201|  3.95k|                switch (*raw) {
  202|    195|                case '"':  writer.push_back('\"'); break;
  ------------------
  |  Branch (202:17): [True: 195, False: 3.75k]
  ------------------
  203|    232|                case '\\': writer.push_back('\\'); break;
  ------------------
  |  Branch (203:17): [True: 232, False: 3.72k]
  ------------------
  204|    195|                case '/':  writer.push_back('/'); break;
  ------------------
  |  Branch (204:17): [True: 195, False: 3.75k]
  ------------------
  205|    207|                case 'b':  writer.push_back('\b'); break;
  ------------------
  |  Branch (205:17): [True: 207, False: 3.74k]
  ------------------
  206|    197|                case 'f':  writer.push_back('\f'); break;
  ------------------
  |  Branch (206:17): [True: 197, False: 3.75k]
  ------------------
  207|    209|                case 'n':  writer.push_back('\n'); break;
  ------------------
  |  Branch (207:17): [True: 209, False: 3.74k]
  ------------------
  208|    219|                case 'r':  writer.push_back('\r'); break;
  ------------------
  |  Branch (208:17): [True: 219, False: 3.73k]
  ------------------
  209|    198|                case 't':  writer.push_back('\t'); break;
  ------------------
  |  Branch (209:17): [True: 198, False: 3.75k]
  ------------------
  210|       |
  211|  2.29k|                case 'u': {
  ------------------
  |  Branch (211:17): [True: 2.29k, False: 1.65k]
  ------------------
  212|  2.29k|                    unsigned int codepoint;
  213|  2.29k|                    if (raw + 1 + 4 >= end ||
  ------------------
  |  Branch (213:25): [True: 5, False: 2.29k]
  ------------------
  214|  2.29k|                        hatoui(raw + 1, raw + 1 + 4, codepoint) !=
  ------------------
  |  Branch (214:25): [True: 14, False: 2.27k]
  ------------------
  215|  2.29k|                               raw + 1 + 4)
  216|     19|                        return JTOK_ERR;
  217|  2.27k|                    writer.push_back_u(codepoint);
  218|  2.27k|                    raw += 4;
  219|  2.27k|                    break;
  220|  2.29k|                    }
  221|      2|                default:
  ------------------
  |  Branch (221:17): [True: 2, False: 3.95k]
  ------------------
  222|      2|                    return JTOK_ERR;
  223|       |
  224|  3.95k|                }
  225|       |
  226|  3.93k|                raw++;                        // skip esc'd char
  227|  3.93k|            }
  228|       |
  229|  29.6M|            else if (*raw == '"') {
  ------------------
  |  Branch (229:22): [True: 822k, False: 28.8M]
  ------------------
  230|   822k|                raw++;                        // skip "
  231|   822k|                break;                        // stop scanning
  232|   822k|            }
  233|       |
  234|  28.8M|            else {
  235|  28.8M|                writer.push_back(static_cast<unsigned char>(*raw));
  236|  28.8M|                raw++;
  237|  28.8M|            }
  238|  29.6M|        }
  239|       |
  240|   822k|        if (!writer.finalize())
  ------------------
  |  Branch (240:13): [True: 21, False: 822k]
  ------------------
  241|     21|            return JTOK_ERR;
  242|   822k|        tokenVal = valStr;
  243|   822k|        consumed = (raw - rawStart);
  244|   822k|        return JTOK_STRING;
  245|   822k|        }
  246|       |
  247|     50|    default:
  ------------------
  |  Branch (247:5): [True: 50, False: 5.88M]
  ------------------
  248|     50|        return JTOK_ERR;
  249|  5.88M|    }
  250|  5.88M|}
_ZN8UniValue4readENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  265|  11.9k|{
  266|  11.9k|    UniValue parsed;
  267|  11.9k|    if (!parsed.read_impl(json)) {
  ------------------
  |  Branch (267:9): [True: 1.16k, False: 10.7k]
  ------------------
  268|  1.16k|        setNull();
  269|  1.16k|        return false;
  270|  1.16k|    }
  271|  10.7k|    *this = std::move(parsed);
  272|  10.7k|    return true;
  273|  11.9k|}
_ZN8UniValue9read_implENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  276|  11.9k|{
  277|  11.9k|    clear();
  278|       |
  279|  11.9k|    uint32_t expectMask = 0;
  280|  11.9k|    std::vector<UniValue*> stack;
  281|       |
  282|  11.9k|    std::string tokenVal;
  283|  11.9k|    unsigned int consumed;
  284|  11.9k|    enum jtokentype tok = JTOK_NONE;
  285|  11.9k|    enum jtokentype last_tok = JTOK_NONE;
  286|  11.9k|    const char* raw{str_in.data()};
  287|  11.9k|    const char* end{raw + str_in.size()};
  288|  5.79M|    do {
  289|  5.79M|        last_tok = tok;
  290|       |
  291|  5.79M|        tok = getJsonToken(tokenVal, consumed, raw, end);
  292|  5.79M|        if (tok == JTOK_NONE || tok == JTOK_ERR)
  ------------------
  |  Branch (292:13): [True: 329, False: 5.78M]
  |  Branch (292:33): [True: 681, False: 5.78M]
  ------------------
  293|  1.01k|            return false;
  294|  5.78M|        raw += consumed;
  295|       |
  296|  5.78M|        bool isValueOpen = jsonTokenIsValue(tok) ||
  ------------------
  |  Branch (296:28): [True: 2.88M, False: 2.90M]
  ------------------
  297|  2.90M|            tok == JTOK_OBJ_OPEN || tok == JTOK_ARR_OPEN;
  ------------------
  |  Branch (297:13): [True: 3.36k, False: 2.89M]
  |  Branch (297:37): [True: 14.1k, False: 2.88M]
  ------------------
  298|       |
  299|  5.78M|        if (expect(VALUE)) {
  ------------------
  |  |  260|  5.78M|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 808k, False: 4.98M]
  |  |  ------------------
  ------------------
  300|   808k|            if (!isValueOpen)
  ------------------
  |  Branch (300:17): [True: 4, False: 808k]
  ------------------
  301|      4|                return false;
  302|   808k|            clearExpect(VALUE);
  ------------------
  |  |  262|   808k|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  303|       |
  304|  4.98M|        } else if (expect(ARR_VALUE)) {
  ------------------
  |  |  260|  4.98M|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 1.27M, False: 3.70M]
  |  |  ------------------
  ------------------
  305|  1.27M|            bool isArrValue = isValueOpen || (tok == JTOK_ARR_CLOSE);
  ------------------
  |  Branch (305:31): [True: 1.27M, False: 352]
  |  Branch (305:46): [True: 344, False: 8]
  ------------------
  306|  1.27M|            if (!isArrValue)
  ------------------
  |  Branch (306:17): [True: 8, False: 1.27M]
  ------------------
  307|      8|                return false;
  308|       |
  309|  1.27M|            clearExpect(ARR_VALUE);
  ------------------
  |  |  262|  1.27M|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  310|       |
  311|  3.70M|        } else if (expect(OBJ_NAME)) {
  ------------------
  |  |  260|  3.70M|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 809k, False: 2.89M]
  |  |  ------------------
  ------------------
  312|   809k|            bool isObjName = (tok == JTOK_OBJ_CLOSE || tok == JTOK_STRING);
  ------------------
  |  Branch (312:31): [True: 764, False: 809k]
  |  Branch (312:56): [True: 809k, False: 13]
  ------------------
  313|   809k|            if (!isObjName)
  ------------------
  |  Branch (313:17): [True: 13, False: 809k]
  ------------------
  314|     13|                return false;
  315|       |
  316|  2.89M|        } else if (expect(COLON)) {
  ------------------
  |  |  260|  2.89M|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 809k, False: 2.08M]
  |  |  ------------------
  ------------------
  317|   809k|            if (tok != JTOK_COLON)
  ------------------
  |  Branch (317:17): [True: 11, False: 809k]
  ------------------
  318|     11|                return false;
  319|   809k|            clearExpect(COLON);
  ------------------
  |  |  262|   809k|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  320|       |
  321|  2.08M|        } else if (!expect(COLON) && (tok == JTOK_COLON)) {
  ------------------
  |  |  260|  4.17M|#define expect(bit) (expectMask & (EXP_##bit))
  ------------------
  |  Branch (321:20): [True: 2.08M, False: 0]
  |  Branch (321:38): [True: 3, False: 2.08M]
  ------------------
  322|      3|            return false;
  323|      3|        }
  324|       |
  325|  5.78M|        if (expect(NOT_VALUE)) {
  ------------------
  |  |  260|  5.78M|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 2.88M, False: 2.90M]
  |  |  ------------------
  ------------------
  326|  2.88M|            if (isValueOpen)
  ------------------
  |  Branch (326:17): [True: 15, False: 2.88M]
  ------------------
  327|     15|                return false;
  328|  2.88M|            clearExpect(NOT_VALUE);
  ------------------
  |  |  262|  2.88M|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  329|  2.88M|        }
  330|       |
  331|  5.78M|        switch (tok) {
  332|       |
  333|  3.35k|        case JTOK_OBJ_OPEN:
  ------------------
  |  Branch (333:9): [True: 3.35k, False: 5.78M]
  ------------------
  334|  17.5k|        case JTOK_ARR_OPEN: {
  ------------------
  |  Branch (334:9): [True: 14.1k, False: 5.77M]
  ------------------
  335|  17.5k|            VType utyp = (tok == JTOK_OBJ_OPEN ? VOBJ : VARR);
  ------------------
  |  Branch (335:27): [True: 3.35k, False: 14.1k]
  ------------------
  336|  17.5k|            if (!stack.size()) {
  ------------------
  |  Branch (336:17): [True: 794, False: 16.7k]
  ------------------
  337|    794|                if (utyp == VOBJ)
  ------------------
  |  Branch (337:21): [True: 215, False: 579]
  ------------------
  338|    215|                    setObject();
  339|    579|                else
  340|    579|                    setArray();
  341|    794|                stack.push_back(this);
  342|  16.7k|            } else {
  343|  16.7k|                UniValue tmpVal(utyp);
  344|  16.7k|                UniValue *top = stack.back();
  345|  16.7k|                top->values.push_back(tmpVal);
  346|       |
  347|  16.7k|                UniValue *newTop = &(top->values.back());
  348|  16.7k|                stack.push_back(newTop);
  349|  16.7k|            }
  350|       |
  351|  17.5k|            if (stack.size() > MAX_JSON_DEPTH)
  ------------------
  |  Branch (351:17): [True: 1, False: 17.5k]
  ------------------
  352|      1|                return false;
  353|       |
  354|  17.5k|            if (utyp == VOBJ)
  ------------------
  |  Branch (354:17): [True: 3.35k, False: 14.1k]
  ------------------
  355|  3.35k|                setExpect(OBJ_NAME);
  ------------------
  |  |  261|  3.35k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  356|  14.1k|            else
  357|  14.1k|                setExpect(ARR_VALUE);
  ------------------
  |  |  261|  14.1k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  358|  17.5k|            break;
  359|  17.5k|            }
  360|       |
  361|  2.21k|        case JTOK_OBJ_CLOSE:
  ------------------
  |  Branch (361:9): [True: 2.21k, False: 5.78M]
  ------------------
  362|  6.91k|        case JTOK_ARR_CLOSE: {
  ------------------
  |  Branch (362:9): [True: 4.70k, False: 5.78M]
  ------------------
  363|  6.91k|            if (!stack.size() || (last_tok == JTOK_COMMA))
  ------------------
  |  Branch (363:17): [True: 2, False: 6.91k]
  |  Branch (363:34): [True: 8, False: 6.90k]
  ------------------
  364|     10|                return false;
  365|       |
  366|  6.90k|            VType utyp = (tok == JTOK_OBJ_CLOSE ? VOBJ : VARR);
  ------------------
  |  Branch (366:27): [True: 2.20k, False: 4.69k]
  ------------------
  367|  6.90k|            UniValue *top = stack.back();
  368|  6.90k|            if (utyp != top->getType())
  ------------------
  |  Branch (368:17): [True: 6, False: 6.89k]
  ------------------
  369|      6|                return false;
  370|       |
  371|  6.89k|            stack.pop_back();
  372|  6.89k|            clearExpect(OBJ_NAME);
  ------------------
  |  |  262|  6.89k|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  373|  6.89k|            setExpect(NOT_VALUE);
  ------------------
  |  |  261|  6.89k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  374|  6.89k|            break;
  375|  6.90k|            }
  376|       |
  377|   809k|        case JTOK_COLON: {
  ------------------
  |  Branch (377:9): [True: 809k, False: 4.98M]
  ------------------
  378|   809k|            if (!stack.size())
  ------------------
  |  Branch (378:17): [True: 0, False: 809k]
  ------------------
  379|      0|                return false;
  380|       |
  381|   809k|            UniValue *top = stack.back();
  382|   809k|            if (top->getType() != VOBJ)
  ------------------
  |  Branch (382:17): [True: 0, False: 809k]
  ------------------
  383|      0|                return false;
  384|       |
  385|   809k|            setExpect(VALUE);
  ------------------
  |  |  261|   809k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  386|   809k|            break;
  387|   809k|            }
  388|       |
  389|  2.06M|        case JTOK_COMMA: {
  ------------------
  |  Branch (389:9): [True: 2.06M, False: 3.72M]
  ------------------
  390|  2.06M|            if (!stack.size() ||
  ------------------
  |  Branch (390:17): [True: 1, False: 2.06M]
  ------------------
  391|  2.06M|                (last_tok == JTOK_COMMA) || (last_tok == JTOK_ARR_OPEN))
  ------------------
  |  Branch (391:17): [True: 0, False: 2.06M]
  |  Branch (391:45): [True: 0, False: 2.06M]
  ------------------
  392|      1|                return false;
  393|       |
  394|  2.06M|            UniValue *top = stack.back();
  395|  2.06M|            if (top->getType() == VOBJ)
  ------------------
  |  Branch (395:17): [True: 806k, False: 1.26M]
  ------------------
  396|   806k|                setExpect(OBJ_NAME);
  ------------------
  |  |  261|   806k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  397|  1.26M|            else
  398|  1.26M|                setExpect(ARR_VALUE);
  ------------------
  |  |  261|  1.26M|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  399|  2.06M|            break;
  400|  2.06M|            }
  401|       |
  402|    324|        case JTOK_KW_NULL:
  ------------------
  |  Branch (402:9): [True: 324, False: 5.78M]
  ------------------
  403|    930|        case JTOK_KW_TRUE:
  ------------------
  |  Branch (403:9): [True: 606, False: 5.78M]
  ------------------
  404|  1.36k|        case JTOK_KW_FALSE: {
  ------------------
  |  Branch (404:9): [True: 435, False: 5.78M]
  ------------------
  405|  1.36k|            UniValue tmpVal;
  406|  1.36k|            switch (tok) {
  407|    324|            case JTOK_KW_NULL:
  ------------------
  |  Branch (407:13): [True: 324, False: 1.04k]
  ------------------
  408|       |                // do nothing more
  409|    324|                break;
  410|    606|            case JTOK_KW_TRUE:
  ------------------
  |  Branch (410:13): [True: 606, False: 759]
  ------------------
  411|    606|                tmpVal.setBool(true);
  412|    606|                break;
  413|    435|            case JTOK_KW_FALSE:
  ------------------
  |  Branch (413:13): [True: 435, False: 930]
  ------------------
  414|    435|                tmpVal.setBool(false);
  415|    435|                break;
  416|      0|            default: /* impossible */ break;
  ------------------
  |  Branch (416:13): [True: 0, False: 1.36k]
  ------------------
  417|  1.36k|            }
  418|       |
  419|  1.36k|            if (!stack.size()) {
  ------------------
  |  Branch (419:17): [True: 9, False: 1.35k]
  ------------------
  420|      9|                *this = tmpVal;
  421|      9|                break;
  422|      9|            }
  423|       |
  424|  1.35k|            UniValue *top = stack.back();
  425|  1.35k|            top->values.push_back(tmpVal);
  426|       |
  427|  1.35k|            setExpect(NOT_VALUE);
  ------------------
  |  |  261|  1.35k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  428|  1.35k|            break;
  429|  1.36k|            }
  430|       |
  431|  2.06M|        case JTOK_NUMBER: {
  ------------------
  |  Branch (431:9): [True: 2.06M, False: 3.72M]
  ------------------
  432|  2.06M|            UniValue tmpVal(VNUM, tokenVal);
  433|  2.06M|            if (!stack.size()) {
  ------------------
  |  Branch (433:17): [True: 1.17k, False: 2.06M]
  ------------------
  434|  1.17k|                *this = tmpVal;
  435|  1.17k|                break;
  436|  1.17k|            }
  437|       |
  438|  2.06M|            UniValue *top = stack.back();
  439|  2.06M|            top->values.push_back(tmpVal);
  440|       |
  441|  2.06M|            setExpect(NOT_VALUE);
  ------------------
  |  |  261|  2.06M|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  442|  2.06M|            break;
  443|  2.06M|            }
  444|       |
  445|   822k|        case JTOK_STRING: {
  ------------------
  |  Branch (445:9): [True: 822k, False: 4.96M]
  ------------------
  446|   822k|            if (expect(OBJ_NAME)) {
  ------------------
  |  |  260|   822k|#define expect(bit) (expectMask & (EXP_##bit))
  |  |  ------------------
  |  |  |  Branch (260:21): [True: 809k, False: 13.2k]
  |  |  ------------------
  ------------------
  447|   809k|                UniValue *top = stack.back();
  448|   809k|                top->keys.push_back(tokenVal);
  449|   809k|                clearExpect(OBJ_NAME);
  ------------------
  |  |  262|   809k|#define clearExpect(bit) (expectMask &= ~EXP_##bit)
  ------------------
  450|   809k|                setExpect(COLON);
  ------------------
  |  |  261|   809k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  451|   809k|            } else {
  452|  13.2k|                UniValue tmpVal(VSTR, tokenVal);
  453|  13.2k|                if (!stack.size()) {
  ------------------
  |  Branch (453:21): [True: 9.35k, False: 3.87k]
  ------------------
  454|  9.35k|                    *this = tmpVal;
  455|  9.35k|                    break;
  456|  9.35k|                }
  457|  3.87k|                UniValue *top = stack.back();
  458|  3.87k|                top->values.push_back(tmpVal);
  459|  3.87k|            }
  460|       |
  461|   812k|            setExpect(NOT_VALUE);
  ------------------
  |  |  261|   812k|#define setExpect(bit) (expectMask |= EXP_##bit)
  ------------------
  462|   812k|            break;
  463|   822k|            }
  464|       |
  465|      0|        default:
  ------------------
  |  Branch (465:9): [True: 0, False: 5.78M]
  ------------------
  466|      0|            return false;
  467|  5.78M|        }
  468|  5.78M|    } while (!stack.empty ());
  ------------------
  |  Branch (468:14): [True: 5.77M, False: 10.8k]
  ------------------
  469|       |
  470|       |    /* Check that nothing follows the initial construct (parsed above).  */
  471|  10.8k|    tok = getJsonToken(tokenVal, consumed, raw, end);
  472|  10.8k|    if (tok != JTOK_NONE)
  ------------------
  |  Branch (472:9): [True: 86, False: 10.7k]
  ------------------
  473|     86|        return false;
  474|       |
  475|  10.7k|    return true;
  476|  10.8k|}
univalue_read.cpp:_ZL12json_isdigiti:
   25|  17.7M|{
   26|  17.7M|    return ((ch >= '0') && (ch <= '9'));
  ------------------
  |  Branch (26:13): [True: 15.4M, False: 2.35M]
  |  Branch (26:28): [True: 15.4M, False: 8.70k]
  ------------------
   27|  17.7M|}
univalue_read.cpp:_ZL6hatouiPKcS0_Rj:
   32|  2.29k|{
   33|  2.29k|    unsigned int result = 0;
   34|  11.4k|    for (; first != last; ++first)
  ------------------
  |  Branch (34:12): [True: 9.14k, False: 2.27k]
  ------------------
   35|  9.14k|    {
   36|  9.14k|        int digit;
   37|  9.14k|        if (json_isdigit(*first))
  ------------------
  |  Branch (37:13): [True: 4.41k, False: 4.73k]
  ------------------
   38|  4.41k|            digit = *first - '0';
   39|       |
   40|  4.73k|        else if (*first >= 'a' && *first <= 'f')
  ------------------
  |  Branch (40:18): [True: 2.47k, False: 2.26k]
  |  Branch (40:35): [True: 2.47k, False: 2]
  ------------------
   41|  2.47k|            digit = *first - 'a' + 10;
   42|       |
   43|  2.26k|        else if (*first >= 'A' && *first <= 'F')
  ------------------
  |  Branch (43:18): [True: 2.25k, False: 9]
  |  Branch (43:35): [True: 2.24k, False: 5]
  ------------------
   44|  2.24k|            digit = *first - 'A' + 10;
   45|       |
   46|     14|        else
   47|     14|            break;
   48|       |
   49|  9.13k|        result = 16 * result + digit;
   50|  9.13k|    }
   51|  2.29k|    out = result;
   52|       |
   53|  2.29k|    return first;
   54|  2.29k|}

_Z19ParseKeyPathElementNSt3__14spanIKcLm18446744073709551615EEE:
   18|  31.0k|{
   19|  31.0k|    const std::string_view raw{elem.begin(), elem.end()};
   20|  31.0k|    if (elem.empty()) {
  ------------------
  |  Branch (20:9): [True: 13, False: 30.9k]
  ------------------
   21|     13|        return util::Unexpected{strprintf("Key path value '%s' is not valid", raw)};
  ------------------
  |  | 1172|     13|#define strprintf tfm::format
  ------------------
   22|     13|    }
   23|       |
   24|  30.9k|    bool is_hardened = false;
   25|  30.9k|    const char last = elem.back();
   26|  30.9k|    if (last == '\'' || last == 'h') {
  ------------------
  |  Branch (26:9): [True: 997, False: 29.9k]
  |  Branch (26:25): [True: 657, False: 29.3k]
  ------------------
   27|  1.65k|        elem = elem.first(elem.size() - 1);
   28|  1.65k|        is_hardened = true;
   29|  1.65k|    }
   30|       |
   31|  30.9k|    const auto number{ToIntegral<uint32_t>(std::string_view{elem.begin(), elem.end()})};
   32|  30.9k|    if (!number) {
  ------------------
  |  Branch (32:9): [True: 60, False: 30.9k]
  ------------------
   33|     60|        return util::Unexpected{strprintf("Key path value '%s' is not a valid uint32", raw)};
  ------------------
  |  | 1172|     60|#define strprintf tfm::format
  ------------------
   34|     60|    }
   35|  30.9k|    if (*number >= BIP32_HARDENED_FLAG) {
  ------------------
  |  Branch (35:9): [True: 30, False: 30.9k]
  ------------------
   36|     30|        return util::Unexpected{strprintf("Key path value %u is out of range", *number)};
  ------------------
  |  | 1172|     30|#define strprintf tfm::format
  ------------------
   37|     30|    }
   38|  30.9k|    return KeyPathElement{*number, is_hardened};
   39|  30.9k|}
_Z15FormatHDKeypathRKNSt3__16vectorIjNS_9allocatorIjEEEEb:
   63|    758|{
   64|    758|    std::string ret;
   65|  10.0k|    for (auto i : path) {
  ------------------
  |  Branch (65:17): [True: 10.0k, False: 758]
  ------------------
   66|  10.0k|        ret += strprintf("/%i", (i << 1) >> 1);
  ------------------
  |  | 1172|  10.0k|#define strprintf tfm::format
  ------------------
   67|  10.0k|        if (i >> 31) ret += apostrophe ? '\'' : 'h';
  ------------------
  |  Branch (67:13): [True: 586, False: 9.44k]
  |  Branch (67:29): [True: 343, False: 243]
  ------------------
   68|  10.0k|    }
   69|    758|    return ret;
   70|    758|}

_ZNK14KeyPathElement11ChildNumberEv:
   25|  30.9k|    uint32_t ChildNumber() const { return index | (is_hardened ? BIP32_HARDENED_FLAG : BIP32_UNHARDENED_FLAG); }
  ------------------
  |  Branch (25:52): [True: 1.63k, False: 29.2k]
  ------------------

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

_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_RKNS0_15source_locationENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   90|  11.9k|{
   91|  11.9k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 11.9k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  11.9k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 11.9k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  11.9k|    }
   96|  11.9k|    return std::forward<T>(val);
   97|  11.9k|}
_Z22inline_check_non_fatalIRKbEOT_S3_RKNSt3__115source_locationENS4_17basic_string_viewIcNS4_11char_traitsIcEEEE:
   73|    124|{
   74|    124|    if (!val) {
  ------------------
  |  Branch (74:9): [True: 0, False: 124]
  ------------------
   75|      0|        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
   76|      0|            assertion_fail(loc, assertion);
   77|      0|        }
   78|      0|        throw NonFatalCheckError{assertion, loc};
   79|      0|    }
   80|    124|    return std::forward<T>(val);
   81|    124|}
_Z22inline_assertion_checkILb1EPKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEOT0_SA_RKNS0_15source_locationENS0_17basic_string_viewIcS3_EE:
   90|    103|{
   91|    103|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 103, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|    103|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 103]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|    103|    }
   96|    103|    return std::forward<T>(val);
   97|    103|}
_Z22inline_check_non_fatalIbEOT_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   73|  41.8M|{
   74|  41.8M|    if (!val) {
  ------------------
  |  Branch (74:9): [True: 0, False: 41.8M]
  ------------------
   75|      0|        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
   76|      0|            assertion_fail(loc, assertion);
   77|      0|        }
   78|      0|        throw NonFatalCheckError{assertion, loc};
   79|      0|    }
   80|  41.8M|    return std::forward<T>(val);
   81|  41.8M|}
_Z22inline_assertion_checkILb1EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|  26.5k|{
   91|  26.5k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 26.5k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  26.5k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 26.5k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  26.5k|    }
   96|  26.5k|    return std::forward<T>(val);
   97|  26.5k|}
_Z22inline_assertion_checkILb0EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|  61.0k|{
   91|  61.0k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [Folded, False: 0]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  61.0k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 61.0k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  61.0k|    }
   96|  61.0k|    return std::forward<T>(val);
   97|  61.0k|}

_ZNKR4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE5errorEv:
   86|    103|    constexpr const E& error() const& noexcept LIFETIMEBOUND { return *Assert(std::get_if<1>(&m_data)); }
  ------------------
  |  |  116|    103|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
_ZN4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEC2IS8_EENS_10UnexpectedIT_EE:
   52|    103|    constexpr Expected(Unexpected<Err> u) : m_data{std::in_place_index<1>, std::move(u).error()}
   53|    103|    {
   54|    103|    }
_ZN4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEC2ES1_:
   50|  30.9k|    constexpr Expected(T v) : m_data{std::in_place_index<0>, std::move(v)} {}
_ZNK4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEcvbEv:
   57|  31.0k|    constexpr explicit operator bool() const noexcept { return has_value(); }
_ZNK4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE9has_valueEv:
   56|  92.8k|    constexpr bool has_value() const noexcept { return m_data.index() == 0; }
_ZNK4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEptEv:
   97|  61.8k|    constexpr const T* operator->() const noexcept LIFETIMEBOUND { return &value(); }
_ZNKR4util8ExpectedI14KeyPathElementNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE5valueEv:
   60|  61.8k|    {
   61|  61.8k|        if (!has_value()) {
  ------------------
  |  Branch (61:13): [True: 0, False: 61.8k]
  ------------------
   62|      0|            throw BadExpectedAccess{};
   63|      0|        }
   64|  61.8k|        return std::get<0>(m_data);
   65|  61.8k|    }
_ZN4util10UnexpectedINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEC2ES7_:
   23|    103|    constexpr explicit Unexpected(E e) : m_error(std::move(e)) {}
_ZNO4util10UnexpectedINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE5errorEv:
   27|    103|    constexpr E&& error() && noexcept LIFETIMEBOUND { return std::move(m_error); }

_ZN8BaseHashI7uint256E5beginEv:
   19|    311|    {
   20|    311|        return m_hash.begin();
   21|    311|    }
_ZNK8BaseHashI7uint160E5beginEv:
   24|    142|    {
   25|    142|        return m_hash.begin();
   26|    142|    }
_ZNK8BaseHashI7uint160E3endEv:
   34|    142|    {
   35|    142|        return m_hash.end();
   36|    142|    }
_ZNK8BaseHashI7uint256E3endEv:
   34|    311|    {
   35|    311|        return m_hash.end();
   36|    311|    }
_ZN8BaseHashI7uint256EC2Ev:
   15|    311|    BaseHash() : m_hash() {}
_ZNK8BaseHashI7uint256E5beginEv:
   24|    311|    {
   25|    311|        return m_hash.begin();
   26|    311|    }
_ZNK8BaseHashI7uint160EltERKS1_:
   54|    115|    {
   55|    115|        return m_hash < other.m_hash;
   56|    115|    }
_ZN8BaseHashI7uint160EC2ERKS0_:
   16|    583|    explicit BaseHash(const HashType& in) : m_hash(in) {}

_ZN4util6ResultIiEC2Ei:
   57|      1|    Result(T obj) : m_variant{std::in_place_index_t<1>{}, std::move(obj)} {}
_ZN4util6ResultIiEC2ENS_5ErrorE:
   58|  9.35k|    Result(Error error) : m_variant{std::in_place_index_t<0>{}, std::move(error.message)} {}
_ZN4util6ResultIiED2Ev:
   60|  9.35k|    ~Result() = default;
_ZNK4util6ResultIiEcvbEv:
   85|  18.7k|    explicit operator bool() const noexcept { return has_value(); }
_ZNK4util6ResultIiE9has_valueEv:
   64|  18.7k|    bool has_value() const noexcept { return m_variant.index() == 1; }
_ZN4util11ErrorStringIiEE13bilingual_strRKNS_6ResultIT_EE:
   94|  9.35k|{
   95|  9.35k|    return result ? bilingual_str{} : std::get<0>(result.m_variant);
  ------------------
  |  Branch (95:12): [True: 0, False: 9.35k]
  ------------------
   96|  9.35k|}
_ZNK4util6ResultIiE5valueEv:
   66|      1|    {
   67|      1|        assert(has_value());
  ------------------
  |  Branch (67:9): [True: 1, False: 0]
  ------------------
   68|      1|        return std::get<1>(m_variant);
   69|      1|    }

_Z5IsHexNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
   41|   116k|{
   42|  7.86M|    for (char c : str) {
  ------------------
  |  Branch (42:17): [True: 7.86M, False: 98.1k]
  ------------------
   43|  7.86M|        if (HexDigit(c) < 0) return false;
  ------------------
  |  Branch (43:13): [True: 18.7k, False: 7.84M]
  ------------------
   44|  7.86M|    }
   45|  98.1k|    return (str.size() > 0) && (str.size()%2 == 0);
  ------------------
  |  Branch (45:12): [True: 73.7k, False: 24.4k]
  |  Branch (45:32): [True: 73.5k, False: 126]
  ------------------
   46|   116k|}
_Z11TryParseHexIhENSt3__18optionalINS0_6vectorIT_NS0_9allocatorIS3_EEEEEENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   50|  73.5k|{
   51|  73.5k|    std::vector<Byte> vch;
   52|  73.5k|    vch.reserve(str.size() / 2); // two hex characters form a single byte
   53|       |
   54|  73.5k|    auto it = str.begin();
   55|  3.55M|    while (it != str.end()) {
  ------------------
  |  Branch (55:12): [True: 3.48M, False: 73.5k]
  ------------------
   56|  3.48M|        if (IsSpace(*it)) {
  ------------------
  |  Branch (56:13): [True: 0, False: 3.48M]
  ------------------
   57|      0|            ++it;
   58|      0|            continue;
   59|      0|        }
   60|  3.48M|        auto c1 = HexDigit(*(it++));
   61|  3.48M|        if (it == str.end()) return std::nullopt;
  ------------------
  |  Branch (61:13): [True: 0, False: 3.48M]
  ------------------
   62|  3.48M|        auto c2 = HexDigit(*(it++));
   63|  3.48M|        if (c1 < 0 || c2 < 0) return std::nullopt;
  ------------------
  |  Branch (63:13): [True: 0, False: 3.48M]
  |  Branch (63:23): [True: 0, False: 3.48M]
  ------------------
   64|  3.48M|        vch.push_back(Byte(c1 << 4) | Byte(c2));
   65|  3.48M|    }
   66|  73.5k|    return vch;
   67|  73.5k|}
_Z15ParseFixedPointNSt3__117basic_string_viewIcNS_11char_traitsIcEEEEiPl:
  271|  10.4k|{
  272|  10.4k|    int64_t mantissa = 0;
  273|  10.4k|    int64_t exponent = 0;
  274|  10.4k|    int mantissa_tzeros = 0;
  275|  10.4k|    bool mantissa_sign = false;
  276|  10.4k|    bool exponent_sign = false;
  277|  10.4k|    int ptr = 0;
  278|  10.4k|    int end = val.size();
  279|  10.4k|    int point_ofs = 0;
  280|       |
  281|  10.4k|    if (ptr < end && val[ptr] == '-') {
  ------------------
  |  Branch (281:9): [True: 10.4k, False: 1]
  |  Branch (281:22): [True: 217, False: 10.2k]
  ------------------
  282|    217|        mantissa_sign = true;
  283|    217|        ++ptr;
  284|    217|    }
  285|  10.4k|    if (ptr < end)
  ------------------
  |  Branch (285:9): [True: 10.4k, False: 2]
  ------------------
  286|  10.4k|    {
  287|  10.4k|        if (val[ptr] == '0') {
  ------------------
  |  Branch (287:13): [True: 96, False: 10.3k]
  ------------------
  288|       |            /* pass single 0 */
  289|     96|            ++ptr;
  290|  10.3k|        } else if (val[ptr] >= '1' && val[ptr] <= '9') {
  ------------------
  |  Branch (290:20): [True: 10.3k, False: 63]
  |  Branch (290:39): [True: 1.18k, False: 9.12k]
  ------------------
  291|  3.38M|            while (ptr < end && IsDigit(val[ptr])) {
  ------------------
  |  Branch (291:20): [True: 3.38M, False: 508]
  |  Branch (291:33): [True: 3.38M, False: 547]
  ------------------
  292|  3.38M|                if (!ProcessMantissaDigit(val[ptr], mantissa, mantissa_tzeros))
  ------------------
  |  Branch (292:21): [True: 126, False: 3.38M]
  ------------------
  293|    126|                    return false; /* overflow */
  294|  3.38M|                ++ptr;
  295|  3.38M|            }
  296|  9.18k|        } else return false; /* missing expected digit */
  297|  10.4k|    } else return false; /* empty string or loose '-' */
  298|  1.15k|    if (ptr < end && val[ptr] == '.')
  ------------------
  |  Branch (298:9): [True: 640, False: 511]
  |  Branch (298:22): [True: 247, False: 393]
  ------------------
  299|    247|    {
  300|    247|        ++ptr;
  301|    247|        if (ptr < end && IsDigit(val[ptr]))
  ------------------
  |  Branch (301:13): [True: 246, False: 1]
  |  Branch (301:26): [True: 233, False: 13]
  ------------------
  302|    233|        {
  303|  7.22M|            while (ptr < end && IsDigit(val[ptr])) {
  ------------------
  |  Branch (303:20): [True: 7.22M, False: 169]
  |  Branch (303:33): [True: 7.22M, False: 35]
  ------------------
  304|  7.22M|                if (!ProcessMantissaDigit(val[ptr], mantissa, mantissa_tzeros))
  ------------------
  |  Branch (304:21): [True: 29, False: 7.22M]
  ------------------
  305|     29|                    return false; /* overflow */
  306|  7.22M|                ++ptr;
  307|  7.22M|                ++point_ofs;
  308|  7.22M|            }
  309|    233|        } else return false; /* missing expected digit */
  310|    247|    }
  311|  1.10k|    if (ptr < end && (val[ptr] == 'e' || val[ptr] == 'E'))
  ------------------
  |  Branch (311:9): [True: 428, False: 680]
  |  Branch (311:23): [True: 200, False: 228]
  |  Branch (311:42): [True: 159, False: 69]
  ------------------
  312|    359|    {
  313|    359|        ++ptr;
  314|    359|        if (ptr < end && val[ptr] == '+')
  ------------------
  |  Branch (314:13): [True: 355, False: 4]
  |  Branch (314:26): [True: 2, False: 353]
  ------------------
  315|      2|            ++ptr;
  316|    357|        else if (ptr < end && val[ptr] == '-') {
  ------------------
  |  Branch (316:18): [True: 353, False: 4]
  |  Branch (316:31): [True: 90, False: 263]
  ------------------
  317|     90|            exponent_sign = true;
  318|     90|            ++ptr;
  319|     90|        }
  320|    359|        if (ptr < end && IsDigit(val[ptr])) {
  ------------------
  |  Branch (320:13): [True: 355, False: 4]
  |  Branch (320:26): [True: 331, False: 24]
  ------------------
  321|   626k|            while (ptr < end && IsDigit(val[ptr])) {
  ------------------
  |  Branch (321:20): [True: 625k, False: 280]
  |  Branch (321:33): [True: 625k, False: 39]
  ------------------
  322|   625k|                if (exponent > (UPPER_BOUND / 10LL))
  ------------------
  |  Branch (322:21): [True: 12, False: 625k]
  ------------------
  323|     12|                    return false; /* overflow */
  324|   625k|                exponent = exponent * 10 + val[ptr] - '0';
  325|   625k|                ++ptr;
  326|   625k|            }
  327|    331|        } else return false; /* missing expected digit */
  328|    359|    }
  329|  1.06k|    if (ptr != end)
  ------------------
  |  Branch (329:9): [True: 108, False: 960]
  ------------------
  330|    108|        return false; /* trailing garbage */
  331|       |
  332|       |    /* finalize exponent */
  333|    960|    if (exponent_sign)
  ------------------
  |  Branch (333:9): [True: 89, False: 871]
  ------------------
  334|     89|        exponent = -exponent;
  335|    960|    exponent = exponent - point_ofs + mantissa_tzeros;
  336|       |
  337|       |    /* finalize mantissa */
  338|    960|    if (mantissa_sign)
  ------------------
  |  Branch (338:9): [True: 201, False: 759]
  ------------------
  339|    201|        mantissa = -mantissa;
  340|       |
  341|       |    /* convert to one 64-bit fixed-point value */
  342|    960|    exponent += decimals;
  343|    960|    if (exponent < 0)
  ------------------
  |  Branch (343:9): [True: 96, False: 864]
  ------------------
  344|     96|        return false; /* cannot represent values smaller than 10^-decimals */
  345|    864|    if (exponent >= 18)
  ------------------
  |  Branch (345:9): [True: 110, False: 754]
  ------------------
  346|    110|        return false; /* cannot represent values larger than or equal to 10^(18-decimals) */
  347|       |
  348|  5.24k|    for (int i=0; i < exponent; ++i) {
  ------------------
  |  Branch (348:19): [True: 4.73k, False: 514]
  ------------------
  349|  4.73k|        if (mantissa > (UPPER_BOUND / 10LL) || mantissa < -(UPPER_BOUND / 10LL))
  ------------------
  |  Branch (349:13): [True: 190, False: 4.54k]
  |  Branch (349:48): [True: 50, False: 4.49k]
  ------------------
  350|    240|            return false; /* overflow */
  351|  4.49k|        mantissa *= 10;
  352|  4.49k|    }
  353|    514|    if (mantissa > UPPER_BOUND || mantissa < -UPPER_BOUND)
  ------------------
  |  Branch (353:9): [True: 0, False: 514]
  |  Branch (353:35): [True: 0, False: 514]
  ------------------
  354|      0|        return false; /* overflow */
  355|       |
  356|    514|    if (amount_out)
  ------------------
  |  Branch (356:9): [True: 514, False: 0]
  ------------------
  357|    514|        *amount_out = mantissa;
  358|       |
  359|    514|    return true;
  360|    514|}
_Z7ToLowerNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
  363|    371|{
  364|    371|    std::string r;
  365|    371|    r.reserve(str.size());
  366|  1.44k|    for (auto ch : str) r += ToLower(ch);
  ------------------
  |  Branch (366:18): [True: 1.44k, False: 371]
  ------------------
  367|    371|    return r;
  368|    371|}
strencodings.cpp:_ZL20ProcessMantissaDigitcRlRi:
  255|  10.6M|{
  256|  10.6M|    if(ch == '0')
  ------------------
  |  Branch (256:8): [True: 10.6M, False: 9.69k]
  ------------------
  257|  10.6M|        ++mantissa_tzeros;
  258|  9.69k|    else {
  259|  3.25M|        for (int i=0; i<=mantissa_tzeros; ++i) {
  ------------------
  |  Branch (259:23): [True: 3.25M, False: 9.53k]
  ------------------
  260|  3.25M|            if (mantissa > (UPPER_BOUND / 10LL))
  ------------------
  |  Branch (260:17): [True: 155, False: 3.24M]
  ------------------
  261|    155|                return false; /* overflow */
  262|  3.24M|            mantissa *= 10;
  263|  3.24M|        }
  264|  9.53k|        mantissa += ch - '0';
  265|  9.53k|        mantissa_tzeros = 0;
  266|  9.53k|    }
  267|  10.6M|    return true;
  268|  10.6M|}

key_io.cpp:_Z11ConvertBitsILi5ELi8ELb0EZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERK12CChainParamsRS7_PNS1_6vectorIiNS5_IiEEEEE3$_0NS1_11__wrap_iterIPKhEENS1_8identityEEbT2_T3_SP_T4_:
  221|      3|{
  222|      3|    size_t acc = 0;
  223|      3|    size_t bits = 0;
  224|      3|    constexpr size_t maxv = (1 << tobits) - 1;
  225|      3|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  226|     79|    while (it != end) {
  ------------------
  |  Branch (226:12): [True: 76, False: 3]
  ------------------
  227|     76|        int v = infn(*it);
  228|     76|        if (v < 0) return false;
  ------------------
  |  Branch (228:13): [True: 0, False: 76]
  ------------------
  229|     76|        acc = ((acc << frombits) | v) & max_acc;
  230|     76|        bits += frombits;
  231|    122|        while (bits >= tobits) {
  ------------------
  |  Branch (231:16): [True: 46, False: 76]
  ------------------
  232|     46|            bits -= tobits;
  233|     46|            outfn((acc >> bits) & maxv);
  234|     46|        }
  235|     76|        ++it;
  236|     76|    }
  237|      3|    if (pad) {
  ------------------
  |  Branch (237:9): [Folded, False: 3]
  ------------------
  238|      0|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|      3|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (239:16): [True: 1, False: 2]
  |  Branch (239:36): [True: 2, False: 0]
  ------------------
  240|      3|        return false;
  241|      3|    }
  242|      0|    return true;
  243|      3|}
_Z10ToIntegralIlENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEEm:
  181|  20.2k|{
  182|  20.2k|    static_assert(std::is_integral_v<T>);
  183|  20.2k|    T result;
  184|  20.2k|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result, base);
  185|  20.2k|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (185:9): [True: 78, False: 20.1k]
  |  Branch (185:57): [True: 86, False: 20.0k]
  ------------------
  186|    164|        return std::nullopt;
  187|    164|    }
  188|  20.0k|    return result;
  189|  20.2k|}
_Z8ParseHexIhENSt3__16vectorIT_NS0_9allocatorIS2_EEEENS0_17basic_string_viewIcNS0_11char_traitsIcEEEE:
   70|  73.5k|{
   71|  73.5k|    return TryParseHex<Byte>(hex_str).value_or(std::vector<Byte>{});
   72|  73.5k|}
_Z7IsSpacec:
  166|  3.63M|constexpr inline bool IsSpace(char c) noexcept {
  167|  3.63M|    return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v';
  ------------------
  |  Branch (167:12): [True: 863, False: 3.63M]
  |  Branch (167:24): [True: 0, False: 3.63M]
  |  Branch (167:37): [True: 0, False: 3.63M]
  |  Branch (167:50): [True: 0, False: 3.63M]
  |  Branch (167:63): [True: 0, False: 3.63M]
  |  Branch (167:76): [True: 0, False: 3.63M]
  ------------------
  168|  3.63M|}
_Z7IsDigitc:
  151|  11.2M|{
  152|  11.2M|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (152:12): [True: 11.2M, False: 265]
  |  Branch (152:24): [True: 11.2M, False: 393]
  ------------------
  153|  11.2M|}
_Z7ToLowerc:
  256|  1.44k|{
  257|  1.44k|    return (c >= 'A' && c <= 'Z' ? (c - 'A') + 'a' : c);
  ------------------
  |  Branch (257:13): [True: 1.34k, False: 106]
  |  Branch (257:25): [True: 244, False: 1.09k]
  ------------------
  258|  1.44k|}
_Z10ToIntegralIjENSt3__18optionalIT_EENS0_17basic_string_viewIcNS0_11char_traitsIcEEEEm:
  181|  32.3k|{
  182|  32.3k|    static_assert(std::is_integral_v<T>);
  183|  32.3k|    T result;
  184|  32.3k|    const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result, base);
  185|  32.3k|    if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {
  ------------------
  |  Branch (185:9): [True: 61, False: 32.2k]
  |  Branch (185:57): [True: 26, False: 32.2k]
  ------------------
  186|     87|        return std::nullopt;
  187|     87|    }
  188|  32.2k|    return result;
  189|  32.3k|}

_ZN4util11ContainsNULENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  238|    790|{
  239|   157k|    for (auto c : str) {
  ------------------
  |  Branch (239:17): [True: 157k, False: 790]
  ------------------
  240|   157k|        if (c == 0) return true;
  ------------------
  |  Branch (240:13): [True: 0, False: 157k]
  ------------------
  241|   157k|    }
  242|    790|    return false;
  243|    790|}
_ZN4util5SplitINSt3__14spanIKcLm18446744073709551615EEEEENS1_6vectorIT_NS1_9allocatorIS6_EEEERKS4_cb:
  148|   164k|{
  149|   164k|    return Split<T>(sp, std::string_view{&sep, 1}, include_sep);
  150|   164k|}
_ZN4util5SplitINSt3__14spanIKcLm18446744073709551615EEEEENS1_6vectorIT_NS1_9allocatorIS6_EEEERKS4_NS1_17basic_string_viewIcNS1_11char_traitsIcEEEEb:
  120|   164k|{
  121|   164k|    std::vector<T> ret;
  122|   164k|    auto it = sp.begin();
  123|   164k|    auto start = it;
  124|  20.1M|    while (it != sp.end()) {
  ------------------
  |  Branch (124:12): [True: 19.9M, False: 164k]
  ------------------
  125|  19.9M|        if (separators.find(*it) != std::string::npos) {
  ------------------
  |  Branch (125:13): [True: 67.7k, False: 19.9M]
  ------------------
  126|  67.7k|            if (include_sep) {
  ------------------
  |  Branch (126:17): [True: 12.3k, False: 55.4k]
  ------------------
  127|  12.3k|                ret.emplace_back(start, it + 1);
  128|  55.4k|            } else {
  129|  55.4k|                ret.emplace_back(start, it);
  130|  55.4k|            }
  131|  67.7k|            start = it + 1;
  132|  67.7k|        }
  133|  19.9M|        ++it;
  134|  19.9M|    }
  135|   164k|    ret.emplace_back(start, it);
  136|   164k|    return ret;
  137|   164k|}
_ZN4util8ToStringIjEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKT_:
  250|  3.77k|{
  251|  3.77k|    std::ostringstream oss;
  252|  3.77k|    oss.imbue(std::locale::classic());
  253|  3.77k|    oss << t;
  254|  3.77k|    return oss.str();
  255|  3.77k|}

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

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

_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   54|  11.9k|{
   55|  11.9k|    Assert(mock_time_in >= 0s);
  ------------------
  |  |  116|  11.9k|#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
  ------------------
   56|  11.9k|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   57|  11.9k|}
_ZN19MockableSteadyClock13ClearMockTimeEv:
   84|  11.9k|{
   85|  11.9k|    g_mock_steady_time.store(0ms, std::memory_order_relaxed);
   86|  11.9k|}

_Z12UntranslatedNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   82|  9.35k|inline bilingual_str Untranslated(std::string original) { return {original, original}; }

descriptor.cpp:_Z6VectorIJNSt3__110unique_ptrIN12_GLOBAL__N_114PubkeyProviderENS0_14default_deleteIS3_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISC_EEEEDpOS9_:
   24|  4.39k|{
   25|  4.39k|    std::vector<std::common_type_t<Args...>> ret;
   26|  4.39k|    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.39k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  4.39k|    return ret;
   30|  4.39k|}
_Z6VectorIJ7CScriptEENSt3__16vectorINS1_11common_typeIJDpT_EE4typeENS1_9allocatorIS7_EEEEDpOS4_:
   24|  5.43k|{
   25|  5.43k|    std::vector<std::common_type_t<Args...>> ret;
   26|  5.43k|    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|  5.43k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  5.43k|    return ret;
   30|  5.43k|}
descriptor.cpp:_Z6VectorIJNSt3__110unique_ptrIN12_GLOBAL__N_114DescriptorImplENS0_14default_deleteIS3_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISC_EEEEDpOS9_:
   24|    449|{
   25|    449|    std::vector<std::common_type_t<Args...>> ret;
   26|    449|    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|    449|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|    449|    return ret;
   30|    449|}
_Z6VectorIJRK7CScriptEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|     24|{
   25|     24|    std::vector<std::common_type_t<Args...>> ret;
   26|     24|    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|     24|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|     24|    return ret;
   30|     24|}
_Z6VectorIJN10miniscript4NodeIjEEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|   525k|{
   25|   525k|    std::vector<std::common_type_t<Args...>> ret;
   26|   525k|    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|   525k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   525k|    return ret;
   30|   525k|}
_Z6VectorIJjEENSt3__16vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorIS6_EEEEDpOS3_:
   24|  3.55k|{
   25|  3.55k|    std::vector<std::common_type_t<Args...>> ret;
   26|  3.55k|    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.55k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  3.55k|    return ret;
   30|  3.55k|}
_Z6VectorIJN10miniscript4NodeIjEES2_EENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|   697k|{
   25|   697k|    std::vector<std::common_type_t<Args...>> ret;
   26|   697k|    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|   697k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   697k|    return ret;
   30|   697k|}
_Z6VectorIJN10miniscript4NodeIjEES2_S2_EENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  5.41k|{
   25|  5.41k|    std::vector<std::common_type_t<Args...>> ret;
   26|  5.41k|    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|  5.41k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  5.41k|    return ret;
   30|  5.41k|}
_Z6VectorIJN10miniscript8internal6MaxIntIjEEEENSt3__16vectorINS4_11common_typeIJDpT_EE4typeENS4_9allocatorISA_EEEEDpOS7_:
   24|   196k|{
   25|   196k|    std::vector<std::common_type_t<Args...>> ret;
   26|   196k|    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|   196k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   196k|    return ret;
   30|   196k|}
_Z6VectorIJN10miniscript8internal7SatInfoEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  98.1k|{
   25|  98.1k|    std::vector<std::common_type_t<Args...>> ret;
   26|  98.1k|    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|  98.1k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  98.1k|    return ret;
   30|  98.1k|}

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

