_ZN6PKHashC2ERK7CPubKey:
   23|  3.64k|PKHash::PKHash(const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {}
_ZN6PKHashC2ERK6CKeyID:
   24|  3.45k|PKHash::PKHash(const CKeyID& pubkey_id) : BaseHash(pubkey_id) {}
_Z18IsValidDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  171|  7.18k|bool IsValidDestination(const CTxDestination& dest) {
  172|  7.18k|    return std::visit(ValidDestinationVisitor(), dest);
  173|  7.18k|}
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK14CNoDestination:
  155|  3.38k|    bool operator()(const CNoDestination& dest) const { return false; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK6PKHash:
  157|  3.79k|    bool operator()(const PKHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK19WitnessV0ScriptHash:
  160|      1|    bool operator()(const WitnessV0ScriptHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK16WitnessV0KeyHash:
  159|      1|    bool operator()(const WitnessV0KeyHash& dest) const { return true; }
addresstype.cpp:_ZNK12_GLOBAL__N_123ValidDestinationVisitorclERK14WitnessUnknown:
  162|      2|    bool operator()(const WitnessUnknown& dest) const { return true; }

_ZN16WitnessV0KeyHashC2Ev:
   81|     11|    WitnessV0KeyHash() : BaseHash() {}
_ZN19WitnessV0ScriptHashC2Ev:
   74|     10|    WitnessV0ScriptHash() : BaseHash() {}
_ZN14WitnessUnknownC2EiRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  103|      2|    WitnessUnknown(int version, const std::vector<unsigned char>& program) : m_version(static_cast<unsigned int>(version)), m_program(program) {}
_ZN6PKHashC2ERK7uint160:
   50|  3.79k|    explicit PKHash(const uint160& hash) : BaseHash(hash) {}
_ZN14CNoDestinationC2Ev:
   25|  3.38k|    CNoDestination() = default;

_Z12EncodeBase58NSt3__14spanIKhLm18446744073709551615EEE:
   90|  3.45k|{
   91|       |    // Skip & count leading zeroes.
   92|  3.45k|    int zeroes = 0;
   93|  3.45k|    int length = 0;
   94|  3.45k|    while (input.size() > 0 && input[0] == 0) {
  ------------------
  |  Branch (94:12): [True: 3.45k, False: 0]
  |  Branch (94:32): [True: 0, False: 3.45k]
  ------------------
   95|      0|        input = input.subspan(1);
   96|      0|        zeroes++;
   97|      0|    }
   98|       |    // Allocate enough space in big-endian base58 representation.
   99|  3.45k|    int size = input.size() * 138 / 100 + 1; // log(256) / log(58), rounded up.
  100|  3.45k|    std::vector<unsigned char> b58(size);
  101|       |    // Process the bytes.
  102|  89.9k|    while (input.size() > 0) {
  ------------------
  |  Branch (102:12): [True: 86.4k, False: 3.45k]
  ------------------
  103|  86.4k|        int carry = input[0];
  104|  86.4k|        int i = 0;
  105|       |        // Apply "b58 = b58 * 256 + ch".
  106|  1.64M|        for (std::vector<unsigned char>::reverse_iterator it = b58.rbegin(); (carry != 0 || i < length) && (it != b58.rend()); it++, i++) {
  ------------------
  |  Branch (106:78): [True: 1.55M, False: 86.4k]
  |  Branch (106:79): [True: 1.55M, False: 92.0k]
  |  Branch (106:93): [True: 5.59k, False: 86.4k]
  |  Branch (106:108): [True: 1.55M, False: 0]
  ------------------
  107|  1.55M|            carry += 256 * (*it);
  108|  1.55M|            *it = carry % 58;
  109|  1.55M|            carry /= 58;
  110|  1.55M|        }
  111|       |
  112|  86.4k|        assert(carry == 0);
  ------------------
  |  Branch (112:9): [True: 86.4k, False: 0]
  ------------------
  113|  86.4k|        length = i;
  114|  86.4k|        input = input.subspan(1);
  115|  86.4k|    }
  116|       |    // Skip leading zeroes in base58 result.
  117|  3.45k|    std::vector<unsigned char>::iterator it = b58.begin() + (size - length);
  118|  3.45k|    while (it != b58.end() && *it == 0)
  ------------------
  |  Branch (118:12): [True: 3.45k, False: 0]
  |  Branch (118:12): [True: 0, False: 3.45k]
  |  Branch (118:31): [True: 0, False: 3.45k]
  ------------------
  119|      0|        it++;
  120|       |    // Translate the result into a string.
  121|  3.45k|    std::string str;
  122|  3.45k|    str.reserve(zeroes + (b58.end() - it));
  123|  3.45k|    str.assign(zeroes, '1');
  124|   121k|    while (it != b58.end())
  ------------------
  |  Branch (124:12): [True: 117k, False: 3.45k]
  ------------------
  125|   117k|        str += pszBase58[*(it++)];
  126|  3.45k|    return str;
  127|  3.45k|}
_Z12DecodeBase58RKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  130|  2.96k|{
  131|  2.96k|    if (ContainsNUL(str)) {
  ------------------
  |  Branch (131:9): [True: 75, False: 2.88k]
  ------------------
  132|     75|        return false;
  133|     75|    }
  134|  2.88k|    return DecodeBase58(str.c_str(), vchRet, max_ret_len);
  135|  2.96k|}
_Z17EncodeBase58CheckNSt3__14spanIKhLm18446744073709551615EEE:
  138|  3.45k|{
  139|       |    // add 4-byte hash check to the end
  140|  3.45k|    std::vector<unsigned char> vch(input.begin(), input.end());
  141|  3.45k|    uint256 hash = Hash(vch);
  142|  3.45k|    vch.insert(vch.end(), hash.data(), hash.data() + 4);
  143|  3.45k|    return EncodeBase58(vch);
  144|  3.45k|}
_Z17DecodeBase58CheckRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIhNS3_IhEEEEi:
  164|  6.77k|{
  165|  6.77k|    if (ContainsNUL(str)) {
  ------------------
  |  Branch (165:9): [True: 75, False: 6.69k]
  ------------------
  166|     75|        return false;
  167|     75|    }
  168|  6.69k|    return DecodeBase58Check(str.c_str(), vchRet, max_ret);
  169|  6.77k|}
base58.cpp:_ZL12DecodeBase58PKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
   41|  9.58k|{
   42|       |    // Skip leading spaces.
   43|  10.9k|    while (*psz && IsSpace(*psz))
  ------------------
  |  Branch (43:12): [True: 5.66k, False: 5.32k]
  |  Branch (43:20): [True: 1.40k, False: 4.26k]
  ------------------
   44|  1.40k|        psz++;
   45|       |    // Skip and count leading '1's.
   46|  9.58k|    int zeroes = 0;
   47|  9.58k|    int length = 0;
   48|  10.9k|    while (*psz == '1') {
  ------------------
  |  Branch (48:12): [True: 1.35k, False: 9.57k]
  ------------------
   49|  1.35k|        zeroes++;
   50|  1.35k|        if (zeroes > max_ret_len) return false;
  ------------------
  |  Branch (50:13): [True: 13, False: 1.34k]
  ------------------
   51|  1.34k|        psz++;
   52|  1.34k|    }
   53|       |    // Allocate enough space in big-endian base256 representation.
   54|  9.57k|    int size = strlen(psz) * 733 /1000 + 1; // log(58) / log(256), rounded up.
   55|  9.57k|    std::vector<unsigned char> b256(size);
   56|       |    // Process the characters.
   57|  9.57k|    static_assert(std::size(mapBase58) == 256, "mapBase58.size() should be 256"); // guarantee not out of range
   58|   140k|    while (*psz && !IsSpace(*psz)) {
  ------------------
  |  Branch (58:12): [True: 130k, False: 9.24k]
  |  Branch (58:20): [True: 130k, False: 117]
  ------------------
   59|       |        // Decode base58 character
   60|   130k|        int carry = mapBase58[(uint8_t)*psz];
   61|   130k|        if (carry == -1)  // Invalid b58 character
  ------------------
  |  Branch (61:13): [True: 193, False: 130k]
  ------------------
   62|    193|            return false;
   63|   130k|        int i = 0;
   64|  1.86M|        for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
  ------------------
  |  Branch (64:79): [True: 1.73M, False: 130k]
  |  Branch (64:80): [True: 1.70M, False: 158k]
  |  Branch (64:94): [True: 27.5k, False: 130k]
  |  Branch (64:109): [True: 1.73M, False: 0]
  ------------------
   65|  1.73M|            carry += 58 * (*it);
   66|  1.73M|            *it = carry % 256;
   67|  1.73M|            carry /= 256;
   68|  1.73M|        }
   69|   130k|        assert(carry == 0);
  ------------------
  |  Branch (69:9): [True: 130k, False: 0]
  ------------------
   70|   130k|        length = i;
   71|   130k|        if (length + zeroes > max_ret_len) return false;
  ------------------
  |  Branch (71:13): [True: 14, False: 130k]
  ------------------
   72|   130k|        psz++;
   73|   130k|    }
   74|       |    // Skip trailing spaces.
   75|  10.6k|    while (IsSpace(*psz))
  ------------------
  |  Branch (75:12): [True: 1.24k, False: 9.36k]
  ------------------
   76|  1.24k|        psz++;
   77|  9.36k|    if (*psz != 0)
  ------------------
  |  Branch (77:9): [True: 35, False: 9.32k]
  ------------------
   78|     35|        return false;
   79|       |    // Skip leading zeroes in b256.
   80|  9.32k|    std::vector<unsigned char>::iterator it = b256.begin() + (size - length);
   81|       |    // Copy result into output vector.
   82|  9.32k|    vch.reserve(zeroes + (b256.end() - it));
   83|  9.32k|    vch.assign(zeroes, 0x00);
   84|   104k|    while (it != b256.end())
  ------------------
  |  Branch (84:12): [True: 95.5k, False: 9.32k]
  ------------------
   85|  95.5k|        vch.push_back(*(it++));
   86|  9.32k|    return true;
   87|  9.36k|}
base58.cpp:_ZL17DecodeBase58CheckPKcRNSt3__16vectorIhNS1_9allocatorIhEEEEi:
  147|  6.69k|{
  148|  6.69k|    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: 137, False: 6.56k]
  |  Branch (148:36): [True: 0, False: 6.69k]
  ------------------
  149|  6.56k|        (vchRet.size() < 4)) {
  ------------------
  |  Branch (149:9): [True: 2.72k, False: 3.84k]
  ------------------
  150|  2.85k|        vchRet.clear();
  151|  2.85k|        return false;
  152|  2.85k|    }
  153|       |    // re-calculate the checksum, ensure it matches the included 4-byte checksum
  154|  3.84k|    uint256 hash = Hash(std::span{vchRet}.first(vchRet.size() - 4));
  155|  3.84k|    if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
  ------------------
  |  Branch (155:9): [True: 26, False: 3.81k]
  ------------------
  156|     26|        vchRet.clear();
  157|     26|        return false;
  158|     26|    }
  159|  3.81k|    vchRet.resize(vchRet.size() - 4);
  160|  3.81k|    return true;
  161|  3.84k|}

_ZN6bech326DecodeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS_9CharLimitE:
  373|    406|DecodeResult Decode(const std::string& str, CharLimit limit) {
  374|    406|    std::vector<int> errors;
  375|    406|    if (!CheckCharacters(str, errors)) return {};
  ------------------
  |  Branch (375:9): [True: 99, False: 307]
  ------------------
  376|    307|    size_t pos = str.rfind(SEPARATOR);
  377|    307|    if (str.size() > limit) return {};
  ------------------
  |  Branch (377:9): [True: 8, False: 299]
  ------------------
  378|    299|    if (pos == str.npos || pos == 0 || pos + CHECKSUM_SIZE >= str.size()) {
  ------------------
  |  Branch (378:9): [True: 15, False: 284]
  |  Branch (378:28): [True: 0, False: 284]
  |  Branch (378:40): [True: 13, False: 271]
  ------------------
  379|     28|        return {};
  380|     28|    }
  381|    271|    data values(str.size() - 1 - pos);
  382|  4.69k|    for (size_t i = 0; i < str.size() - 1 - pos; ++i) {
  ------------------
  |  Branch (382:24): [True: 4.43k, False: 262]
  ------------------
  383|  4.43k|        unsigned char c = str[i + pos + 1];
  384|  4.43k|        int8_t rev = CHARSET_REV[c];
  385|       |
  386|  4.43k|        if (rev == -1) {
  ------------------
  |  Branch (386:13): [True: 9, False: 4.42k]
  ------------------
  387|      9|            return {};
  388|      9|        }
  389|  4.42k|        values[i] = rev;
  390|  4.42k|    }
  391|    262|    std::string hrp;
  392|    262|    hrp.reserve(pos);
  393|  2.99k|    for (size_t i = 0; i < pos; ++i) {
  ------------------
  |  Branch (393:24): [True: 2.73k, False: 262]
  ------------------
  394|  2.73k|        hrp += LowerCase(str[i]);
  395|  2.73k|    }
  396|    262|    Encoding result = VerifyChecksum(hrp, values);
  397|    262|    if (result == Encoding::INVALID) return {};
  ------------------
  |  Branch (397:9): [True: 224, False: 38]
  ------------------
  398|     38|    return {result, std::move(hrp), data(values.begin(), values.end() - CHECKSUM_SIZE)};
  399|    262|}
_ZN6bech3212LocateErrorsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS_9CharLimitE:
  402|    368|std::pair<std::string, std::vector<int>> LocateErrors(const std::string& str, CharLimit limit) {
  403|    368|    std::vector<int> error_locations{};
  404|       |
  405|    368|    if (str.size() > limit) {
  ------------------
  |  Branch (405:9): [True: 46, False: 322]
  ------------------
  406|     46|        error_locations.push_back(static_cast<int>(limit));
  407|     46|        return std::make_pair("Bech32 string too long", std::move(error_locations));
  408|     46|    }
  409|       |
  410|    322|    if (!CheckCharacters(str, error_locations)){
  ------------------
  |  Branch (410:9): [True: 61, False: 261]
  ------------------
  411|     61|        return std::make_pair("Invalid character or mixed case", std::move(error_locations));
  412|     61|    }
  413|       |
  414|    261|    size_t pos = str.rfind(SEPARATOR);
  415|    261|    if (pos == str.npos) {
  ------------------
  |  Branch (415:9): [True: 15, False: 246]
  ------------------
  416|     15|        return std::make_pair("Missing separator", std::vector<int>{});
  417|     15|    }
  418|    246|    if (pos == 0 || pos + CHECKSUM_SIZE >= str.size()) {
  ------------------
  |  Branch (418:9): [True: 0, False: 246]
  |  Branch (418:21): [True: 13, False: 233]
  ------------------
  419|     13|        error_locations.push_back(pos);
  420|     13|        return std::make_pair("Invalid separator position", std::move(error_locations));
  421|     13|    }
  422|       |
  423|    233|    std::string hrp;
  424|    233|    hrp.reserve(pos);
  425|  2.87k|    for (size_t i = 0; i < pos; ++i) {
  ------------------
  |  Branch (425:24): [True: 2.64k, False: 233]
  ------------------
  426|  2.64k|        hrp += LowerCase(str[i]);
  427|  2.64k|    }
  428|       |
  429|    233|    size_t length = str.size() - 1 - pos; // length of data part
  430|    233|    data values(length);
  431|  3.37k|    for (size_t i = pos + 1; i < str.size(); ++i) {
  ------------------
  |  Branch (431:30): [True: 3.15k, False: 224]
  ------------------
  432|  3.15k|        unsigned char c = str[i];
  433|  3.15k|        int8_t rev = CHARSET_REV[c];
  434|  3.15k|        if (rev == -1) {
  ------------------
  |  Branch (434:13): [True: 9, False: 3.14k]
  ------------------
  435|      9|            error_locations.push_back(i);
  436|      9|            return std::make_pair("Invalid Base 32 character", std::move(error_locations));
  437|      9|        }
  438|  3.14k|        values[i - pos - 1] = rev;
  439|  3.14k|    }
  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|    224|    std::optional<Encoding> error_encoding;
  444|    448|    for (Encoding encoding : {Encoding::BECH32, Encoding::BECH32M}) {
  ------------------
  |  Branch (444:28): [True: 448, False: 224]
  ------------------
  445|    448|        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|    448|        auto enc = PreparePolynomialCoefficients(hrp, values);
  449|    448|        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|    448|        if (residue != 0) {
  ------------------
  |  Branch (453:13): [True: 448, 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|    448|            uint32_t syn = Syndrome(residue);
  457|       |
  458|       |            // Unpack the three 10-bit syndrome values
  459|    448|            int s0 = syn & 0x3FF;
  460|    448|            int s1 = (syn >> 10) & 0x3FF;
  461|    448|            int s2 = syn >> 20;
  462|       |
  463|       |            // Get the discrete logs of these values in GF1024 for more efficient computation
  464|    448|            int l_s0 = GF1024_LOG.at(s0);
  465|    448|            int l_s1 = GF1024_LOG.at(s1);
  466|    448|            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|    448|            if (l_s0 != -1 && l_s1 != -1 && l_s2 != -1 && (2 * l_s1 - l_s2 - l_s0 + 2046) % 1023 == 0) {
  ------------------
  |  Branch (472:17): [True: 428, False: 20]
  |  Branch (472:31): [True: 412, False: 16]
  |  Branch (472:45): [True: 410, False: 2]
  |  Branch (472:59): [True: 27, False: 383]
  ------------------
  473|       |                // Compute the error position p1 as l_s1 - l_s0 = p1 (mod 1023)
  474|     27|                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|     27|                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|     27|                if (p1 < length && !(l_e1 % 33)) {
  ------------------
  |  Branch (482:21): [True: 14, False: 13]
  |  Branch (482:36): [True: 12, False: 2]
  ------------------
  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|     12|                    possible_errors.push_back(str.size() - p1 - 1);
  487|     12|                }
  488|       |            // Otherwise, suppose there are two errors. Then E(x) = e1*x^p1 + e2*x^p2.
  489|    421|            } else {
  490|       |                // For all possible first error positions p1
  491|  5.82k|                for (size_t p1 = 0; p1 < length; ++p1) {
  ------------------
  |  Branch (491:37): [True: 5.44k, False: 386]
  ------------------
  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.44k|                    int s2_s1p1 = s2 ^ (s1 == 0 ? 0 : GF1024_EXP.at((l_s1 + p1) % 1023));
  ------------------
  |  Branch (501:41): [True: 397, False: 5.04k]
  ------------------
  502|  5.44k|                    if (s2_s1p1 == 0) continue;
  ------------------
  |  Branch (502:25): [True: 76, False: 5.36k]
  ------------------
  503|  5.36k|                    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.36k|                    int s1_s0p1 = s1 ^ (s0 == 0 ? 0 : GF1024_EXP.at((l_s0 + p1) % 1023));
  ------------------
  |  Branch (507:41): [True: 362, False: 5.00k]
  ------------------
  508|  5.36k|                    if (s1_s0p1 == 0) continue;
  ------------------
  |  Branch (508:25): [True: 72, False: 5.29k]
  ------------------
  509|  5.29k|                    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.29k|                    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.29k|                    if (p2 >= length || p1 == p2) continue;
  ------------------
  |  Branch (517:25): [True: 4.71k, False: 577]
  |  Branch (517:41): [True: 75, False: 502]
  ------------------
  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|    502|                    int s1_s0p2 = s1 ^ (s0 == 0 ? 0 : GF1024_EXP.at((l_s0 + p2) % 1023));
  ------------------
  |  Branch (522:41): [True: 40, False: 462]
  ------------------
  523|    502|                    if (s1_s0p2 == 0) continue;
  ------------------
  |  Branch (523:25): [True: 0, False: 502]
  ------------------
  524|    502|                    int l_s1_s0p2 = GF1024_LOG.at(s1_s0p2);
  525|       |
  526|       |                    // And compute (the log of) 1/((e)^p1 + (e)^p2))
  527|    502|                    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|    502|                    int l_e2 = l_s1_s0p1 + inv_p1_p2 + (1023 - 997) * p2;
  533|       |                    // Check that e2 is in GF(32)
  534|    502|                    if (l_e2 % 33) continue;
  ------------------
  |  Branch (534:25): [True: 427, False: 75]
  ------------------
  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|     75|                    int l_e1 = l_s1_s0p2 + inv_p1_p2 + (1023 - 997) * p1;
  540|       |                    // Check that e1 is in GF(32)
  541|     75|                    if (l_e1 % 33) continue;
  ------------------
  |  Branch (541:25): [True: 40, 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|     75|                }
  554|    421|            }
  555|    448|        } else {
  556|       |            // No errors
  557|      0|            return std::make_pair("", std::vector<int>{});
  558|      0|        }
  559|       |
  560|    448|        if (error_locations.empty() || (!possible_errors.empty() && possible_errors.size() < error_locations.size())) {
  ------------------
  |  Branch (560:13): [True: 417, False: 31]
  |  Branch (560:41): [True: 3, False: 28]
  |  Branch (560:69): [True: 1, False: 2]
  ------------------
  561|    418|            error_locations = std::move(possible_errors);
  562|    418|            if (!error_locations.empty()) error_encoding = encoding;
  ------------------
  |  Branch (562:17): [True: 45, False: 373]
  ------------------
  563|    418|        }
  564|    448|    }
  565|    224|    std::string error_message = error_encoding == Encoding::BECH32M ? "Invalid Bech32m checksum"
  ------------------
  |  Branch (565:33): [True: 14, False: 210]
  ------------------
  566|    224|                              : error_encoding == Encoding::BECH32 ? "Invalid Bech32 checksum"
  ------------------
  |  Branch (566:33): [True: 30, False: 180]
  ------------------
  567|    210|                              : "Invalid checksum";
  568|       |
  569|    224|    return std::make_pair(error_message, std::move(error_locations));
  570|    224|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_115CheckCharactersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS1_6vectorIiNS5_IiEEEE:
  287|    728|{
  288|    728|    bool lower = false, upper = false;
  289|  31.5k|    for (size_t i = 0; i < str.size(); ++i) {
  ------------------
  |  Branch (289:24): [True: 30.8k, False: 728]
  ------------------
  290|  30.8k|        unsigned char c{(unsigned char)(str[i])};
  291|  30.8k|        if (c >= 'a' && c <= 'z') {
  ------------------
  |  Branch (291:13): [True: 17.5k, False: 13.3k]
  |  Branch (291:25): [True: 14.0k, False: 3.45k]
  ------------------
  292|  14.0k|            if (upper) {
  ------------------
  |  Branch (292:17): [True: 1.55k, False: 12.5k]
  ------------------
  293|  1.55k|                errors.push_back(i);
  294|  12.5k|            } else {
  295|  12.5k|                lower = true;
  296|  12.5k|            }
  297|  16.7k|        } else if (c >= 'A' && c <= 'Z') {
  ------------------
  |  Branch (297:20): [True: 7.13k, False: 9.62k]
  |  Branch (297:32): [True: 3.44k, False: 3.68k]
  ------------------
  298|  3.44k|            if (lower) {
  ------------------
  |  Branch (298:17): [True: 629, False: 2.81k]
  ------------------
  299|    629|                errors.push_back(i);
  300|  2.81k|            } else {
  301|  2.81k|                upper = true;
  302|  2.81k|            }
  303|  13.3k|        } else if (c < 33 || c > 126) {
  ------------------
  |  Branch (303:20): [True: 3.58k, False: 9.72k]
  |  Branch (303:30): [True: 3.17k, False: 6.54k]
  ------------------
  304|  6.76k|            errors.push_back(i);
  305|  6.76k|        }
  306|  30.8k|    }
  307|    728|    return errors.empty();
  308|    728|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_19LowerCaseEh:
  281|  5.37k|{
  282|  5.37k|    return (c >= 'A' && c <= 'Z') ? (c - 'A') + 'a' : c;
  ------------------
  |  Branch (282:13): [True: 3.99k, False: 1.37k]
  |  Branch (282:25): [True: 1.33k, False: 2.66k]
  ------------------
  283|  5.37k|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_114VerifyChecksumERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
  327|    262|{
  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|    262|    auto enc = PreparePolynomialCoefficients(hrp, values);
  334|    262|    const uint32_t check = PolyMod(enc);
  335|    262|    if (check == EncodingConstant(Encoding::BECH32)) return Encoding::BECH32;
  ------------------
  |  Branch (335:9): [True: 29, False: 233]
  ------------------
  336|    233|    if (check == EncodingConstant(Encoding::BECH32M)) return Encoding::BECH32M;
  ------------------
  |  Branch (336:9): [True: 9, False: 224]
  ------------------
  337|    224|    return Encoding::INVALID;
  338|    233|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_129PreparePolynomialCoefficientsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
  311|    710|{
  312|    710|    data ret;
  313|    710|    ret.reserve(hrp.size() + 1 + hrp.size() + values.size() + CHECKSUM_SIZE);
  314|       |
  315|       |    /** Expand a HRP for use in checksum computation. */
  316|  8.52k|    for (size_t i = 0; i < hrp.size(); ++i) ret.push_back(hrp[i] >> 5);
  ------------------
  |  Branch (316:24): [True: 7.81k, False: 710]
  ------------------
  317|    710|    ret.push_back(0);
  318|  8.52k|    for (size_t i = 0; i < hrp.size(); ++i) ret.push_back(hrp[i] & 0x1f);
  ------------------
  |  Branch (318:24): [True: 7.81k, False: 710]
  ------------------
  319|       |
  320|    710|    ret.insert(ret.end(), values.begin(), values.end());
  321|       |
  322|    710|    return ret;
  323|    710|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_17PolyModERKNSt3__16vectorIhNS1_9allocatorIhEEEE:
  130|    710|{
  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|    710|    uint32_t c = 1;
  177|  27.0k|    for (const auto v_i : v) {
  ------------------
  |  Branch (177:25): [True: 27.0k, False: 710]
  ------------------
  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|  27.0k|        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|  27.0k|        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|  27.0k|        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.3k, False: 15.6k]
  ------------------
  208|  27.0k|        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.3k, False: 14.6k]
  ------------------
  209|  27.0k|        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.3k, False: 15.6k]
  ------------------
  210|  27.0k|        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.6k, False: 15.3k]
  ------------------
  211|  27.0k|        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.1k, False: 16.8k]
  ------------------
  212|       |
  213|  27.0k|    }
  214|    710|    return c;
  215|    710|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_116EncodingConstantENS_8EncodingE:
  121|    943|uint32_t EncodingConstant(Encoding encoding) {
  122|    943|    assert(encoding == Encoding::BECH32 || encoding == Encoding::BECH32M);
  ------------------
  |  Branch (122:5): [True: 486, False: 457]
  |  Branch (122:5): [True: 457, False: 0]
  |  Branch (122:5): [True: 943, False: 0]
  ------------------
  123|    943|    return encoding == Encoding::BECH32 ? 1 : 0x2bc830a3;
  ------------------
  |  Branch (123:12): [True: 486, False: 457]
  ------------------
  124|    943|}
bech32.cpp:_ZN6bech3212_GLOBAL__N_18SyndromeEj:
  260|    448|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|    448|    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|    448|    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|  11.6k|    for (int i = 0; i < 25; ++i) {
  ------------------
  |  Branch (273:21): [True: 11.2k, False: 448]
  ------------------
  274|  11.2k|        result ^= ((residue >> (5+i)) & 1 ? SYNDROME_CONSTS.at(i) : 0);
  ------------------
  |  Branch (274:20): [True: 5.30k, False: 5.89k]
  ------------------
  275|  11.2k|    }
  276|    448|    return result;
  277|    448|}

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

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

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

_Z13MessageVerifyRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_S7_:
   33|  7.18k|{
   34|  7.18k|    CTxDestination destination = DecodeDestination(address);
   35|  7.18k|    if (!IsValidDestination(destination)) {
  ------------------
  |  Branch (35:9): [True: 3.38k, False: 3.79k]
  ------------------
   36|  3.38k|        return MessageVerificationResult::ERR_INVALID_ADDRESS;
   37|  3.38k|    }
   38|       |
   39|  3.79k|    if (std::get_if<PKHash>(&destination) == nullptr) {
  ------------------
  |  Branch (39:9): [True: 4, False: 3.79k]
  ------------------
   40|      4|        return MessageVerificationResult::ERR_ADDRESS_NO_KEY;
   41|      4|    }
   42|       |
   43|  3.79k|    auto signature_bytes = DecodeBase64(signature);
   44|  3.79k|    if (!signature_bytes) {
  ------------------
  |  Branch (44:9): [True: 24, False: 3.76k]
  ------------------
   45|     24|        return MessageVerificationResult::ERR_MALFORMED_SIGNATURE;
   46|     24|    }
   47|       |
   48|  3.76k|    CPubKey pubkey;
   49|  3.76k|    if (!pubkey.RecoverCompact(MessageHash(message), *signature_bytes)) {
  ------------------
  |  Branch (49:9): [True: 123, False: 3.64k]
  ------------------
   50|    123|        return MessageVerificationResult::ERR_PUBKEY_NOT_RECOVERED;
   51|    123|    }
   52|       |
   53|  3.64k|    if (!(PKHash(pubkey) == *std::get_if<PKHash>(&destination))) {
  ------------------
  |  Branch (53:9): [True: 187, False: 3.45k]
  ------------------
   54|    187|        return MessageVerificationResult::ERR_NOT_SIGNED;
   55|    187|    }
   56|       |
   57|  3.45k|    return MessageVerificationResult::OK;
   58|  3.64k|}
_Z11MessageSignRK4CKeyRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERS8_:
   64|  3.72k|{
   65|  3.72k|    std::vector<unsigned char> signature_bytes;
   66|       |
   67|  3.72k|    if (!privkey.SignCompact(MessageHash(message), signature_bytes)) {
  ------------------
  |  Branch (67:9): [True: 264, False: 3.45k]
  ------------------
   68|    264|        return false;
   69|    264|    }
   70|       |
   71|  3.45k|    signature = EncodeBase64(signature_bytes);
   72|       |
   73|  3.45k|    return true;
   74|  3.72k|}
_Z11MessageHashRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   77|  11.2k|{
   78|  11.2k|    HashWriter hasher{};
   79|  11.2k|    hasher << MESSAGE_MAGIC << message;
   80|       |
   81|  11.2k|    return hasher.GetHash();
   82|  11.2k|}
_Z19SigningResultString13SigningResult:
   85|  3.72k|{
   86|  3.72k|    switch (res) {
  ------------------
  |  Branch (86:13): [True: 3.72k, False: 0]
  ------------------
   87|  3.65k|        case SigningResult::OK:
  ------------------
  |  Branch (87:9): [True: 3.65k, False: 67]
  ------------------
   88|  3.65k|            return "No error";
   89|     41|        case SigningResult::PRIVATE_KEY_NOT_AVAILABLE:
  ------------------
  |  Branch (89:9): [True: 41, False: 3.68k]
  ------------------
   90|     41|            return "Private key not available";
   91|     26|        case SigningResult::SIGNING_FAILED:
  ------------------
  |  Branch (91:9): [True: 26, False: 3.69k]
  ------------------
   92|     26|            return "Sign failed";
   93|  3.72k|    } // no default case, so the compiler can warn about missing cases
   94|  3.72k|    assert(false);
  ------------------
  |  Branch (94:5): [Folded, False: 0]
  ------------------
   95|      0|}

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

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

_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|   113k|{
   29|   113k|    uint32_t x;
   30|   113k|    memcpy(&x, ptr, 4);
   31|   113k|    return le32toh_internal(x);
   32|   113k|}
_Z9WriteLE32ITk8ByteTypehEvPT_j:
   51|  35.5k|{
   52|  35.5k|    uint32_t v = htole32_internal(x);
   53|  35.5k|    memcpy(ptr, &v, 4);
   54|  35.5k|}
_Z8ReadBE32ITk8ByteTypehEjPKT_:
   73|   844k|{
   74|   844k|    uint32_t x;
   75|   844k|    memcpy(&x, ptr, 4);
   76|   844k|    return be32toh_internal(x);
   77|   844k|}
_Z9WriteBE32ITk8ByteTypehEvPT_j:
   96|   352k|{
   97|   352k|    uint32_t v = htobe32_internal(x);
   98|   352k|    memcpy(ptr, &v, 4);
   99|   352k|}
_Z9WriteLE64ITk8ByteTypehEvPT_m:
   58|  7.10k|{
   59|  7.10k|    uint64_t v = htole64_internal(x);
   60|  7.10k|    memcpy(ptr, &v, 8);
   61|  7.10k|}
_Z9WriteBE64ITk8ByteTypehEvPT_m:
  103|  44.1k|{
  104|  44.1k|    uint64_t v = htobe64_internal(x);
  105|  44.1k|    memcpy(ptr, &v, 8);
  106|  44.1k|}

_ZN10CRIPEMD160C2Ev:
  243|  7.10k|{
  244|  7.10k|    ripemd160::Initialize(s);
  245|  7.10k|}
_ZN10CRIPEMD1605WriteEPKhm:
  248|  21.3k|{
  249|  21.3k|    const unsigned char* end = data + len;
  250|  21.3k|    size_t bufsize = bytes % 64;
  251|  21.3k|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (251:9): [True: 14.2k, False: 7.10k]
  |  Branch (251:20): [True: 7.10k, False: 7.10k]
  ------------------
  252|       |        // Fill the buffer, and process it.
  253|  7.10k|        memcpy(buf + bufsize, data, 64 - bufsize);
  254|  7.10k|        bytes += 64 - bufsize;
  255|  7.10k|        data += 64 - bufsize;
  256|  7.10k|        ripemd160::Transform(s, buf);
  257|  7.10k|        bufsize = 0;
  258|  7.10k|    }
  259|  21.3k|    while (end - data >= 64) {
  ------------------
  |  Branch (259:12): [True: 0, False: 21.3k]
  ------------------
  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|  21.3k|    if (end > data) {
  ------------------
  |  Branch (265:9): [True: 14.2k, False: 7.10k]
  ------------------
  266|       |        // Fill the buffer with what remains.
  267|  14.2k|        memcpy(buf + bufsize, data, end - data);
  268|  14.2k|        bytes += end - data;
  269|  14.2k|    }
  270|  21.3k|    return *this;
  271|  21.3k|}
_ZN10CRIPEMD1608FinalizeEPh:
  274|  7.10k|{
  275|  7.10k|    static const unsigned char pad[64] = {0x80};
  276|  7.10k|    unsigned char sizedesc[8];
  277|  7.10k|    WriteLE64(sizedesc, bytes << 3);
  278|  7.10k|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  279|  7.10k|    Write(sizedesc, 8);
  280|  7.10k|    WriteLE32(hash, s[0]);
  281|  7.10k|    WriteLE32(hash + 4, s[1]);
  282|  7.10k|    WriteLE32(hash + 8, s[2]);
  283|  7.10k|    WriteLE32(hash + 12, s[3]);
  284|  7.10k|    WriteLE32(hash + 16, s[4]);
  285|  7.10k|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd16010InitializeEPj:
   25|  7.10k|{
   26|  7.10k|    s[0] = 0x67452301ul;
   27|  7.10k|    s[1] = 0xEFCDAB89ul;
   28|  7.10k|    s[2] = 0x98BADCFEul;
   29|  7.10k|    s[3] = 0x10325476ul;
   30|  7.10k|    s[4] = 0xC3D2E1F0ul;
   31|  7.10k|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1609TransformEPjPKh:
   55|  7.10k|{
   56|  7.10k|    uint32_t a1 = s[0], b1 = s[1], c1 = s[2], d1 = s[3], e1 = s[4];
   57|  7.10k|    uint32_t a2 = a1, b2 = b1, c2 = c1, d2 = d1, e2 = e1;
   58|  7.10k|    uint32_t w0 = ReadLE32(chunk + 0), w1 = ReadLE32(chunk + 4), w2 = ReadLE32(chunk + 8), w3 = ReadLE32(chunk + 12);
   59|  7.10k|    uint32_t w4 = ReadLE32(chunk + 16), w5 = ReadLE32(chunk + 20), w6 = ReadLE32(chunk + 24), w7 = ReadLE32(chunk + 28);
   60|  7.10k|    uint32_t w8 = ReadLE32(chunk + 32), w9 = ReadLE32(chunk + 36), w10 = ReadLE32(chunk + 40), w11 = ReadLE32(chunk + 44);
   61|  7.10k|    uint32_t w12 = ReadLE32(chunk + 48), w13 = ReadLE32(chunk + 52), w14 = ReadLE32(chunk + 56), w15 = ReadLE32(chunk + 60);
   62|       |
   63|  7.10k|    R11(a1, b1, c1, d1, e1, w0, 11);
   64|  7.10k|    R12(a2, b2, c2, d2, e2, w5, 8);
   65|  7.10k|    R11(e1, a1, b1, c1, d1, w1, 14);
   66|  7.10k|    R12(e2, a2, b2, c2, d2, w14, 9);
   67|  7.10k|    R11(d1, e1, a1, b1, c1, w2, 15);
   68|  7.10k|    R12(d2, e2, a2, b2, c2, w7, 9);
   69|  7.10k|    R11(c1, d1, e1, a1, b1, w3, 12);
   70|  7.10k|    R12(c2, d2, e2, a2, b2, w0, 11);
   71|  7.10k|    R11(b1, c1, d1, e1, a1, w4, 5);
   72|  7.10k|    R12(b2, c2, d2, e2, a2, w9, 13);
   73|  7.10k|    R11(a1, b1, c1, d1, e1, w5, 8);
   74|  7.10k|    R12(a2, b2, c2, d2, e2, w2, 15);
   75|  7.10k|    R11(e1, a1, b1, c1, d1, w6, 7);
   76|  7.10k|    R12(e2, a2, b2, c2, d2, w11, 15);
   77|  7.10k|    R11(d1, e1, a1, b1, c1, w7, 9);
   78|  7.10k|    R12(d2, e2, a2, b2, c2, w4, 5);
   79|  7.10k|    R11(c1, d1, e1, a1, b1, w8, 11);
   80|  7.10k|    R12(c2, d2, e2, a2, b2, w13, 7);
   81|  7.10k|    R11(b1, c1, d1, e1, a1, w9, 13);
   82|  7.10k|    R12(b2, c2, d2, e2, a2, w6, 7);
   83|  7.10k|    R11(a1, b1, c1, d1, e1, w10, 14);
   84|  7.10k|    R12(a2, b2, c2, d2, e2, w15, 8);
   85|  7.10k|    R11(e1, a1, b1, c1, d1, w11, 15);
   86|  7.10k|    R12(e2, a2, b2, c2, d2, w8, 11);
   87|  7.10k|    R11(d1, e1, a1, b1, c1, w12, 6);
   88|  7.10k|    R12(d2, e2, a2, b2, c2, w1, 14);
   89|  7.10k|    R11(c1, d1, e1, a1, b1, w13, 7);
   90|  7.10k|    R12(c2, d2, e2, a2, b2, w10, 14);
   91|  7.10k|    R11(b1, c1, d1, e1, a1, w14, 9);
   92|  7.10k|    R12(b2, c2, d2, e2, a2, w3, 12);
   93|  7.10k|    R11(a1, b1, c1, d1, e1, w15, 8);
   94|  7.10k|    R12(a2, b2, c2, d2, e2, w12, 6);
   95|       |
   96|  7.10k|    R21(e1, a1, b1, c1, d1, w7, 7);
   97|  7.10k|    R22(e2, a2, b2, c2, d2, w6, 9);
   98|  7.10k|    R21(d1, e1, a1, b1, c1, w4, 6);
   99|  7.10k|    R22(d2, e2, a2, b2, c2, w11, 13);
  100|  7.10k|    R21(c1, d1, e1, a1, b1, w13, 8);
  101|  7.10k|    R22(c2, d2, e2, a2, b2, w3, 15);
  102|  7.10k|    R21(b1, c1, d1, e1, a1, w1, 13);
  103|  7.10k|    R22(b2, c2, d2, e2, a2, w7, 7);
  104|  7.10k|    R21(a1, b1, c1, d1, e1, w10, 11);
  105|  7.10k|    R22(a2, b2, c2, d2, e2, w0, 12);
  106|  7.10k|    R21(e1, a1, b1, c1, d1, w6, 9);
  107|  7.10k|    R22(e2, a2, b2, c2, d2, w13, 8);
  108|  7.10k|    R21(d1, e1, a1, b1, c1, w15, 7);
  109|  7.10k|    R22(d2, e2, a2, b2, c2, w5, 9);
  110|  7.10k|    R21(c1, d1, e1, a1, b1, w3, 15);
  111|  7.10k|    R22(c2, d2, e2, a2, b2, w10, 11);
  112|  7.10k|    R21(b1, c1, d1, e1, a1, w12, 7);
  113|  7.10k|    R22(b2, c2, d2, e2, a2, w14, 7);
  114|  7.10k|    R21(a1, b1, c1, d1, e1, w0, 12);
  115|  7.10k|    R22(a2, b2, c2, d2, e2, w15, 7);
  116|  7.10k|    R21(e1, a1, b1, c1, d1, w9, 15);
  117|  7.10k|    R22(e2, a2, b2, c2, d2, w8, 12);
  118|  7.10k|    R21(d1, e1, a1, b1, c1, w5, 9);
  119|  7.10k|    R22(d2, e2, a2, b2, c2, w12, 7);
  120|  7.10k|    R21(c1, d1, e1, a1, b1, w2, 11);
  121|  7.10k|    R22(c2, d2, e2, a2, b2, w4, 6);
  122|  7.10k|    R21(b1, c1, d1, e1, a1, w14, 7);
  123|  7.10k|    R22(b2, c2, d2, e2, a2, w9, 15);
  124|  7.10k|    R21(a1, b1, c1, d1, e1, w11, 13);
  125|  7.10k|    R22(a2, b2, c2, d2, e2, w1, 13);
  126|  7.10k|    R21(e1, a1, b1, c1, d1, w8, 12);
  127|  7.10k|    R22(e2, a2, b2, c2, d2, w2, 11);
  128|       |
  129|  7.10k|    R31(d1, e1, a1, b1, c1, w3, 11);
  130|  7.10k|    R32(d2, e2, a2, b2, c2, w15, 9);
  131|  7.10k|    R31(c1, d1, e1, a1, b1, w10, 13);
  132|  7.10k|    R32(c2, d2, e2, a2, b2, w5, 7);
  133|  7.10k|    R31(b1, c1, d1, e1, a1, w14, 6);
  134|  7.10k|    R32(b2, c2, d2, e2, a2, w1, 15);
  135|  7.10k|    R31(a1, b1, c1, d1, e1, w4, 7);
  136|  7.10k|    R32(a2, b2, c2, d2, e2, w3, 11);
  137|  7.10k|    R31(e1, a1, b1, c1, d1, w9, 14);
  138|  7.10k|    R32(e2, a2, b2, c2, d2, w7, 8);
  139|  7.10k|    R31(d1, e1, a1, b1, c1, w15, 9);
  140|  7.10k|    R32(d2, e2, a2, b2, c2, w14, 6);
  141|  7.10k|    R31(c1, d1, e1, a1, b1, w8, 13);
  142|  7.10k|    R32(c2, d2, e2, a2, b2, w6, 6);
  143|  7.10k|    R31(b1, c1, d1, e1, a1, w1, 15);
  144|  7.10k|    R32(b2, c2, d2, e2, a2, w9, 14);
  145|  7.10k|    R31(a1, b1, c1, d1, e1, w2, 14);
  146|  7.10k|    R32(a2, b2, c2, d2, e2, w11, 12);
  147|  7.10k|    R31(e1, a1, b1, c1, d1, w7, 8);
  148|  7.10k|    R32(e2, a2, b2, c2, d2, w8, 13);
  149|  7.10k|    R31(d1, e1, a1, b1, c1, w0, 13);
  150|  7.10k|    R32(d2, e2, a2, b2, c2, w12, 5);
  151|  7.10k|    R31(c1, d1, e1, a1, b1, w6, 6);
  152|  7.10k|    R32(c2, d2, e2, a2, b2, w2, 14);
  153|  7.10k|    R31(b1, c1, d1, e1, a1, w13, 5);
  154|  7.10k|    R32(b2, c2, d2, e2, a2, w10, 13);
  155|  7.10k|    R31(a1, b1, c1, d1, e1, w11, 12);
  156|  7.10k|    R32(a2, b2, c2, d2, e2, w0, 13);
  157|  7.10k|    R31(e1, a1, b1, c1, d1, w5, 7);
  158|  7.10k|    R32(e2, a2, b2, c2, d2, w4, 7);
  159|  7.10k|    R31(d1, e1, a1, b1, c1, w12, 5);
  160|  7.10k|    R32(d2, e2, a2, b2, c2, w13, 5);
  161|       |
  162|  7.10k|    R41(c1, d1, e1, a1, b1, w1, 11);
  163|  7.10k|    R42(c2, d2, e2, a2, b2, w8, 15);
  164|  7.10k|    R41(b1, c1, d1, e1, a1, w9, 12);
  165|  7.10k|    R42(b2, c2, d2, e2, a2, w6, 5);
  166|  7.10k|    R41(a1, b1, c1, d1, e1, w11, 14);
  167|  7.10k|    R42(a2, b2, c2, d2, e2, w4, 8);
  168|  7.10k|    R41(e1, a1, b1, c1, d1, w10, 15);
  169|  7.10k|    R42(e2, a2, b2, c2, d2, w1, 11);
  170|  7.10k|    R41(d1, e1, a1, b1, c1, w0, 14);
  171|  7.10k|    R42(d2, e2, a2, b2, c2, w3, 14);
  172|  7.10k|    R41(c1, d1, e1, a1, b1, w8, 15);
  173|  7.10k|    R42(c2, d2, e2, a2, b2, w11, 14);
  174|  7.10k|    R41(b1, c1, d1, e1, a1, w12, 9);
  175|  7.10k|    R42(b2, c2, d2, e2, a2, w15, 6);
  176|  7.10k|    R41(a1, b1, c1, d1, e1, w4, 8);
  177|  7.10k|    R42(a2, b2, c2, d2, e2, w0, 14);
  178|  7.10k|    R41(e1, a1, b1, c1, d1, w13, 9);
  179|  7.10k|    R42(e2, a2, b2, c2, d2, w5, 6);
  180|  7.10k|    R41(d1, e1, a1, b1, c1, w3, 14);
  181|  7.10k|    R42(d2, e2, a2, b2, c2, w12, 9);
  182|  7.10k|    R41(c1, d1, e1, a1, b1, w7, 5);
  183|  7.10k|    R42(c2, d2, e2, a2, b2, w2, 12);
  184|  7.10k|    R41(b1, c1, d1, e1, a1, w15, 6);
  185|  7.10k|    R42(b2, c2, d2, e2, a2, w13, 9);
  186|  7.10k|    R41(a1, b1, c1, d1, e1, w14, 8);
  187|  7.10k|    R42(a2, b2, c2, d2, e2, w9, 12);
  188|  7.10k|    R41(e1, a1, b1, c1, d1, w5, 6);
  189|  7.10k|    R42(e2, a2, b2, c2, d2, w7, 5);
  190|  7.10k|    R41(d1, e1, a1, b1, c1, w6, 5);
  191|  7.10k|    R42(d2, e2, a2, b2, c2, w10, 15);
  192|  7.10k|    R41(c1, d1, e1, a1, b1, w2, 12);
  193|  7.10k|    R42(c2, d2, e2, a2, b2, w14, 8);
  194|       |
  195|  7.10k|    R51(b1, c1, d1, e1, a1, w4, 9);
  196|  7.10k|    R52(b2, c2, d2, e2, a2, w12, 8);
  197|  7.10k|    R51(a1, b1, c1, d1, e1, w0, 15);
  198|  7.10k|    R52(a2, b2, c2, d2, e2, w15, 5);
  199|  7.10k|    R51(e1, a1, b1, c1, d1, w5, 5);
  200|  7.10k|    R52(e2, a2, b2, c2, d2, w10, 12);
  201|  7.10k|    R51(d1, e1, a1, b1, c1, w9, 11);
  202|  7.10k|    R52(d2, e2, a2, b2, c2, w4, 9);
  203|  7.10k|    R51(c1, d1, e1, a1, b1, w7, 6);
  204|  7.10k|    R52(c2, d2, e2, a2, b2, w1, 12);
  205|  7.10k|    R51(b1, c1, d1, e1, a1, w12, 8);
  206|  7.10k|    R52(b2, c2, d2, e2, a2, w5, 5);
  207|  7.10k|    R51(a1, b1, c1, d1, e1, w2, 13);
  208|  7.10k|    R52(a2, b2, c2, d2, e2, w8, 14);
  209|  7.10k|    R51(e1, a1, b1, c1, d1, w10, 12);
  210|  7.10k|    R52(e2, a2, b2, c2, d2, w7, 6);
  211|  7.10k|    R51(d1, e1, a1, b1, c1, w14, 5);
  212|  7.10k|    R52(d2, e2, a2, b2, c2, w6, 8);
  213|  7.10k|    R51(c1, d1, e1, a1, b1, w1, 12);
  214|  7.10k|    R52(c2, d2, e2, a2, b2, w2, 13);
  215|  7.10k|    R51(b1, c1, d1, e1, a1, w3, 13);
  216|  7.10k|    R52(b2, c2, d2, e2, a2, w13, 6);
  217|  7.10k|    R51(a1, b1, c1, d1, e1, w8, 14);
  218|  7.10k|    R52(a2, b2, c2, d2, e2, w14, 5);
  219|  7.10k|    R51(e1, a1, b1, c1, d1, w11, 11);
  220|  7.10k|    R52(e2, a2, b2, c2, d2, w0, 15);
  221|  7.10k|    R51(d1, e1, a1, b1, c1, w6, 8);
  222|  7.10k|    R52(d2, e2, a2, b2, c2, w3, 13);
  223|  7.10k|    R51(c1, d1, e1, a1, b1, w15, 5);
  224|  7.10k|    R52(c2, d2, e2, a2, b2, w9, 11);
  225|  7.10k|    R51(b1, c1, d1, e1, a1, w13, 6);
  226|  7.10k|    R52(b2, c2, d2, e2, a2, w11, 11);
  227|       |
  228|  7.10k|    uint32_t t = s[0];
  229|  7.10k|    s[0] = s[1] + c1 + d2;
  230|  7.10k|    s[1] = s[2] + d1 + e2;
  231|  7.10k|    s[2] = s[3] + e1 + a2;
  232|  7.10k|    s[3] = s[4] + a1 + b2;
  233|  7.10k|    s[4] = t + b1 + c2;
  234|  7.10k|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603R11ERjjS1_jjji:
   41|   113k|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|  1.13M|{
   37|  1.13M|    a = rol(a + f + x + k, r) + e;
   38|  1.13M|    c = rol(c, 10);
   39|  1.13M|}
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1603rolEji:
   33|  2.27M|uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); }
ripemd160.cpp:_ZN12_GLOBAL__N_19ripemd1602f1Ejjj:
   17|   227k|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|   113k|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|   227k|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|   113k|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|   227k|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|   113k|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|   227k|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|   113k|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|   227k|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|   113k|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|   113k|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|   113k|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|   113k|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|   113k|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|  25.6k|{
  696|  25.6k|    sha256::Initialize(s);
  697|  25.6k|}
_ZN7CSHA2565WriteEPKhm:
  700|   157k|{
  701|   157k|    const unsigned char* end = data + len;
  702|   157k|    size_t bufsize = bytes % 64;
  703|   157k|    if (bufsize && bufsize + len >= 64) {
  ------------------
  |  Branch (703:9): [True: 112k, False: 44.1k]
  |  Branch (703:20): [True: 44.5k, False: 68.2k]
  ------------------
  704|       |        // Fill the buffer, and process it.
  705|  44.5k|        memcpy(buf + bufsize, data, 64 - bufsize);
  706|  44.5k|        bytes += 64 - bufsize;
  707|  44.5k|        data += 64 - bufsize;
  708|  44.5k|        Transform(s, buf, 1);
  709|  44.5k|        bufsize = 0;
  710|  44.5k|    }
  711|   157k|    if (end - data >= 64) {
  ------------------
  |  Branch (711:9): [True: 6.71k, False: 150k]
  ------------------
  712|  6.71k|        size_t blocks = (end - data) / 64;
  713|  6.71k|        Transform(s, data, blocks);
  714|  6.71k|        data += 64 * blocks;
  715|  6.71k|        bytes += 64 * blocks;
  716|  6.71k|    }
  717|   157k|    if (end > data) {
  ------------------
  |  Branch (717:9): [True: 112k, False: 44.1k]
  ------------------
  718|       |        // Fill the buffer with what remains.
  719|   112k|        memcpy(buf + bufsize, data, end - data);
  720|   112k|        bytes += end - data;
  721|   112k|    }
  722|   157k|    return *this;
  723|   157k|}
_ZN7CSHA2568FinalizeEPh:
  726|  44.1k|{
  727|  44.1k|    static const unsigned char pad[64] = {0x80};
  728|  44.1k|    unsigned char sizedesc[8];
  729|  44.1k|    WriteBE64(sizedesc, bytes << 3);
  730|  44.1k|    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
  731|  44.1k|    Write(sizedesc, 8);
  732|  44.1k|    WriteBE32(hash, s[0]);
  733|  44.1k|    WriteBE32(hash + 4, s[1]);
  734|  44.1k|    WriteBE32(hash + 8, s[2]);
  735|  44.1k|    WriteBE32(hash + 12, s[3]);
  736|  44.1k|    WriteBE32(hash + 16, s[4]);
  737|  44.1k|    WriteBE32(hash + 20, s[5]);
  738|  44.1k|    WriteBE32(hash + 24, s[6]);
  739|  44.1k|    WriteBE32(hash + 28, s[7]);
  740|  44.1k|}
_ZN7CSHA2565ResetEv:
  743|  18.5k|{
  744|  18.5k|    bytes = 0;
  745|  18.5k|    sha256::Initialize(s);
  746|  18.5k|    return *this;
  747|  18.5k|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2569TransformEPjPKhm:
  100|  51.3k|{
  101|   104k|    while (blocks--) {
  ------------------
  |  Branch (101:12): [True: 52.7k, False: 51.3k]
  ------------------
  102|  52.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];
  103|  52.7k|        uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
  104|       |
  105|  52.7k|        Round(a, b, c, d, e, f, g, h, 0x428a2f98 + (w0 = ReadBE32(chunk + 0)));
  106|  52.7k|        Round(h, a, b, c, d, e, f, g, 0x71374491 + (w1 = ReadBE32(chunk + 4)));
  107|  52.7k|        Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf + (w2 = ReadBE32(chunk + 8)));
  108|  52.7k|        Round(f, g, h, a, b, c, d, e, 0xe9b5dba5 + (w3 = ReadBE32(chunk + 12)));
  109|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x3956c25b + (w4 = ReadBE32(chunk + 16)));
  110|  52.7k|        Round(d, e, f, g, h, a, b, c, 0x59f111f1 + (w5 = ReadBE32(chunk + 20)));
  111|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x923f82a4 + (w6 = ReadBE32(chunk + 24)));
  112|  52.7k|        Round(b, c, d, e, f, g, h, a, 0xab1c5ed5 + (w7 = ReadBE32(chunk + 28)));
  113|  52.7k|        Round(a, b, c, d, e, f, g, h, 0xd807aa98 + (w8 = ReadBE32(chunk + 32)));
  114|  52.7k|        Round(h, a, b, c, d, e, f, g, 0x12835b01 + (w9 = ReadBE32(chunk + 36)));
  115|  52.7k|        Round(g, h, a, b, c, d, e, f, 0x243185be + (w10 = ReadBE32(chunk + 40)));
  116|  52.7k|        Round(f, g, h, a, b, c, d, e, 0x550c7dc3 + (w11 = ReadBE32(chunk + 44)));
  117|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x72be5d74 + (w12 = ReadBE32(chunk + 48)));
  118|  52.7k|        Round(d, e, f, g, h, a, b, c, 0x80deb1fe + (w13 = ReadBE32(chunk + 52)));
  119|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x9bdc06a7 + (w14 = ReadBE32(chunk + 56)));
  120|  52.7k|        Round(b, c, d, e, f, g, h, a, 0xc19bf174 + (w15 = ReadBE32(chunk + 60)));
  121|       |
  122|  52.7k|        Round(a, b, c, d, e, f, g, h, 0xe49b69c1 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  123|  52.7k|        Round(h, a, b, c, d, e, f, g, 0xefbe4786 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  124|  52.7k|        Round(g, h, a, b, c, d, e, f, 0x0fc19dc6 + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  125|  52.7k|        Round(f, g, h, a, b, c, d, e, 0x240ca1cc + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  126|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x2de92c6f + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  127|  52.7k|        Round(d, e, f, g, h, a, b, c, 0x4a7484aa + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  128|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  129|  52.7k|        Round(b, c, d, e, f, g, h, a, 0x76f988da + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  130|  52.7k|        Round(a, b, c, d, e, f, g, h, 0x983e5152 + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  131|  52.7k|        Round(h, a, b, c, d, e, f, g, 0xa831c66d + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  132|  52.7k|        Round(g, h, a, b, c, d, e, f, 0xb00327c8 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  133|  52.7k|        Round(f, g, h, a, b, c, d, e, 0xbf597fc7 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  134|  52.7k|        Round(e, f, g, h, a, b, c, d, 0xc6e00bf3 + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  135|  52.7k|        Round(d, e, f, g, h, a, b, c, 0xd5a79147 + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  136|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x06ca6351 + (w14 += sigma1(w12) + w7 + sigma0(w15)));
  137|  52.7k|        Round(b, c, d, e, f, g, h, a, 0x14292967 + (w15 += sigma1(w13) + w8 + sigma0(w0)));
  138|       |
  139|  52.7k|        Round(a, b, c, d, e, f, g, h, 0x27b70a85 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  140|  52.7k|        Round(h, a, b, c, d, e, f, g, 0x2e1b2138 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  141|  52.7k|        Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  142|  52.7k|        Round(f, g, h, a, b, c, d, e, 0x53380d13 + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  143|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x650a7354 + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  144|  52.7k|        Round(d, e, f, g, h, a, b, c, 0x766a0abb + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  145|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x81c2c92e + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  146|  52.7k|        Round(b, c, d, e, f, g, h, a, 0x92722c85 + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  147|  52.7k|        Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1 + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  148|  52.7k|        Round(h, a, b, c, d, e, f, g, 0xa81a664b + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  149|  52.7k|        Round(g, h, a, b, c, d, e, f, 0xc24b8b70 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  150|  52.7k|        Round(f, g, h, a, b, c, d, e, 0xc76c51a3 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  151|  52.7k|        Round(e, f, g, h, a, b, c, d, 0xd192e819 + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  152|  52.7k|        Round(d, e, f, g, h, a, b, c, 0xd6990624 + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  153|  52.7k|        Round(c, d, e, f, g, h, a, b, 0xf40e3585 + (w14 += sigma1(w12) + w7 + sigma0(w15)));
  154|  52.7k|        Round(b, c, d, e, f, g, h, a, 0x106aa070 + (w15 += sigma1(w13) + w8 + sigma0(w0)));
  155|       |
  156|  52.7k|        Round(a, b, c, d, e, f, g, h, 0x19a4c116 + (w0 += sigma1(w14) + w9 + sigma0(w1)));
  157|  52.7k|        Round(h, a, b, c, d, e, f, g, 0x1e376c08 + (w1 += sigma1(w15) + w10 + sigma0(w2)));
  158|  52.7k|        Round(g, h, a, b, c, d, e, f, 0x2748774c + (w2 += sigma1(w0) + w11 + sigma0(w3)));
  159|  52.7k|        Round(f, g, h, a, b, c, d, e, 0x34b0bcb5 + (w3 += sigma1(w1) + w12 + sigma0(w4)));
  160|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x391c0cb3 + (w4 += sigma1(w2) + w13 + sigma0(w5)));
  161|  52.7k|        Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a + (w5 += sigma1(w3) + w14 + sigma0(w6)));
  162|  52.7k|        Round(c, d, e, f, g, h, a, b, 0x5b9cca4f + (w6 += sigma1(w4) + w15 + sigma0(w7)));
  163|  52.7k|        Round(b, c, d, e, f, g, h, a, 0x682e6ff3 + (w7 += sigma1(w5) + w0 + sigma0(w8)));
  164|  52.7k|        Round(a, b, c, d, e, f, g, h, 0x748f82ee + (w8 += sigma1(w6) + w1 + sigma0(w9)));
  165|  52.7k|        Round(h, a, b, c, d, e, f, g, 0x78a5636f + (w9 += sigma1(w7) + w2 + sigma0(w10)));
  166|  52.7k|        Round(g, h, a, b, c, d, e, f, 0x84c87814 + (w10 += sigma1(w8) + w3 + sigma0(w11)));
  167|  52.7k|        Round(f, g, h, a, b, c, d, e, 0x8cc70208 + (w11 += sigma1(w9) + w4 + sigma0(w12)));
  168|  52.7k|        Round(e, f, g, h, a, b, c, d, 0x90befffa + (w12 += sigma1(w10) + w5 + sigma0(w13)));
  169|  52.7k|        Round(d, e, f, g, h, a, b, c, 0xa4506ceb + (w13 += sigma1(w11) + w6 + sigma0(w14)));
  170|  52.7k|        Round(c, d, e, f, g, h, a, b, 0xbef9a3f7 + (w14 + sigma1(w12) + w7 + sigma0(w15)));
  171|  52.7k|        Round(b, c, d, e, f, g, h, a, 0xc67178f2 + (w15 + sigma1(w13) + w8 + sigma0(w0)));
  172|       |
  173|  52.7k|        s[0] += a;
  174|  52.7k|        s[1] += b;
  175|  52.7k|        s[2] += c;
  176|  52.7k|        s[3] += d;
  177|  52.7k|        s[4] += e;
  178|  52.7k|        s[5] += f;
  179|  52.7k|        s[6] += g;
  180|  52.7k|        s[7] += h;
  181|  52.7k|        chunk += 64;
  182|  52.7k|    }
  183|  51.3k|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2565RoundEjjjRjjjjS1_j:
   78|  3.37M|{
   79|  3.37M|    uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k;
   80|  3.37M|    uint32_t t2 = Sigma0(a) + Maj(a, b, c);
   81|  3.37M|    d += t1;
   82|  3.37M|    h = t1 + t2;
   83|  3.37M|}
sha256.cpp:_ZN12_GLOBAL__N_16sha2566Sigma1Ej:
   72|  3.37M|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|  3.37M|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|  3.37M|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|  3.37M|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|  2.53M|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|  2.53M|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|  44.1k|{
   88|  44.1k|    s[0] = 0x6a09e667ul;
   89|  44.1k|    s[1] = 0xbb67ae85ul;
   90|  44.1k|    s[2] = 0x3c6ef372ul;
   91|  44.1k|    s[3] = 0xa54ff53aul;
   92|  44.1k|    s[4] = 0x510e527ful;
   93|  44.1k|    s[5] = 0x9b05688cul;
   94|  44.1k|    s[6] = 0x1f83d9abul;
   95|  44.1k|    s[7] = 0x5be0cd19ul;
   96|  44.1k|}

_Z4HashINSt3__14spanIhLm18446744073709551615EEEE7uint256RKT_:
   84|  3.84k|{
   85|  3.84k|    uint256 result;
   86|  3.84k|    CHash256().Write(MakeUCharSpan(in1)).Finalize(result);
   87|  3.84k|    return result;
   88|  3.84k|}
_ZN10HashWriterlsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEERS_RKT_:
  150|  22.4k|    {
  151|  22.4k|        ::Serialize(*this, obj);
  152|  22.4k|        return *this;
  153|  22.4k|    }
_Z4HashINSt3__16vectorIhNS0_9allocatorIhEEEEE7uint256RKT_:
   84|  3.45k|{
   85|  3.45k|    uint256 result;
   86|  3.45k|    CHash256().Write(MakeUCharSpan(in1)).Finalize(result);
   87|  3.45k|    return result;
   88|  3.45k|}
_ZN9ChainCodeD2Ev:
   28|      2|    ~ChainCode() { memory_cleanse(data(), size()); }
_Z7Hash160INSt3__14spanIKhLm18446744073709551615EEEE7uint160RKT_:
  101|  7.10k|{
  102|  7.10k|    uint160 result;
  103|  7.10k|    CHash160().Write(MakeUCharSpan(in1)).Finalize(result);
  104|  7.10k|    return result;
  105|  7.10k|}
_ZN8CHash2565WriteENSt3__14spanIKhLm18446744073709551615EEE:
   45|  7.29k|    CHash256& Write(std::span<const unsigned char> input) {
   46|  7.29k|        sha.Write(input.data(), input.size());
   47|  7.29k|        return *this;
   48|  7.29k|    }
_ZN8CHash2568FinalizeENSt3__14spanIhLm18446744073709551615EEE:
   38|  7.29k|    void Finalize(std::span<unsigned char> output) {
   39|  7.29k|        assert(output.size() == OUTPUT_SIZE);
  ------------------
  |  Branch (39:9): [True: 7.29k, False: 0]
  ------------------
   40|  7.29k|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   41|  7.29k|        sha.Finalize(buf);
   42|  7.29k|        sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   43|  7.29k|    }
_ZN10HashWriter7GetHashEv:
  123|  11.2k|    uint256 GetHash() {
  124|  11.2k|        uint256 result;
  125|  11.2k|        ctx.Finalize(result.begin());
  126|  11.2k|        ctx.Reset().Write(result.begin(), CSHA256::OUTPUT_SIZE).Finalize(result.begin());
  127|  11.2k|        return result;
  128|  11.2k|    }
_ZN8CHash1605WriteENSt3__14spanIKhLm18446744073709551615EEE:
   70|  7.10k|    CHash160& Write(std::span<const unsigned char> input) {
   71|  7.10k|        sha.Write(input.data(), input.size());
   72|  7.10k|        return *this;
   73|  7.10k|    }
_ZN8CHash1608FinalizeENSt3__14spanIhLm18446744073709551615EEE:
   63|  7.10k|    void Finalize(std::span<unsigned char> output) {
   64|  7.10k|        assert(output.size() == OUTPUT_SIZE);
  ------------------
  |  Branch (64:9): [True: 7.10k, False: 0]
  ------------------
   65|  7.10k|        unsigned char buf[CSHA256::OUTPUT_SIZE];
   66|  7.10k|        sha.Finalize(buf);
   67|  7.10k|        CRIPEMD160().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data());
   68|  7.10k|    }
_ZN10HashWriter5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  115|  35.9k|    {
  116|  35.9k|        ctx.Write(UCharCast(src.data()), src.size());
  117|  35.9k|    }

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

_ZN4CKey5CheckEPKh:
  159|  3.72k|bool CKey::Check(const unsigned char *vch) {
  160|  3.72k|    return secp256k1_ec_seckey_verify(secp256k1_context_static, vch);
  161|  3.72k|}
_ZNK4CKey9GetPubKeyEv:
  184|  3.45k|CPubKey CKey::GetPubKey() const {
  185|  3.45k|    assert(keydata);
  ------------------
  |  Branch (185:5): [True: 3.45k, False: 0]
  ------------------
  186|  3.45k|    secp256k1_pubkey pubkey;
  187|  3.45k|    size_t clen = CPubKey::SIZE;
  188|  3.45k|    CPubKey result;
  189|  3.45k|    int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, UCharCast(begin()));
  190|  3.45k|    assert(ret);
  ------------------
  |  Branch (190:5): [True: 3.45k, False: 0]
  ------------------
  191|  3.45k|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  216|    290|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|    290|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  202|    290|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
                  secp256k1_ec_pubkey_serialize(secp256k1_context_static, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  217|  6.62k|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|  3.16k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (191:109): [True: 290, False: 3.16k]
  ------------------
  192|  3.45k|    assert(result.size() == clen);
  ------------------
  |  Branch (192:5): [True: 3.45k, False: 0]
  ------------------
  193|  3.45k|    assert(result.IsValid());
  ------------------
  |  Branch (193:5): [True: 3.45k, False: 0]
  ------------------
  194|  3.45k|    return result;
  195|  3.45k|}
_ZNK4CKey11SignCompactERK7uint256RNSt3__16vectorIhNS3_9allocatorIhEEEE:
  251|  3.72k|bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
  252|  3.72k|    if (!keydata)
  ------------------
  |  Branch (252:9): [True: 264, False: 3.45k]
  ------------------
  253|    264|        return false;
  254|  3.45k|    vchSig.resize(CPubKey::COMPACT_SIGNATURE_SIZE);
  255|  3.45k|    int rec = -1;
  256|  3.45k|    secp256k1_ecdsa_recoverable_signature rsig;
  257|  3.45k|    int ret = secp256k1_ecdsa_sign_recoverable(secp256k1_context_sign, &rsig, hash.begin(), UCharCast(begin()), secp256k1_nonce_function_rfc6979, nullptr);
  258|  3.45k|    assert(ret);
  ------------------
  |  Branch (258:5): [True: 3.45k, False: 0]
  ------------------
  259|  3.45k|    ret = secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_static, &vchSig[1], &rec, &rsig);
  260|  3.45k|    assert(ret);
  ------------------
  |  Branch (260:5): [True: 3.45k, False: 0]
  ------------------
  261|  3.45k|    assert(rec != -1);
  ------------------
  |  Branch (261:5): [True: 3.45k, False: 0]
  ------------------
  262|  3.45k|    vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);
  ------------------
  |  Branch (262:29): [True: 290, False: 3.16k]
  ------------------
  263|       |    // Additional verification step to prevent using a potentially corrupted signature
  264|  3.45k|    secp256k1_pubkey epk, rpk;
  265|  3.45k|    ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &epk, UCharCast(begin()));
  266|  3.45k|    assert(ret);
  ------------------
  |  Branch (266:5): [True: 3.45k, False: 0]
  ------------------
  267|  3.45k|    ret = secp256k1_ecdsa_recover(secp256k1_context_static, &rpk, &rsig, hash.begin());
  268|  3.45k|    assert(ret);
  ------------------
  |  Branch (268:5): [True: 3.45k, False: 0]
  ------------------
  269|  3.45k|    ret = secp256k1_ec_pubkey_cmp(secp256k1_context_static, &epk, &rpk);
  270|  3.45k|    assert(ret == 0);
  ------------------
  |  Branch (270:5): [True: 3.45k, False: 0]
  ------------------
  271|  3.45k|    return true;
  272|  3.45k|}
_ZN11ECC_ContextD2Ev:
  501|      2|{
  502|      2|    ECC_Stop();
  503|      2|}
key.cpp:_ZL8ECC_Stopv:
  486|      2|static void ECC_Stop() {
  487|      2|    secp256k1_context *ctx = secp256k1_context_sign;
  488|      2|    secp256k1_context_sign = nullptr;
  489|       |
  490|      2|    if (ctx) {
  ------------------
  |  Branch (490:9): [True: 2, False: 0]
  ------------------
  491|      2|        secp256k1_context_destroy(ctx);
  492|      2|    }
  493|      2|}

_ZN4CKey3SetINSt3__111__wrap_iterIPhEEEEvT_S5_b:
  109|  3.72k|    {
  110|  3.72k|        if (size_t(pend - pbegin) != std::tuple_size_v<KeyType>) {
  ------------------
  |  Branch (110:13): [True: 0, False: 3.72k]
  ------------------
  111|      0|            ClearKeyData();
  112|  3.72k|        } else if (Check(UCharCast(&pbegin[0]))) {
  ------------------
  |  Branch (112:20): [True: 3.45k, False: 264]
  ------------------
  113|  3.45k|            MakeKeyData();
  114|  3.45k|            memcpy(keydata->data(), (unsigned char*)&pbegin[0], keydata->size());
  115|  3.45k|            fCompressed = fCompressedIn;
  116|  3.45k|        } else {
  117|    264|            ClearKeyData();
  118|    264|        }
  119|  3.72k|    }
_ZNK4CKey5beginEv:
  124|  10.3k|    const std::byte* begin() const { return data(); }
_ZNK4CKey4dataEv:
  123|  10.3k|    const std::byte* data() const { return keydata ? reinterpret_cast<const std::byte*>(keydata->data()) : nullptr; }
  ------------------
  |  Branch (123:44): [True: 10.3k, False: 0]
  ------------------
_ZN4CKeyC2Ev:
   79|  3.72k|    CKey() noexcept = default;
_ZN4CKey11MakeKeyDataEv:
   69|  3.45k|    {
   70|  3.45k|        if (!keydata) keydata = make_secure_unique<KeyType>();
  ------------------
  |  Branch (70:13): [True: 3.45k, False: 0]
  ------------------
   71|  3.45k|    }
_ZN4CKey12ClearKeyDataEv:
   74|    264|    {
   75|    264|        keydata.reset();
   76|    264|    }
_ZNK4CKey7IsValidEv:
  128|  3.72k|    bool IsValid() const { return !!keydata; }

_Z17EncodeDestinationRKNSt3__17variantIJ14CNoDestination17PubKeyDestination6PKHash10ScriptHash19WitnessV0ScriptHash16WitnessV0KeyHash16WitnessV1Taproot11PayToAnchor14WitnessUnknownEEE:
  296|  3.45k|{
  297|  3.45k|    return std::visit(DestinationEncoder(Params()), dest);
  298|  3.45k|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_PNS_6vectorIiNS3_IiEEEE:
  301|  7.18k|{
  302|  7.18k|    return DecodeDestination(str, Params(), error_msg, error_locations);
  303|  7.18k|}
_Z17DecodeDestinationRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  306|  7.18k|{
  307|  7.18k|    std::string error_msg;
  308|  7.18k|    return DecodeDestination(str, error_msg);
  309|  7.18k|}
key_io.cpp:_ZNK12_GLOBAL__N_118DestinationEncoderclERK6PKHash:
   32|  3.45k|    {
   33|  3.45k|        std::vector<unsigned char> data = m_params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
   34|  3.45k|        data.insert(data.end(), id.begin(), id.end());
   35|  3.45k|        return EncodeBase58Check(data);
   36|  3.45k|    }
key_io.cpp:_ZN12_GLOBAL__N_118DestinationEncoderC2ERK12CChainParams:
   29|  3.45k|    explicit DestinationEncoder(const CChainParams& params) : m_params(params) {}
key_io.cpp:_ZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK12CChainParamsRS6_PNS0_6vectorIiNS4_IiEEEE:
   86|  7.18k|{
   87|  7.18k|    std::vector<unsigned char> data;
   88|  7.18k|    uint160 hash;
   89|  7.18k|    error_str = "";
   90|       |
   91|       |    // Note this will be false if it is a valid Bech32 address for a different network
   92|  7.18k|    bool is_bech32 = (ToLower(str.substr(0, params.Bech32HRP().size())) == params.Bech32HRP());
   93|       |
   94|  7.18k|    if (!is_bech32 && DecodeBase58Check(str, data, 21)) {
  ------------------
  |  Branch (94:9): [True: 6.77k, False: 406]
  |  Branch (94:23): [True: 3.81k, False: 2.96k]
  ------------------
   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.81k|        const std::vector<unsigned char>& pubkey_prefix = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
   99|  3.81k|        if (data.size() == hash.size() + pubkey_prefix.size() && std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin())) {
  ------------------
  |  Branch (99:13): [True: 3.79k, False: 22]
  |  Branch (99:66): [True: 3.79k, False: 0]
  ------------------
  100|  3.79k|            std::copy(data.begin() + pubkey_prefix.size(), data.end(), hash.begin());
  101|  3.79k|            return PKHash(hash);
  102|  3.79k|        }
  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|     22|        const std::vector<unsigned char>& script_prefix = params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
  106|     22|        if (data.size() == hash.size() + script_prefix.size() && std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) {
  ------------------
  |  Branch (106:13): [True: 0, False: 22]
  |  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|     22|        if ((data.size() >= script_prefix.size() &&
  ------------------
  |  Branch (112:14): [True: 22, False: 0]
  ------------------
  113|     22|                std::equal(script_prefix.begin(), script_prefix.end(), data.begin())) ||
  ------------------
  |  Branch (113:17): [True: 0, False: 22]
  ------------------
  114|     22|            (data.size() >= pubkey_prefix.size() &&
  ------------------
  |  Branch (114:14): [True: 22, False: 0]
  ------------------
  115|     22|                std::equal(pubkey_prefix.begin(), pubkey_prefix.end(), data.begin()))) {
  ------------------
  |  Branch (115:17): [True: 0, False: 22]
  ------------------
  116|      0|            error_str = "Invalid length for Base58 address (P2PKH or P2SH)";
  117|     22|        } else {
  118|     22|            error_str = "Invalid or unsupported Base58-encoded address.";
  119|     22|        }
  120|     22|        return CNoDestination();
  121|  3.36k|    } else if (!is_bech32) {
  ------------------
  |  Branch (121:16): [True: 2.96k, False: 406]
  ------------------
  122|       |        // Try Base58 decoding without the checksum, using a much larger max length
  123|  2.96k|        if (!DecodeBase58(str, data, 100)) {
  ------------------
  |  Branch (123:13): [True: 193, False: 2.76k]
  ------------------
  124|    193|            error_str = "Invalid or unsupported Segwit (Bech32) or Base58 encoding.";
  125|  2.76k|        } else {
  126|  2.76k|            error_str = "Invalid checksum or length of Base58 address (P2PKH or P2SH)";
  127|  2.76k|        }
  128|  2.96k|        return CNoDestination();
  129|  2.96k|    }
  130|       |
  131|    406|    data.clear();
  132|    406|    const auto dec = bech32::Decode(str);
  133|    406|    if (dec.encoding == bech32::Encoding::BECH32 || dec.encoding == bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (133:9): [True: 29, False: 377]
  |  Branch (133:53): [True: 9, False: 368]
  ------------------
  134|     38|        if (dec.data.empty()) {
  ------------------
  |  Branch (134:13): [True: 3, False: 35]
  ------------------
  135|      3|            error_str = "Empty Bech32 data section";
  136|      3|            return CNoDestination();
  137|      3|        }
  138|       |        // Bech32 decoding
  139|     35|        if (dec.hrp != params.Bech32HRP()) {
  ------------------
  |  Branch (139:13): [True: 4, False: 31]
  ------------------
  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|     31|        int version = dec.data[0]; // The first 5 bit symbol is the witness version (0-16)
  144|     31|        if (version == 0 && dec.encoding != bech32::Encoding::BECH32) {
  ------------------
  |  Branch (144:13): [True: 23, False: 8]
  |  Branch (144:29): [True: 1, False: 22]
  ------------------
  145|      1|            error_str = "Version 0 witness address must use Bech32 checksum";
  146|      1|            return CNoDestination();
  147|      1|        }
  148|     30|        if (version != 0 && dec.encoding != bech32::Encoding::BECH32M) {
  ------------------
  |  Branch (148:13): [True: 8, False: 22]
  |  Branch (148:29): [True: 1, False: 7]
  ------------------
  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|     29|        data.reserve(((dec.data.size() - 1) * 5) / 8);
  154|     29|        if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end())) {
  ------------------
  |  Branch (154:13): [True: 15, False: 14]
  ------------------
  155|       |
  156|     15|            std::string_view byte_str{data.size() == 1 ? "byte" : "bytes"};
  ------------------
  |  Branch (156:39): [True: 0, False: 15]
  ------------------
  157|       |
  158|     15|            if (version == 0) {
  ------------------
  |  Branch (158:17): [True: 11, False: 4]
  ------------------
  159|     11|                {
  160|     11|                    WitnessV0KeyHash keyid;
  161|     11|                    if (data.size() == keyid.size()) {
  ------------------
  |  Branch (161:25): [True: 1, False: 10]
  ------------------
  162|      1|                        std::copy(data.begin(), data.end(), keyid.begin());
  163|      1|                        return keyid;
  164|      1|                    }
  165|     11|                }
  166|     10|                {
  167|     10|                    WitnessV0ScriptHash scriptid;
  168|     10|                    if (data.size() == scriptid.size()) {
  ------------------
  |  Branch (168:25): [True: 1, False: 9]
  ------------------
  169|      1|                        std::copy(data.begin(), data.end(), scriptid.begin());
  170|      1|                        return scriptid;
  171|      1|                    }
  172|     10|                }
  173|       |
  174|      9|                error_str = strprintf("Invalid Bech32 v0 address program size (%d %s), per BIP141", data.size(), byte_str);
  ------------------
  |  | 1172|      9|#define strprintf tfm::format
  ------------------
  175|      9|                return CNoDestination();
  176|     10|            }
  177|       |
  178|      4|            if (version == 1 && data.size() == WITNESS_V1_TAPROOT_SIZE) {
  ------------------
  |  Branch (178:17): [True: 2, False: 2]
  |  Branch (178:33): [True: 0, False: 2]
  ------------------
  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|      4|            if (CScript::IsPayToAnchor(version, data)) {
  ------------------
  |  Branch (185:17): [True: 0, False: 4]
  ------------------
  186|      0|                return PayToAnchor();
  187|      0|            }
  188|       |
  189|      4|            if (version > 16) {
  ------------------
  |  Branch (189:17): [True: 0, False: 4]
  ------------------
  190|      0|                error_str = "Invalid Bech32 address witness version";
  191|      0|                return CNoDestination();
  192|      0|            }
  193|       |
  194|      4|            if (data.size() < 2 || data.size() > BECH32_WITNESS_PROG_MAX_LEN) {
  ------------------
  |  Branch (194:17): [True: 0, False: 4]
  |  Branch (194:36): [True: 2, False: 2]
  ------------------
  195|      2|                error_str = strprintf("Invalid Bech32 address program size (%d %s)", data.size(), byte_str);
  ------------------
  |  | 1172|      2|#define strprintf tfm::format
  ------------------
  196|      2|                return CNoDestination();
  197|      2|            }
  198|       |
  199|      2|            return WitnessUnknown{version, data};
  200|     14|        } else {
  201|     14|            error_str = strprintf("Invalid padding in Bech32 data section");
  ------------------
  |  | 1172|     14|#define strprintf tfm::format
  ------------------
  202|     14|            return CNoDestination();
  203|     14|        }
  204|     29|    }
  205|       |
  206|       |    // Perform Bech32 error location
  207|    368|    auto res = bech32::LocateErrors(str);
  208|    368|    error_str = res.first;
  209|    368|    if (error_locations) *error_locations = std::move(res.second);
  ------------------
  |  Branch (209:9): [True: 0, False: 368]
  ------------------
  210|    368|    return CNoDestination();
  211|    406|}
key_io.cpp:_ZZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK12CChainParamsRS6_PNS0_6vectorIiNS4_IiEEEEENK3$_0clEh:
  154|    570|        if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end())) {

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

_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|  3.38k|        : _union(std::move(other._union)), _size(other._size)
  225|  3.38k|    {
  226|  3.38k|        other._size = 0;
  227|  3.38k|    }
_ZNK9prevectorILj36EhjiE9is_directEv:
  126|  6.78k|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj36EhjiEC2Ev:
  196|  3.38k|    prevector() = default;
_ZN9prevectorILj36EhjiED2Ev:
  422|  6.78k|    ~prevector() {
  423|  6.78k|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 4, False: 6.78k]
  ------------------
  424|      4|            free(_union.indirect_contents.indirect);
  425|      4|            _union.indirect_contents.indirect = nullptr;
  426|      4|        }
  427|  6.78k|    }

_ZN7CPubKey14RecoverCompactERK7uint256RKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  300|  3.76k|bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
  301|  3.76k|    if (vchSig.size() != COMPACT_SIGNATURE_SIZE)
  ------------------
  |  Branch (301:9): [True: 18, False: 3.75k]
  ------------------
  302|     18|        return false;
  303|  3.75k|    int recid = (vchSig[0] - 27) & 3;
  304|  3.75k|    bool fComp = ((vchSig[0] - 27) & 4) != 0;
  305|  3.75k|    secp256k1_pubkey pubkey;
  306|  3.75k|    secp256k1_ecdsa_recoverable_signature sig;
  307|  3.75k|    if (!secp256k1_ecdsa_recoverable_signature_parse_compact(secp256k1_context_static, &sig, &vchSig[1], recid)) {
  ------------------
  |  Branch (307:9): [True: 1, False: 3.74k]
  ------------------
  308|      1|        return false;
  309|      1|    }
  310|  3.74k|    if (!secp256k1_ecdsa_recover(secp256k1_context_static, &pubkey, &sig, hash.begin())) {
  ------------------
  |  Branch (310:9): [True: 104, False: 3.64k]
  ------------------
  311|    104|        return false;
  312|    104|    }
  313|  3.64k|    unsigned char pub[SIZE];
  314|  3.64k|    size_t publen = SIZE;
  315|  3.64k|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, fComp ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  216|    418|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|    418|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  202|    418|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
                  secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, fComp ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  217|  6.87k|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|  3.22k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (315:84): [True: 418, False: 3.22k]
  ------------------
  316|  3.64k|    Set(pub, pub + publen);
  317|  3.64k|    return true;
  318|  3.74k|}

_ZN7CPubKey6GetLenEh:
   67|  17.6k|    {
   68|  17.6k|        if (chHeader == 2 || chHeader == 3)
  ------------------
  |  Branch (68:13): [True: 814, False: 16.8k]
  |  Branch (68:30): [True: 892, False: 15.9k]
  ------------------
   69|  1.70k|            return COMPRESSED_SIZE;
   70|  15.9k|        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
  ------------------
  |  Branch (70:13): [True: 15.9k, False: 0]
  |  Branch (70:30): [True: 0, False: 0]
  |  Branch (70:47): [True: 0, False: 0]
  ------------------
   71|  15.9k|            return SIZE;
   72|      0|        return 0;
   73|  15.9k|    }
_ZN7CPubKey10InvalidateEv:
   77|  7.22k|    {
   78|  7.22k|        vch[0] = 0xFF;
   79|  7.22k|    }
_ZNK7CPubKey4sizeEv:
  118|  14.0k|    unsigned int size() const { return GetLen(vch[0]); }
_ZNK7CPubKey7IsValidEv:
  192|  3.45k|    {
  193|  3.45k|        return size() > 0;
  194|  3.45k|    }
_ZN7CPubKeyC2Ev:
   89|  7.22k|    {
   90|  7.22k|        Invalidate();
   91|  7.22k|    }
_ZNK7CPubKey5GetIDEv:
  167|  7.10k|    {
  168|  7.10k|        return CKeyID(Hash160(std::span{vch}.first(size())));
  169|  7.10k|    }
_ZN6CKeyIDC2ERK7uint160:
   29|  7.10k|    explicit CKeyID(const uint160& in) : uint160(in) {}
_ZNK7CPubKey5beginEv:
  120|  3.45k|    const unsigned char* begin() const { return vch; }
_ZN7CPubKey3SetIPhEEvT_S2_:
   96|  3.64k|    {
   97|  3.64k|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (97:19): [True: 0, False: 3.64k]
  ------------------
   98|  3.64k|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (98:13): [True: 3.64k, False: 0]
  |  Branch (98:20): [True: 3.64k, False: 0]
  ------------------
   99|  3.64k|            memcpy(vch, (unsigned char*)&pbegin[0], len);
  100|      0|        else
  101|      0|            Invalidate();
  102|  3.64k|    }

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

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

_ZN7CScript13IsPayToAnchorEiRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  217|      4|{
  218|      4|    return version == 1 &&
  ------------------
  |  Branch (218:12): [True: 2, False: 2]
  ------------------
  219|      2|        program.size() == 2 &&
  ------------------
  |  Branch (219:9): [True: 0, False: 2]
  ------------------
  220|      0|        program[0] == 0x4e &&
  ------------------
  |  Branch (220:9): [True: 0, False: 0]
  ------------------
  221|      0|        program[1] == 0x73;
  ------------------
  |  Branch (221:9): [True: 0, False: 0]
  ------------------
  222|      4|}

_ZN7CScriptC2Ev:
  452|  3.38k|    CScript() = default;

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

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

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

secp256k1.c:secp256k1_eckey_pubkey_serialize33:
   38|  7.62k|static void secp256k1_eckey_pubkey_serialize33(secp256k1_ge *elem, unsigned char *pub33) {
   39|  7.62k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(elem));
   40|       |
   41|  7.62k|    secp256k1_fe_normalize_var(&elem->x);
  ------------------
  |  |   80|  7.62k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   42|  7.62k|    secp256k1_fe_normalize_var(&elem->y);
  ------------------
  |  |   80|  7.62k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   43|  7.62k|    pub33[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |   85|  7.62k|#  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|  3.83k|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
                  pub33[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  220|  11.4k|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
  |  Branch (43:16): [True: 3.83k, False: 3.78k]
  ------------------
   44|  7.62k|    secp256k1_fe_get_b32(&pub33[1], &elem->x);
  ------------------
  |  |   89|  7.62k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   45|  7.62k|}
secp256k1.c:secp256k1_eckey_pubkey_serialize65:
   47|  6.39k|static void secp256k1_eckey_pubkey_serialize65(secp256k1_ge *elem, unsigned char *pub65) {
   48|  6.39k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(elem));
   49|       |
   50|  6.39k|    secp256k1_fe_normalize_var(&elem->x);
  ------------------
  |  |   80|  6.39k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   51|  6.39k|    secp256k1_fe_normalize_var(&elem->y);
  ------------------
  |  |   80|  6.39k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   52|  6.39k|    pub65[0] = SECP256K1_TAG_PUBKEY_UNCOMPRESSED;
  ------------------
  |  |  222|  6.39k|#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04
  ------------------
   53|  6.39k|    secp256k1_fe_get_b32(&pub65[1], &elem->x);
  ------------------
  |  |   89|  6.39k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   54|  6.39k|    secp256k1_fe_get_b32(&pub65[33], &elem->y);
  ------------------
  |  |   89|  6.39k|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   55|  6.39k|}

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

secp256k1.c:secp256k1_ecmult:
  365|  7.10k|static void secp256k1_ecmult(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) {
  366|  7.10k|    secp256k1_fe aux[ECMULT_TABLE_SIZE(WINDOW_A)];
  367|  7.10k|    secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)];
  368|  7.10k|    struct secp256k1_strauss_point_state ps[1];
  369|  7.10k|    struct secp256k1_strauss_state state;
  370|       |
  371|  7.10k|    state.aux = aux;
  372|  7.10k|    state.pre_a = pre_a;
  373|  7.10k|    state.ps = ps;
  374|  7.10k|    secp256k1_ecmult_strauss_wnaf(&state, r, 1, a, na, ng);
  375|  7.10k|}
secp256k1.c:secp256k1_ecmult_strauss_wnaf:
  252|  7.10k|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|  7.10k|    secp256k1_ge tmpa;
  254|  7.10k|    secp256k1_fe Z;
  255|       |    /* Split G factors. */
  256|  7.10k|    secp256k1_scalar ng_1, ng_128;
  257|  7.10k|    int wnaf_ng_1[129];
  258|  7.10k|    int bits_ng_1 = 0;
  259|  7.10k|    int wnaf_ng_128[129];
  260|  7.10k|    int bits_ng_128 = 0;
  261|  7.10k|    int i;
  262|  7.10k|    int bits = 0;
  263|  7.10k|    size_t np;
  264|  7.10k|    size_t no = 0;
  265|       |
  266|  7.10k|    secp256k1_fe_set_int(&Z, 1);
  ------------------
  |  |   83|  7.10k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  267|  14.2k|    for (np = 0; np < num; ++np) {
  ------------------
  |  Branch (267:18): [True: 7.10k, False: 7.10k]
  ------------------
  268|  7.10k|        secp256k1_gej tmp;
  269|  7.10k|        secp256k1_scalar na_1, na_lam;
  270|  7.10k|        if (secp256k1_scalar_is_zero(&na[np]) || secp256k1_gej_is_infinity(&a[np])) {
  ------------------
  |  Branch (270:13): [True: 0, False: 7.10k]
  |  Branch (270:50): [True: 0, False: 7.10k]
  ------------------
  271|      0|            continue;
  272|      0|        }
  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|  7.10k|        secp256k1_scalar_split_lambda(&na_1, &na_lam, &na[np]);
  275|       |
  276|       |        /* build wnaf representation for na_1 and na_lam. */
  277|  7.10k|        state->ps[no].bits_na_1   = secp256k1_ecmult_wnaf_small(state->ps[no].wnaf_na_1,   129, &na_1,   WINDOW_A);
  ------------------
  |  |   32|  7.10k|#  define WINDOW_A 5
  ------------------
  278|  7.10k|        state->ps[no].bits_na_lam = secp256k1_ecmult_wnaf_small(state->ps[no].wnaf_na_lam, 129, &na_lam, WINDOW_A);
  ------------------
  |  |   32|  7.10k|#  define WINDOW_A 5
  ------------------
  279|  7.10k|        VERIFY_CHECK(state->ps[no].bits_na_1 <= 129);
  280|  7.10k|        VERIFY_CHECK(state->ps[no].bits_na_lam <= 129);
  281|  7.10k|        if (state->ps[no].bits_na_1 > bits) {
  ------------------
  |  Branch (281:13): [True: 7.10k, False: 0]
  ------------------
  282|  7.10k|            bits = state->ps[no].bits_na_1;
  283|  7.10k|        }
  284|  7.10k|        if (state->ps[no].bits_na_lam > bits) {
  ------------------
  |  Branch (284:13): [True: 2.80k, False: 4.29k]
  ------------------
  285|  2.80k|            bits = state->ps[no].bits_na_lam;
  286|  2.80k|        }
  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|  7.10k|        tmp = a[np];
  299|  7.10k|        if (no) {
  ------------------
  |  Branch (299:13): [True: 0, False: 7.10k]
  ------------------
  300|      0|            secp256k1_gej_rescale(&tmp, &Z);
  301|      0|        }
  302|  7.10k|        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|  7.10k|#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|  7.10k|#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|  7.10k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  303|  7.10k|        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: 7.10k]
  ------------------
  304|       |
  305|  7.10k|        ++no;
  306|  7.10k|    }
  307|       |
  308|       |    /* Bring them to the same Z denominator. */
  309|  7.10k|    if (no) {
  ------------------
  |  Branch (309:9): [True: 7.10k, False: 0]
  ------------------
  310|  7.10k|        secp256k1_ge_table_set_globalz(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, state->aux);
  ------------------
  |  |   41|  7.10k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  311|  7.10k|    }
  312|       |
  313|  14.2k|    for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (313:18): [True: 7.10k, False: 7.10k]
  ------------------
  314|  7.10k|        size_t j;
  315|  63.9k|        for (j = 0; j < ECMULT_TABLE_SIZE(WINDOW_A); j++) {
  ------------------
  |  |   41|  63.9k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  |  Branch (315:21): [True: 56.8k, False: 7.10k]
  ------------------
  316|  56.8k|            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|  56.8k|#  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|  56.8k|#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|  56.8k|#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
  ------------------
  317|  56.8k|        }
  318|  7.10k|    }
  319|       |
  320|  7.10k|    if (ng) {
  ------------------
  |  Branch (320:9): [True: 7.10k, False: 0]
  ------------------
  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|  7.10k|        secp256k1_scalar_split_128(&ng_1, &ng_128, ng);
  323|       |
  324|       |        /* Build wnaf representation for ng_1 and ng_128 */
  325|  7.10k|        bits_ng_1   = secp256k1_ecmult_wnaf(wnaf_ng_1,   129, &ng_1,   WINDOW_G);
  ------------------
  |  |   31|  7.10k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  326|  7.10k|        bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, 129, &ng_128, WINDOW_G);
  ------------------
  |  |   31|  7.10k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  327|  7.10k|        if (bits_ng_1 > bits) {
  ------------------
  |  Branch (327:13): [True: 1.60k, False: 5.50k]
  ------------------
  328|  1.60k|            bits = bits_ng_1;
  329|  1.60k|        }
  330|  7.10k|        if (bits_ng_128 > bits) {
  ------------------
  |  Branch (330:13): [True: 1.48k, False: 5.62k]
  ------------------
  331|  1.48k|            bits = bits_ng_128;
  332|  1.48k|        }
  333|  7.10k|    }
  334|       |
  335|  7.10k|    secp256k1_gej_set_infinity(r);
  336|       |
  337|   911k|    for (i = bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (337:24): [True: 904k, False: 7.10k]
  ------------------
  338|   904k|        int n;
  339|   904k|        secp256k1_gej_double_var(r, r, NULL);
  340|  1.80M|        for (np = 0; np < no; ++np) {
  ------------------
  |  Branch (340:22): [True: 904k, False: 904k]
  ------------------
  341|   904k|            if (i < state->ps[np].bits_na_1 && (n = state->ps[np].wnaf_na_1[i])) {
  ------------------
  |  Branch (341:17): [True: 888k, False: 16.0k]
  |  Branch (341:48): [True: 152k, False: 736k]
  ------------------
  342|   152k|                secp256k1_ecmult_table_get_ge(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A);
  ------------------
  |  |   41|   152k|#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|   152k|#  define WINDOW_A 5
  ------------------
  343|   152k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  344|   152k|            }
  345|   904k|            if (i < state->ps[np].bits_na_lam && (n = state->ps[np].wnaf_na_lam[i])) {
  ------------------
  |  Branch (345:17): [True: 883k, False: 20.7k]
  |  Branch (345:50): [True: 152k, False: 731k]
  ------------------
  346|   152k|                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|   152k|#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|   152k|#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|   152k|#  define WINDOW_A 5
  ------------------
  347|   152k|                secp256k1_gej_add_ge_var(r, r, &tmpa, NULL);
  348|   152k|            }
  349|   904k|        }
  350|   904k|        if (i < bits_ng_1 && (n = wnaf_ng_1[i])) {
  ------------------
  |  Branch (350:13): [True: 863k, False: 41.3k]
  |  Branch (350:30): [True: 60.2k, False: 803k]
  ------------------
  351|  60.2k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g, n, WINDOW_G);
  ------------------
  |  |   31|  60.2k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  352|  60.2k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  353|  60.2k|        }
  354|   904k|        if (i < bits_ng_128 && (n = wnaf_ng_128[i])) {
  ------------------
  |  Branch (354:13): [True: 865k, False: 38.7k]
  |  Branch (354:32): [True: 60.3k, False: 805k]
  ------------------
  355|  60.3k|            secp256k1_ecmult_table_get_ge_storage(&tmpa, secp256k1_pre_g_128, n, WINDOW_G);
  ------------------
  |  |   31|  60.3k|#    define WINDOW_G ECMULT_WINDOW_SIZE
  ------------------
  356|  60.3k|            secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z);
  357|  60.3k|        }
  358|   904k|    }
  359|       |
  360|  7.10k|    if (!secp256k1_gej_is_infinity(r)) {
  ------------------
  |  Branch (360:9): [True: 7.10k, False: 0]
  ------------------
  361|  7.10k|        secp256k1_fe_mul(&r->z, &r->z, &Z);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  362|  7.10k|    }
  363|  7.10k|}
secp256k1.c:secp256k1_ecmult_wnaf_small:
  224|  14.2k|static int secp256k1_ecmult_wnaf_small(int8_t *wnaf, int len, const secp256k1_scalar *a, int w) {
  225|  14.2k|    int wnaf_tmp[256];
  226|  14.2k|    int ret, i;
  227|       |
  228|  14.2k|    VERIFY_CHECK(2 <= w && w <= 8);
  229|  14.2k|    ret = secp256k1_ecmult_wnaf(wnaf_tmp, len, a, w);
  230|       |
  231|  1.84M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (231:17): [True: 1.83M, False: 14.2k]
  ------------------
  232|  1.83M|        wnaf[i] = (int8_t)wnaf_tmp[i];
  233|  1.83M|    }
  234|       |
  235|  14.2k|    return ret;
  236|  14.2k|}
secp256k1.c:secp256k1_ecmult_odd_multiples_table:
   73|  7.10k|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|  7.10k|    secp256k1_gej d, ai;
   75|  7.10k|    secp256k1_ge d_ge;
   76|  7.10k|    size_t i;
   77|       |
   78|  7.10k|    VERIFY_CHECK(!secp256k1_gej_is_infinity(a));
   79|       |
   80|  7.10k|    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|  7.10k|    secp256k1_ge_set_xy(&d_ge, &d.x, &d.y);
   96|  7.10k|    secp256k1_ge_set_gej_zinv(&pre_a[0], a, &d.z);
   97|  7.10k|    secp256k1_gej_set_ge(&ai, &pre_a[0]);
   98|  7.10k|    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|  7.10k|    zr[0] = d.z;
  104|       |
  105|  56.8k|    for (i = 1; i < n; i++) {
  ------------------
  |  Branch (105:17): [True: 49.7k, False: 7.10k]
  ------------------
  106|  49.7k|        secp256k1_gej_add_ge_var(&ai, &ai, &d_ge, &zr[i]);
  107|  49.7k|        secp256k1_ge_set_xy(&pre_a[i], &ai.x, &ai.y);
  108|  49.7k|    }
  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|  7.10k|    secp256k1_fe_mul(z, &ai.z, &d.z);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  115|  7.10k|}
secp256k1.c:secp256k1_ecmult_wnaf:
  162|  28.4k|static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a, int w) {
  163|  28.4k|    secp256k1_scalar s;
  164|  28.4k|    int last_set_bit = -1;
  165|  28.4k|    int bit = 0;
  166|  28.4k|    int sign = 1;
  167|  28.4k|    int carry = 0;
  168|       |
  169|  28.4k|    VERIFY_CHECK(wnaf != NULL);
  170|  28.4k|    VERIFY_CHECK(0 <= len && len <= 256);
  171|  28.4k|    VERIFY_CHECK(a != NULL);
  172|  28.4k|    VERIFY_CHECK(2 <= w && w <= 31);
  173|       |
  174|  3.69M|    for (bit = 0; bit < len; bit++) {
  ------------------
  |  Branch (174:19): [True: 3.66M, False: 28.4k]
  ------------------
  175|  3.66M|        wnaf[bit] = 0;
  176|  3.66M|    }
  177|       |
  178|  28.4k|    s = *a;
  179|  28.4k|    if (secp256k1_scalar_get_bits_limb32(&s, 255, 1)) {
  ------------------
  |  Branch (179:9): [True: 7.05k, False: 21.3k]
  ------------------
  180|  7.05k|        secp256k1_scalar_negate(&s, &s);
  181|  7.05k|        sign = -1;
  182|  7.05k|    }
  183|       |
  184|  28.4k|    bit = 0;
  185|   899k|    while (bit < len) {
  ------------------
  |  Branch (185:12): [True: 871k, False: 28.4k]
  ------------------
  186|   871k|        int now;
  187|   871k|        int word;
  188|   871k|        if (secp256k1_scalar_get_bits_limb32(&s, bit, 1) == (unsigned int)carry) {
  ------------------
  |  Branch (188:13): [True: 445k, False: 425k]
  ------------------
  189|   445k|            bit++;
  190|   445k|            continue;
  191|   445k|        }
  192|       |
  193|   425k|        now = w;
  194|   425k|        if (now > len - bit) {
  ------------------
  |  Branch (194:13): [True: 18.4k, False: 406k]
  ------------------
  195|  18.4k|            now = len - bit;
  196|  18.4k|        }
  197|       |
  198|   425k|        word = secp256k1_scalar_get_bits_var(&s, bit, now) + carry;
  199|       |
  200|   425k|        carry = (word >> (w-1)) & 1;
  201|   425k|        word -= carry << w;
  202|       |
  203|   425k|        wnaf[bit] = sign * word;
  204|   425k|        last_set_bit = bit;
  205|       |
  206|   425k|        bit += now;
  207|   425k|    }
  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|  28.4k|    return last_set_bit + 1;
  221|  28.4k|}
secp256k1.c:secp256k1_ecmult_table_get_ge:
  125|   152k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge(secp256k1_ge *r, const secp256k1_ge *pre, int n, int w) {
  126|   152k|    secp256k1_ecmult_table_verify(n,w);
  127|   152k|    if (n > 0) {
  ------------------
  |  Branch (127:9): [True: 76.1k, False: 76.4k]
  ------------------
  128|  76.1k|        *r = pre[(n-1)/2];
  129|  76.4k|    } else {
  130|  76.4k|        *r = pre[(-n-1)/2];
  131|  76.4k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|  76.4k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  76.4k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  76.4k|    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: 76.4k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  76.4k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 76.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  76.4k|    } \
  |  |  |  |   94|  76.4k|    stmt; \
  |  |  |  |   95|  76.4k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 76.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  76.4k|    }
  133|   152k|}
secp256k1.c:secp256k1_ecmult_table_verify:
  117|   425k|SECP256K1_INLINE static void secp256k1_ecmult_table_verify(int n, int w) {
  118|   425k|    (void)n;
  119|   425k|    (void)w;
  120|   425k|    VERIFY_CHECK(((n) & 1) == 1);
  121|   425k|    VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1));
  122|   425k|    VERIFY_CHECK((n) <=  ((1 << ((w)-1)) - 1));
  123|   425k|}
secp256k1.c:secp256k1_ecmult_table_get_ge_lambda:
  135|   152k|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|   152k|    secp256k1_ecmult_table_verify(n,w);
  137|   152k|    if (n > 0) {
  ------------------
  |  Branch (137:9): [True: 75.6k, False: 76.4k]
  ------------------
  138|  75.6k|        secp256k1_ge_set_xy(r, &x[(n-1)/2], &pre[(n-1)/2].y);
  139|  76.4k|    } else {
  140|  76.4k|        secp256k1_ge_set_xy(r, &x[(-n-1)/2], &pre[(-n-1)/2].y);
  141|  76.4k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|  76.4k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  76.4k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  76.4k|    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: 76.4k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  76.4k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 76.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  76.4k|    } \
  |  |  |  |   94|  76.4k|    stmt; \
  |  |  |  |   95|  76.4k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 76.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  142|  76.4k|    }
  143|   152k|}
secp256k1.c:secp256k1_ecmult_table_get_ge_storage:
  145|   120k|SECP256K1_INLINE static void secp256k1_ecmult_table_get_ge_storage(secp256k1_ge *r, const secp256k1_ge_storage *pre, int n, int w) {
  146|   120k|    secp256k1_ecmult_table_verify(n,w);
  147|   120k|    if (n > 0) {
  ------------------
  |  Branch (147:9): [True: 66.9k, False: 53.6k]
  ------------------
  148|  66.9k|        secp256k1_ge_from_storage(r, &pre[(n-1)/2]);
  149|  66.9k|    } else {
  150|  53.6k|        secp256k1_ge_from_storage(r, &pre[(-n-1)/2]);
  151|  53.6k|        secp256k1_fe_negate(&(r->y), &(r->y), 1);
  ------------------
  |  |  211|  53.6k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  53.6k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  53.6k|    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: 53.6k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  53.6k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 53.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  53.6k|    } \
  |  |  |  |   94|  53.6k|    stmt; \
  |  |  |  |   95|  53.6k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 53.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|  53.6k|    }
  153|   120k|}

secp256k1.c:secp256k1_fe_impl_sqr:
  317|  9.16M|SECP256K1_FORCE_INLINE static void secp256k1_fe_impl_sqr(secp256k1_fe *r, const secp256k1_fe *a) {
  318|  9.16M|    secp256k1_fe_sqr_inner(r->n, a->n);
  319|  9.16M|}
secp256k1.c:secp256k1_fe_impl_mul:
  313|  10.1M|SECP256K1_FORCE_INLINE static void secp256k1_fe_impl_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) {
  314|  10.1M|    secp256k1_fe_mul_inner(r->n, a->n, b->n);
  315|  10.1M|}
secp256k1.c:secp256k1_fe_impl_add_int:
  301|  7.14k|SECP256K1_INLINE static void secp256k1_fe_impl_add_int(secp256k1_fe *r, int a) {
  302|  7.14k|    r->n[0] += a;
  303|  7.14k|}
secp256k1.c:secp256k1_fe_impl_is_zero:
  206|  14.0k|SECP256K1_INLINE static int secp256k1_fe_impl_is_zero(const secp256k1_fe *a) {
  207|  14.0k|    const uint64_t *t = a->n;
  208|  14.0k|    return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
  209|  14.0k|}
secp256k1.c:secp256k1_fe_impl_cmp_var:
  215|     76|static int secp256k1_fe_impl_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) {
  216|     76|    int i;
  217|    130|    for (i = 4; i >= 0; i--) {
  ------------------
  |  Branch (217:17): [True: 130, False: 0]
  ------------------
  218|    130|        if (a->n[i] > b->n[i]) {
  ------------------
  |  Branch (218:13): [True: 65, False: 65]
  ------------------
  219|     65|            return 1;
  220|     65|        }
  221|     65|        if (a->n[i] < b->n[i]) {
  ------------------
  |  Branch (221:13): [True: 11, False: 54]
  ------------------
  222|     11|            return -1;
  223|     11|        }
  224|     65|    }
  225|      0|    return 0;
  226|     76|}
secp256k1.c:secp256k1_fe_impl_add:
  305|  10.0M|SECP256K1_INLINE static void secp256k1_fe_impl_add(secp256k1_fe *r, const secp256k1_fe *a) {
  306|  10.0M|    r->n[0] += a->n[0];
  307|  10.0M|    r->n[1] += a->n[1];
  308|  10.0M|    r->n[2] += a->n[2];
  309|  10.0M|    r->n[3] += a->n[3];
  310|  10.0M|    r->n[4] += a->n[4];
  311|  10.0M|}
secp256k1.c:secp256k1_fe_impl_normalize_weak:
   80|  7.10k|static void secp256k1_fe_impl_normalize_weak(secp256k1_fe *r) {
   81|  7.10k|    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|  7.10k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   85|       |
   86|       |    /* The first pass ensures the magnitude is 1, ... */
   87|  7.10k|    t0 += x * 0x1000003D1ULL;
   88|  7.10k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   89|  7.10k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   90|  7.10k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   91|  7.10k|    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|  7.10k|    VERIFY_CHECK(t4 >> 49 == 0);
   95|       |
   96|  7.10k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   97|  7.10k|}
secp256k1.c:secp256k1_fe_impl_negate_unchecked:
  278|  5.21M|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|  5.21M|    VERIFY_CHECK(0xFFFFEFFFFFC2FULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  281|  5.21M|    VERIFY_CHECK(0xFFFFFFFFFFFFFULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  282|  5.21M|    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|  5.21M|    r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0];
  287|  5.21M|    r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1];
  288|  5.21M|    r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2];
  289|  5.21M|    r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3];
  290|  5.21M|    r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4];
  291|  5.21M|}
secp256k1.c:secp256k1_fe_impl_cmov:
  321|  3.12M|SECP256K1_INLINE static void secp256k1_fe_impl_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) {
  322|  3.12M|    uint64_t mask0, mask1;
  323|  3.12M|    volatile int vflag = flag;
  324|  3.12M|    VERIFY_CHECK(flag == 0 || flag == 1);
  325|  3.12M|    SECP256K1_CHECKMEM_CHECK_VERIFY(r->n, sizeof(r->n));
  ------------------
  |  |  114|  3.12M|#define SECP256K1_CHECKMEM_CHECK_VERIFY(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  3.12M|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 3.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  326|  3.12M|    mask0 = vflag + ~((uint64_t)0);
  327|  3.12M|    mask1 = ~mask0;
  328|  3.12M|    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
  329|  3.12M|    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
  330|  3.12M|    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
  331|  3.12M|    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
  332|  3.12M|    r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1);
  333|  3.12M|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero:
  137|   899k|static int secp256k1_fe_impl_normalizes_to_zero(const secp256k1_fe *r) {
  138|   899k|    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|   899k|    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|   899k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  145|       |
  146|       |    /* The first pass ensures the magnitude is 1, ... */
  147|   899k|    t0 += x * 0x1000003D1ULL;
  148|   899k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0  = t0; z1  = t0 ^ 0x1000003D0ULL;
  149|   899k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  150|   899k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  151|   899k|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  152|   899k|                                                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|   899k|    VERIFY_CHECK(t4 >> 49 == 0);
  156|       |
  157|   899k|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  158|   899k|}
secp256k1.c:secp256k1_fe_impl_set_int:
  201|  99.4k|SECP256K1_INLINE static void secp256k1_fe_impl_set_int(secp256k1_fe *r, int a) {
  202|  99.4k|    r->n[0] = a;
  203|  99.4k|    r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
  204|  99.4k|}
secp256k1.c:secp256k1_fe_impl_mul_int_unchecked:
  293|  1.79M|SECP256K1_INLINE static void secp256k1_fe_impl_mul_int_unchecked(secp256k1_fe *r, int a) {
  294|  1.79M|    r->n[0] *= a;
  295|  1.79M|    r->n[1] *= a;
  296|  1.79M|    r->n[2] *= a;
  297|  1.79M|    r->n[3] *= a;
  298|  1.79M|    r->n[4] *= a;
  299|  1.79M|}
secp256k1.c:secp256k1_fe_impl_half:
  335|  1.35M|static SECP256K1_INLINE void secp256k1_fe_impl_half(secp256k1_fe *r) {
  336|  1.35M|    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
  337|  1.35M|    uint64_t one = (uint64_t)1;
  338|  1.35M|    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|  1.35M|    t0 += 0xFFFFEFFFFFC2FULL & mask;
  351|  1.35M|    t1 += mask;
  352|  1.35M|    t2 += mask;
  353|  1.35M|    t3 += mask;
  354|  1.35M|    t4 += mask >> 4;
  355|       |
  356|  1.35M|    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|  1.35M|    r->n[0] = (t0 >> 1) + ((t1 & one) << 51);
  366|  1.35M|    r->n[1] = (t1 >> 1) + ((t2 & one) << 51);
  367|  1.35M|    r->n[2] = (t2 >> 1) + ((t3 & one) << 51);
  368|  1.35M|    r->n[3] = (t3 >> 1) + ((t4 & one) << 51);
  369|  1.35M|    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|  1.35M|}
secp256k1.c:secp256k1_fe_impl_inv:
  453|  10.3k|static void secp256k1_fe_impl_inv(secp256k1_fe *r, const secp256k1_fe *x) {
  454|  10.3k|    secp256k1_fe tmp = *x;
  455|  10.3k|    secp256k1_modinv64_signed62 s;
  456|       |
  457|  10.3k|    secp256k1_fe_normalize(&tmp);
  ------------------
  |  |   78|  10.3k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  458|  10.3k|    secp256k1_fe_to_signed62(&s, &tmp);
  459|  10.3k|    secp256k1_modinv64(&s, &secp256k1_const_modinfo_fe);
  460|  10.3k|    secp256k1_fe_from_signed62(r, &s);
  461|  10.3k|}
secp256k1.c:secp256k1_fe_to_signed62:
  437|  17.4k|static void secp256k1_fe_to_signed62(secp256k1_modinv64_signed62 *r, const secp256k1_fe *a) {
  438|  17.4k|    const uint64_t M62 = UINT64_MAX >> 2;
  439|  17.4k|    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|  17.4k|    r->v[0] = (a0       | a1 << 52) & M62;
  442|  17.4k|    r->v[1] = (a1 >> 10 | a2 << 42) & M62;
  443|  17.4k|    r->v[2] = (a2 >> 20 | a3 << 32) & M62;
  444|  17.4k|    r->v[3] = (a3 >> 30 | a4 << 22) & M62;
  445|  17.4k|    r->v[4] =  a4 >> 40;
  446|  17.4k|}
secp256k1.c:secp256k1_fe_from_signed62:
  417|  17.4k|static void secp256k1_fe_from_signed62(secp256k1_fe *r, const secp256k1_modinv64_signed62 *a) {
  418|  17.4k|    const uint64_t M52 = UINT64_MAX >> 12;
  419|  17.4k|    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|  17.4k|    VERIFY_CHECK(a0 >> 62 == 0);
  425|  17.4k|    VERIFY_CHECK(a1 >> 62 == 0);
  426|  17.4k|    VERIFY_CHECK(a2 >> 62 == 0);
  427|  17.4k|    VERIFY_CHECK(a3 >> 62 == 0);
  428|  17.4k|    VERIFY_CHECK(a4 >> 8 == 0);
  429|       |
  430|  17.4k|    r->n[0] =  a0                   & M52;
  431|  17.4k|    r->n[1] = (a0 >> 52 | a1 << 10) & M52;
  432|  17.4k|    r->n[2] = (a1 >> 42 | a2 << 20) & M52;
  433|  17.4k|    r->n[3] = (a2 >> 32 | a3 << 30) & M52;
  434|  17.4k|    r->n[4] = (a3 >> 22 | a4 << 40);
  435|  17.4k|}
secp256k1.c:secp256k1_fe_impl_set_b32_limit:
  265|  7.20k|static int secp256k1_fe_impl_set_b32_limit(secp256k1_fe *r, const unsigned char *a) {
  266|  7.20k|    secp256k1_fe_impl_set_b32_mod(r, a);
  267|  7.20k|    return !((r->n[4] == 0x0FFFFFFFFFFFFULL) & ((r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL) & (r->n[0] >= 0xFFFFEFFFFFC2FULL));
  268|  7.20k|}
secp256k1.c:secp256k1_fe_impl_get_b32:
  271|  23.8k|static void secp256k1_fe_impl_get_b32(unsigned char *r, const secp256k1_fe *a) {
  272|  23.8k|    secp256k1_write_be64(&r[0], (a->n[4] << 16) | (a->n[3] >> 36));
  273|  23.8k|    secp256k1_write_be64(&r[8], (a->n[3] << 28) | (a->n[2] >> 24));
  274|  23.8k|    secp256k1_write_be64(&r[16], (a->n[2] << 40) | (a->n[1] >> 12));
  275|  23.8k|    secp256k1_write_be64(&r[24], (a->n[1] << 52) | a->n[0]);
  276|  23.8k|}
secp256k1.c:secp256k1_fe_impl_normalize_var:
   99|  42.2k|static void secp256k1_fe_impl_normalize_var(secp256k1_fe *r) {
  100|  42.2k|    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|  42.2k|    uint64_t m;
  104|  42.2k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  105|       |
  106|       |    /* The first pass ensures the magnitude is 1, ... */
  107|  42.2k|    t0 += x * 0x1000003D1ULL;
  108|  42.2k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  109|  42.2k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
  110|  42.2k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
  111|  42.2k|    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|  42.2k|    VERIFY_CHECK(t4 >> 49 == 0);
  115|       |
  116|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
  117|  42.2k|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
  118|  42.2k|        & (t0 >= 0xFFFFEFFFFFC2FULL));
  119|       |
  120|  42.2k|    if (x) {
  ------------------
  |  Branch (120:9): [True: 0, False: 42.2k]
  ------------------
  121|      0|        t0 += 0x1000003D1ULL;
  122|      0|        t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  123|      0|        t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
  124|      0|        t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
  125|      0|        t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
  126|       |
  127|       |        /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */
  128|      0|        VERIFY_CHECK(t4 >> 48 == x);
  129|       |
  130|       |        /* Mask off the possible multiple of 2^256 from the final reduction */
  131|      0|        t4 &= 0x0FFFFFFFFFFFFULL;
  132|      0|    }
  133|       |
  134|  42.2k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
  135|  42.2k|}
secp256k1.c:secp256k1_fe_impl_is_odd:
  211|  18.2k|SECP256K1_INLINE static int secp256k1_fe_impl_is_odd(const secp256k1_fe *a) {
  212|  18.2k|    return a->n[0] & 1;
  213|  18.2k|}
secp256k1.c:secp256k1_fe_impl_from_storage:
  409|  1.16M|static SECP256K1_INLINE void secp256k1_fe_impl_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) {
  410|  1.16M|    r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL;
  411|  1.16M|    r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL);
  412|  1.16M|    r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL);
  413|  1.16M|    r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL);
  414|  1.16M|    r->n[4] = a->n[3] >> 16;
  415|  1.16M|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero_var:
  160|   467k|static int secp256k1_fe_impl_normalizes_to_zero_var(const secp256k1_fe *r) {
  161|   467k|    uint64_t t0, t1, t2, t3, t4;
  162|   467k|    uint64_t z0, z1;
  163|   467k|    uint64_t x;
  164|       |
  165|   467k|    t0 = r->n[0];
  166|   467k|    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|   467k|    x = t4 >> 48;
  170|       |
  171|       |    /* The first pass ensures the magnitude is 1, ... */
  172|   467k|    t0 += x * 0x1000003D1ULL;
  173|       |
  174|       |    /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */
  175|   467k|    z0 = t0 & 0xFFFFFFFFFFFFFULL;
  176|   467k|    z1 = z0 ^ 0x1000003D0ULL;
  177|       |
  178|       |    /* Fast return path should catch the majority of cases */
  179|   467k|    if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) {
  ------------------
  |  Branch (179:9): [True: 467k, False: 132]
  ------------------
  180|   467k|        return 0;
  181|   467k|    }
  182|       |
  183|    132|    t1 = r->n[1];
  184|    132|    t2 = r->n[2];
  185|    132|    t3 = r->n[3];
  186|       |
  187|    132|    t4 &= 0x0FFFFFFFFFFFFULL;
  188|       |
  189|    132|    t1 += (t0 >> 52);
  190|    132|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  191|    132|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  192|    132|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  193|    132|                                                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|    132|    VERIFY_CHECK(t4 >> 49 == 0);
  197|       |
  198|    132|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  199|   467k|}
secp256k1.c:secp256k1_fe_impl_inv_var:
  463|  7.10k|static void secp256k1_fe_impl_inv_var(secp256k1_fe *r, const secp256k1_fe *x) {
  464|  7.10k|    secp256k1_fe tmp = *x;
  465|  7.10k|    secp256k1_modinv64_signed62 s;
  466|       |
  467|  7.10k|    secp256k1_fe_normalize_var(&tmp);
  ------------------
  |  |   80|  7.10k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  468|  7.10k|    secp256k1_fe_to_signed62(&s, &tmp);
  469|  7.10k|    secp256k1_modinv64_var(&s, &secp256k1_const_modinfo_fe);
  470|  7.10k|    secp256k1_fe_from_signed62(r, &s);
  471|  7.10k|}
secp256k1.c:secp256k1_fe_storage_cmov:
  389|  28.5M|static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) {
  390|  28.5M|    uint64_t mask0, mask1;
  391|  28.5M|    volatile int vflag = flag;
  392|  28.5M|    VERIFY_CHECK(flag == 0 || flag == 1);
  393|  28.5M|    SECP256K1_CHECKMEM_CHECK_VERIFY(r->n, sizeof(r->n));
  ------------------
  |  |  114|  28.5M|#define SECP256K1_CHECKMEM_CHECK_VERIFY(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|  28.5M|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 28.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  394|  28.5M|    mask0 = vflag + ~((uint64_t)0);
  395|  28.5M|    mask1 = ~mask0;
  396|  28.5M|    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
  397|  28.5M|    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
  398|  28.5M|    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
  399|  28.5M|    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
  400|  28.5M|}
secp256k1.c:secp256k1_fe_impl_set_b32_mod:
  228|  7.20k|static void secp256k1_fe_impl_set_b32_mod(secp256k1_fe *r, const unsigned char *a) {
  229|  7.20k|    r->n[0] = (uint64_t)a[31]
  230|  7.20k|            | ((uint64_t)a[30] << 8)
  231|  7.20k|            | ((uint64_t)a[29] << 16)
  232|  7.20k|            | ((uint64_t)a[28] << 24)
  233|  7.20k|            | ((uint64_t)a[27] << 32)
  234|  7.20k|            | ((uint64_t)a[26] << 40)
  235|  7.20k|            | ((uint64_t)(a[25] & 0xF)  << 48);
  236|  7.20k|    r->n[1] = (uint64_t)((a[25] >> 4) & 0xF)
  237|  7.20k|            | ((uint64_t)a[24] << 4)
  238|  7.20k|            | ((uint64_t)a[23] << 12)
  239|  7.20k|            | ((uint64_t)a[22] << 20)
  240|  7.20k|            | ((uint64_t)a[21] << 28)
  241|  7.20k|            | ((uint64_t)a[20] << 36)
  242|  7.20k|            | ((uint64_t)a[19] << 44);
  243|  7.20k|    r->n[2] = (uint64_t)a[18]
  244|  7.20k|            | ((uint64_t)a[17] << 8)
  245|  7.20k|            | ((uint64_t)a[16] << 16)
  246|  7.20k|            | ((uint64_t)a[15] << 24)
  247|  7.20k|            | ((uint64_t)a[14] << 32)
  248|  7.20k|            | ((uint64_t)a[13] << 40)
  249|  7.20k|            | ((uint64_t)(a[12] & 0xF) << 48);
  250|  7.20k|    r->n[3] = (uint64_t)((a[12] >> 4) & 0xF)
  251|  7.20k|            | ((uint64_t)a[11] << 4)
  252|  7.20k|            | ((uint64_t)a[10] << 12)
  253|  7.20k|            | ((uint64_t)a[9]  << 20)
  254|  7.20k|            | ((uint64_t)a[8]  << 28)
  255|  7.20k|            | ((uint64_t)a[7]  << 36)
  256|  7.20k|            | ((uint64_t)a[6]  << 44);
  257|  7.20k|    r->n[4] = (uint64_t)a[5]
  258|  7.20k|            | ((uint64_t)a[4] << 8)
  259|  7.20k|            | ((uint64_t)a[3] << 16)
  260|  7.20k|            | ((uint64_t)a[2] << 24)
  261|  7.20k|            | ((uint64_t)a[1] << 32)
  262|  7.20k|            | ((uint64_t)a[0] << 40);
  263|  7.20k|}
secp256k1.c:secp256k1_fe_impl_normalize:
   43|  45.3k|static void secp256k1_fe_impl_normalize(secp256k1_fe *r) {
   44|  45.3k|    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|  45.3k|    uint64_t m;
   48|  45.3k|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   49|       |
   50|       |    /* The first pass ensures the magnitude is 1, ... */
   51|  45.3k|    t0 += x * 0x1000003D1ULL;
   52|  45.3k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   53|  45.3k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
   54|  45.3k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
   55|  45.3k|    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|  45.3k|    VERIFY_CHECK(t4 >> 49 == 0);
   59|       |
   60|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
   61|  45.3k|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
   62|  45.3k|        & (t0 >= 0xFFFFEFFFFFC2FULL));
   63|       |
   64|       |    /* Apply the final reduction (for constant-time behaviour, we do it always) */
   65|  45.3k|    t0 += x * 0x1000003D1ULL;
   66|  45.3k|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   67|  45.3k|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   68|  45.3k|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   69|  45.3k|    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|  45.3k|    VERIFY_CHECK(t4 >> 48 == x);
   73|       |
   74|       |    /* Mask off the possible multiple of 2^256 from the final reduction */
   75|  45.3k|    t4 &= 0x0FFFFFFFFFFFFULL;
   76|       |
   77|  45.3k|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   78|  45.3k|}
secp256k1.c:secp256k1_fe_impl_to_storage:
  402|  28.0k|static void secp256k1_fe_impl_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) {
  403|  28.0k|    r->n[0] = a->n[0] | a->n[1] << 52;
  404|  28.0k|    r->n[1] = a->n[1] >> 12 | a->n[2] << 40;
  405|  28.0k|    r->n[2] = a->n[2] >> 24 | a->n[3] << 28;
  406|  28.0k|    r->n[3] = a->n[3] >> 36 | a->n[4] << 16;
  407|  28.0k|}

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

secp256k1.c:secp256k1_fe_verify:
  149|  21.2M|static void secp256k1_fe_verify(const secp256k1_fe *a) { (void)a; }
secp256k1.c:secp256k1_fe_verify_magnitude:
  150|  20.5M|static void secp256k1_fe_verify_magnitude(const secp256k1_fe *a, int m) { (void)a; (void)m; }
secp256k1.c:secp256k1_fe_sqrt:
   37|  7.14k|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|  7.14k|    secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1;
   48|  7.14k|    int j, ret;
   49|       |
   50|  7.14k|    VERIFY_CHECK(r != a);
   51|  7.14k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  345|  7.14k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   52|  7.14k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 8);
  ------------------
  |  |  349|  7.14k|#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|  7.14k|    secp256k1_fe_sqr(&x2, a);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   60|  7.14k|    secp256k1_fe_mul(&x2, &x2, a);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   61|       |
   62|  7.14k|    secp256k1_fe_sqr(&x3, &x2);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   63|  7.14k|    secp256k1_fe_mul(&x3, &x3, a);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   64|       |
   65|  7.14k|    x6 = x3;
   66|  28.5k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (66:15): [True: 21.4k, False: 7.14k]
  ------------------
   67|  21.4k|        secp256k1_fe_sqr(&x6, &x6);
  ------------------
  |  |   94|  21.4k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   68|  21.4k|    }
   69|  7.14k|    secp256k1_fe_mul(&x6, &x6, &x3);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   70|       |
   71|  7.14k|    x9 = x6;
   72|  28.5k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (72:15): [True: 21.4k, False: 7.14k]
  ------------------
   73|  21.4k|        secp256k1_fe_sqr(&x9, &x9);
  ------------------
  |  |   94|  21.4k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   74|  21.4k|    }
   75|  7.14k|    secp256k1_fe_mul(&x9, &x9, &x3);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   76|       |
   77|  7.14k|    x11 = x9;
   78|  21.4k|    for (j=0; j<2; j++) {
  ------------------
  |  Branch (78:15): [True: 14.2k, False: 7.14k]
  ------------------
   79|  14.2k|        secp256k1_fe_sqr(&x11, &x11);
  ------------------
  |  |   94|  14.2k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   80|  14.2k|    }
   81|  7.14k|    secp256k1_fe_mul(&x11, &x11, &x2);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   82|       |
   83|  7.14k|    x22 = x11;
   84|  85.6k|    for (j=0; j<11; j++) {
  ------------------
  |  Branch (84:15): [True: 78.5k, False: 7.14k]
  ------------------
   85|  78.5k|        secp256k1_fe_sqr(&x22, &x22);
  ------------------
  |  |   94|  78.5k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   86|  78.5k|    }
   87|  7.14k|    secp256k1_fe_mul(&x22, &x22, &x11);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   88|       |
   89|  7.14k|    x44 = x22;
   90|   164k|    for (j=0; j<22; j++) {
  ------------------
  |  Branch (90:15): [True: 157k, False: 7.14k]
  ------------------
   91|   157k|        secp256k1_fe_sqr(&x44, &x44);
  ------------------
  |  |   94|   157k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   92|   157k|    }
   93|  7.14k|    secp256k1_fe_mul(&x44, &x44, &x22);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
   94|       |
   95|  7.14k|    x88 = x44;
   96|   321k|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (96:15): [True: 314k, False: 7.14k]
  ------------------
   97|   314k|        secp256k1_fe_sqr(&x88, &x88);
  ------------------
  |  |   94|   314k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
   98|   314k|    }
   99|  7.14k|    secp256k1_fe_mul(&x88, &x88, &x44);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  100|       |
  101|  7.14k|    x176 = x88;
  102|   635k|    for (j=0; j<88; j++) {
  ------------------
  |  Branch (102:15): [True: 628k, False: 7.14k]
  ------------------
  103|   628k|        secp256k1_fe_sqr(&x176, &x176);
  ------------------
  |  |   94|   628k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  104|   628k|    }
  105|  7.14k|    secp256k1_fe_mul(&x176, &x176, &x88);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  106|       |
  107|  7.14k|    x220 = x176;
  108|   321k|    for (j=0; j<44; j++) {
  ------------------
  |  Branch (108:15): [True: 314k, False: 7.14k]
  ------------------
  109|   314k|        secp256k1_fe_sqr(&x220, &x220);
  ------------------
  |  |   94|   314k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  110|   314k|    }
  111|  7.14k|    secp256k1_fe_mul(&x220, &x220, &x44);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  112|       |
  113|  7.14k|    x223 = x220;
  114|  28.5k|    for (j=0; j<3; j++) {
  ------------------
  |  Branch (114:15): [True: 21.4k, False: 7.14k]
  ------------------
  115|  21.4k|        secp256k1_fe_sqr(&x223, &x223);
  ------------------
  |  |   94|  21.4k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  116|  21.4k|    }
  117|  7.14k|    secp256k1_fe_mul(&x223, &x223, &x3);
  ------------------
  |  |   93|  7.14k|#  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|  7.14k|    t1 = x223;
  122|   171k|    for (j=0; j<23; j++) {
  ------------------
  |  Branch (122:15): [True: 164k, False: 7.14k]
  ------------------
  123|   164k|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|   164k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|   164k|    }
  125|  7.14k|    secp256k1_fe_mul(&t1, &t1, &x22);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|  49.9k|    for (j=0; j<6; j++) {
  ------------------
  |  Branch (126:15): [True: 42.8k, False: 7.14k]
  ------------------
  127|  42.8k|        secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|  42.8k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  128|  42.8k|    }
  129|  7.14k|    secp256k1_fe_mul(&t1, &t1, &x2);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  130|  7.14k|    secp256k1_fe_sqr(&t1, &t1);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  131|  7.14k|    secp256k1_fe_sqr(r, &t1);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  132|       |
  133|       |    /* Check that a square root was actually calculated */
  134|       |
  135|  7.14k|    secp256k1_fe_sqr(&t1, r);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  136|  7.14k|    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|  7.14k|    return ret;
  146|  7.14k|}
secp256k1.c:secp256k1_fe_equal:
   25|  7.14k|SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) {
   26|  7.14k|    secp256k1_fe na;
   27|  7.14k|    SECP256K1_FE_VERIFY(a);
  ------------------
  |  |  345|  7.14k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   28|  7.14k|    SECP256K1_FE_VERIFY(b);
  ------------------
  |  |  345|  7.14k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   29|  7.14k|    SECP256K1_FE_VERIFY_MAGNITUDE(a, 1);
  ------------------
  |  |  349|  7.14k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   30|  7.14k|    SECP256K1_FE_VERIFY_MAGNITUDE(b, 30);
  ------------------
  |  |  349|  7.14k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   31|       |
   32|  7.14k|    secp256k1_fe_negate(&na, a, 1);
  ------------------
  |  |  211|  7.14k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  7.14k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  7.14k|    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: 7.14k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  7.14k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 7.14k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  7.14k|    } \
  |  |  |  |   94|  7.14k|    stmt; \
  |  |  |  |   95|  7.14k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 7.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   33|  7.14k|    secp256k1_fe_add(&na, b);
  ------------------
  |  |   92|  7.14k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
   34|  7.14k|    return secp256k1_fe_normalizes_to_zero(&na);
  ------------------
  |  |   81|  7.14k|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
   35|  7.14k|}
secp256k1.c:secp256k1_fe_clear:
   21|  10.3k|SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) {
   22|  10.3k|    secp256k1_memclear_explicit(a, sizeof(secp256k1_fe));
   23|  10.3k|}

secp256k1.c:secp256k1_ge_set_xy:
  132|   215k|static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) {
  133|   215k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  345|   215k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  134|   215k|    SECP256K1_FE_VERIFY(y);
  ------------------
  |  |  345|   215k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  135|       |
  136|   215k|    r->infinity = 0;
  137|   215k|    r->x = *x;
  138|   215k|    r->y = *y;
  139|       |
  140|   215k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   215k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  141|   215k|}
secp256k1.c:secp256k1_ge_verify:
   78|  1.89M|static void secp256k1_ge_verify(const secp256k1_ge *a) {
   79|  1.89M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  345|  1.89M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   80|  1.89M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  345|  1.89M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   81|  1.89M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GE_X_MAGNITUDE_MAX);
  ------------------
  |  |  349|  1.89M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   82|  1.89M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GE_Y_MAGNITUDE_MAX);
  ------------------
  |  |  349|  1.89M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   83|  1.89M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   84|  1.89M|    (void)a;
   85|  1.89M|}
secp256k1.c:secp256k1_ge_clear:
  343|  13.8k|static void secp256k1_ge_clear(secp256k1_ge *r) {
  344|  13.8k|    secp256k1_memclear_explicit(r, sizeof(secp256k1_ge));
  345|  13.8k|}
secp256k1.c:secp256k1_gej_verify:
   87|  5.59M|static void secp256k1_gej_verify(const secp256k1_gej *a) {
   88|  5.59M|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  345|  5.59M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   89|  5.59M|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  345|  5.59M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   90|  5.59M|    SECP256K1_FE_VERIFY(&a->z);
  ------------------
  |  |  345|  5.59M|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   91|  5.59M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GEJ_X_MAGNITUDE_MAX);
  ------------------
  |  |  349|  5.59M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   92|  5.59M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GEJ_Y_MAGNITUDE_MAX);
  ------------------
  |  |  349|  5.59M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   93|  5.59M|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->z, SECP256K1_GEJ_Z_MAGNITUDE_MAX);
  ------------------
  |  |  349|  5.59M|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   94|  5.59M|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   95|  5.59M|    (void)a;
   96|  5.59M|}
secp256k1.c:secp256k1_gej_set_infinity:
  322|  14.3k|static void secp256k1_gej_set_infinity(secp256k1_gej *r) {
  323|  14.3k|    r->infinity = 1;
  324|  14.3k|    secp256k1_fe_set_int(&r->x, 0);
  ------------------
  |  |   83|  14.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  325|  14.3k|    secp256k1_fe_set_int(&r->y, 0);
  ------------------
  |  |   83|  14.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  326|  14.3k|    secp256k1_fe_set_int(&r->z, 0);
  ------------------
  |  |   83|  14.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  327|       |
  328|  14.3k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  14.3k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  329|  14.3k|}
secp256k1.c:secp256k1_gej_add_ge:
  724|   446k|static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b) {
  725|       |    /* Operations: 7 mul, 5 sqr, 21 add/cmov/half/mul_int/negate/normalizes_to_zero */
  726|   446k|    secp256k1_fe zz, u1, u2, s1, s2, t, tt, m, n, q, rr;
  727|   446k|    secp256k1_fe m_alt, rr_alt;
  728|   446k|    int degenerate;
  729|   446k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|   446k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  730|   446k|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|   446k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  731|   446k|    VERIFY_CHECK(!b->infinity);
  732|       |
  733|       |    /*  In:
  734|       |     *    Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks.
  735|       |     *    In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002.
  736|       |     *  we find as solution for a unified addition/doubling formula:
  737|       |     *    lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation.
  738|       |     *    x3 = lambda^2 - (x1 + x2)
  739|       |     *    2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2).
  740|       |     *
  741|       |     *  Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives:
  742|       |     *    U1 = X1*Z2^2, U2 = X2*Z1^2
  743|       |     *    S1 = Y1*Z2^3, S2 = Y2*Z1^3
  744|       |     *    Z = Z1*Z2
  745|       |     *    T = U1+U2
  746|       |     *    M = S1+S2
  747|       |     *    Q = -T*M^2
  748|       |     *    R = T^2-U1*U2
  749|       |     *    X3 = R^2+Q
  750|       |     *    Y3 = -(R*(2*X3+Q)+M^4)/2
  751|       |     *    Z3 = M*Z
  752|       |     *  (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.)
  753|       |     *
  754|       |     *  This formula has the benefit of being the same for both addition
  755|       |     *  of distinct points and doubling. However, it breaks down in the
  756|       |     *  case that either point is infinity, or that y1 = -y2. We handle
  757|       |     *  these cases in the following ways:
  758|       |     *
  759|       |     *    - If b is infinity we simply bail by means of a VERIFY_CHECK.
  760|       |     *
  761|       |     *    - If a is infinity, we detect this, and at the end of the
  762|       |     *      computation replace the result (which will be meaningless,
  763|       |     *      but we compute to be constant-time) with b.x : b.y : 1.
  764|       |     *
  765|       |     *    - If a = -b, we have y1 = -y2, which is a degenerate case.
  766|       |     *      But here the answer is infinity, so we simply set the
  767|       |     *      infinity flag of the result, overriding the computed values
  768|       |     *      without even needing to cmov.
  769|       |     *
  770|       |     *    - If y1 = -y2 but x1 != x2, which does occur thanks to certain
  771|       |     *      properties of our curve (specifically, 1 has nontrivial cube
  772|       |     *      roots in our field, and the curve equation has no x coefficient)
  773|       |     *      then the answer is not infinity but also not given by the above
  774|       |     *      equation. In this case, we cmov in place an alternate expression
  775|       |     *      for lambda. Specifically (y1 - y2)/(x1 - x2). Where both these
  776|       |     *      expressions for lambda are defined, they are equal, and can be
  777|       |     *      obtained from each other by multiplication by (y1 + y2)/(y1 + y2)
  778|       |     *      then substitution of x^3 + 7 for y^2 (using the curve equation).
  779|       |     *      For all pairs of nonzero points (a, b) at least one is defined,
  780|       |     *      so this covers everything.
  781|       |     */
  782|       |
  783|   446k|    secp256k1_fe_sqr(&zz, &a->z);                       /* z = Z1^2 */
  ------------------
  |  |   94|   446k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  784|   446k|    u1 = a->x;                                          /* u1 = U1 = X1*Z2^2 (GEJ_X_M) */
  785|   446k|    secp256k1_fe_mul(&u2, &b->x, &zz);                  /* u2 = U2 = X2*Z1^2 (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  786|   446k|    s1 = a->y;                                          /* s1 = S1 = Y1*Z2^3 (GEJ_Y_M) */
  787|   446k|    secp256k1_fe_mul(&s2, &b->y, &zz);                  /* s2 = Y2*Z1^2 (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  788|   446k|    secp256k1_fe_mul(&s2, &s2, &a->z);                  /* s2 = S2 = Y2*Z1^3 (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  789|   446k|    t = u1; secp256k1_fe_add(&t, &u2);                  /* t = T = U1+U2 (GEJ_X_M+1) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  790|   446k|    m = s1; secp256k1_fe_add(&m, &s2);                  /* m = M = S1+S2 (GEJ_Y_M+1) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  791|   446k|    secp256k1_fe_sqr(&rr, &t);                          /* rr = T^2 (1) */
  ------------------
  |  |   94|   446k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  792|   446k|    secp256k1_fe_negate(&m_alt, &u2, 1);                /* Malt = -X2*Z1^2 (2) */
  ------------------
  |  |  211|   446k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   446k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   446k|    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: 446k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   446k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 446k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   446k|    } \
  |  |  |  |   94|   446k|    stmt; \
  |  |  |  |   95|   446k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 446k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  793|   446k|    secp256k1_fe_mul(&tt, &u1, &m_alt);                 /* tt = -U1*U2 (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  794|   446k|    secp256k1_fe_add(&rr, &tt);                         /* rr = R = T^2-U1*U2 (2) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  795|       |    /* If lambda = R/M = R/0 we have a problem (except in the "trivial"
  796|       |     * case that Z = z1z2 = 0, and this is special-cased later on). */
  797|   446k|    degenerate = secp256k1_fe_normalizes_to_zero(&m);
  ------------------
  |  |   81|   446k|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
  798|       |    /* This only occurs when y1 == -y2 and x1^3 == x2^3, but x1 != x2.
  799|       |     * This means either x1 == beta*x2 or beta*x1 == x2, where beta is
  800|       |     * a nontrivial cube root of one. In either case, an alternate
  801|       |     * non-indeterminate expression for lambda is (y1 - y2)/(x1 - x2),
  802|       |     * so we set R/M equal to this. */
  803|   446k|    rr_alt = s1;
  804|   446k|    secp256k1_fe_mul_int(&rr_alt, 2);       /* rr_alt = Y1*Z2^3 - Y2*Z1^3 (GEJ_Y_M*2) */
  ------------------
  |  |  233|   446k|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   87|   446k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   446k|    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: 446k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   446k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 446k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   446k|    } \
  |  |  |  |   94|   446k|    stmt; \
  |  |  |  |   95|   446k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 446k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  805|   446k|    secp256k1_fe_add(&m_alt, &u1);          /* Malt = X1*Z2^2 - X2*Z1^2 (GEJ_X_M+2) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  806|       |
  807|   446k|    secp256k1_fe_cmov(&rr_alt, &rr, !degenerate);       /* rr_alt (GEJ_Y_M*2) */
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  808|   446k|    secp256k1_fe_cmov(&m_alt, &m, !degenerate);         /* m_alt (GEJ_X_M+2) */
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  809|       |    /* Now Ralt / Malt = lambda and is guaranteed not to be Ralt / 0.
  810|       |     * From here on out Ralt and Malt represent the numerator
  811|       |     * and denominator of lambda; R and M represent the explicit
  812|       |     * expressions x1^2 + x2^2 + x1x2 and y1 + y2. */
  813|   446k|    secp256k1_fe_sqr(&n, &m_alt);                       /* n = Malt^2 (1) */
  ------------------
  |  |   94|   446k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  814|   446k|    secp256k1_fe_negate(&q, &t,
  ------------------
  |  |  211|   446k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   446k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   446k|    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: 446k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   446k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 446k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   446k|    } \
  |  |  |  |   94|   446k|    stmt; \
  |  |  |  |   95|   446k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 446k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  815|   446k|        SECP256K1_GEJ_X_MAGNITUDE_MAX + 1);             /* q = -T (GEJ_X_M+2) */
  816|   446k|    secp256k1_fe_mul(&q, &q, &n);                       /* q = Q = -T*Malt^2 (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  817|       |    /* These two lines use the observation that either M == Malt or M == 0,
  818|       |     * so M^3 * Malt is either Malt^4 (which is computed by squaring), or
  819|       |     * zero (which is "computed" by cmov). So the cost is one squaring
  820|       |     * versus two multiplications. */
  821|   446k|    secp256k1_fe_sqr(&n, &n);                           /* n = Malt^4 (1) */
  ------------------
  |  |   94|   446k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  822|   446k|    secp256k1_fe_cmov(&n, &m, degenerate);              /* n = M^3 * Malt (GEJ_Y_M+1) */
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  823|   446k|    secp256k1_fe_sqr(&t, &rr_alt);                      /* t = Ralt^2 (1) */
  ------------------
  |  |   94|   446k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  824|   446k|    secp256k1_fe_mul(&r->z, &a->z, &m_alt);             /* r->z = Z3 = Malt*Z (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  825|   446k|    secp256k1_fe_add(&t, &q);                           /* t = Ralt^2 + Q (2) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  826|   446k|    r->x = t;                                           /* r->x = X3 = Ralt^2 + Q (2) */
  827|   446k|    secp256k1_fe_mul_int(&t, 2);                        /* t = 2*X3 (4) */
  ------------------
  |  |  233|   446k|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   87|   446k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   446k|    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: 446k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   446k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 446k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   446k|    } \
  |  |  |  |   94|   446k|    stmt; \
  |  |  |  |   95|   446k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 446k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  828|   446k|    secp256k1_fe_add(&t, &q);                           /* t = 2*X3 + Q (5) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  829|   446k|    secp256k1_fe_mul(&t, &t, &rr_alt);                  /* t = Ralt*(2*X3 + Q) (1) */
  ------------------
  |  |   93|   446k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  830|   446k|    secp256k1_fe_add(&t, &n);                           /* t = Ralt*(2*X3 + Q) + M^3*Malt (GEJ_Y_M+2) */
  ------------------
  |  |   92|   446k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  831|   446k|    secp256k1_fe_negate(&r->y, &t,
  ------------------
  |  |  211|   446k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   446k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   446k|    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: 446k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   446k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 446k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   446k|    } \
  |  |  |  |   94|   446k|    stmt; \
  |  |  |  |   95|   446k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 446k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  832|   446k|        SECP256K1_GEJ_Y_MAGNITUDE_MAX + 2);             /* r->y = -(Ralt*(2*X3 + Q) + M^3*Malt) (GEJ_Y_M+3) */
  833|   446k|    secp256k1_fe_half(&r->y);                           /* r->y = Y3 = -(Ralt*(2*X3 + Q) + M^3*Malt)/2 ((GEJ_Y_M+3)/2 + 1) */
  ------------------
  |  |  101|   446k|#  define secp256k1_fe_half secp256k1_fe_impl_half
  ------------------
  834|       |
  835|       |    /* In case a->infinity == 1, replace r with (b->x, b->y, 1). */
  836|   446k|    secp256k1_fe_cmov(&r->x, &b->x, a->infinity);
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  837|   446k|    secp256k1_fe_cmov(&r->y, &b->y, a->infinity);
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  838|   446k|    secp256k1_fe_cmov(&r->z, &secp256k1_fe_one, a->infinity);
  ------------------
  |  |   95|   446k|#  define secp256k1_fe_cmov secp256k1_fe_impl_cmov
  ------------------
  839|       |
  840|       |    /* Set r->infinity if r->z is 0.
  841|       |     *
  842|       |     * If a->infinity is set, then r->infinity = (r->z == 0) = (1 == 0) = false,
  843|       |     * which is correct because the function assumes that b is not infinity.
  844|       |     *
  845|       |     * Now assume !a->infinity. This implies Z = Z1 != 0.
  846|       |     *
  847|       |     * Case y1 = -y2:
  848|       |     * In this case we could have a = -b, namely if x1 = x2.
  849|       |     * We have degenerate = true, r->z = (x1 - x2) * Z.
  850|       |     * Then r->infinity = ((x1 - x2)Z == 0) = (x1 == x2) = (a == -b).
  851|       |     *
  852|       |     * Case y1 != -y2:
  853|       |     * In this case, we can't have a = -b.
  854|       |     * We have degenerate = false, r->z = (y1 + y2) * Z.
  855|       |     * Then r->infinity = ((y1 + y2)Z == 0) = (y1 == -y2) = false. */
  856|   446k|    r->infinity = secp256k1_fe_normalizes_to_zero(&r->z);
  ------------------
  |  |   81|   446k|#  define secp256k1_fe_normalizes_to_zero secp256k1_fe_impl_normalizes_to_zero
  ------------------
  857|       |
  858|   446k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   446k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  859|   446k|}
secp256k1.c:secp256k1_gej_is_infinity:
  440|  28.4k|static int secp256k1_gej_is_infinity(const secp256k1_gej *a) {
  441|  28.4k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  28.4k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  442|       |
  443|  28.4k|    return a->infinity;
  444|  28.4k|}
secp256k1.c:secp256k1_ge_set_gej:
  159|  10.3k|static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a) {
  160|  10.3k|    secp256k1_fe z2, z3;
  161|  10.3k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  10.3k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  162|       |
  163|  10.3k|    r->infinity = a->infinity;
  164|  10.3k|    secp256k1_fe_inv(&a->z, &a->z);
  ------------------
  |  |   98|  10.3k|#  define secp256k1_fe_inv secp256k1_fe_impl_inv
  ------------------
  165|  10.3k|    secp256k1_fe_sqr(&z2, &a->z);
  ------------------
  |  |   94|  10.3k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  166|  10.3k|    secp256k1_fe_mul(&z3, &a->z, &z2);
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  167|  10.3k|    secp256k1_fe_mul(&a->x, &a->x, &z2);
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  168|  10.3k|    secp256k1_fe_mul(&a->y, &a->y, &z3);
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  169|  10.3k|    secp256k1_fe_set_int(&a->z, 1);
  ------------------
  |  |   83|  10.3k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  170|  10.3k|    r->x = a->x;
  171|  10.3k|    r->y = a->y;
  172|       |
  173|  10.3k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  10.3k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  174|  10.3k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  10.3k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  175|  10.3k|}
secp256k1.c:secp256k1_ge_set_xo_var:
  347|  7.14k|static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) {
  348|  7.14k|    secp256k1_fe x2, x3;
  349|  7.14k|    int ret;
  350|  7.14k|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  345|  7.14k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  351|       |
  352|  7.14k|    r->x = *x;
  353|  7.14k|    secp256k1_fe_sqr(&x2, x);
  ------------------
  |  |   94|  7.14k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  354|  7.14k|    secp256k1_fe_mul(&x3, x, &x2);
  ------------------
  |  |   93|  7.14k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  355|  7.14k|    r->infinity = 0;
  356|  7.14k|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|  7.14k|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|  7.14k|#define SECP256K1_B 7
  ------------------
  357|  7.14k|    ret = secp256k1_fe_sqrt(&r->y, &x3);
  358|  7.14k|    secp256k1_fe_normalize_var(&r->y);
  ------------------
  |  |   80|  7.14k|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  359|  7.14k|    if (secp256k1_fe_is_odd(&r->y) != odd) {
  ------------------
  |  |   85|  7.14k|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (359:9): [True: 3.66k, False: 3.47k]
  ------------------
  360|  3.66k|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|  3.66k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|  3.66k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|  3.66k|    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: 3.66k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|  3.66k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 3.66k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|  3.66k|    } \
  |  |  |  |   94|  3.66k|    stmt; \
  |  |  |  |   95|  3.66k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 3.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  3.66k|    }
  362|       |
  363|  7.14k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  7.14k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  364|  7.14k|    return ret;
  365|  7.14k|}
secp256k1.c:secp256k1_gej_set_ge:
  367|  28.7k|static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a) {
  368|  28.7k|   SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  28.7k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  369|       |
  370|  28.7k|   r->infinity = a->infinity;
  371|  28.7k|   r->x = a->x;
  372|  28.7k|   r->y = a->y;
  373|  28.7k|   secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|  28.7k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  374|       |
  375|  28.7k|   SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  28.7k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  376|  28.7k|}
secp256k1.c:secp256k1_gej_rescale:
  861|  10.3k|static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *s) {
  862|       |    /* Operations: 4 mul, 1 sqr */
  863|  10.3k|    secp256k1_fe zz;
  864|  10.3k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  10.3k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  865|  10.3k|    SECP256K1_FE_VERIFY(s);
  ------------------
  |  |  345|  10.3k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  866|  10.3k|    VERIFY_CHECK(!secp256k1_fe_normalizes_to_zero_var(s));
  867|       |
  868|  10.3k|    secp256k1_fe_sqr(&zz, s);
  ------------------
  |  |   94|  10.3k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  869|  10.3k|    secp256k1_fe_mul(&r->x, &r->x, &zz);                /* r->x *= s^2 */
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  870|  10.3k|    secp256k1_fe_mul(&r->y, &r->y, &zz);
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  871|  10.3k|    secp256k1_fe_mul(&r->y, &r->y, s);                  /* r->y *= s^3 */
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  872|  10.3k|    secp256k1_fe_mul(&r->z, &r->z, s);                  /* r->z *= s   */
  ------------------
  |  |   93|  10.3k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  873|       |
  874|  10.3k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  10.3k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  875|  10.3k|}
secp256k1.c:secp256k1_ge_set_gej_zinv:
   99|  7.10k|static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
  100|  7.10k|    secp256k1_fe zi2;
  101|  7.10k|    secp256k1_fe zi3;
  102|  7.10k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  7.10k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  103|  7.10k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  345|  7.10k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  104|  7.10k|    VERIFY_CHECK(!a->infinity);
  105|       |
  106|  7.10k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|  7.10k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  107|  7.10k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  108|  7.10k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  109|  7.10k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  110|  7.10k|    r->infinity = a->infinity;
  111|       |
  112|  7.10k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  7.10k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  113|  7.10k|}
secp256k1.c:secp256k1_ge_table_set_globalz:
  289|  7.10k|static void secp256k1_ge_table_set_globalz(size_t len, secp256k1_ge *a, const secp256k1_fe *zr) {
  290|  7.10k|    size_t i;
  291|  7.10k|    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|  7.10k|    if (len > 0) {
  ------------------
  |  Branch (299:9): [True: 7.10k, False: 0]
  ------------------
  300|  7.10k|        i = len - 1;
  301|       |        /* Ensure all y values are in weak normal form for fast negation of points */
  302|  7.10k|        secp256k1_fe_normalize_weak(&a[i].y);
  ------------------
  |  |   79|  7.10k|#  define secp256k1_fe_normalize_weak secp256k1_fe_impl_normalize_weak
  ------------------
  303|  7.10k|        zs = zr[i];
  304|       |
  305|       |        /* Work our way backwards, using the z-ratios to scale the x/y values. */
  306|  56.8k|        while (i > 0) {
  ------------------
  |  Branch (306:16): [True: 49.7k, False: 7.10k]
  ------------------
  307|  49.7k|            if (i != len - 1) {
  ------------------
  |  Branch (307:17): [True: 42.6k, False: 7.10k]
  ------------------
  308|  42.6k|                secp256k1_fe_mul(&zs, &zs, &zr[i]);
  ------------------
  |  |   93|  42.6k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  309|  42.6k|            }
  310|  49.7k|            i--;
  311|  49.7k|            secp256k1_ge_set_ge_zinv(&a[i], &a[i], &zs);
  312|  49.7k|        }
  313|  7.10k|    }
  314|       |
  315|       |#ifdef VERIFY
  316|       |    for (i = 0; i < len; i++) {
  317|       |        SECP256K1_GE_VERIFY(&a[i]);
  318|       |    }
  319|       |#endif
  320|  7.10k|}
secp256k1.c:secp256k1_ge_set_ge_zinv:
  116|  49.7k|static void secp256k1_ge_set_ge_zinv(secp256k1_ge *r, const secp256k1_ge *a, const secp256k1_fe *zi) {
  117|  49.7k|    secp256k1_fe zi2;
  118|  49.7k|    secp256k1_fe zi3;
  119|  49.7k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  49.7k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  120|  49.7k|    SECP256K1_FE_VERIFY(zi);
  ------------------
  |  |  345|  49.7k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  121|  49.7k|    VERIFY_CHECK(!a->infinity);
  122|       |
  123|  49.7k|    secp256k1_fe_sqr(&zi2, zi);
  ------------------
  |  |   94|  49.7k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  124|  49.7k|    secp256k1_fe_mul(&zi3, &zi2, zi);
  ------------------
  |  |   93|  49.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  125|  49.7k|    secp256k1_fe_mul(&r->x, &a->x, &zi2);
  ------------------
  |  |   93|  49.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  126|  49.7k|    secp256k1_fe_mul(&r->y, &a->y, &zi3);
  ------------------
  |  |   93|  49.7k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  127|  49.7k|    r->infinity = a->infinity;
  128|       |
  129|  49.7k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  49.7k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  130|  49.7k|}
secp256k1.c:secp256k1_gej_double_var:
  495|   911k|static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) {
  496|   911k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|   911k|#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|   911k|    if (a->infinity) {
  ------------------
  |  Branch (508:9): [True: 7.17k, False: 904k]
  ------------------
  509|  7.17k|        secp256k1_gej_set_infinity(r);
  510|  7.17k|        if (rzr != NULL) {
  ------------------
  |  Branch (510:13): [True: 0, False: 7.17k]
  ------------------
  511|      0|            secp256k1_fe_set_int(rzr, 1);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  512|      0|        }
  513|  7.17k|        return;
  514|  7.17k|    }
  515|       |
  516|   904k|    if (rzr != NULL) {
  ------------------
  |  Branch (516:9): [True: 0, False: 904k]
  ------------------
  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|   904k|    secp256k1_gej_double(r, a);
  522|       |
  523|   904k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   904k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  524|   904k|}
secp256k1.c:secp256k1_gej_double:
  460|   904k|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|   904k|    secp256k1_fe l, s, t;
  463|   904k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|   904k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  464|       |
  465|   904k|    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|   904k|    secp256k1_fe_mul(&r->z, &a->z, &a->y); /* Z3 = Y1*Z1 (1) */
  ------------------
  |  |   93|   904k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  477|   904k|    secp256k1_fe_sqr(&s, &a->y);           /* S = Y1^2 (1) */
  ------------------
  |  |   94|   904k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  478|   904k|    secp256k1_fe_sqr(&l, &a->x);           /* L = X1^2 (1) */
  ------------------
  |  |   94|   904k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  479|   904k|    secp256k1_fe_mul_int(&l, 3);           /* L = 3*X1^2 (3) */
  ------------------
  |  |  233|   904k|#define secp256k1_fe_mul_int(r, a) ASSERT_INT_CONST_AND_DO(a, secp256k1_fe_mul_int_unchecked(r, a))
  |  |  ------------------
  |  |  |  |   87|   904k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   904k|    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: 904k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   904k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 904k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   904k|    } \
  |  |  |  |   94|   904k|    stmt; \
  |  |  |  |   95|   904k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 904k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|   904k|    secp256k1_fe_half(&l);                 /* L = 3/2*X1^2 (2) */
  ------------------
  |  |  101|   904k|#  define secp256k1_fe_half secp256k1_fe_impl_half
  ------------------
  481|   904k|    secp256k1_fe_negate(&t, &s, 1);        /* T = -S (2) */
  ------------------
  |  |  211|   904k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   904k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   904k|    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: 904k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   904k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 904k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   904k|    } \
  |  |  |  |   94|   904k|    stmt; \
  |  |  |  |   95|   904k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 904k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  482|   904k|    secp256k1_fe_mul(&t, &t, &a->x);       /* T = -X1*S (1) */
  ------------------
  |  |   93|   904k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  483|   904k|    secp256k1_fe_sqr(&r->x, &l);           /* X3 = L^2 (1) */
  ------------------
  |  |   94|   904k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  484|   904k|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + T (2) */
  ------------------
  |  |   92|   904k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  485|   904k|    secp256k1_fe_add(&r->x, &t);           /* X3 = L^2 + 2*T (3) */
  ------------------
  |  |   92|   904k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  486|   904k|    secp256k1_fe_sqr(&s, &s);              /* S' = S^2 (1) */
  ------------------
  |  |   94|   904k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  487|   904k|    secp256k1_fe_add(&t, &r->x);           /* T' = X3 + T (4) */
  ------------------
  |  |   92|   904k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  488|   904k|    secp256k1_fe_mul(&r->y, &t, &l);       /* Y3 = L*(X3 + T) (1) */
  ------------------
  |  |   93|   904k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  489|   904k|    secp256k1_fe_add(&r->y, &s);           /* Y3 = L*(X3 + T) + S^2 (2) */
  ------------------
  |  |   92|   904k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  490|   904k|    secp256k1_fe_negate(&r->y, &r->y, 2);  /* Y3 = -(L*(X3 + T) + S^2) (3) */
  ------------------
  |  |  211|   904k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   904k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   904k|    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: 904k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   904k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 904k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   904k|    } \
  |  |  |  |   94|   904k|    stmt; \
  |  |  |  |   95|   904k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 904k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|       |
  492|   904k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   904k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  493|   904k|}
secp256k1.c:secp256k1_ge_from_storage:
  890|   580k|static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) {
  891|   580k|    secp256k1_fe_from_storage(&r->x, &a->x);
  ------------------
  |  |   97|   580k|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  892|   580k|    secp256k1_fe_from_storage(&r->y, &a->y);
  ------------------
  |  |   97|   580k|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  893|   580k|    r->infinity = 0;
  894|       |
  895|   580k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|   580k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  896|   580k|}
secp256k1.c:secp256k1_gej_add_zinv_var:
  653|   120k|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|   120k|    secp256k1_fe az, z12, u1, u2, s1, s2, h, i, h2, h3, t;
  656|   120k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|   120k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  657|   120k|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|   120k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  658|   120k|    SECP256K1_FE_VERIFY(bzinv);
  ------------------
  |  |  345|   120k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  659|       |
  660|   120k|    if (a->infinity) {
  ------------------
  |  Branch (660:9): [True: 3.00k, False: 117k]
  ------------------
  661|  3.00k|        secp256k1_fe bzinv2, bzinv3;
  662|  3.00k|        r->infinity = b->infinity;
  663|  3.00k|        secp256k1_fe_sqr(&bzinv2, bzinv);
  ------------------
  |  |   94|  3.00k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  664|  3.00k|        secp256k1_fe_mul(&bzinv3, &bzinv2, bzinv);
  ------------------
  |  |   93|  3.00k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  665|  3.00k|        secp256k1_fe_mul(&r->x, &b->x, &bzinv2);
  ------------------
  |  |   93|  3.00k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  666|  3.00k|        secp256k1_fe_mul(&r->y, &b->y, &bzinv3);
  ------------------
  |  |   93|  3.00k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  667|  3.00k|        secp256k1_fe_set_int(&r->z, 1);
  ------------------
  |  |   83|  3.00k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  668|  3.00k|        SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|  3.00k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  669|  3.00k|        return;
  670|  3.00k|    }
  671|   117k|    if (b->infinity) {
  ------------------
  |  Branch (671:9): [True: 0, False: 117k]
  ------------------
  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|   117k|    secp256k1_fe_mul(&az, &a->z, bzinv);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  685|       |
  686|   117k|    secp256k1_fe_sqr(&z12, &az);
  ------------------
  |  |   94|   117k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  687|   117k|    u1 = a->x;
  688|   117k|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  689|   117k|    s1 = a->y;
  690|   117k|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  691|   117k|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|   117k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   117k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   117k|    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: 117k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   117k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 117k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   117k|    } \
  |  |  |  |   94|   117k|    stmt; \
  |  |  |  |   95|   117k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 117k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  692|   117k|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|   117k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   117k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   117k|    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: 117k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   117k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 117k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   117k|    } \
  |  |  |  |   94|   117k|    stmt; \
  |  |  |  |   95|   117k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 117k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  693|   117k|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|   117k|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (693:9): [True: 50, False: 117k]
  ------------------
  694|     50|        if (secp256k1_fe_normalizes_to_zero_var(&i)) {
  ------------------
  |  |   82|     50|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (694:13): [True: 2, False: 48]
  ------------------
  695|      2|            secp256k1_gej_double_var(r, a, NULL);
  696|     48|        } else {
  697|     48|            secp256k1_gej_set_infinity(r);
  698|     48|        }
  699|     50|        return;
  700|     50|    }
  701|       |
  702|   117k|    r->infinity = 0;
  703|   117k|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  704|       |
  705|   117k|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|   117k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  706|   117k|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|   117k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   117k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   117k|    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: 117k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   117k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 117k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   117k|    } \
  |  |  |  |   94|   117k|    stmt; \
  |  |  |  |   95|   117k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 117k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|   117k|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  708|   117k|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  709|       |
  710|   117k|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|   117k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  711|   117k|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  712|   117k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  713|   117k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  714|       |
  715|   117k|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  716|   117k|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  717|   117k|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|   117k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  718|   117k|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|   117k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  719|       |
  720|   117k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   117k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  721|   117k|}
secp256k1.c:secp256k1_ge_set_gej_var:
  177|  7.10k|static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) {
  178|  7.10k|    secp256k1_fe z2, z3;
  179|  7.10k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  7.10k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  180|       |
  181|  7.10k|    if (secp256k1_gej_is_infinity(a)) {
  ------------------
  |  Branch (181:9): [True: 0, False: 7.10k]
  ------------------
  182|      0|        secp256k1_ge_set_infinity(r);
  183|      0|        return;
  184|      0|    }
  185|  7.10k|    r->infinity = 0;
  186|  7.10k|    secp256k1_fe_inv_var(&a->z, &a->z);
  ------------------
  |  |   99|  7.10k|#  define secp256k1_fe_inv_var secp256k1_fe_impl_inv_var
  ------------------
  187|  7.10k|    secp256k1_fe_sqr(&z2, &a->z);
  ------------------
  |  |   94|  7.10k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  188|  7.10k|    secp256k1_fe_mul(&z3, &a->z, &z2);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  189|  7.10k|    secp256k1_fe_mul(&a->x, &a->x, &z2);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  190|  7.10k|    secp256k1_fe_mul(&a->y, &a->y, &z3);
  ------------------
  |  |   93|  7.10k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  191|  7.10k|    secp256k1_fe_set_int(&a->z, 1);
  ------------------
  |  |   83|  7.10k|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  192|  7.10k|    secp256k1_ge_set_xy(r, &a->x, &a->y);
  193|       |
  194|  7.10k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|  7.10k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  195|  7.10k|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  212|  7.10k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  196|  7.10k|}
secp256k1.c:secp256k1_ge_storage_cmov:
  911|  14.2M|static SECP256K1_INLINE void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag) {
  912|  14.2M|    VERIFY_CHECK(flag == 0 || flag == 1);
  913|  14.2M|    secp256k1_fe_storage_cmov(&r->x, &a->x, flag);
  914|  14.2M|    secp256k1_fe_storage_cmov(&r->y, &a->y, flag);
  915|  14.2M|}
secp256k1.c:secp256k1_gej_clear:
  339|  10.3k|static void secp256k1_gej_clear(secp256k1_gej *r) {
  340|  10.3k|    secp256k1_memclear_explicit(r, sizeof(secp256k1_gej));
  341|  10.3k|}
secp256k1.c:secp256k1_gej_add_ge_var:
  590|   354k|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|   354k|    secp256k1_fe z12, u1, u2, s1, s2, h, i, h2, h3, t;
  593|   354k|    SECP256K1_GEJ_VERIFY(a);
  ------------------
  |  |  216|   354k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  594|   354k|    SECP256K1_GE_VERIFY(b);
  ------------------
  |  |  212|   354k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  595|       |
  596|   354k|    if (a->infinity) {
  ------------------
  |  Branch (596:9): [True: 4.20k, False: 350k]
  ------------------
  597|  4.20k|        VERIFY_CHECK(rzr == NULL);
  598|  4.20k|        secp256k1_gej_set_ge(r, b);
  599|  4.20k|        return;
  600|  4.20k|    }
  601|   350k|    if (b->infinity) {
  ------------------
  |  Branch (601:9): [True: 0, False: 350k]
  ------------------
  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|   350k|    secp256k1_fe_sqr(&z12, &a->z);
  ------------------
  |  |   94|   350k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  610|   350k|    u1 = a->x;
  611|   350k|    secp256k1_fe_mul(&u2, &b->x, &z12);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  612|   350k|    s1 = a->y;
  613|   350k|    secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
                  secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  614|   350k|    secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |  211|   350k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   350k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   350k|    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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   350k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 350k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   350k|    } \
  |  |  |  |   94|   350k|    stmt; \
  |  |  |  |   95|   350k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 350k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&h, &u1, SECP256K1_GEJ_X_MAGNITUDE_MAX); secp256k1_fe_add(&h, &u2);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  615|   350k|    secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |  211|   350k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   350k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   350k|    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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   350k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 350k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   350k|    } \
  |  |  |  |   94|   350k|    stmt; \
  |  |  |  |   95|   350k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 350k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  secp256k1_fe_negate(&i, &s2, 1); secp256k1_fe_add(&i, &s1);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  616|   350k|    if (secp256k1_fe_normalizes_to_zero_var(&h)) {
  ------------------
  |  |   82|   350k|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (616:9): [True: 52, False: 350k]
  ------------------
  617|     52|        if (secp256k1_fe_normalizes_to_zero_var(&i)) {
  ------------------
  |  |   82|     52|#  define secp256k1_fe_normalizes_to_zero_var secp256k1_fe_impl_normalizes_to_zero_var
  ------------------
  |  Branch (617:13): [True: 0, False: 52]
  ------------------
  618|      0|            secp256k1_gej_double_var(r, a, rzr);
  619|     52|        } else {
  620|     52|            if (rzr != NULL) {
  ------------------
  |  Branch (620:17): [True: 0, False: 52]
  ------------------
  621|      0|                secp256k1_fe_set_int(rzr, 0);
  ------------------
  |  |   83|      0|#  define secp256k1_fe_set_int secp256k1_fe_impl_set_int
  ------------------
  622|      0|            }
  623|     52|            secp256k1_gej_set_infinity(r);
  624|     52|        }
  625|     52|        return;
  626|     52|    }
  627|       |
  628|   350k|    r->infinity = 0;
  629|   350k|    if (rzr != NULL) {
  ------------------
  |  Branch (629:9): [True: 49.7k, False: 300k]
  ------------------
  630|  49.7k|        *rzr = h;
  631|  49.7k|    }
  632|   350k|    secp256k1_fe_mul(&r->z, &a->z, &h);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  633|       |
  634|   350k|    secp256k1_fe_sqr(&h2, &h);
  ------------------
  |  |   94|   350k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  635|   350k|    secp256k1_fe_negate(&h2, &h2, 1);
  ------------------
  |  |  211|   350k|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   87|   350k|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   88|   350k|    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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   91|      0|            break; \
  |  |  |  |   92|   350k|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:9): [True: 350k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   93|   350k|    } \
  |  |  |  |   94|   350k|    stmt; \
  |  |  |  |   95|   350k|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:9): [Folded, False: 350k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  636|   350k|    secp256k1_fe_mul(&h3, &h2, &h);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  637|   350k|    secp256k1_fe_mul(&t, &u1, &h2);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  638|       |
  639|   350k|    secp256k1_fe_sqr(&r->x, &i);
  ------------------
  |  |   94|   350k|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  640|   350k|    secp256k1_fe_add(&r->x, &h3);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  641|   350k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  642|   350k|    secp256k1_fe_add(&r->x, &t);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  643|       |
  644|   350k|    secp256k1_fe_add(&t, &r->x);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  645|   350k|    secp256k1_fe_mul(&r->y, &t, &i);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  646|   350k|    secp256k1_fe_mul(&h3, &h3, &s1);
  ------------------
  |  |   93|   350k|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  647|   350k|    secp256k1_fe_add(&r->y, &h3);
  ------------------
  |  |   92|   350k|#  define secp256k1_fe_add secp256k1_fe_impl_add
  ------------------
  648|       |
  649|   350k|    SECP256K1_GEJ_VERIFY(r);
  ------------------
  |  |  216|   350k|#define SECP256K1_GEJ_VERIFY(a) secp256k1_gej_verify(a)
  ------------------
  650|   350k|    if (rzr != NULL) SECP256K1_FE_VERIFY(rzr);
  ------------------
  |  |  345|  49.7k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  |  Branch (650:9): [True: 49.7k, False: 300k]
  ------------------
  651|   350k|}
secp256k1.c:secp256k1_ge_to_bytes:
  977|  14.0k|static void secp256k1_ge_to_bytes(unsigned char *buf, const secp256k1_ge *a) {
  978|  14.0k|    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|  14.0k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   74|  14.0k|#define STATIC_ASSERT(expr) do { \
  |  |   75|  14.0k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (75:12): [Folded, False: 0]
  |  |  ------------------
  |  |   76|  14.0k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 14.0k, False: 0]
  |  |  ------------------
  |  |   77|  14.0k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   78|  14.0k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (78:9): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |   79|  14.0k|        ; \
  |  |   80|  14.0k|    } \
  |  |   81|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (81:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  984|  14.0k|    VERIFY_CHECK(!secp256k1_ge_is_infinity(a));
  985|  14.0k|    secp256k1_ge_to_storage(&s, a);
  986|  14.0k|    memcpy(buf, &s, 64);
  987|  14.0k|}
secp256k1.c:secp256k1_ge_to_storage:
  877|  14.0k|static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) {
  878|  14.0k|    secp256k1_fe x, y;
  879|  14.0k|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  212|  14.0k|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  880|  14.0k|    VERIFY_CHECK(!a->infinity);
  881|       |
  882|  14.0k|    x = a->x;
  883|  14.0k|    secp256k1_fe_normalize(&x);
  ------------------
  |  |   78|  14.0k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  884|  14.0k|    y = a->y;
  885|  14.0k|    secp256k1_fe_normalize(&y);
  ------------------
  |  |   78|  14.0k|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  886|  14.0k|    secp256k1_fe_to_storage(&r->x, &x);
  ------------------
  |  |   96|  14.0k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  887|  14.0k|    secp256k1_fe_to_storage(&r->y, &y);
  ------------------
  |  |   96|  14.0k|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  888|  14.0k|}
secp256k1.c:secp256k1_ge_from_bytes:
  989|  14.0k|static void secp256k1_ge_from_bytes(secp256k1_ge *r, const unsigned char *buf) {
  990|  14.0k|    secp256k1_ge_storage s;
  991|       |
  992|  14.0k|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   74|  14.0k|#define STATIC_ASSERT(expr) do { \
  |  |   75|  14.0k|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (75:12): [Folded, False: 0]
  |  |  ------------------
  |  |   76|  14.0k|        case 0: \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 14.0k, False: 0]
  |  |  ------------------
  |  |   77|  14.0k|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   78|  14.0k|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (78:9): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |   79|  14.0k|        ; \
  |  |   80|  14.0k|    } \
  |  |   81|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (81:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  993|  14.0k|    memcpy(&s, buf, 64);
  994|  14.0k|    secp256k1_ge_from_storage(r, &s);
  995|  14.0k|}

secp256k1.c:secp256k1_sha256_transform:
  133|  76.0k|static void secp256k1_sha256_transform(uint32_t *state, const unsigned char *blocks64, size_t n_blocks) {
  134|   152k|    while (n_blocks--) {
  ------------------
  |  Branch (134:12): [True: 76.0k, False: 76.0k]
  ------------------
  135|  76.0k|        secp256k1_sha256_transform_impl(state, blocks64);
  136|  76.0k|        blocks64 += 64;
  137|  76.0k|    }
  138|  76.0k|}
secp256k1.c:secp256k1_sha256_transform_impl:
   51|  76.0k|static void secp256k1_sha256_transform_impl(uint32_t* s, const unsigned char* buf) {
   52|  76.0k|    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|  76.0k|    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
   54|       |
   55|  76.0k|    Round(a, b, c, d, e, f, g, h, 0x428a2f98,  w0 = secp256k1_read_be32(&buf[0]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   56|  76.0k|    Round(h, a, b, c, d, e, f, g, 0x71374491,  w1 = secp256k1_read_be32(&buf[4]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   57|  76.0k|    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf,  w2 = secp256k1_read_be32(&buf[8]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   58|  76.0k|    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5,  w3 = secp256k1_read_be32(&buf[12]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   59|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x3956c25b,  w4 = secp256k1_read_be32(&buf[16]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   60|  76.0k|    Round(d, e, f, g, h, a, b, c, 0x59f111f1,  w5 = secp256k1_read_be32(&buf[20]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   61|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x923f82a4,  w6 = secp256k1_read_be32(&buf[24]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   62|  76.0k|    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5,  w7 = secp256k1_read_be32(&buf[28]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   63|  76.0k|    Round(a, b, c, d, e, f, g, h, 0xd807aa98,  w8 = secp256k1_read_be32(&buf[32]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   64|  76.0k|    Round(h, a, b, c, d, e, f, g, 0x12835b01,  w9 = secp256k1_read_be32(&buf[36]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   65|  76.0k|    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = secp256k1_read_be32(&buf[40]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   66|  76.0k|    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = secp256k1_read_be32(&buf[44]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   67|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = secp256k1_read_be32(&buf[48]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   68|  76.0k|    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = secp256k1_read_be32(&buf[52]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   69|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = secp256k1_read_be32(&buf[56]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   70|  76.0k|    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = secp256k1_read_be32(&buf[60]));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   71|       |
   72|  76.0k|    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   73|  76.0k|    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   74|  76.0k|    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   75|  76.0k|    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   76|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   77|  76.0k|    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   78|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   79|  76.0k|    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   80|  76.0k|    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   81|  76.0k|    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   82|  76.0k|    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   83|  76.0k|    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   84|  76.0k|    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   85|  76.0k|    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   86|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   87|  76.0k|    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   88|       |
   89|  76.0k|    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   90|  76.0k|    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   91|  76.0k|    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   92|  76.0k|    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   93|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   94|  76.0k|    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   95|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   96|  76.0k|    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   97|  76.0k|    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   98|  76.0k|    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
   99|  76.0k|    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  100|  76.0k|    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  101|  76.0k|    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  102|  76.0k|    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  103|  76.0k|    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  104|  76.0k|    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  105|       |
  106|  76.0k|    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  107|  76.0k|    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  108|  76.0k|    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  109|  76.0k|    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  110|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  111|  76.0k|    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  112|  76.0k|    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  113|  76.0k|    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  114|  76.0k|    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  115|  76.0k|    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  116|  76.0k|    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  117|  76.0k|    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  118|  76.0k|    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  119|  76.0k|    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  120|  76.0k|    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  121|  76.0k|    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
  ------------------
  |  |   24|  76.0k|#define Round(a,b,c,d,e,f,g,h,k,w) do { \
  |  |   25|  76.0k|    uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
  |  |  ------------------
  |  |  |  |   20|  76.0k|#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|  76.0k|#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
  |  |  ------------------
  |  |   26|  76.0k|    uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
  |  |  ------------------
  |  |  |  |   19|  76.0k|#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|  76.0k|#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
  |  |  ------------------
  |  |   27|  76.0k|    (d) += t1; \
  |  |   28|  76.0k|    (h) = t1 + t2; \
  |  |   29|  76.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (29:9): [Folded, False: 76.0k]
  |  |  ------------------
  ------------------
  122|       |
  123|  76.0k|    s[0] += a;
  124|  76.0k|    s[1] += b;
  125|  76.0k|    s[2] += c;
  126|  76.0k|    s[3] += d;
  127|  76.0k|    s[4] += e;
  128|  76.0k|    s[5] += f;
  129|  76.0k|    s[6] += g;
  130|  76.0k|    s[7] += h;
  131|  76.0k|}
secp256k1.c:secp256k1_sha256_initialize:
   31|  34.5k|static void secp256k1_sha256_initialize(secp256k1_sha256 *hash) {
   32|  34.5k|    hash->s[0] = 0x6a09e667ul;
   33|  34.5k|    hash->s[1] = 0xbb67ae85ul;
   34|  34.5k|    hash->s[2] = 0x3c6ef372ul;
   35|  34.5k|    hash->s[3] = 0xa54ff53aul;
   36|  34.5k|    hash->s[4] = 0x510e527ful;
   37|  34.5k|    hash->s[5] = 0x9b05688cul;
   38|  34.5k|    hash->s[6] = 0x1f83d9abul;
   39|  34.5k|    hash->s[7] = 0x5be0cd19ul;
   40|  34.5k|    hash->bytes = 0;
   41|  34.5k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_initialize:
  320|  3.45k|static void secp256k1_rfc6979_hmac_sha256_initialize(const secp256k1_hash_ctx *hash_ctx, secp256k1_rfc6979_hmac_sha256 *rng, const unsigned char *key, size_t keylen) {
  321|  3.45k|    secp256k1_hmac_sha256 hmac;
  322|  3.45k|    static const unsigned char zero[1] = {0x00};
  323|  3.45k|    static const unsigned char one[1] = {0x01};
  324|       |
  325|  3.45k|    memset(rng->v, 0x01, 32); /* RFC6979 3.2.b. */
  326|  3.45k|    memset(rng->k, 0x00, 32); /* RFC6979 3.2.c. */
  327|       |
  328|       |    /* RFC6979 3.2.d. */
  329|  3.45k|    secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  330|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  331|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, zero, 1);
  332|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, key, keylen);
  333|  3.45k|    secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->k);
  334|  3.45k|    secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  335|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  336|  3.45k|    secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->v);
  337|       |
  338|       |    /* RFC6979 3.2.f. */
  339|  3.45k|    secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  340|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  341|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, one, 1);
  342|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, key, keylen);
  343|  3.45k|    secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->k);
  344|  3.45k|    secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  345|  3.45k|    secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  346|  3.45k|    secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->v);
  347|  3.45k|    rng->retry = 0;
  348|  3.45k|}
secp256k1.c:secp256k1_hmac_sha256_initialize:
  276|  17.2k|static void secp256k1_hmac_sha256_initialize(const secp256k1_hash_ctx *hash_ctx, secp256k1_hmac_sha256 *hash, const unsigned char *key, size_t keylen) {
  277|  17.2k|    size_t n;
  278|  17.2k|    unsigned char rkey[64];
  279|  17.2k|    if (keylen <= sizeof(rkey)) {
  ------------------
  |  Branch (279:9): [True: 17.2k, False: 0]
  ------------------
  280|  17.2k|        memcpy(rkey, key, keylen);
  281|  17.2k|        memset(rkey + keylen, 0, sizeof(rkey) - keylen);
  282|  17.2k|    } else {
  283|      0|        secp256k1_sha256 sha256;
  284|      0|        secp256k1_sha256_initialize(&sha256);
  285|      0|        secp256k1_sha256_write(hash_ctx, &sha256, key, keylen);
  286|      0|        secp256k1_sha256_finalize(hash_ctx, &sha256, rkey);
  287|      0|        memset(rkey + 32, 0, 32);
  288|      0|    }
  289|       |
  290|  17.2k|    secp256k1_sha256_initialize(&hash->outer);
  291|  1.12M|    for (n = 0; n < sizeof(rkey); n++) {
  ------------------
  |  Branch (291:17): [True: 1.10M, False: 17.2k]
  ------------------
  292|  1.10M|        rkey[n] ^= 0x5c;
  293|  1.10M|    }
  294|  17.2k|    secp256k1_sha256_write(hash_ctx, &hash->outer, rkey, sizeof(rkey));
  295|       |
  296|  17.2k|    secp256k1_sha256_initialize(&hash->inner);
  297|  1.12M|    for (n = 0; n < sizeof(rkey); n++) {
  ------------------
  |  Branch (297:17): [True: 1.10M, False: 17.2k]
  ------------------
  298|  1.10M|        rkey[n] ^= 0x5c ^ 0x36;
  299|  1.10M|    }
  300|  17.2k|    secp256k1_sha256_write(hash_ctx, &hash->inner, rkey, sizeof(rkey));
  301|  17.2k|    secp256k1_memclear_explicit(rkey, sizeof(rkey));
  302|  17.2k|}
secp256k1.c:secp256k1_hmac_sha256_write:
  304|  31.1k|static void secp256k1_hmac_sha256_write(const secp256k1_hash_ctx *hash_ctx, secp256k1_hmac_sha256 *hash, const unsigned char *data, size_t size) {
  305|  31.1k|    secp256k1_sha256_write(hash_ctx, &hash->inner, data, size);
  306|  31.1k|}
secp256k1.c:secp256k1_hmac_sha256_finalize:
  308|  17.2k|static void secp256k1_hmac_sha256_finalize(const secp256k1_hash_ctx *hash_ctx, secp256k1_hmac_sha256 *hash, unsigned char *out32) {
  309|  17.2k|    unsigned char temp[32];
  310|  17.2k|    secp256k1_sha256_finalize(hash_ctx, &hash->inner, temp);
  311|  17.2k|    secp256k1_sha256_write(hash_ctx, &hash->outer, temp, 32);
  312|  17.2k|    secp256k1_memclear_explicit(temp, sizeof(temp));
  313|  17.2k|    secp256k1_sha256_finalize(hash_ctx, &hash->outer, out32);
  314|  17.2k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_generate:
  350|  3.45k|static void secp256k1_rfc6979_hmac_sha256_generate(const secp256k1_hash_ctx *hash_ctx, secp256k1_rfc6979_hmac_sha256 *rng, unsigned char *out, size_t outlen) {
  351|       |    /* RFC6979 3.2.h. */
  352|  3.45k|    static const unsigned char zero[1] = {0x00};
  353|  3.45k|    if (rng->retry) {
  ------------------
  |  Branch (353:9): [True: 0, False: 3.45k]
  ------------------
  354|      0|        secp256k1_hmac_sha256 hmac;
  355|      0|        secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  356|      0|        secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  357|      0|        secp256k1_hmac_sha256_write(hash_ctx, &hmac, zero, 1);
  358|      0|        secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->k);
  359|      0|        secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  360|      0|        secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  361|      0|        secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->v);
  362|      0|    }
  363|       |
  364|  6.91k|    while (outlen > 0) {
  ------------------
  |  Branch (364:12): [True: 3.45k, False: 3.45k]
  ------------------
  365|  3.45k|        secp256k1_hmac_sha256 hmac;
  366|  3.45k|        size_t now = outlen;
  367|  3.45k|        secp256k1_hmac_sha256_initialize(hash_ctx, &hmac, rng->k, 32);
  368|  3.45k|        secp256k1_hmac_sha256_write(hash_ctx, &hmac, rng->v, 32);
  369|  3.45k|        secp256k1_hmac_sha256_finalize(hash_ctx, &hmac, rng->v);
  370|  3.45k|        if (now > 32) {
  ------------------
  |  Branch (370:13): [True: 0, False: 3.45k]
  ------------------
  371|      0|            now = 32;
  372|      0|        }
  373|  3.45k|        memcpy(out, rng->v, now);
  374|  3.45k|        out += now;
  375|  3.45k|        outlen -= now;
  376|  3.45k|    }
  377|       |
  378|  3.45k|    rng->retry = 1;
  379|  3.45k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_finalize:
  381|  3.45k|static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256 *rng) {
  382|  3.45k|    (void) rng;
  383|  3.45k|}
secp256k1.c:secp256k1_rfc6979_hmac_sha256_clear:
  385|  3.45k|static void secp256k1_rfc6979_hmac_sha256_clear(secp256k1_rfc6979_hmac_sha256 *rng) {
  386|  3.45k|    secp256k1_memclear_explicit(rng, sizeof(*rng));
  387|  3.45k|}
secp256k1.c:secp256k1_sha256_write:
  210|   152k|static void secp256k1_sha256_write(const secp256k1_hash_ctx *hash_ctx, secp256k1_sha256 *hash, const unsigned char *data, size_t len) {
  211|   152k|    size_t chunk_len;
  212|   152k|    size_t bufsize = hash->bytes & 0x3F;
  213|   152k|    hash->bytes += len;
  214|   152k|    VERIFY_CHECK(hash->bytes >= len);
  215|   152k|    VERIFY_CHECK(hash_ctx != NULL);
  216|   152k|    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|   152k|    chunk_len = 64 - bufsize;
  220|   152k|    if (bufsize && len >= chunk_len) {
  ------------------
  |  Branch (220:9): [True: 82.9k, False: 69.1k]
  |  Branch (220:20): [True: 41.4k, False: 41.4k]
  ------------------
  221|  41.4k|        memcpy(hash->buf + bufsize, data, chunk_len);
  222|  41.4k|        data += chunk_len;
  223|  41.4k|        len -= chunk_len;
  224|  41.4k|        hash_ctx->fn_sha256_compression(hash->s, hash->buf, 1);
  225|  41.4k|        bufsize = 0;
  226|  41.4k|    }
  227|       |
  228|       |    /* If we still have data to process, invoke compression directly on the input */
  229|   152k|    if (len >= 64) {
  ------------------
  |  Branch (229:9): [True: 34.5k, False: 117k]
  ------------------
  230|  34.5k|        const size_t n_blocks = len / 64;
  231|  34.5k|        const size_t advance = n_blocks * 64;
  232|  34.5k|        hash_ctx->fn_sha256_compression(hash->s, data, n_blocks);
  233|  34.5k|        data += advance;
  234|  34.5k|        len -= advance;
  235|  34.5k|    }
  236|       |
  237|       |    /* Fill the buffer with what remains */
  238|   152k|    if (len) {
  ------------------
  |  Branch (238:9): [True: 82.9k, False: 69.1k]
  ------------------
  239|  82.9k|        memcpy(hash->buf + bufsize, data, len);
  240|  82.9k|    }
  241|   152k|}
secp256k1.c:secp256k1_sha256_finalize:
  243|  34.5k|static void secp256k1_sha256_finalize(const secp256k1_hash_ctx *hash_ctx, secp256k1_sha256 *hash, unsigned char *out32) {
  244|  34.5k|    static const unsigned char pad[64] = {0x80};
  245|  34.5k|    unsigned char sizedesc[8];
  246|  34.5k|    int i;
  247|       |    /* The maximum message size of SHA256 is 2^64-1 bits. */
  248|  34.5k|    VERIFY_CHECK(hash->bytes < ((uint64_t)1 << 61));
  249|  34.5k|    secp256k1_write_be32(&sizedesc[0], hash->bytes >> 29);
  250|  34.5k|    secp256k1_write_be32(&sizedesc[4], hash->bytes << 3);
  251|  34.5k|    secp256k1_sha256_write(hash_ctx, hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64));
  252|  34.5k|    secp256k1_sha256_write(hash_ctx, hash, sizedesc, 8);
  253|   311k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (253:17): [True: 276k, False: 34.5k]
  ------------------
  254|   276k|        secp256k1_write_be32(&out32[4*i], hash->s[i]);
  255|   276k|        hash->s[i] = 0;
  256|   276k|    }
  257|  34.5k|}

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

secp256k1.c:secp256k1_modinv64_var:
  637|  14.2k|static void secp256k1_modinv64_var(secp256k1_modinv64_signed62 *x, const secp256k1_modinv64_modinfo *modinfo) {
  638|       |    /* Start with d=0, e=1, f=modulus, g=x, eta=-1. */
  639|  14.2k|    secp256k1_modinv64_signed62 d = {{0, 0, 0, 0, 0}};
  640|  14.2k|    secp256k1_modinv64_signed62 e = {{1, 0, 0, 0, 0}};
  641|  14.2k|    secp256k1_modinv64_signed62 f = modinfo->modulus;
  642|  14.2k|    secp256k1_modinv64_signed62 g = *x;
  643|       |#ifdef VERIFY
  644|       |    int i = 0;
  645|       |#endif
  646|  14.2k|    int j, len = 5;
  647|  14.2k|    int64_t eta = -1; /* eta = -delta; delta is initially 1 */
  648|  14.2k|    int64_t cond, fn, gn;
  649|       |
  650|       |    /* Do iterations of 62 divsteps each until g=0. */
  651|   127k|    while (1) {
  ------------------
  |  Branch (651:12): [True: 127k, Folded]
  ------------------
  652|       |        /* Compute transition matrix and new eta after 62 divsteps. */
  653|   127k|        secp256k1_modinv64_trans2x2 t;
  654|   127k|        eta = secp256k1_modinv64_divsteps_62_var(eta, f.v[0], g.v[0], &t);
  655|       |        /* Update d,e using that transition matrix. */
  656|   127k|        secp256k1_modinv64_update_de_62(&d, &e, &t, modinfo);
  657|       |        /* Update f,g using that transition matrix. */
  658|   127k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
  659|   127k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  660|   127k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, -1) > 0); /* g > -modulus */
  661|   127k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  662|       |
  663|   127k|        secp256k1_modinv64_update_fg_62_var(len, &f, &g, &t);
  664|       |        /* If the bottom limb of g is zero, there is a chance that g=0. */
  665|   127k|        if (g.v[0] == 0) {
  ------------------
  |  Branch (665:13): [True: 14.3k, False: 113k]
  ------------------
  666|  14.3k|            cond = 0;
  667|       |            /* Check if the other limbs are also 0. */
  668|  14.6k|            for (j = 1; j < len; ++j) {
  ------------------
  |  Branch (668:25): [True: 338, False: 14.3k]
  ------------------
  669|    338|                cond |= g.v[j];
  670|    338|            }
  671|       |            /* If so, we're done. */
  672|  14.3k|            if (cond == 0) break;
  ------------------
  |  Branch (672:17): [True: 14.2k, False: 94]
  ------------------
  673|  14.3k|        }
  674|       |
  675|       |        /* Determine if len>1 and limb (len-1) of both f and g is 0 or -1. */
  676|   113k|        fn = f.v[len - 1];
  677|   113k|        gn = g.v[len - 1];
  678|   113k|        cond = ((int64_t)len - 2) >> 63;
  679|   113k|        cond |= fn ^ (fn >> 63);
  680|   113k|        cond |= gn ^ (gn >> 63);
  681|       |        /* If so, reduce length, propagating the sign of f and g's top limb into the one below. */
  682|   113k|        if (cond == 0) {
  ------------------
  |  Branch (682:13): [True: 56.8k, False: 56.8k]
  ------------------
  683|  56.8k|            f.v[len - 2] |= (uint64_t)fn << 62;
  684|  56.8k|            g.v[len - 2] |= (uint64_t)gn << 62;
  685|  56.8k|            --len;
  686|  56.8k|        }
  687|       |
  688|   113k|        VERIFY_CHECK(++i < 12); /* We should never need more than 12*62 = 744 divsteps */
  689|   113k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
  690|   113k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  691|   113k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, -1) > 0); /* g > -modulus */
  692|   113k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  693|   113k|    }
  694|       |
  695|       |    /* At this point g is 0 and (if g was not originally 0) f must now equal +/- GCD of
  696|       |     * the initial f, g values i.e. +/- 1, and d now contains +/- the modular inverse. */
  697|       |
  698|       |    /* g == 0 */
  699|  14.2k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, len, &SECP256K1_SIGNED62_ONE, 0) == 0);
  700|       |    /* |f| == 1, or (x == 0 and d == 0 and f == modulus) */
  701|  14.2k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &SECP256K1_SIGNED62_ONE, -1) == 0 ||
  702|  14.2k|                 secp256k1_modinv64_mul_cmp_62(&f, len, &SECP256K1_SIGNED62_ONE, 1) == 0 ||
  703|  14.2k|                 (secp256k1_modinv64_mul_cmp_62(x, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  704|  14.2k|                  secp256k1_modinv64_mul_cmp_62(&d, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  705|  14.2k|                  secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, 1) == 0));
  706|       |
  707|       |    /* Optionally negate d, normalize to [0,modulus), and return it. */
  708|  14.2k|    secp256k1_modinv64_normalize_62(&d, f.v[len - 1], modinfo);
  709|  14.2k|    *x = d;
  710|  14.2k|}
secp256k1.c:secp256k1_modinv64_divsteps_62_var:
  239|   127k|static int64_t secp256k1_modinv64_divsteps_62_var(int64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {
  240|       |    /* Transformation matrix; see comments in secp256k1_modinv64_divsteps_62. */
  241|   127k|    uint64_t u = 1, v = 0, q = 0, r = 1;
  242|   127k|    uint64_t f = f0, g = g0, m;
  243|   127k|    uint32_t w;
  244|   127k|    int i = 62, limit, zeros;
  245|       |
  246|  2.08M|    for (;;) {
  247|       |        /* Use a sentinel bit to count zeros only up to i. */
  248|  2.08M|        zeros = secp256k1_ctz64_var(g | (UINT64_MAX << i));
  249|       |        /* Perform zeros divsteps at once; they all just divide g by two. */
  250|  2.08M|        g >>= zeros;
  251|  2.08M|        u <<= zeros;
  252|  2.08M|        v <<= zeros;
  253|  2.08M|        eta -= zeros;
  254|  2.08M|        i -= zeros;
  255|       |        /* We're done once we've done 62 divsteps. */
  256|  2.08M|        if (i == 0) break;
  ------------------
  |  Branch (256:13): [True: 127k, False: 1.95M]
  ------------------
  257|  1.95M|        VERIFY_CHECK((f & 1) == 1);
  258|  1.95M|        VERIFY_CHECK((g & 1) == 1);
  259|  1.95M|        VERIFY_CHECK((u * f0 + v * g0) == f << (62 - i));
  260|  1.95M|        VERIFY_CHECK((q * f0 + r * g0) == g << (62 - i));
  261|       |        /* Bounds on eta that follow from the bounds on iteration count (max 12*62 divsteps). */
  262|  1.95M|        VERIFY_CHECK(eta >= -745 && eta <= 745);
  263|       |        /* If eta is negative, negate it and replace f,g with g,-f. */
  264|  1.95M|        if (eta < 0) {
  ------------------
  |  Branch (264:13): [True: 1.88M, False: 72.7k]
  ------------------
  265|  1.88M|            uint64_t tmp;
  266|  1.88M|            eta = -eta;
  267|  1.88M|            tmp = f; f = g; g = -tmp;
  268|  1.88M|            tmp = u; u = q; q = -tmp;
  269|  1.88M|            tmp = v; v = r; r = -tmp;
  270|       |            /* Use a formula to cancel out up to 6 bits of g. Also, no more than i can be cancelled
  271|       |             * out (as we'd be done before that point), and no more than eta+1 can be done as its
  272|       |             * sign will flip again once that happens. */
  273|  1.88M|            limit = ((int)eta + 1) > i ? i : ((int)eta + 1);
  ------------------
  |  Branch (273:21): [True: 38.2k, False: 1.84M]
  ------------------
  274|  1.88M|            VERIFY_CHECK(limit > 0 && limit <= 62);
  275|       |            /* m is a mask for the bottom min(limit, 6) bits. */
  276|  1.88M|            m = (UINT64_MAX >> (64 - limit)) & 63U;
  277|       |            /* Find what multiple of f must be added to g to cancel its bottom min(limit, 6)
  278|       |             * bits. */
  279|  1.88M|            w = (f * g * (f * f - 2)) & m;
  280|  1.88M|        } else {
  281|       |            /* In this branch, use a simpler formula that only lets us cancel up to 4 bits of g, as
  282|       |             * eta tends to be smaller here. */
  283|  72.7k|            limit = ((int)eta + 1) > i ? i : ((int)eta + 1);
  ------------------
  |  Branch (283:21): [True: 3.03k, False: 69.6k]
  ------------------
  284|  72.7k|            VERIFY_CHECK(limit > 0 && limit <= 62);
  285|       |            /* m is a mask for the bottom min(limit, 4) bits. */
  286|  72.7k|            m = (UINT64_MAX >> (64 - limit)) & 15U;
  287|       |            /* Find what multiple of f must be added to g to cancel its bottom min(limit, 4)
  288|       |             * bits. */
  289|  72.7k|            w = f + (((f + 1) & 4) << 1);
  290|  72.7k|            w = (-w * g) & m;
  291|  72.7k|        }
  292|  1.95M|        g += f * w;
  293|  1.95M|        q += u * w;
  294|  1.95M|        r += v * w;
  295|  1.95M|        VERIFY_CHECK((g & m) == 0);
  296|  1.95M|    }
  297|       |    /* Return data in t and return value. */
  298|   127k|    t->u = (int64_t)u;
  299|   127k|    t->v = (int64_t)v;
  300|   127k|    t->q = (int64_t)q;
  301|   127k|    t->r = (int64_t)r;
  302|       |
  303|       |    /* The determinant of t must be a power of two. This guarantees that multiplication with t
  304|       |     * does not change the gcd of f and g, apart from adding a power-of-2 factor to it (which
  305|       |     * will be divided out again). As each divstep's individual matrix has determinant 2, the
  306|       |     * aggregate of 62 of them will have determinant 2^62. */
  307|   127k|    VERIFY_CHECK(secp256k1_modinv64_det_check_pow2(t, 62, 0));
  308|       |
  309|   127k|    return eta;
  310|   127k|}
secp256k1.c:secp256k1_modinv64_update_de_62:
  411|   266k|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|   266k|    const uint64_t M62 = UINT64_MAX >> 2;
  413|   266k|    const int64_t d0 = d->v[0], d1 = d->v[1], d2 = d->v[2], d3 = d->v[3], d4 = d->v[4];
  414|   266k|    const int64_t e0 = e->v[0], e1 = e->v[1], e2 = e->v[2], e3 = e->v[3], e4 = e->v[4];
  415|   266k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  416|   266k|    int64_t md, me, sd, se;
  417|   266k|    secp256k1_int128 cd, ce;
  418|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  419|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  420|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  421|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  422|   266k|    VERIFY_CHECK(secp256k1_modinv64_abs(u) <= (((int64_t)1 << 62) - secp256k1_modinv64_abs(v))); /* |u|+|v| <= 2^62 */
  423|   266k|    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|   266k|    sd = d4 >> 63;
  427|   266k|    se = e4 >> 63;
  428|   266k|    md = (u & sd) + (v & se);
  429|   266k|    me = (q & sd) + (r & se);
  430|       |    /* Begin computing t*[d,e]. */
  431|   266k|    secp256k1_i128_mul(&cd, u, d0);
  432|   266k|    secp256k1_i128_accum_mul(&cd, v, e0);
  433|   266k|    secp256k1_i128_mul(&ce, q, d0);
  434|   266k|    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|   266k|    md -= (modinfo->modulus_inv62 * secp256k1_i128_to_u64(&cd) + md) & M62;
  437|   266k|    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|   266k|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[0], md);
  440|   266k|    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|   266k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cd) & M62) == 0); secp256k1_i128_rshift(&cd, 62);
  443|   266k|    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|   266k|    secp256k1_i128_accum_mul(&cd, u, d1);
  446|   266k|    secp256k1_i128_accum_mul(&cd, v, e1);
  447|   266k|    secp256k1_i128_accum_mul(&ce, q, d1);
  448|   266k|    secp256k1_i128_accum_mul(&ce, r, e1);
  449|   266k|    if (modinfo->modulus.v[1]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (449:9): [True: 98.5k, False: 167k]
  ------------------
  450|  98.5k|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[1], md);
  451|  98.5k|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[1], me);
  452|  98.5k|    }
  453|   266k|    d->v[0] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  454|   266k|    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|   266k|    secp256k1_i128_accum_mul(&cd, u, d2);
  457|   266k|    secp256k1_i128_accum_mul(&cd, v, e2);
  458|   266k|    secp256k1_i128_accum_mul(&ce, q, d2);
  459|   266k|    secp256k1_i128_accum_mul(&ce, r, e2);
  460|   266k|    if (modinfo->modulus.v[2]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (460:9): [True: 98.5k, False: 167k]
  ------------------
  461|  98.5k|        secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[2], md);
  462|  98.5k|        secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[2], me);
  463|  98.5k|    }
  464|   266k|    d->v[1] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  465|   266k|    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|   266k|    secp256k1_i128_accum_mul(&cd, u, d3);
  468|   266k|    secp256k1_i128_accum_mul(&cd, v, e3);
  469|   266k|    secp256k1_i128_accum_mul(&ce, q, d3);
  470|   266k|    secp256k1_i128_accum_mul(&ce, r, e3);
  471|   266k|    if (modinfo->modulus.v[3]) { /* Optimize for the case where limb of modulus is zero. */
  ------------------
  |  Branch (471:9): [True: 0, False: 266k]
  ------------------
  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|   266k|    d->v[2] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  476|   266k|    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|   266k|    secp256k1_i128_accum_mul(&cd, u, d4);
  479|   266k|    secp256k1_i128_accum_mul(&cd, v, e4);
  480|   266k|    secp256k1_i128_accum_mul(&ce, q, d4);
  481|   266k|    secp256k1_i128_accum_mul(&ce, r, e4);
  482|   266k|    secp256k1_i128_accum_mul(&cd, modinfo->modulus.v[4], md);
  483|   266k|    secp256k1_i128_accum_mul(&ce, modinfo->modulus.v[4], me);
  484|   266k|    d->v[3] = secp256k1_i128_to_u64(&cd) & M62; secp256k1_i128_rshift(&cd, 62);
  485|   266k|    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|   266k|    d->v[4] = secp256k1_i128_to_i64(&cd);
  488|   266k|    e->v[4] = secp256k1_i128_to_i64(&ce);
  489|       |
  490|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, -2) > 0); /* d > -2*modulus */
  491|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(d, 5, &modinfo->modulus, 1) < 0);  /* d <    modulus */
  492|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, -2) > 0); /* e > -2*modulus */
  493|   266k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(e, 5, &modinfo->modulus, 1) < 0);  /* e <    modulus */
  494|   266k|}
secp256k1.c:secp256k1_modinv64_update_fg_62_var:
  553|   127k|static void secp256k1_modinv64_update_fg_62_var(int len, secp256k1_modinv64_signed62 *f, secp256k1_modinv64_signed62 *g, const secp256k1_modinv64_trans2x2 *t) {
  554|   127k|    const uint64_t M62 = UINT64_MAX >> 2;
  555|   127k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  556|   127k|    int64_t fi, gi;
  557|   127k|    secp256k1_int128 cf, cg;
  558|   127k|    int i;
  559|   127k|    VERIFY_CHECK(len > 0);
  560|       |    /* Start computing t*[f,g]. */
  561|   127k|    fi = f->v[0];
  562|   127k|    gi = g->v[0];
  563|   127k|    secp256k1_i128_mul(&cf, u, fi);
  564|   127k|    secp256k1_i128_accum_mul(&cf, v, gi);
  565|   127k|    secp256k1_i128_mul(&cg, q, fi);
  566|   127k|    secp256k1_i128_accum_mul(&cg, r, gi);
  567|       |    /* Verify that the bottom 62 bits of the result are zero, and then throw them away. */
  568|   127k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cf) & M62) == 0); secp256k1_i128_rshift(&cf, 62);
  569|   127k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cg) & M62) == 0); secp256k1_i128_rshift(&cg, 62);
  570|       |    /* Now iteratively compute limb i=1..len of t*[f,g], and store them in output limb i-1 (shifting
  571|       |     * down by 62 bits). */
  572|   355k|    for (i = 1; i < len; ++i) {
  ------------------
  |  Branch (572:17): [True: 227k, False: 127k]
  ------------------
  573|   227k|        fi = f->v[i];
  574|   227k|        gi = g->v[i];
  575|   227k|        secp256k1_i128_accum_mul(&cf, u, fi);
  576|   227k|        secp256k1_i128_accum_mul(&cf, v, gi);
  577|   227k|        secp256k1_i128_accum_mul(&cg, q, fi);
  578|   227k|        secp256k1_i128_accum_mul(&cg, r, gi);
  579|   227k|        f->v[i - 1] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  580|   227k|        g->v[i - 1] = secp256k1_i128_to_u64(&cg) & M62; secp256k1_i128_rshift(&cg, 62);
  581|   227k|    }
  582|       |    /* What remains is limb (len) of t*[f,g]; store it as output limb (len-1). */
  583|   127k|    f->v[len - 1] = secp256k1_i128_to_i64(&cf);
  584|   127k|    g->v[len - 1] = secp256k1_i128_to_i64(&cg);
  585|   127k|}
secp256k1.c:secp256k1_modinv64_normalize_62:
   88|  28.0k|static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t sign, const secp256k1_modinv64_modinfo *modinfo) {
   89|  28.0k|    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);
   90|  28.0k|    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];
   91|  28.0k|    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|  28.0k|    cond_add = r4 >> 63;
  110|  28.0k|    r0 += modinfo->modulus.v[0] & cond_add;
  111|  28.0k|    r1 += modinfo->modulus.v[1] & cond_add;
  112|  28.0k|    r2 += modinfo->modulus.v[2] & cond_add;
  113|  28.0k|    r3 += modinfo->modulus.v[3] & cond_add;
  114|  28.0k|    r4 += modinfo->modulus.v[4] & cond_add;
  115|  28.0k|    cond_negate = sign >> 63;
  116|  28.0k|    r0 = (r0 ^ cond_negate) - cond_negate;
  117|  28.0k|    r1 = (r1 ^ cond_negate) - cond_negate;
  118|  28.0k|    r2 = (r2 ^ cond_negate) - cond_negate;
  119|  28.0k|    r3 = (r3 ^ cond_negate) - cond_negate;
  120|  28.0k|    r4 = (r4 ^ cond_negate) - cond_negate;
  121|       |    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */
  122|  28.0k|    r1 += r0 >> 62; r0 &= M62;
  123|  28.0k|    r2 += r1 >> 62; r1 &= M62;
  124|  28.0k|    r3 += r2 >> 62; r2 &= M62;
  125|  28.0k|    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|  28.0k|    cond_add = r4 >> 63;
  130|  28.0k|    r0 += modinfo->modulus.v[0] & cond_add;
  131|  28.0k|    r1 += modinfo->modulus.v[1] & cond_add;
  132|  28.0k|    r2 += modinfo->modulus.v[2] & cond_add;
  133|  28.0k|    r3 += modinfo->modulus.v[3] & cond_add;
  134|  28.0k|    r4 += modinfo->modulus.v[4] & cond_add;
  135|       |    /* And propagate again. */
  136|  28.0k|    r1 += r0 >> 62; r0 &= M62;
  137|  28.0k|    r2 += r1 >> 62; r1 &= M62;
  138|  28.0k|    r3 += r2 >> 62; r2 &= M62;
  139|  28.0k|    r4 += r3 >> 62; r3 &= M62;
  140|       |
  141|  28.0k|    r->v[0] = r0;
  142|  28.0k|    r->v[1] = r1;
  143|  28.0k|    r->v[2] = r2;
  144|  28.0k|    r->v[3] = r3;
  145|  28.0k|    r->v[4] = r4;
  146|       |
  147|  28.0k|    VERIFY_CHECK(r0 >> 62 == 0);
  148|  28.0k|    VERIFY_CHECK(r1 >> 62 == 0);
  149|  28.0k|    VERIFY_CHECK(r2 >> 62 == 0);
  150|  28.0k|    VERIFY_CHECK(r3 >> 62 == 0);
  151|  28.0k|    VERIFY_CHECK(r4 >> 62 == 0);
  152|  28.0k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 0) >= 0); /* r >= 0 */
  153|  28.0k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(r, 5, &modinfo->modulus, 1) < 0); /* r < modulus */
  154|  28.0k|}
secp256k1.c:secp256k1_modinv64:
  588|  13.8k|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.8k|    secp256k1_modinv64_signed62 d = {{0, 0, 0, 0, 0}};
  591|  13.8k|    secp256k1_modinv64_signed62 e = {{1, 0, 0, 0, 0}};
  592|  13.8k|    secp256k1_modinv64_signed62 f = modinfo->modulus;
  593|  13.8k|    secp256k1_modinv64_signed62 g = *x;
  594|  13.8k|    int i;
  595|  13.8k|    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|   152k|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (598:17): [True: 138k, False: 13.8k]
  ------------------
  599|       |        /* Compute transition matrix and new zeta after 59 divsteps. */
  600|   138k|        secp256k1_modinv64_trans2x2 t;
  601|   138k|        zeta = secp256k1_modinv64_divsteps_59(zeta, f.v[0], g.v[0], &t);
  602|       |        /* Update d,e using that transition matrix. */
  603|   138k|        secp256k1_modinv64_update_de_62(&d, &e, &t, modinfo);
  604|       |        /* Update f,g using that transition matrix. */
  605|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  606|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  607|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  608|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  609|       |
  610|   138k|        secp256k1_modinv64_update_fg_62(&f, &g, &t);
  611|       |
  612|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, -1) > 0); /* f > -modulus */
  613|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &modinfo->modulus, 1) <= 0); /* f <= modulus */
  614|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, -1) > 0); /* g > -modulus */
  615|   138k|        VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&g, 5, &modinfo->modulus, 1) < 0);  /* g <  modulus */
  616|   138k|    }
  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.8k|    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.8k|    VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, -1) == 0 ||
  626|  13.8k|                 secp256k1_modinv64_mul_cmp_62(&f, 5, &SECP256K1_SIGNED62_ONE, 1) == 0 ||
  627|  13.8k|                 (secp256k1_modinv64_mul_cmp_62(x, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  628|  13.8k|                  secp256k1_modinv64_mul_cmp_62(&d, 5, &SECP256K1_SIGNED62_ONE, 0) == 0 &&
  629|  13.8k|                  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.8k|    secp256k1_modinv64_normalize_62(&d, f.v[4], modinfo);
  633|  13.8k|    *x = d;
  634|  13.8k|}
secp256k1.c:secp256k1_modinv64_divsteps_59:
  167|   138k|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|   138k|    uint64_t u = 8, v = 0, q = 0, r = 8;
  176|   138k|    volatile uint64_t c1, c2;
  177|   138k|    uint64_t mask1, mask2, f = f0, g = g0, x, y, z;
  178|   138k|    int i;
  179|       |
  180|  8.29M|    for (i = 3; i < 62; ++i) {
  ------------------
  |  Branch (180:17): [True: 8.16M, False: 138k]
  ------------------
  181|  8.16M|        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */
  182|  8.16M|        VERIFY_CHECK((u * f0 + v * g0) == f << i);
  183|  8.16M|        VERIFY_CHECK((q * f0 + r * g0) == g << i);
  184|       |        /* Compute conditional masks for (zeta < 0) and for (g & 1). */
  185|  8.16M|        c1 = zeta >> 63;
  186|  8.16M|        mask1 = c1;
  187|  8.16M|        c2 = g & 1;
  188|  8.16M|        mask2 = -c2;
  189|       |        /* Compute x,y,z, conditionally negated versions of f,u,v. */
  190|  8.16M|        x = (f ^ mask1) - mask1;
  191|  8.16M|        y = (u ^ mask1) - mask1;
  192|  8.16M|        z = (v ^ mask1) - mask1;
  193|       |        /* Conditionally add x,y,z to g,q,r. */
  194|  8.16M|        g += x & mask2;
  195|  8.16M|        q += y & mask2;
  196|  8.16M|        r += z & mask2;
  197|       |        /* In what follows, c1 is a condition mask for (zeta < 0) and (g & 1). */
  198|  8.16M|        mask1 &= mask2;
  199|       |        /* Conditionally change zeta into -zeta-2 or zeta-1. */
  200|  8.16M|        zeta = (zeta ^ mask1) - 1;
  201|       |        /* Conditionally add g,q,r to f,u,v. */
  202|  8.16M|        f += g & mask1;
  203|  8.16M|        u += q & mask1;
  204|  8.16M|        v += r & mask1;
  205|       |        /* Shifts */
  206|  8.16M|        g >>= 1;
  207|  8.16M|        u <<= 1;
  208|  8.16M|        v <<= 1;
  209|       |        /* Bounds on zeta that follow from the bounds on iteration count (max 10*59 divsteps). */
  210|  8.16M|        VERIFY_CHECK(zeta >= -591 && zeta <= 591);
  211|  8.16M|    }
  212|       |    /* Return data in t and return value. */
  213|   138k|    t->u = (int64_t)u;
  214|   138k|    t->v = (int64_t)v;
  215|   138k|    t->q = (int64_t)q;
  216|   138k|    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|   138k|    VERIFY_CHECK(secp256k1_modinv64_det_check_pow2(t, 65, 0));
  225|       |
  226|   138k|    return zeta;
  227|   138k|}
secp256k1.c:secp256k1_modinv64_update_fg_62:
  500|   138k|static void secp256k1_modinv64_update_fg_62(secp256k1_modinv64_signed62 *f, secp256k1_modinv64_signed62 *g, const secp256k1_modinv64_trans2x2 *t) {
  501|   138k|    const uint64_t M62 = UINT64_MAX >> 2;
  502|   138k|    const int64_t f0 = f->v[0], f1 = f->v[1], f2 = f->v[2], f3 = f->v[3], f4 = f->v[4];
  503|   138k|    const int64_t g0 = g->v[0], g1 = g->v[1], g2 = g->v[2], g3 = g->v[3], g4 = g->v[4];
  504|   138k|    const int64_t u = t->u, v = t->v, q = t->q, r = t->r;
  505|   138k|    secp256k1_int128 cf, cg;
  506|       |    /* Start computing t*[f,g]. */
  507|   138k|    secp256k1_i128_mul(&cf, u, f0);
  508|   138k|    secp256k1_i128_accum_mul(&cf, v, g0);
  509|   138k|    secp256k1_i128_mul(&cg, q, f0);
  510|   138k|    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|   138k|    VERIFY_CHECK((secp256k1_i128_to_u64(&cf) & M62) == 0); secp256k1_i128_rshift(&cf, 62);
  513|   138k|    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|   138k|    secp256k1_i128_accum_mul(&cf, u, f1);
  516|   138k|    secp256k1_i128_accum_mul(&cf, v, g1);
  517|   138k|    secp256k1_i128_accum_mul(&cg, q, f1);
  518|   138k|    secp256k1_i128_accum_mul(&cg, r, g1);
  519|   138k|    f->v[0] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  520|   138k|    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|   138k|    secp256k1_i128_accum_mul(&cf, u, f2);
  523|   138k|    secp256k1_i128_accum_mul(&cf, v, g2);
  524|   138k|    secp256k1_i128_accum_mul(&cg, q, f2);
  525|   138k|    secp256k1_i128_accum_mul(&cg, r, g2);
  526|   138k|    f->v[1] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  527|   138k|    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|   138k|    secp256k1_i128_accum_mul(&cf, u, f3);
  530|   138k|    secp256k1_i128_accum_mul(&cf, v, g3);
  531|   138k|    secp256k1_i128_accum_mul(&cg, q, f3);
  532|   138k|    secp256k1_i128_accum_mul(&cg, r, g3);
  533|   138k|    f->v[2] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  534|   138k|    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|   138k|    secp256k1_i128_accum_mul(&cf, u, f4);
  537|   138k|    secp256k1_i128_accum_mul(&cf, v, g4);
  538|   138k|    secp256k1_i128_accum_mul(&cg, q, f4);
  539|   138k|    secp256k1_i128_accum_mul(&cg, r, g4);
  540|   138k|    f->v[3] = secp256k1_i128_to_u64(&cf) & M62; secp256k1_i128_rshift(&cf, 62);
  541|   138k|    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|   138k|    f->v[4] = secp256k1_i128_to_i64(&cf);
  544|   138k|    g->v[4] = secp256k1_i128_to_i64(&cg);
  545|   138k|}

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

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

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

secp256k1_context_preallocated_destroy:
  178|      2|void secp256k1_context_preallocated_destroy(secp256k1_context* ctx) {
  179|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded, False: 2]
  |  |  ------------------
  ------------------
  180|       |
  181|       |    /* Defined as noop */
  182|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2]
  ------------------
  183|      0|        return;
  184|      0|    }
  185|       |
  186|      2|    secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx);
  187|      2|}
secp256k1_context_destroy:
  189|      2|void secp256k1_context_destroy(secp256k1_context* ctx) {
  190|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (146:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded, False: 2]
  |  |  ------------------
  ------------------
  191|       |
  192|       |    /* Defined as noop */
  193|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (193:9): [True: 0, False: 2]
  ------------------
  194|      0|        return;
  195|      0|    }
  196|       |
  197|      2|    secp256k1_context_preallocated_destroy(ctx);
  198|      2|    free(ctx);
  199|      2|}
secp256k1_ec_pubkey_serialize:
  286|  14.0k|int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
  287|  14.0k|    secp256k1_ge Q;
  288|  14.0k|    size_t len;
  289|       |
  290|  14.0k|    VERIFY_CHECK(ctx != NULL);
  291|  14.0k|    ARG_CHECK(outputlen != NULL);
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  14.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  292|  14.0k|    ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33u : 65u));
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  28.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  |  Branch (146:39): [True: 7.62k, False: 6.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  293|  14.0k|    len = *outputlen;
  294|  14.0k|    *outputlen = 0;
  295|  14.0k|    ARG_CHECK(output != NULL);
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  14.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  296|  14.0k|    memset(output, 0, len);
  297|  14.0k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  14.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  298|  14.0k|    ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION);
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  14.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  299|  14.0k|    if (secp256k1_pubkey_load(ctx, &Q, pubkey)) {
  ------------------
  |  Branch (299:9): [True: 14.0k, False: 0]
  ------------------
  300|  14.0k|        if (flags & SECP256K1_FLAGS_BIT_COMPRESSION) {
  ------------------
  |  |  202|  14.0k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  ------------------
  |  Branch (300:13): [True: 7.62k, False: 6.39k]
  ------------------
  301|  7.62k|            secp256k1_eckey_pubkey_serialize33(&Q, output);
  302|  7.62k|            *outputlen = 33;
  303|  7.62k|        } else {
  304|  6.39k|            secp256k1_eckey_pubkey_serialize65(&Q, output);
  305|  6.39k|            *outputlen = 65;
  306|  6.39k|        }
  307|  14.0k|        return 1;
  308|  14.0k|    }
  309|      0|    return 0;
  310|  14.0k|}
secp256k1_ec_pubkey_cmp:
  312|  3.45k|int secp256k1_ec_pubkey_cmp(const secp256k1_context* ctx, const secp256k1_pubkey* pubkey0, const secp256k1_pubkey* pubkey1) {
  313|  3.45k|    unsigned char out[2][33];
  314|  3.45k|    const secp256k1_pubkey* pk[2];
  315|  3.45k|    int i;
  316|       |
  317|  3.45k|    VERIFY_CHECK(ctx != NULL);
  318|  3.45k|    pk[0] = pubkey0; pk[1] = pubkey1;
  319|  10.3k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (319:17): [True: 6.91k, False: 3.45k]
  ------------------
  320|  6.91k|        size_t out_size = sizeof(out[i]);
  321|       |        /* If the public key is NULL or invalid, ec_pubkey_serialize will call
  322|       |         * the illegal_callback and return 0. In that case we will serialize the
  323|       |         * key as all zeros which is less than any valid public key. This
  324|       |         * results in consistent comparisons even if NULL or invalid pubkeys are
  325|       |         * involved and prevents edge cases such as sorting algorithms that use
  326|       |         * this function and do not terminate as a result. */
  327|  6.91k|        if (!secp256k1_ec_pubkey_serialize(ctx, out[i], &out_size, pk[i], SECP256K1_EC_COMPRESSED)) {
  ------------------
  |  |  216|  6.91k|#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  197|  6.91k|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  |  |               #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION)
  |  |  ------------------
  |  |  |  |  202|  6.91k|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  |  |  ------------------
  ------------------
  |  Branch (327:13): [True: 0, False: 6.91k]
  ------------------
  328|       |            /* Note that ec_pubkey_serialize should already set the output to
  329|       |             * zero in that case, but it's not guaranteed by the API, we can't
  330|       |             * test it and writing a VERIFY_CHECK is more complex than
  331|       |             * explicitly memsetting (again). */
  332|      0|            memset(out[i], 0, sizeof(out[i]));
  333|      0|        }
  334|  6.91k|    }
  335|  3.45k|    return secp256k1_memcmp_var(out[0], out[1], sizeof(out[0]));
  336|  3.45k|}
secp256k1_ec_seckey_verify:
  615|  3.72k|int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char *seckey) {
  616|  3.72k|    secp256k1_scalar sec;
  617|  3.72k|    int ret;
  618|  3.72k|    VERIFY_CHECK(ctx != NULL);
  619|  3.72k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|  3.72k|#define ARG_CHECK(cond) do { \
  |  |   46|  3.72k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  3.72k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 3.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  3.72k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 3.72k]
  |  |  ------------------
  ------------------
  620|       |
  621|  3.72k|    ret = secp256k1_scalar_set_b32_seckey(&sec, seckey);
  622|  3.72k|    secp256k1_scalar_clear(&sec);
  623|  3.72k|    return ret;
  624|  3.72k|}
secp256k1_ec_pubkey_create:
  636|  6.91k|int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) {
  637|  6.91k|    secp256k1_ge p;
  638|  6.91k|    secp256k1_scalar seckey_scalar;
  639|  6.91k|    int ret = 0;
  640|  6.91k|    VERIFY_CHECK(ctx != NULL);
  641|  6.91k|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|  6.91k|#define ARG_CHECK(cond) do { \
  |  |   46|  6.91k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  6.91k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 6.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  6.91k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 6.91k]
  |  |  ------------------
  ------------------
  642|  6.91k|    memset(pubkey, 0, sizeof(*pubkey));
  643|  6.91k|    ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
  ------------------
  |  |   45|  6.91k|#define ARG_CHECK(cond) do { \
  |  |   46|  6.91k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  6.91k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 6.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  6.91k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 6.91k]
  |  |  ------------------
  ------------------
  644|  6.91k|    ARG_CHECK(seckey != NULL);
  ------------------
  |  |   45|  6.91k|#define ARG_CHECK(cond) do { \
  |  |   46|  6.91k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  6.91k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 6.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  6.91k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 6.91k]
  |  |  ------------------
  ------------------
  645|       |
  646|  6.91k|    ret = secp256k1_ec_pubkey_create_helper(&ctx->ecmult_gen_ctx, &seckey_scalar, &p, seckey);
  647|  6.91k|    secp256k1_pubkey_save(pubkey, &p);
  648|  6.91k|    secp256k1_memczero(pubkey, sizeof(*pubkey), !ret);
  649|       |
  650|  6.91k|    secp256k1_scalar_clear(&seckey_scalar);
  651|  6.91k|    return ret;
  652|  6.91k|}
secp256k1.c:secp256k1_context_is_proper:
   83|      4|static int secp256k1_context_is_proper(const secp256k1_context* ctx) {
   84|      4|    return secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx);
   85|      4|}
secp256k1.c:secp256k1_pubkey_save:
  264|  14.0k|static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) {
  265|  14.0k|    secp256k1_ge_to_bytes(pubkey->data, ge);
  266|  14.0k|}
secp256k1.c:secp256k1_pubkey_load:
  258|  14.0k|static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) {
  259|  14.0k|    secp256k1_ge_from_bytes(ge, pubkey->data);
  260|  14.0k|    ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));
  ------------------
  |  |   45|  14.0k|#define ARG_CHECK(cond) do { \
  |  |   46|  14.0k|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  146|  14.0k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (146:21): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|  14.0k|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  261|  14.0k|    return 1;
  262|  14.0k|}
secp256k1.c:nonce_function_rfc6979_impl:
  497|  3.45k|static int nonce_function_rfc6979_impl(const secp256k1_hash_ctx *hash_ctx, unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) {
  498|  3.45k|   unsigned char keydata[112];
  499|  3.45k|   unsigned int offset = 0;
  500|  3.45k|   secp256k1_rfc6979_hmac_sha256 rng;
  501|  3.45k|   unsigned int i;
  502|  3.45k|   secp256k1_scalar msg;
  503|  3.45k|   unsigned char msgmod32[32];
  504|  3.45k|   secp256k1_scalar_set_b32(&msg, msg32, NULL);
  505|  3.45k|   secp256k1_scalar_get_b32(msgmod32, &msg);
  506|       |   /* We feed a byte array to the PRNG as input, consisting of:
  507|       |    * - the private key (32 bytes) and reduced message (32 bytes), see RFC 6979 3.2d.
  508|       |    * - optionally 32 extra bytes of data, see RFC 6979 3.6 Additional Data.
  509|       |    * - optionally 16 extra bytes with the algorithm name.
  510|       |    * Because the arguments have distinct fixed lengths it is not possible for
  511|       |    *  different argument mixtures to emulate each other and result in the same
  512|       |    *  nonces.
  513|       |    */
  514|  3.45k|   buffer_append(keydata, &offset, key32, 32);
  515|  3.45k|   buffer_append(keydata, &offset, msgmod32, 32);
  516|  3.45k|   if (data != NULL) {
  ------------------
  |  Branch (516:8): [True: 0, False: 3.45k]
  ------------------
  517|      0|       buffer_append(keydata, &offset, data, 32);
  518|      0|   }
  519|  3.45k|   if (algo16 != NULL) {
  ------------------
  |  Branch (519:8): [True: 0, False: 3.45k]
  ------------------
  520|      0|       buffer_append(keydata, &offset, algo16, 16);
  521|      0|   }
  522|  3.45k|   secp256k1_rfc6979_hmac_sha256_initialize(hash_ctx, &rng, keydata, offset);
  523|  3.45k|   for (i = 0; ; i++) {
  524|  3.45k|       secp256k1_rfc6979_hmac_sha256_generate(hash_ctx, &rng, nonce32, 32);
  525|  3.45k|       if (i == counter) break;
  ------------------
  |  Branch (525:12): [True: 3.45k, False: 0]
  ------------------
  526|  3.45k|   }
  527|  3.45k|   secp256k1_rfc6979_hmac_sha256_finalize(&rng);
  528|       |
  529|  3.45k|   secp256k1_memclear_explicit(keydata, sizeof(keydata));
  530|  3.45k|   secp256k1_rfc6979_hmac_sha256_clear(&rng);
  531|  3.45k|   return 1;
  532|  3.45k|}
secp256k1.c:buffer_append:
  492|  6.91k|static SECP256K1_INLINE void buffer_append(unsigned char *buf, unsigned int *offset, const void *data, unsigned int len) {
  493|  6.91k|    memcpy(buf + *offset, data, len);
  494|  6.91k|    *offset += len;
  495|  6.91k|}
secp256k1.c:secp256k1_ecdsa_sign_inner:
  541|  3.45k|static int secp256k1_ecdsa_sign_inner(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) {
  542|  3.45k|    secp256k1_scalar sec, non, msg;
  543|  3.45k|    int ret = 0;
  544|  3.45k|    int is_sec_valid;
  545|  3.45k|    unsigned char nonce32[32];
  546|  3.45k|    unsigned int count = 0;
  547|       |    /* Default initialization here is important so we won't pass uninit values to the cmov in the end */
  548|  3.45k|    *r = secp256k1_scalar_zero;
  549|  3.45k|    *s = secp256k1_scalar_zero;
  550|  3.45k|    if (recid) {
  ------------------
  |  Branch (550:9): [True: 3.45k, False: 0]
  ------------------
  551|  3.45k|        *recid = 0;
  552|  3.45k|    }
  553|       |
  554|       |    /* Fail if the secret key is invalid. */
  555|  3.45k|    is_sec_valid = secp256k1_scalar_set_b32_seckey(&sec, seckey);
  556|  3.45k|    secp256k1_scalar_cmov(&sec, &secp256k1_scalar_one, !is_sec_valid);
  557|  3.45k|    secp256k1_scalar_set_b32(&msg, msg32, NULL);
  558|  3.45k|    while (1) {
  ------------------
  |  Branch (558:12): [True: 3.45k, Folded]
  ------------------
  559|  3.45k|        int is_nonce_valid;
  560|       |
  561|  3.45k|        if (noncefp == NULL || noncefp == secp256k1_nonce_function_rfc6979) {
  ------------------
  |  Branch (561:13): [True: 0, False: 3.45k]
  |  Branch (561:32): [True: 3.45k, False: 0]
  ------------------
  562|       |            /* Use ctx-aware function by default */
  563|  3.45k|            ret = nonce_function_rfc6979_impl(secp256k1_get_hash_context(ctx), nonce32, msg32, seckey, NULL, (void*)noncedata, count);
  564|  3.45k|        } else {
  565|      0|            ret = !!noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count);
  566|      0|        }
  567|       |
  568|  3.45k|        if (!ret) {
  ------------------
  |  Branch (568:13): [True: 0, False: 3.45k]
  ------------------
  569|      0|            break;
  570|      0|        }
  571|  3.45k|        is_nonce_valid = secp256k1_scalar_set_b32_seckey(&non, nonce32);
  572|       |        /* The nonce is still secret here, but it being invalid is less likely than 1:2^255. */
  573|  3.45k|        secp256k1_declassify(ctx, &is_nonce_valid, sizeof(is_nonce_valid));
  574|  3.45k|        if (is_nonce_valid) {
  ------------------
  |  Branch (574:13): [True: 3.45k, False: 0]
  ------------------
  575|  3.45k|            ret = secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, r, s, &sec, &msg, &non, recid);
  576|       |            /* The final signature is no longer a secret, nor is the fact that we were successful or not. */
  577|  3.45k|            secp256k1_declassify(ctx, &ret, sizeof(ret));
  578|  3.45k|            if (ret) {
  ------------------
  |  Branch (578:17): [True: 3.45k, False: 0]
  ------------------
  579|  3.45k|                break;
  580|  3.45k|            }
  581|  3.45k|        }
  582|      0|        count++;
  583|      0|    }
  584|       |    /* We don't want to declassify is_sec_valid and therefore the range of
  585|       |     * seckey. As a result is_sec_valid is included in ret only after ret was
  586|       |     * used as a branching variable. */
  587|  3.45k|    ret &= is_sec_valid;
  588|  3.45k|    secp256k1_memclear_explicit(nonce32, sizeof(nonce32));
  589|  3.45k|    secp256k1_scalar_clear(&msg);
  590|  3.45k|    secp256k1_scalar_clear(&non);
  591|  3.45k|    secp256k1_scalar_clear(&sec);
  592|  3.45k|    secp256k1_scalar_cmov(r, &secp256k1_scalar_zero, !ret);
  593|  3.45k|    secp256k1_scalar_cmov(s, &secp256k1_scalar_zero, !ret);
  594|  3.45k|    if (recid) {
  ------------------
  |  Branch (594:9): [True: 3.45k, False: 0]
  ------------------
  595|  3.45k|        const int zero = 0;
  596|  3.45k|        secp256k1_int_cmov(recid, &zero, !ret);
  597|  3.45k|    }
  598|  3.45k|    return ret;
  599|  3.45k|}
secp256k1.c:secp256k1_ec_pubkey_create_helper:
  626|  6.91k|static int secp256k1_ec_pubkey_create_helper(const secp256k1_ecmult_gen_context *ecmult_gen_ctx, secp256k1_scalar *seckey_scalar, secp256k1_ge *p, const unsigned char *seckey) {
  627|  6.91k|    int ret;
  628|       |
  629|  6.91k|    ret = secp256k1_scalar_set_b32_seckey(seckey_scalar, seckey);
  630|  6.91k|    secp256k1_scalar_cmov(seckey_scalar, &secp256k1_scalar_one, !ret);
  631|       |
  632|  6.91k|    secp256k1_ecmult_gen_ge(ecmult_gen_ctx, p, seckey_scalar);
  633|  6.91k|    return ret;
  634|  6.91k|}
secp256k1.c:secp256k1_get_hash_context:
  237|  3.45k|static SECP256K1_INLINE const secp256k1_hash_ctx* secp256k1_get_hash_context(const secp256k1_context *ctx) {
  238|  3.45k|    return &ctx->hash_ctx;
  239|  3.45k|}
secp256k1.c:secp256k1_declassify:
  254|  6.91k|static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
  255|  6.91k|    if (EXPECT(ctx->declassify, 0)) SECP256K1_CHECKMEM_DEFINE(p, len);
  ------------------
  |  |  146|  6.91k|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 0, False: 6.91k]
  |  |  ------------------
  ------------------
                  if (EXPECT(ctx->declassify, 0)) SECP256K1_CHECKMEM_DEFINE(p, len);
  ------------------
  |  |  106|      0|#  define SECP256K1_CHECKMEM_DEFINE(p, len) SECP256K1_CHECKMEM_NOOP((p), (len))
  |  |  ------------------
  |  |  |  |   42|      0|#define SECP256K1_CHECKMEM_NOOP(p, len) do { (void)(p); (void)(len); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:78): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|  6.91k|}

secp256k1.c:secp256k1_read_be32:
  428|  1.21M|SECP256K1_INLINE static uint32_t secp256k1_read_be32(const unsigned char* p) {
  429|  1.21M|    return (uint32_t)p[0] << 24 |
  430|  1.21M|           (uint32_t)p[1] << 16 |
  431|  1.21M|           (uint32_t)p[2] << 8  |
  432|  1.21M|           (uint32_t)p[3];
  433|  1.21M|}
secp256k1.c:secp256k1_memcmp_var:
  281|  3.45k|static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2, size_t n) {
  282|  3.45k|    const unsigned char *p1 = s1, *p2 = s2;
  283|  3.45k|    size_t i;
  284|       |
  285|   117k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (285:17): [True: 114k, False: 3.45k]
  ------------------
  286|   114k|        int diff = p1[i] - p2[i];
  287|   114k|        if (diff != 0) {
  ------------------
  |  Branch (287:13): [True: 0, False: 114k]
  ------------------
  288|      0|            return diff;
  289|      0|        }
  290|   114k|    }
  291|  3.45k|    return 0;
  292|  3.45k|}
secp256k1.c:secp256k1_read_be64:
  444|   170k|SECP256K1_INLINE static uint64_t secp256k1_read_be64(const unsigned char* p) {
  445|   170k|    return (uint64_t)p[0] << 56 |
  446|   170k|           (uint64_t)p[1] << 48 |
  447|   170k|           (uint64_t)p[2] << 40 |
  448|   170k|           (uint64_t)p[3] << 32 |
  449|   170k|           (uint64_t)p[4] << 24 |
  450|   170k|           (uint64_t)p[5] << 16 |
  451|   170k|           (uint64_t)p[6] << 8  |
  452|   170k|           (uint64_t)p[7];
  453|   170k|}
secp256k1.c:secp256k1_ctz64_var:
  410|  2.08M|static SECP256K1_INLINE int secp256k1_ctz64_var(uint64_t x) {
  411|  2.08M|    VERIFY_CHECK(x != 0);
  412|  2.08M|#if (__has_builtin(__builtin_ctzl) || defined(__GNUC__))
  413|       |    /* If the unsigned long type is sufficient to represent the largest uint64_t, consider __builtin_ctzl. */
  414|  2.08M|    if (((unsigned long)UINT64_MAX) == UINT64_MAX) {
  ------------------
  |  Branch (414:9): [True: 2.08M, Folded]
  ------------------
  415|  2.08M|        return __builtin_ctzl(x);
  416|  2.08M|    }
  417|      0|#endif
  418|      0|#if (__has_builtin(__builtin_ctzll) || defined(__GNUC__))
  419|       |    /* Otherwise consider __builtin_ctzll (the unsigned long long type is always at least 64 bits). */
  420|      0|    return __builtin_ctzll(x);
  421|       |#else
  422|       |    /* If no suitable CTZ builtin is available, use a (variable time) software emulation. */
  423|       |    return secp256k1_ctz64_var_debruijn(x);
  424|       |#endif
  425|  2.08M|}
secp256k1.c:secp256k1_int_cmov:
  312|  3.45k|static SECP256K1_INLINE void secp256k1_int_cmov(int *r, const int *a, int flag) {
  313|  3.45k|    unsigned int mask0, mask1, r_masked, a_masked;
  314|       |    /* Access flag with a volatile-qualified lvalue.
  315|       |       This prevents clang from figuring out (after inlining) that flag can
  316|       |       take only be 0 or 1, which leads to variable time code. */
  317|  3.45k|    volatile int vflag = flag;
  318|       |
  319|  3.45k|    VERIFY_CHECK(flag == 0 || flag == 1);
  320|       |    /* Casting a negative int to unsigned and back to int is implementation defined behavior */
  321|  3.45k|    VERIFY_CHECK(*r >= 0 && *a >= 0);
  322|       |
  323|  3.45k|    mask0 = (unsigned int)vflag + ~0u;
  324|  3.45k|    mask1 = ~mask0;
  325|  3.45k|    r_masked = ((unsigned int)*r & mask0);
  326|  3.45k|    a_masked = ((unsigned int)*a & mask1);
  327|       |
  328|  3.45k|    *r = (int)(r_masked | a_masked);
  329|  3.45k|}
secp256k1.c:secp256k1_memczero:
  220|  6.91k|static SECP256K1_INLINE void secp256k1_memczero(void *s, size_t len, int flag) {
  221|  6.91k|    unsigned char *p = (unsigned char *)s;
  222|       |    /* Access flag with a volatile-qualified lvalue.
  223|       |       This prevents clang from figuring out (after inlining) that flag can
  224|       |       take only be 0 or 1, which leads to variable time code. */
  225|  6.91k|    volatile int vflag = flag;
  226|  6.91k|    unsigned char mask = -(unsigned char) vflag;
  227|  6.91k|    VERIFY_CHECK(flag == 0 || flag == 1);
  228|   449k|    while (len) {
  ------------------
  |  Branch (228:12): [True: 442k, False: 6.91k]
  ------------------
  229|   442k|        *p &= ~mask;
  230|   442k|        p++;
  231|   442k|        len--;
  232|   442k|    }
  233|  6.91k|}
secp256k1.c:secp256k1_rotr32:
  468|  2.67M|SECP256K1_INLINE static uint32_t secp256k1_rotr32(const uint32_t x, const unsigned int by) {
  469|       |#if defined(_MSC_VER)
  470|       |    return _rotr(x, by);  /* needs <stdlib.h> */
  471|       |#else
  472|       |    /* Reduce rotation amount to avoid UB when shifting. */
  473|  2.67M|    const unsigned int mask = CHAR_BIT * sizeof(x) - 1;
  474|       |    /* Turned into a rot instruction by GCC and clang. */
  475|  2.67M|    return (x >> (by & mask)) | (x << ((-by) & mask));
  476|  2.67M|#endif
  477|  2.67M|}
secp256k1.c:secp256k1_write_be64:
  456|   165k|SECP256K1_INLINE static void secp256k1_write_be64(unsigned char* p, uint64_t x) {
  457|   165k|    p[7] = x;
  458|   165k|    p[6] = x >>  8;
  459|   165k|    p[5] = x >> 16;
  460|   165k|    p[4] = x >> 24;
  461|   165k|    p[3] = x >> 32;
  462|   165k|    p[2] = x >> 40;
  463|   165k|    p[1] = x >> 48;
  464|   165k|    p[0] = x >> 56;
  465|   165k|}
secp256k1.c:secp256k1_memclear_explicit:
  268|   135k|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|   135k|    secp256k1_memzero_explicit(ptr, len);
  271|       |#ifdef VERIFY
  272|       |    SECP256K1_CHECKMEM_UNDEFINE(ptr, len);
  273|       |#endif
  274|   135k|}
secp256k1.c:secp256k1_memzero_explicit:
  236|   135k|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|   135k|    memset(ptr, 0, len);
  253|   135k|    __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|   135k|}
secp256k1.c:secp256k1_write_be32:
  436|   345k|SECP256K1_INLINE static void secp256k1_write_be32(unsigned char* p, uint32_t x) {
  437|   345k|    p[3] = x;
  438|   345k|    p[2] = x >>  8;
  439|   345k|    p[1] = x >> 16;
  440|   345k|    p[0] = x >> 24;
  441|   345k|}

_Z9SerializeI10HashWritercEvRT_RKNSt3__112basic_stringIT0_NS3_11char_traitsIS5_EENS3_9allocatorIS5_EEEE:
  832|  22.4k|{
  833|  22.4k|    WriteCompactSize(os, str.size());
  834|  22.4k|    if (!str.empty())
  ------------------
  |  Branch (834:9): [True: 13.3k, False: 9.10k]
  ------------------
  835|  13.3k|        os.write(MakeByteSpan(str));
  836|  22.4k|}
_Z16WriteCompactSizeI10HashWriterEvRT_m:
  303|  22.4k|{
  304|  22.4k|    if (nSize < 253)
  ------------------
  |  Branch (304:9): [True: 22.2k, False: 172]
  ------------------
  305|  22.2k|    {
  306|  22.2k|        ser_writedata8(os, nSize);
  307|  22.2k|    }
  308|    172|    else if (nSize <= std::numeric_limits<uint16_t>::max())
  ------------------
  |  Branch (308:14): [True: 172, False: 0]
  ------------------
  309|    172|    {
  310|    172|        ser_writedata8(os, 253);
  311|    172|        ser_writedata16(os, nSize);
  312|    172|    }
  313|      0|    else if (nSize <= std::numeric_limits<unsigned int>::max())
  ------------------
  |  Branch (313:14): [True: 0, False: 0]
  ------------------
  314|      0|    {
  315|      0|        ser_writedata8(os, 254);
  316|      0|        ser_writedata32(os, nSize);
  317|      0|    }
  318|      0|    else
  319|      0|    {
  320|      0|        ser_writedata8(os, 255);
  321|      0|        ser_writedata64(os, nSize);
  322|      0|    }
  323|  22.4k|    return;
  324|  22.4k|}
_Z14ser_writedata8I10HashWriterEvRT_h:
   58|  22.4k|{
   59|  22.4k|    s.write(std::as_bytes(std::span{&obj, 1}));
   60|  22.4k|}
_Z15ser_writedata16I10HashWriterEvRT_t:
   62|    172|{
   63|    172|    obj = htole16_internal(obj);
   64|    172|    s.write(std::as_bytes(std::span{&obj, 1}));
   65|    172|}

_Z13MakeUCharSpanINSt3__14spanIhLm18446744073709551615EEEEDTcl13UCharSpanCasttlS1_fp_EEERKT_:
  111|  3.84k|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z13UCharSpanCastIhLm18446744073709551615EEDaNSt3__14spanIT_XT0_EEE:
  108|  3.84k|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()}; }
_Z9UCharCastPh:
   96|  7.56k|inline unsigned char* UCharCast(unsigned char* c) { return c; }
_Z12MakeByteSpanINSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEDaRKT_:
   85|  13.3k|{
   86|  13.3k|    return std::as_bytes(std::span{v});
   87|  13.3k|}
_Z13MakeUCharSpanINSt3__16vectorIhNS0_9allocatorIhEEEEEDTcl13UCharSpanCasttlNS0_4spanEfp_EEERKT_:
  111|  3.45k|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z13MakeUCharSpanINSt3__14spanIKhLm18446744073709551615EEEEDTcl13UCharSpanCasttlS1_fp_EEERKT_:
  111|  7.10k|template <typename V> constexpr auto MakeUCharSpan(const V& v) -> decltype(UCharSpanCast(std::span{v})) { return UCharSpanCast(std::span{v}); }
_Z13UCharSpanCastIKhLm18446744073709551615EEDaNSt3__14spanIT_XT0_EEE:
  108|  10.5k|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()}; }
_Z9UCharCastPKh:
  100|  10.5k|inline const unsigned char* UCharCast(const unsigned char* c) { return c; }
_Z9UCharCastPKSt4byte:
  102|  46.2k|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|    }
_Z18make_secure_uniqueINSt3__15arrayIhLm32EEEJEENS0_10unique_ptrIT_19SecureUniqueDeleterIS4_EEEDpOT0_:
   67|  3.45k|{
   68|  3.45k|    T* p = secure_allocator<T>().allocate(1);
   69|       |
   70|       |    // initialize in place, and return as secure_unique_ptr
   71|  3.45k|    try {
   72|  3.45k|        return secure_unique_ptr<T>(new (p) T(std::forward<Args>(as)...));
   73|  3.45k|    } catch (...) {
   74|      0|        secure_allocator<T>().deallocate(p, 1);
   75|      0|        throw;
   76|      0|    }
   77|  3.45k|}
_ZN16secure_allocatorINSt3__15arrayIhLm32EEEE8allocateEm:
   28|  3.45k|    {
   29|  3.45k|        T* allocation = static_cast<T*>(LockedPoolManager::Instance().alloc(sizeof(T) * n));
   30|  3.45k|        if (!allocation) {
  ------------------
  |  Branch (30:13): [True: 0, False: 3.45k]
  ------------------
   31|      0|            throw std::bad_alloc();
   32|      0|        }
   33|  3.45k|        return allocation;
   34|  3.45k|    }
_ZN19SecureUniqueDeleterINSt3__15arrayIhLm32EEEEclEPS2_:
   57|  3.45k|    void operator()(T* t) noexcept {
   58|  3.45k|        secure_allocator<T>().deallocate(t, 1);
   59|  3.45k|    }
_ZN16secure_allocatorINSt3__15arrayIhLm32EEEE10deallocateEPS2_m:
   37|  3.45k|    {
   38|  3.45k|        if (p != nullptr) {
  ------------------
  |  Branch (38:13): [True: 3.45k, False: 0]
  ------------------
   39|  3.45k|            memory_cleanse(p, sizeof(T) * n);
   40|  3.45k|        }
   41|  3.45k|        LockedPoolManager::Instance().free(p);
   42|  3.45k|    }

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

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

_ZNK5Arena14addressInArenaEPv:
   90|  3.46k|    bool addressInArena(void *ptr) const { return ptr >= base && ptr < end; }
  ------------------
  |  Branch (90:51): [True: 3.46k, False: 0]
  |  Branch (90:66): [True: 3.46k, 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|    }

_ZN18FuzzedDataProvider16PickValueInArrayI13SigningResultEET_St16initializer_listIKS2_E:
  316|  3.72k|T FuzzedDataProvider::PickValueInArray(std::initializer_list<const T> list) {
  317|  3.72k|  if (!list.size())
  ------------------
  |  Branch (317:7): [True: 0, False: 3.72k]
  ------------------
  318|      0|    abort();
  319|       |
  320|  3.72k|  return *(list.begin() + ConsumeIntegralInRange<size_t>(0, list.size() - 1));
  321|  3.72k|}
_ZN18FuzzedDataProviderC2EPKhm:
   37|  3.72k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|  3.72k|inline bool FuzzedDataProvider::ConsumeBool() {
  290|  3.72k|  return 1 & ConsumeIntegral<uint8_t>();
  291|  3.72k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  3.72k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  3.72k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  3.72k|                                std::numeric_limits<T>::max());
  198|  3.72k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  3.72k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  3.72k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|  3.72k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  3.72k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 3.72k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  3.72k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  3.72k|  uint64_t result = 0;
  215|  3.72k|  size_t offset = 0;
  216|       |
  217|  4.91k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 3.72k, False: 1.18k]
  |  Branch (217:43): [True: 3.72k, False: 0]
  ------------------
  218|  3.72k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 1.18k, False: 2.53k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  1.18k|    --remaining_bytes_;
  226|  1.18k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  1.18k|    offset += CHAR_BIT;
  228|  1.18k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  3.72k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 3.72k, False: 0]
  ------------------
  232|  3.72k|    result = result % (range + 1);
  233|       |
  234|  3.72k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  3.72k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  11.1k|FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) {
  154|       |  // Reads bytes from the start of |data_ptr_|. Maps "\\" to "\", and maps "\"
  155|       |  // followed by anything else to the end of the string. As a result of this
  156|       |  // logic, a fuzzer can insert characters into the string, and the string
  157|       |  // will be lengthened to include those new characters, resulting in a more
  158|       |  // stable fuzzer than picking the length of a string independently from
  159|       |  // picking its contents.
  160|  11.1k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  11.1k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|   254k|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 253k, False: 93]
  |  Branch (164:40): [True: 247k, False: 6.87k]
  ------------------
  165|   247k|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|   247k|    Advance(1);
  167|   247k|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 13.3k, False: 233k]
  |  Branch (167:25): [True: 13.3k, False: 14]
  ------------------
  168|  13.3k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  13.3k|      Advance(1);
  170|  13.3k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 4.19k, False: 9.10k]
  ------------------
  171|  4.19k|        break;
  172|  13.3k|    }
  173|   242k|    result += next;
  174|   242k|  }
  175|       |
  176|  11.1k|  result.shrink_to_fit();
  177|  11.1k|  return result;
  178|  11.1k|}
_ZN18FuzzedDataProvider14CopyAndAdvanceEPvm:
  338|  3.63k|                                               size_t num_bytes) {
  339|  3.63k|  std::memcpy(destination, data_ptr_, num_bytes);
  340|  3.63k|  Advance(num_bytes);
  341|  3.63k|}
_ZN18FuzzedDataProvider7AdvanceEm:
  343|   263k|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  344|   263k|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (344:7): [True: 0, False: 263k]
  ------------------
  345|      0|    abort();
  346|       |
  347|   263k|  data_ptr_ += num_bytes;
  348|   263k|  remaining_bytes_ -= num_bytes;
  349|   263k|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  378|   260k|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  379|   260k|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  380|   260k|  static_assert(!std::numeric_limits<TU>::is_signed,
  381|   260k|                "Source type must be unsigned.");
  382|       |
  383|       |  if constexpr (std::numeric_limits<TS>::is_modulo)
  384|       |    return static_cast<TS>(value);
  385|       |
  386|       |  // Avoid using implementation-defined unsigned to signed conversions.
  387|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  388|   260k|  constexpr auto TS_max = static_cast<TU>(std::numeric_limits<TS>::max());
  389|   260k|  if (value <= TS_max) {
  ------------------
  |  Branch (389:7): [True: 212k, False: 48.0k]
  ------------------
  390|   212k|    return static_cast<TS>(value);
  391|   212k|  } else {
  392|  48.0k|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  393|  48.0k|    return TS_min + static_cast<TS>(value - TS_min);
  394|  48.0k|  }
  395|   260k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeImEET_S1_S1_:
  205|  3.72k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  3.72k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|  3.72k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  3.72k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 3.72k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  3.72k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  3.72k|  uint64_t result = 0;
  215|  3.72k|  size_t offset = 0;
  216|       |
  217|  3.84k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 3.84k, False: 0]
  |  Branch (217:43): [True: 3.72k, False: 125]
  ------------------
  218|  3.72k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 125, False: 3.59k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|    125|    --remaining_bytes_;
  226|    125|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|    125|    offset += CHAR_BIT;
  228|    125|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  3.72k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 3.72k, False: 0]
  ------------------
  232|  3.72k|    result = result % (range + 1);
  233|       |
  234|  3.72k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  3.72k|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEm:
  109|  3.72k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t num_bytes) {
  110|  3.72k|  num_bytes = std::min(num_bytes, remaining_bytes_);
  111|  3.72k|  return ConsumeBytes<T>(num_bytes, num_bytes);
  112|  3.72k|}
_ZN18FuzzedDataProvider12ConsumeBytesIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEEmm:
  352|  3.72k|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t size, size_t num_bytes) {
  353|  3.72k|  static_assert(sizeof(T) == sizeof(uint8_t), "Incompatible data type.");
  354|       |
  355|       |  // The point of using the size-based constructor below is to increase the
  356|       |  // odds of having a vector object with capacity being equal to the length.
  357|       |  // That part is always implementation specific, but at least both libc++ and
  358|       |  // libstdc++ allocate the requested number of bytes in that constructor,
  359|       |  // which seems to be a natural choice for other implementations as well.
  360|       |  // To increase the odds even more, we also call |shrink_to_fit| below.
  361|  3.72k|  std::vector<T> result(size);
  362|  3.72k|  if (size == 0) {
  ------------------
  |  Branch (362:7): [True: 87, False: 3.63k]
  ------------------
  363|     87|    if (num_bytes != 0)
  ------------------
  |  Branch (363:9): [True: 0, False: 87]
  ------------------
  364|      0|      abort();
  365|     87|    return result;
  366|     87|  }
  367|       |
  368|  3.63k|  CopyAndAdvance(result.data(), num_bytes);
  369|       |
  370|       |  // Even though |shrink_to_fit| is also implementation specific, we expect it
  371|       |  // to provide an additional assurance in case vector's constructor allocated
  372|       |  // a buffer which is larger than the actual amount of data we put inside it.
  373|  3.63k|  result.shrink_to_fit();
  374|  3.63k|  return result;
  375|  3.72k|}

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

_Z19message_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
   27|  3.72k|{
   28|  3.72k|    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
   29|  3.72k|    const std::string random_message = fuzzed_data_provider.ConsumeRandomLengthString(1024);
   30|  3.72k|    {
   31|  3.72k|        CKey private_key = ConsumePrivateKey(fuzzed_data_provider);
   32|  3.72k|        std::string signature;
   33|  3.72k|        const bool message_signed = MessageSign(private_key, random_message, signature);
   34|  3.72k|        if (private_key.IsValid()) {
  ------------------
  |  Branch (34:13): [True: 3.45k, False: 264]
  ------------------
   35|  3.45k|            assert(message_signed);
  ------------------
  |  Branch (35:13): [True: 3.45k, False: 0]
  ------------------
   36|  3.45k|            const MessageVerificationResult verification_result = MessageVerify(EncodeDestination(PKHash(private_key.GetPubKey().GetID())), signature, random_message);
   37|  3.45k|            assert(verification_result == MessageVerificationResult::OK);
  ------------------
  |  Branch (37:13): [True: 3.45k, False: 0]
  ------------------
   38|  3.45k|        }
   39|  3.72k|    }
   40|  3.72k|    {
   41|  3.72k|        (void)MessageHash(random_message);
   42|  3.72k|        auto address = fuzzed_data_provider.ConsumeRandomLengthString(1024);
   43|  3.72k|        auto signature = fuzzed_data_provider.ConsumeRandomLengthString(1024);
   44|  3.72k|        (void)MessageVerify(address, signature, random_message);
   45|  3.72k|        (void)SigningResultString(fuzzed_data_provider.PickValueInArray({SigningResult::OK, SigningResult::PRIVATE_KEY_NOT_AVAILABLE, SigningResult::SIGNING_FAILED}));
   46|  3.72k|    }
   47|  3.72k|}

_Z17ConsumePrivateKeyR18FuzzedDataProviderNSt3__18optionalIbEE:
  231|  3.72k|{
  232|  3.72k|    auto key_data = fuzzed_data_provider.ConsumeBytes<uint8_t>(32);
  233|  3.72k|    key_data.resize(32);
  234|  3.72k|    CKey key;
  235|  3.72k|    bool compressed_value = compressed ? *compressed : fuzzed_data_provider.ConsumeBool();
  ------------------
  |  Branch (235:29): [True: 0, False: 3.72k]
  ------------------
  236|  3.72k|    key.Set(key_data.begin(), key_data.end(), compressed_value);
  237|  3.72k|    return key;
  238|  3.72k|}

_ZN12CheckGlobalsC2Ev:
   59|  3.72k|CheckGlobals::CheckGlobals() : m_impl(std::make_unique<CheckGlobalsImpl>()) {}
_ZN12CheckGlobalsD2Ev:
   60|  3.72k|CheckGlobals::~CheckGlobals() = default;
_ZN16CheckGlobalsImplC2Ev:
   17|  3.72k|    {
   18|  3.72k|        g_used_g_prng = false;
   19|  3.72k|        g_seeded_g_prng_zero = false;
   20|  3.72k|        g_used_system_time = false;
   21|  3.72k|        SetMockTime(0s);
   22|  3.72k|        MockableSteadyClock::ClearMockTime();
   23|  3.72k|    }
_ZN16CheckGlobalsImplD2Ev:
   25|  3.72k|    {
   26|  3.72k|        if (g_used_g_prng && !g_seeded_g_prng_zero) {
  ------------------
  |  Branch (26:13): [True: 2, False: 3.72k]
  |  Branch (26:30): [True: 0, False: 2]
  ------------------
   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|  3.72k|        if (g_used_system_time) {
  ------------------
  |  Branch (42:13): [True: 0, False: 3.72k]
  ------------------
   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|  3.72k|    }

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

_ZN10tinyformat6formatIJmNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     11|{
 1089|     11|    std::ostringstream oss;
 1090|     11|    format(oss, fmt, args...);
 1091|     11|    return oss.str();
 1092|     11|}
_ZN10tinyformat6formatIJmNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     11|{
 1081|     11|    vformat(out, fmt, makeFormatList(args...));
 1082|     11|}
_ZN10tinyformat14makeFormatListIJmNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     11|{
 1045|     11|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     11|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJmNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEDpRKT_:
  990|     11|            : FormatList(&m_formatterStore[0], N),
  991|     11|            m_formatterStore { FormatArg(args)... }
  992|     11|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6formatIJEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|     14|{
 1089|     14|    std::ostringstream oss;
 1090|     14|    format(oss, fmt, args...);
 1091|     14|    return oss.str();
 1092|     14|}
_ZN10tinyformat6formatIJEEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|     14|{
 1081|     14|    vformat(out, fmt, makeFormatList(args...));
 1082|     14|}
_ZN10tinyformat14makeFormatListIJEEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|     14|{
 1045|     14|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|     14|}
_ZN10tinyformat17FormatStringCheckILj0EEcvPKcEv:
  197|     14|    operator const char*() { return fmt; }
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEES7_NS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1088|      4|{
 1089|      4|    std::ostringstream oss;
 1090|      4|    format(oss, fmt, args...);
 1091|      4|    return oss.str();
 1092|      4|}
_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEEvRNS1_13basic_ostreamIcS4_EENS_17FormatStringCheckIXsZT_EEEDpRKT_:
 1080|      4|{
 1081|      4|    vformat(out, fmt, makeFormatList(args...));
 1082|      4|}
_ZN10tinyformat14makeFormatListIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEENS_6detail11FormatListNIXsZT_EEEDpRKT_:
 1044|      4|{
 1045|      4|    return detail::FormatListN<sizeof...(args)>(args...);
 1046|      4|}
_ZN10tinyformat17FormatStringCheckILj2EEcvPKcEv:
  197|     15|    operator const char*() { return fmt; }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSE_iPKv:
  558|      8|        {
  559|      8|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|      8|        }
_ZN10tinyformat11formatValueINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSC_iRKT_:
  351|      8|{
  352|      8|#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|      8|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|      8|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|      8|#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|      8|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|      8|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|      8|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 8]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|      8|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 8]
  |  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|      8|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 8]
  ------------------
  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|      8|    else
  378|      8|        out << value;
  379|      8|}
_ZN10tinyformat6detail9FormatArgC2INSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEERKT_:
  534|     11|            : m_value(static_cast<const void*>(&value)),
  535|     11|            m_formatImpl(&formatImpl<T>),
  536|     11|            m_toIntImpl(&toIntImpl<T>)
  537|     11|        { }
_ZN10tinyformat6detail9FormatArg10formatImplINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEvRNS3_13basic_ostreamIcS6_EEPKcSC_iPKv:
  558|     11|        {
  559|     11|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     11|        }
_ZN10tinyformat11formatValueINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEvRNS1_13basic_ostreamIcS4_EEPKcSA_iRKT_:
  351|     11|{
  352|     11|#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|     11|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|     11|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|     11|#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|     11|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|     11|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|     11|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [Folded, False: 11]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|     11|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 11]
  |  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|     11|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 11]
  ------------------
  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|     11|    else
  378|     11|        out << value;
  379|     11|}
_ZNK10tinyformat6detail9FormatArg6formatERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEPKcS9_i:
  541|     30|        {
  542|     30|            TINYFORMAT_ASSERT(m_value);
  ------------------
  |  |  153|     30|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (542:13): [True: 30, False: 0]
  ------------------
  543|     30|            TINYFORMAT_ASSERT(m_formatImpl);
  ------------------
  |  |  153|     30|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (543:13): [True: 30, False: 0]
  ------------------
  544|     30|            m_formatImpl(out, fmtBegin, fmtEnd, ntrunc, m_value);
  545|     30|        }
_ZN10tinyformat10FormatListC2EPNS_6detail9FormatArgEi:
  966|     29|            : m_args(args), m_N(N) { }
_ZN10tinyformat6detail21parseWidthOrPrecisionERiRPKcbPKNS0_9FormatArgES1_i:
  593|     30|{
  594|     30|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (594:9): [True: 30, False: 0]
  |  Branch (594:22): [True: 0, False: 30]
  ------------------
  595|      0|        n = parseIntAndAdvance(c);
  596|      0|    }
  597|     30|    else if (*c == '*') {
  ------------------
  |  Branch (597:14): [True: 0, False: 30]
  ------------------
  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|     30|    else {
  618|     30|        return false;
  619|     30|    }
  620|      0|    return true;
  621|     30|}
_ZN10tinyformat6detail24printFormatStringLiteralERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKc:
  629|     59|{
  630|     59|    const char* c = fmt;
  631|  1.45k|    for (;; ++c) {
  632|  1.45k|        if (*c == '\0') {
  ------------------
  |  Branch (632:13): [True: 29, False: 1.43k]
  ------------------
  633|     29|            out.write(fmt, c - fmt);
  634|     29|            return c;
  635|     29|        }
  636|  1.43k|        else if (*c == '%') {
  ------------------
  |  Branch (636:18): [True: 30, False: 1.40k]
  ------------------
  637|     30|            out.write(fmt, c - fmt);
  638|     30|            if (*(c+1) != '%')
  ------------------
  |  Branch (638:17): [True: 30, False: 0]
  ------------------
  639|     30|                return c;
  640|       |            // for "%%", tack trailing % onto next literal section.
  641|      0|            fmt = ++c;
  642|      0|        }
  643|  1.45k|    }
  644|     59|}
_ZN10tinyformat6detail21streamStateFromFormatERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERbS7_RiPKcPKNS0_9FormatArgES8_i:
  685|     30|{
  686|     30|    TINYFORMAT_ASSERT(*fmtStart == '%');
  ------------------
  |  |  153|     30|#   define TINYFORMAT_ASSERT(cond) assert(cond)
  ------------------
  |  Branch (686:5): [True: 30, False: 0]
  ------------------
  687|       |    // Reset stream state to defaults.
  688|     30|    out.width(0);
  689|     30|    out.precision(6);
  690|     30|    out.fill(' ');
  691|       |    // Reset most flags; ignore irrelevant unitbuf & skipws.
  692|     30|    out.unsetf(std::ios::adjustfield | std::ios::basefield |
  693|     30|               std::ios::floatfield | std::ios::showbase | std::ios::boolalpha |
  694|     30|               std::ios::showpoint | std::ios::showpos | std::ios::uppercase);
  695|     30|    bool precisionSet = false;
  696|     30|    bool widthSet = false;
  697|     30|    int widthExtra = 0;
  698|     30|    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|     30|    if (*c >= '0' && *c <= '9') {
  ------------------
  |  Branch (702:9): [True: 30, False: 0]
  |  Branch (702:22): [True: 0, False: 30]
  ------------------
  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|     30|    else if (positionalMode) {
  ------------------
  |  Branch (731:14): [True: 0, False: 30]
  ------------------
  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|     30|    if (!widthSet) {
  ------------------
  |  Branch (735:9): [True: 30, False: 0]
  ------------------
  736|       |        // Parse flags
  737|     30|        for (;; ++c) {
  738|     30|            switch (*c) {
  739|      0|                case '#':
  ------------------
  |  Branch (739:17): [True: 0, False: 30]
  ------------------
  740|      0|                    out.setf(std::ios::showpoint | std::ios::showbase);
  741|      0|                    continue;
  742|      0|                case '0':
  ------------------
  |  Branch (742:17): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  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: 30]
  ------------------
  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: 30]
  ------------------
  761|      0|                    out.setf(std::ios::showpos);
  762|      0|                    spacePadPositive = false;
  763|      0|                    widthExtra = 1;
  764|      0|                    continue;
  765|     30|                default:
  ------------------
  |  Branch (765:17): [True: 30, False: 0]
  ------------------
  766|     30|                    break;
  767|     30|            }
  768|     30|            break;
  769|     30|        }
  770|       |        // Parse width
  771|     30|        int width = 0;
  772|     30|        widthSet = parseWidthOrPrecision(width, c, positionalMode,
  773|     30|                                         args, argIndex, numArgs);
  774|     30|        if (widthSet) {
  ------------------
  |  Branch (774:13): [True: 0, False: 30]
  ------------------
  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|     30|    }
  784|       |    // 3) Parse precision
  785|     30|    if (*c == '.') {
  ------------------
  |  Branch (785:9): [True: 0, False: 30]
  ------------------
  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|     30|    while (*c == 'l' || *c == 'h' || *c == 'L' ||
  ------------------
  |  Branch (797:12): [True: 0, False: 30]
  |  Branch (797:25): [True: 0, False: 30]
  |  Branch (797:38): [True: 0, False: 30]
  ------------------
  798|     30|           *c == 'j' || *c == 'z' || *c == 't') {
  ------------------
  |  Branch (798:12): [True: 0, False: 30]
  |  Branch (798:25): [True: 0, False: 30]
  |  Branch (798:38): [True: 0, False: 30]
  ------------------
  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|     30|    bool intConversion = false;
  805|     30|    switch (*c) {
  806|     11|        case 'u': case 'd': case 'i':
  ------------------
  |  Branch (806:9): [True: 0, False: 30]
  |  Branch (806:19): [True: 11, False: 19]
  |  Branch (806:29): [True: 0, False: 30]
  ------------------
  807|     11|            out.setf(std::ios::dec, std::ios::basefield);
  808|     11|            intConversion = true;
  809|     11|            break;
  810|      0|        case 'o':
  ------------------
  |  Branch (810:9): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  815|      0|            out.setf(std::ios::uppercase);
  816|      0|            [[fallthrough]];
  817|      0|        case 'x': case 'p':
  ------------------
  |  Branch (817:9): [True: 0, False: 30]
  |  Branch (817:19): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  822|      0|            out.setf(std::ios::uppercase);
  823|      0|            [[fallthrough]];
  824|      0|        case 'e':
  ------------------
  |  Branch (824:9): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  829|      0|            out.setf(std::ios::uppercase);
  830|      0|            [[fallthrough]];
  831|      0|        case 'f':
  ------------------
  |  Branch (831:9): [True: 0, False: 30]
  ------------------
  832|      0|            out.setf(std::ios::fixed, std::ios::floatfield);
  833|      0|            break;
  834|      0|        case 'A':
  ------------------
  |  Branch (834:9): [True: 0, False: 30]
  ------------------
  835|      0|            out.setf(std::ios::uppercase);
  836|      0|            [[fallthrough]];
  837|      0|        case 'a':
  ------------------
  |  Branch (837:9): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  847|      0|            out.setf(std::ios::uppercase);
  848|      0|            [[fallthrough]];
  849|      0|        case 'g':
  ------------------
  |  Branch (849:9): [True: 0, False: 30]
  ------------------
  850|      0|            out.setf(std::ios::dec, std::ios::basefield);
  851|       |            // As in boost::format, let stream decide float format.
  852|      0|            out.flags(out.flags() & ~std::ios::floatfield);
  853|      0|            break;
  854|      0|        case 'c':
  ------------------
  |  Branch (854:9): [True: 0, False: 30]
  ------------------
  855|       |            // Handled as special case inside formatValue()
  856|      0|            break;
  857|     19|        case 's':
  ------------------
  |  Branch (857:9): [True: 19, False: 11]
  ------------------
  858|     19|            if (precisionSet)
  ------------------
  |  Branch (858:17): [True: 0, False: 19]
  ------------------
  859|      0|                ntrunc = static_cast<int>(out.precision());
  860|       |            // Make %s print Booleans as "true" and "false"
  861|     19|            out.setf(std::ios::boolalpha);
  862|     19|            break;
  863|      0|        case 'n':
  ------------------
  |  Branch (863:9): [True: 0, False: 30]
  ------------------
  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: 30]
  ------------------
  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: 30]
  ------------------
  872|      0|            break;
  873|     30|    }
  874|     30|    if (intConversion && precisionSet && !widthSet) {
  ------------------
  |  Branch (874:9): [True: 11, False: 19]
  |  Branch (874:26): [True: 0, False: 11]
  |  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|     30|    return c+1;
  884|     30|}
_ZN10tinyformat6detail10formatImplERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcPKNS0_9FormatArgEi:
  891|     29|{
  892|       |    // Saved stream state
  893|     29|    std::streamsize origWidth = out.width();
  894|     29|    std::streamsize origPrecision = out.precision();
  895|     29|    std::ios::fmtflags origFlags = out.flags();
  896|     29|    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|     29|    bool positionalMode = false;
  901|     29|    int argIndex = 0;
  902|     59|    while (true) {
  ------------------
  |  Branch (902:12): [True: 59, Folded]
  ------------------
  903|     59|        fmt = printFormatStringLiteral(out, fmt);
  904|     59|        if (*fmt == '\0') {
  ------------------
  |  Branch (904:13): [True: 29, False: 30]
  ------------------
  905|     29|            if (!positionalMode && argIndex < numArgs) {
  ------------------
  |  Branch (905:17): [True: 29, False: 0]
  |  Branch (905:36): [True: 0, False: 29]
  ------------------
  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|     29|            break;
  909|     29|        }
  910|     30|        bool spacePadPositive = false;
  911|     30|        int ntrunc = -1;
  912|     30|        const char* fmtEnd = streamStateFromFormat(out, positionalMode, spacePadPositive, ntrunc, fmt,
  913|     30|                                                   args, argIndex, numArgs);
  914|       |        // NB: argIndex may be incremented by reading variable width/precision
  915|       |        // in `streamStateFromFormat`, so do the bounds check here.
  916|     30|        if (argIndex >= numArgs) {
  ------------------
  |  Branch (916:13): [True: 0, False: 30]
  ------------------
  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|     30|        const FormatArg& arg = args[argIndex];
  921|       |        // Format the arg into the stream.
  922|     30|        if (!spacePadPositive) {
  ------------------
  |  Branch (922:13): [True: 30, False: 0]
  ------------------
  923|     30|            arg.format(out, fmt, fmtEnd, ntrunc);
  924|     30|        }
  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|     30|        if (!positionalMode)
  ------------------
  |  Branch (941:13): [True: 30, False: 0]
  ------------------
  942|     30|            ++argIndex;
  943|     30|        fmt = fmtEnd;
  944|     30|    }
  945|       |
  946|       |    // Restore stream state
  947|     29|    out.width(origWidth);
  948|     29|    out.precision(origPrecision);
  949|     29|    out.flags(origFlags);
  950|     29|    out.fill(origFill);
  951|     29|}
_ZN10tinyformat7vformatERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEPKcRKNS_10FormatListE:
 1070|     29|{
 1071|     29|    detail::formatImpl(out, fmt, list.m_args, list.m_N);
 1072|     29|}
_ZN10tinyformat6detail11FormatListNILi2EEC2IJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEDpRKT_:
  990|      4|            : FormatList(&m_formatterStore[0], N),
  991|      4|            m_formatterStore { FormatArg(args)... }
  992|      4|        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
_ZN10tinyformat6detail11FormatListNILi0EEC2Ev:
 1025|     14|    FormatListN() : FormatList(nullptr, 0) {}
_ZN10tinyformat6detail9FormatArg10formatImplImEEvRNSt3__113basic_ostreamIcNS3_11char_traitsIcEEEEPKcSA_iPKv:
  558|     11|        {
  559|     11|            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
  560|     11|        }
_ZN10tinyformat11formatValueImEEvRNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPKcS8_iRKT_:
  351|     11|{
  352|     11|#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|     11|    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
  356|     11|    (void) DummyType(); // avoid unused type warning with gcc-4.8
  357|     11|#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|     11|    const bool canConvertToChar = detail::is_convertible<T,char>::value;
  364|     11|    const bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
  365|     11|    if (canConvertToChar && *(fmtEnd-1) == 'c')
  ------------------
  |  Branch (365:9): [True: 11, Folded]
  |  Branch (365:29): [True: 0, False: 11]
  ------------------
  366|      0|        detail::formatValueAsType<T, char>::invoke(out, value);
  367|     11|    else if (canConvertToVoidPtr && *(fmtEnd-1) == 'p')
  ------------------
  |  Branch (367:14): [Folded, False: 11]
  |  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|     11|    else if (ntrunc >= 0) {
  ------------------
  |  Branch (372:14): [True: 0, False: 11]
  ------------------
  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|     11|    else
  378|     11|        out << value;
  379|     11|}
_ZN10tinyformat6detail9FormatArgC2INSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEERKT_:
  534|      8|            : m_value(static_cast<const void*>(&value)),
  535|      8|            m_formatImpl(&formatImpl<T>),
  536|      8|            m_toIntImpl(&toIntImpl<T>)
  537|      8|        { }
_ZN10tinyformat6detail9FormatArgC2ImEERKT_:
  534|     11|            : m_value(static_cast<const void*>(&value)),
  535|     11|            m_formatImpl(&formatImpl<T>),
  536|     11|            m_toIntImpl(&toIntImpl<T>)
  537|     11|        { }

_ZNK9base_blobILj160EE3endEv:
  105|  3.45k|    constexpr const unsigned char* end() const { return m_data.data() + WIDTH; }
_ZN9base_blobILj160EE5beginEv:
  101|  3.79k|    constexpr unsigned char* begin() { return m_data.data(); }
_ZNK9base_blobILj160EEeqERKS0_:
   62|  3.64k|    constexpr bool operator==(const base_blob&) const = default;
_ZNK9base_blobILj256EE5beginEv:
  104|  10.6k|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZNK9base_blobILj160EE5beginEv:
  104|  3.45k|    constexpr const unsigned char* begin() const { return m_data.data(); }
_ZN9base_blobILj256EE4dataEv:
   99|  14.2k|    constexpr unsigned char* data() { return m_data.data(); }
_ZN7uint160C2Ev:
  187|  14.2k|    constexpr uint160() = default;
_ZN9base_blobILj160EEC2Ev:
   37|  14.2k|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj160EE4dataEv:
   99|  7.10k|    constexpr unsigned char* data() { return m_data.data(); }
_ZN9base_blobILj160EE4sizeEv:
  107|  10.9k|    static constexpr unsigned int size() { return WIDTH; }
_ZN7uint256C2Ev:
  200|  18.5k|    constexpr uint256() = default;
_ZN9base_blobILj256EEC2Ev:
   37|  18.5k|    constexpr base_blob() : m_data() {}
_ZN9base_blobILj256EE5beginEv:
  101|  33.6k|    constexpr unsigned char* begin() { return m_data.data(); }
_ZN9base_blobILj256EE4sizeEv:
  107|  7.31k|    static constexpr unsigned int size() { return WIDTH; }

_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|  3.72k|{
   91|  3.72k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 3.72k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  3.72k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 3.72k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  3.72k|    }
   96|  3.72k|    return std::forward<T>(val);
   97|  3.72k|}
_Z22inline_assertion_checkILb1EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|  3.72k|{
   91|  3.72k|    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
  ------------------
  |  Branch (91:9): [True: 3.72k, Folded]
  |  Branch (91:22): [Folded, False: 0]
  |  Branch (91:54): [True: 0, Folded]
  ------------------
   92|  3.72k|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 3.72k]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|  3.72k|    }
   96|  3.72k|    return std::forward<T>(val);
   97|  3.72k|}
_Z22inline_assertion_checkILb0EbEOT0_S1_RKNSt3__115source_locationENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   90|     10|{
   91|     10|    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|     10|        if (!val) {
  ------------------
  |  Branch (92:13): [True: 0, False: 10]
  ------------------
   93|      0|            assertion_fail(loc, assertion);
   94|      0|        }
   95|     10|    }
   96|     10|    return std::forward<T>(val);
   97|     10|}

_ZN8BaseHashI7uint256E5beginEv:
   19|      1|    {
   20|      1|        return m_hash.begin();
   21|      1|    }
_ZNK8BaseHashI7uint160E5beginEv:
   24|  3.45k|    {
   25|  3.45k|        return m_hash.begin();
   26|  3.45k|    }
_ZNK8BaseHashI7uint160E3endEv:
   34|  3.45k|    {
   35|  3.45k|        return m_hash.end();
   36|  3.45k|    }
_ZN8BaseHashI7uint160EC2Ev:
   15|     11|    BaseHash() : m_hash() {}
_ZN8BaseHashI7uint160E5beginEv:
   19|      1|    {
   20|      1|        return m_hash.begin();
   21|      1|    }
_ZN8BaseHashI7uint256EC2Ev:
   15|     10|    BaseHash() : m_hash() {}
_ZNK8BaseHashI7uint160E4sizeEv:
   59|     11|    {
   60|     11|        return m_hash.size();
   61|     11|    }
_ZNK8BaseHashI7uint160EeqERKS1_:
   49|  3.64k|    {
   50|  3.64k|        return m_hash == other.m_hash;
   51|  3.64k|    }
_ZNK8BaseHashI7uint256E4sizeEv:
   59|     10|    {
   60|     10|        return m_hash.size();
   61|     10|    }
_ZN8BaseHashI7uint160EC2ERKS0_:
   16|  10.8k|    explicit BaseHash(const HashType& in) : m_hash(in) {}

_Z7CeilDivITkNSt3__117unsigned_integralEmTkNS0_17unsigned_integralEjEDaT_T0_:
   71|  3.45k|{
   72|  3.45k|    assert(divisor > 0);
  ------------------
  |  Branch (72:5): [True: 3.45k, False: 0]
  ------------------
   73|  3.45k|    return dividend / divisor + (dividend % divisor != 0);
   74|  3.45k|}

_Z12EncodeBase64NSt3__14spanIKhLm18446744073709551615EEE:
   98|  3.45k|{
   99|  3.45k|    static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  100|       |
  101|  3.45k|    std::string str;
  102|  3.45k|    str.reserve(CeilDiv(input.size(), 3u) * 4);
  103|  3.45k|    ConvertBits<8, 6, true>([&](int v) { str += pbase64[v]; }, input.begin(), input.end());
  104|  6.91k|    while (str.size() % 4) str += '=';
  ------------------
  |  Branch (104:12): [True: 3.45k, False: 3.45k]
  ------------------
  105|  3.45k|    return str;
  106|  3.45k|}
_Z12DecodeBase64NSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
  109|  3.79k|{
  110|  3.79k|    static const int8_t decode64_table[256]{
  111|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  112|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  113|  3.79k|        -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1,
  114|  3.79k|        -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
  115|  3.79k|        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28,
  116|  3.79k|        29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  117|  3.79k|        49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  118|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  119|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  120|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  121|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  122|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  123|  3.79k|        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
  124|  3.79k|    };
  125|       |
  126|  3.79k|    if (str.size() % 4 != 0) return {};
  ------------------
  |  Branch (126:9): [True: 2, False: 3.79k]
  ------------------
  127|       |    /* One or two = characters at the end are permitted. */
  128|  3.79k|    if (str.size() >= 1 && str.back() == '=') str.remove_suffix(1);
  ------------------
  |  Branch (128:9): [True: 3.78k, False: 7]
  |  Branch (128:28): [True: 3.76k, False: 20]
  ------------------
  129|  3.79k|    if (str.size() >= 1 && str.back() == '=') str.remove_suffix(1);
  ------------------
  |  Branch (129:9): [True: 3.78k, False: 7]
  |  Branch (129:28): [True: 2, False: 3.78k]
  ------------------
  130|       |
  131|  3.79k|    std::vector<unsigned char> ret;
  132|  3.79k|    ret.reserve((str.size() * 3) / 4);
  133|  3.79k|    bool valid = ConvertBits<6, 8, false>(
  134|  3.79k|        [&](unsigned char c) { ret.push_back(c); },
  135|  3.79k|        str.begin(), str.end(),
  136|  3.79k|        [](char c) { return decode64_table[uint8_t(c)]; }
  137|  3.79k|    );
  138|  3.79k|    if (!valid) return {};
  ------------------
  |  Branch (138:9): [True: 22, False: 3.76k]
  ------------------
  139|       |
  140|  3.76k|    return ret;
  141|  3.79k|}
_Z7ToLowerNSt3__117basic_string_viewIcNS_11char_traitsIcEEEE:
  363|  7.18k|{
  364|  7.18k|    std::string r;
  365|  7.18k|    r.reserve(str.size());
  366|  17.9k|    for (auto ch : str) r += ToLower(ch);
  ------------------
  |  Branch (366:18): [True: 17.9k, False: 7.18k]
  ------------------
  367|  7.18k|    return r;
  368|  7.18k|}
strencodings.cpp:_ZZ12EncodeBase64NSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEi:
  103|   300k|    ConvertBits<8, 6, true>([&](int v) { str += pbase64[v]; }, input.begin(), input.end());
strencodings.cpp:_ZZ12DecodeBase64NSt3__117basic_string_viewIcNS_11char_traitsIcEEEEENK3$_1clEc:
  136|   328k|        [](char c) { return decode64_table[uint8_t(c)]; }
strencodings.cpp:_ZZ12DecodeBase64NSt3__117basic_string_viewIcNS_11char_traitsIcEEEEENK3$_0clEh:
  134|   245k|        [&](unsigned char c) { ret.push_back(c); },

key_io.cpp:_Z11ConvertBitsILi5ELi8ELb0EZN12_GLOBAL__N_117DecodeDestinationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERK12CChainParamsRS7_PNS1_6vectorIiNS5_IiEEEEE3$_0NS1_11__wrap_iterIPKhEENS1_8identityEEbT2_T3_SP_T4_:
  221|     29|{
  222|     29|    size_t acc = 0;
  223|     29|    size_t bits = 0;
  224|     29|    constexpr size_t maxv = (1 << tobits) - 1;
  225|     29|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  226|    962|    while (it != end) {
  ------------------
  |  Branch (226:12): [True: 933, False: 29]
  ------------------
  227|    933|        int v = infn(*it);
  228|    933|        if (v < 0) return false;
  ------------------
  |  Branch (228:13): [True: 0, False: 933]
  ------------------
  229|    933|        acc = ((acc << frombits) | v) & max_acc;
  230|    933|        bits += frombits;
  231|  1.50k|        while (bits >= tobits) {
  ------------------
  |  Branch (231:16): [True: 570, False: 933]
  ------------------
  232|    570|            bits -= tobits;
  233|    570|            outfn((acc >> bits) & maxv);
  234|    570|        }
  235|    933|        ++it;
  236|    933|    }
  237|     29|    if (pad) {
  ------------------
  |  Branch (237:9): [Folded, False: 29]
  ------------------
  238|      0|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|     29|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (239:16): [True: 10, False: 19]
  |  Branch (239:36): [True: 4, False: 15]
  ------------------
  240|     14|        return false;
  241|     14|    }
  242|     15|    return true;
  243|     29|}
_Z7IsSpacec:
  166|   147k|constexpr inline bool IsSpace(char c) noexcept {
  167|   147k|    return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v';
  ------------------
  |  Branch (167:12): [True: 406, False: 146k]
  |  Branch (167:24): [True: 508, False: 146k]
  |  Branch (167:37): [True: 470, False: 145k]
  |  Branch (167:50): [True: 414, False: 145k]
  |  Branch (167:63): [True: 410, False: 144k]
  |  Branch (167:76): [True: 560, False: 144k]
  ------------------
  168|   147k|}
_Z7ToLowerc:
  256|  17.9k|{
  257|  17.9k|    return (c >= 'A' && c <= 'Z' ? (c - 'A') + 'a' : c);
  ------------------
  |  Branch (257:13): [True: 15.4k, False: 2.49k]
  |  Branch (257:25): [True: 3.44k, False: 12.0k]
  ------------------
  258|  17.9k|}
strencodings.cpp:_Z11ConvertBitsILi8ELi6ELb1EZ12EncodeBase64NSt3__14spanIKhLm18446744073709551615EEEE3$_0NS0_11__wrap_iterIPS2_EENS0_8identityEEbT2_T3_SA_T4_:
  221|  3.45k|{
  222|  3.45k|    size_t acc = 0;
  223|  3.45k|    size_t bits = 0;
  224|  3.45k|    constexpr size_t maxv = (1 << tobits) - 1;
  225|  3.45k|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  226|   228k|    while (it != end) {
  ------------------
  |  Branch (226:12): [True: 224k, False: 3.45k]
  ------------------
  227|   224k|        int v = infn(*it);
  228|   224k|        if (v < 0) return false;
  ------------------
  |  Branch (228:13): [True: 0, False: 224k]
  ------------------
  229|   224k|        acc = ((acc << frombits) | v) & max_acc;
  230|   224k|        bits += frombits;
  231|   522k|        while (bits >= tobits) {
  ------------------
  |  Branch (231:16): [True: 297k, False: 224k]
  ------------------
  232|   297k|            bits -= tobits;
  233|   297k|            outfn((acc >> bits) & maxv);
  234|   297k|        }
  235|   224k|        ++it;
  236|   224k|    }
  237|  3.45k|    if (pad) {
  ------------------
  |  Branch (237:9): [True: 3.45k, Folded]
  ------------------
  238|  3.45k|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (238:13): [True: 3.45k, False: 0]
  ------------------
  239|  3.45k|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (239:16): [True: 0, False: 0]
  |  Branch (239:36): [True: 0, False: 0]
  ------------------
  240|      0|        return false;
  241|      0|    }
  242|  3.45k|    return true;
  243|  3.45k|}
strencodings.cpp:_Z11ConvertBitsILi6ELi8ELb0EZ12DecodeBase64NSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEE3$_0PKcZ12DecodeBase64S4_E3$_1EbT2_T3_SA_T4_:
  221|  3.79k|{
  222|  3.79k|    size_t acc = 0;
  223|  3.79k|    size_t bits = 0;
  224|  3.79k|    constexpr size_t maxv = (1 << tobits) - 1;
  225|  3.79k|    constexpr size_t max_acc = (1 << (frombits + tobits - 1)) - 1;
  226|   331k|    while (it != end) {
  ------------------
  |  Branch (226:12): [True: 328k, False: 3.77k]
  ------------------
  227|   328k|        int v = infn(*it);
  228|   328k|        if (v < 0) return false;
  ------------------
  |  Branch (228:13): [True: 18, False: 328k]
  ------------------
  229|   328k|        acc = ((acc << frombits) | v) & max_acc;
  230|   328k|        bits += frombits;
  231|   573k|        while (bits >= tobits) {
  ------------------
  |  Branch (231:16): [True: 245k, False: 328k]
  ------------------
  232|   245k|            bits -= tobits;
  233|   245k|            outfn((acc >> bits) & maxv);
  234|   245k|        }
  235|   328k|        ++it;
  236|   328k|    }
  237|  3.77k|    if (pad) {
  ------------------
  |  Branch (237:9): [Folded, False: 3.77k]
  ------------------
  238|      0|        if (bits) outfn((acc << (tobits - bits)) & maxv);
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|  3.77k|    } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) {
  ------------------
  |  Branch (239:16): [True: 0, False: 3.77k]
  |  Branch (239:36): [True: 4, False: 3.76k]
  ------------------
  240|      4|        return false;
  241|      4|    }
  242|  3.76k|    return true;
  243|  3.77k|}

_ZN4util11ContainsNULENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  238|  9.73k|{
  239|   154k|    for (auto c : str) {
  ------------------
  |  Branch (239:17): [True: 154k, False: 9.58k]
  ------------------
  240|   154k|        if (c == 0) return true;
  ------------------
  |  Branch (240:13): [True: 150, False: 154k]
  ------------------
  241|   154k|    }
  242|  9.58k|    return false;
  243|  9.73k|}

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

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

