_ZN4CoinC2Ev:
   55|  1.35k|    Coin() : fCoinBase(false), nHeight(0) { }
_ZNK4Coin7IsSpentEv:
   81|    854|    bool IsSpent() const {
   82|    854|        return out.IsNull();
   83|    854|    }
_ZN4Coin11UnserializeI10DataStreamEEvRT_:
   70|  1.35k|    void Unserialize(Stream &s) {
   71|  1.35k|        uint32_t code = 0;
   72|  1.35k|        ::Unserialize(s, VARINT(code));
  ------------------
  |  |  500|  1.35k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   73|  1.35k|        nHeight = code >> 1;
   74|  1.35k|        fCoinBase = code & 1;
   75|  1.35k|        ::Unserialize(s, Using<TxOutCompression>(out));
   76|  1.35k|    }
_ZNK4Coin9SerializeI10DataStreamEEvRT_:
   62|    854|    void Serialize(Stream &s) const {
   63|    854|        assert(!IsSpent());
   64|    854|        uint32_t code = nHeight * uint32_t{2} + fCoinBase;
   65|    854|        ::Serialize(s, VARINT(code));
  ------------------
  |  |  500|    854|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   66|    854|        ::Serialize(s, Using<TxOutCompression>(out));
   67|    854|    }

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

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

_Z14CompressScriptRK7CScriptR9prevectorILj33EhjiE:
   56|    854|{
   57|    854|    CKeyID keyID;
   58|    854|    if (IsToKeyID(script, keyID)) {
  ------------------
  |  Branch (58:9): [True: 5, False: 849]
  ------------------
   59|      5|        out.resize(21);
   60|      5|        out[0] = 0x00;
   61|      5|        memcpy(&out[1], &keyID, 20);
   62|      5|        return true;
   63|      5|    }
   64|    849|    CScriptID scriptID;
   65|    849|    if (IsToScriptID(script, scriptID)) {
  ------------------
  |  Branch (65:9): [True: 1, False: 848]
  ------------------
   66|      1|        out.resize(21);
   67|      1|        out[0] = 0x01;
   68|      1|        memcpy(&out[1], &scriptID, 20);
   69|      1|        return true;
   70|      1|    }
   71|    848|    CPubKey pubkey;
   72|    848|    if (IsToPubKey(script, pubkey)) {
  ------------------
  |  Branch (72:9): [True: 188, False: 660]
  ------------------
   73|    188|        out.resize(33);
   74|    188|        memcpy(&out[1], &pubkey[1], 32);
   75|    188|        if (pubkey[0] == 0x02 || pubkey[0] == 0x03) {
  ------------------
  |  Branch (75:13): [True: 1, False: 187]
  |  Branch (75:34): [True: 6, False: 181]
  ------------------
   76|      7|            out[0] = pubkey[0];
   77|      7|            return true;
   78|    181|        } else if (pubkey[0] == 0x04) {
  ------------------
  |  Branch (78:20): [True: 181, False: 0]
  ------------------
   79|    181|            out[0] = 0x04 | (pubkey[64] & 0x01);
   80|    181|            return true;
   81|    181|        }
   82|    188|    }
   83|    660|    return false;
   84|    848|}
_Z20GetSpecialScriptSizej:
   87|    307|{
   88|    307|    if (nSize == 0 || nSize == 1)
  ------------------
  |  Branch (88:9): [True: 6, False: 301]
  |  Branch (88:23): [True: 2, False: 299]
  ------------------
   89|      8|        return 20;
   90|    299|    if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
  ------------------
  |  Branch (90:9): [True: 2, False: 297]
  |  Branch (90:23): [True: 7, False: 290]
  |  Branch (90:37): [True: 171, False: 119]
  |  Branch (90:51): [True: 119, False: 0]
  ------------------
   91|    299|        return 32;
   92|      0|    return 0;
   93|    299|}
_Z16DecompressScriptR7CScriptjRK9prevectorILj33EhjiE:
   96|    301|{
   97|    301|    switch(nSize) {
  ------------------
  |  Branch (97:12): [True: 0, False: 301]
  ------------------
   98|      5|    case 0x00:
  ------------------
  |  Branch (98:5): [True: 5, False: 296]
  ------------------
   99|      5|        script.resize(25);
  100|      5|        script[0] = OP_DUP;
  101|      5|        script[1] = OP_HASH160;
  102|      5|        script[2] = 20;
  103|      5|        memcpy(&script[3], in.data(), 20);
  104|      5|        script[23] = OP_EQUALVERIFY;
  105|      5|        script[24] = OP_CHECKSIG;
  106|      5|        return true;
  107|      1|    case 0x01:
  ------------------
  |  Branch (107:5): [True: 1, False: 300]
  ------------------
  108|      1|        script.resize(23);
  109|      1|        script[0] = OP_HASH160;
  110|      1|        script[1] = 20;
  111|      1|        memcpy(&script[2], in.data(), 20);
  112|      1|        script[22] = OP_EQUAL;
  113|      1|        return true;
  114|      1|    case 0x02:
  ------------------
  |  Branch (114:5): [True: 1, False: 300]
  ------------------
  115|      7|    case 0x03:
  ------------------
  |  Branch (115:5): [True: 6, False: 295]
  ------------------
  116|      7|        script.resize(35);
  117|      7|        script[0] = 33;
  118|      7|        script[1] = nSize;
  119|      7|        memcpy(&script[2], in.data(), 32);
  120|      7|        script[34] = OP_CHECKSIG;
  121|      7|        return true;
  122|    170|    case 0x04:
  ------------------
  |  Branch (122:5): [True: 170, False: 131]
  ------------------
  123|    288|    case 0x05:
  ------------------
  |  Branch (123:5): [True: 118, False: 183]
  ------------------
  124|    288|        unsigned char vch[33] = {};
  125|    288|        vch[0] = nSize - 2;
  126|    288|        memcpy(&vch[1], in.data(), 32);
  127|    288|        CPubKey pubkey{vch};
  128|    288|        if (!pubkey.Decompress())
  ------------------
  |  Branch (128:13): [True: 107, False: 181]
  ------------------
  129|    107|            return false;
  130|    181|        assert(pubkey.size() == 65);
  131|    181|        script.resize(67);
  132|    181|        script[0] = 65;
  133|    181|        memcpy(&script[1], pubkey.begin(), 65);
  134|    181|        script[66] = OP_CHECKSIG;
  135|    181|        return true;
  136|    301|    }
  137|      0|    return false;
  138|    301|}
_Z14CompressAmountm:
  150|    854|{
  151|    854|    if (n == 0)
  ------------------
  |  Branch (151:9): [True: 38, False: 816]
  ------------------
  152|     38|        return 0;
  153|    816|    int e = 0;
  154|  3.54k|    while (((n % 10) == 0) && e < 9) {
  ------------------
  |  Branch (154:12): [True: 2.73k, False: 813]
  |  Branch (154:31): [True: 2.73k, False: 3]
  ------------------
  155|  2.73k|        n /= 10;
  156|  2.73k|        e++;
  157|  2.73k|    }
  158|    816|    if (e < 9) {
  ------------------
  |  Branch (158:9): [True: 761, False: 55]
  ------------------
  159|    761|        int d = (n % 10);
  160|    761|        assert(d >= 1 && d <= 9);
  161|    761|        n /= 10;
  162|    761|        return 1 + (n*9 + d - 1)*10 + e;
  163|    761|    } else {
  164|     55|        return 1 + (n - 1)*10 + 9;
  165|     55|    }
  166|    816|}
_Z16DecompressAmountm:
  169|  1.13k|{
  170|       |    // x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
  171|  1.13k|    if (x == 0)
  ------------------
  |  Branch (171:9): [True: 48, False: 1.08k]
  ------------------
  172|     48|        return 0;
  173|  1.08k|    x--;
  174|       |    // x = 10*(9*n + d - 1) + e
  175|  1.08k|    int e = x % 10;
  176|  1.08k|    x /= 10;
  177|  1.08k|    uint64_t n = 0;
  178|  1.08k|    if (e < 9) {
  ------------------
  |  Branch (178:9): [True: 964, False: 120]
  ------------------
  179|       |        // x = 9*n + d - 1
  180|    964|        int d = (x % 9) + 1;
  181|    964|        x /= 9;
  182|       |        // x = n
  183|    964|        n = x*10 + d;
  184|    964|    } else {
  185|    120|        n = x+1;
  186|    120|    }
  187|  5.54k|    while (e) {
  ------------------
  |  Branch (187:12): [True: 4.45k, False: 1.08k]
  ------------------
  188|  4.45k|        n *= 10;
  189|  4.45k|        e--;
  190|  4.45k|    }
  191|  1.08k|    return n;
  192|  1.13k|}
compressor.cpp:_ZL9IsToKeyIDRK7CScriptR6CKeyID:
   20|    854|{
   21|    854|    if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160
  ------------------
  |  Branch (21:9): [True: 47, False: 807]
  |  Branch (21:32): [True: 38, False: 9]
  |  Branch (21:55): [True: 26, False: 12]
  ------------------
   22|    854|                            && script[2] == 20 && script[23] == OP_EQUALVERIFY
  ------------------
  |  Branch (22:32): [True: 18, False: 8]
  |  Branch (22:51): [True: 15, False: 3]
  ------------------
   23|    854|                            && script[24] == OP_CHECKSIG) {
  ------------------
  |  Branch (23:32): [True: 5, False: 10]
  ------------------
   24|      5|        memcpy(&hash, &script[3], 20);
   25|      5|        return true;
   26|      5|    }
   27|    849|    return false;
   28|    854|}
compressor.cpp:_ZL12IsToScriptIDRK7CScriptR9CScriptID:
   31|    849|{
   32|    849|    if (script.size() == 23 && script[0] == OP_HASH160 && script[1] == 20
  ------------------
  |  Branch (32:9): [True: 31, False: 818]
  |  Branch (32:32): [True: 20, False: 11]
  |  Branch (32:59): [True: 11, False: 9]
  ------------------
   33|    849|                            && script[22] == OP_EQUAL) {
  ------------------
  |  Branch (33:32): [True: 1, False: 10]
  ------------------
   34|      1|        memcpy(&hash, &script[2], 20);
   35|      1|        return true;
   36|      1|    }
   37|    848|    return false;
   38|    849|}
compressor.cpp:_ZL10IsToPubKeyRK7CScriptR7CPubKey:
   41|    848|{
   42|    848|    if (script.size() == 35 && script[0] == 33 && script[34] == OP_CHECKSIG
  ------------------
  |  Branch (42:9): [True: 36, False: 812]
  |  Branch (42:32): [True: 27, False: 9]
  |  Branch (42:51): [True: 17, False: 10]
  ------------------
   43|    848|                            && (script[1] == 0x02 || script[1] == 0x03)) {
  ------------------
  |  Branch (43:33): [True: 1, False: 16]
  |  Branch (43:54): [True: 6, False: 10]
  ------------------
   44|      7|        pubkey.Set(&script[1], &script[34]);
   45|      7|        return true;
   46|      7|    }
   47|    841|    if (script.size() == 67 && script[0] == 65 && script[66] == OP_CHECKSIG
  ------------------
  |  Branch (47:9): [True: 294, False: 547]
  |  Branch (47:32): [True: 286, False: 8]
  |  Branch (47:51): [True: 278, False: 8]
  ------------------
   48|    841|                            && script[1] == 0x04) {
  ------------------
  |  Branch (48:32): [True: 270, False: 8]
  ------------------
   49|    270|        pubkey.Set(&script[1], &script[66]);
   50|    270|        return pubkey.IsFullyValid(); // if not fully valid, a case that would not be compressible
   51|    270|    }
   52|    571|    return false;
   53|    841|}

_ZN16TxOutCompression16SerializationOpsI10DataStream6CTxOut17ActionUnserializeEEvRT0_RT_T1_:
  115|  1.27k|    FORMATTER_METHODS(CTxOut, obj) { READWRITE(Using<AmountCompression>(obj.nValue), Using<ScriptCompression>(obj.scriptPubKey)); }
  ------------------
  |  |  156|  1.27k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN17AmountCompression5UnserI10DataStreamlEEvRT_RT0_:
  105|  1.27k|    {
  106|  1.27k|        uint64_t v;
  107|  1.27k|        s >> VARINT(v);
  ------------------
  |  |  500|  1.27k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  108|  1.27k|        val = DecompressAmount(v);
  109|  1.27k|    }
_ZN17ScriptCompression5UnserI10DataStreamEEvRT_R7CScript:
   77|  1.13k|    void Unser(Stream &s, CScript& script) {
   78|  1.13k|        unsigned int nSize = 0;
   79|  1.13k|        s >> VARINT(nSize);
  ------------------
  |  |  500|  1.13k|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   80|  1.13k|        if (nSize < nSpecialScripts) {
  ------------------
  |  Branch (80:13): [True: 307, False: 825]
  ------------------
   81|    307|            CompressedScript vch(GetSpecialScriptSize(nSize), 0x00);
   82|    307|            s >> Span{vch};
   83|    307|            DecompressScript(script, nSize, vch);
   84|    307|            return;
   85|    307|        }
   86|    825|        nSize -= nSpecialScripts;
   87|    825|        if (nSize > MAX_SCRIPT_SIZE) {
  ------------------
  |  Branch (87:13): [True: 119, False: 706]
  ------------------
   88|       |            // Overly long script, replace with a short invalid one
   89|    119|            script << OP_RETURN;
   90|    119|            s.ignore(nSize);
   91|    706|        } else {
   92|    706|            script.resize(nSize);
   93|    706|            s >> Span{script};
   94|    706|        }
   95|    825|    }
_ZN16TxOutCompression16SerializationOpsI10DataStreamK6CTxOut15ActionSerializeEEvRT0_RT_T1_:
  115|    854|    FORMATTER_METHODS(CTxOut, obj) { READWRITE(Using<AmountCompression>(obj.nValue), Using<ScriptCompression>(obj.scriptPubKey)); }
  ------------------
  |  |  156|    854|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN17AmountCompression3SerI10DataStreamlEEvRT_T0_:
  101|    854|    {
  102|    854|        s << VARINT(CompressAmount(val));
  ------------------
  |  |  500|    854|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
  103|    854|    }
_ZN17ScriptCompression3SerI10DataStreamEEvRT_RK7CScript:
   65|    854|    void Ser(Stream &s, const CScript& script) {
   66|    854|        CompressedScript compr;
   67|    854|        if (CompressScript(script, compr)) {
  ------------------
  |  Branch (67:13): [True: 194, False: 660]
  ------------------
   68|    194|            s << Span{compr};
   69|    194|            return;
   70|    194|        }
   71|    660|        unsigned int nSize = script.size() + nSpecialScripts;
   72|    660|        s << VARINT(nSize);
  ------------------
  |  |  500|    660|#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
  ------------------
   73|    660|        s << Span{script};
   74|    660|    }

_ZN15ChaCha20AlignedD2Ev:
   43|      2|{
   44|      2|    memory_cleanse(input, sizeof(input));
   45|      2|}
_ZN8ChaCha20D2Ev:
  333|      2|{
  334|      2|    memory_cleanse(m_buffer.data(), m_buffer.size());
  335|      2|}

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

_ZN11ECC_ContextD2Ev:
  482|      2|{
  483|      2|    ECC_Stop();
  484|      2|}
key.cpp:_ZL8ECC_Stopv:
  467|      2|static void ECC_Stop() {
  468|      2|    secp256k1_context *ctx = secp256k1_context_sign;
  469|      2|    secp256k1_context_sign = nullptr;
  470|       |
  471|      2|    if (ctx) {
  ------------------
  |  Branch (471:9): [True: 2, False: 0]
  ------------------
  472|      2|        secp256k1_context_destroy(ctx);
  473|      2|    }
  474|      2|}

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

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

_ZN9prevectorILj28EhjiE3endEv:
  304|    119|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj28EhjiE8item_ptrEi:
  206|  2.09k|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (206:47): [True: 818, False: 1.27k]
  ------------------
_ZNK9prevectorILj28EhjiE9is_directEv:
  173|  17.8k|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj28EhjiE10direct_ptrEi:
  169|  1.26k|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj28EhjiE12indirect_ptrEi:
  171|  1.27k|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj28EhjiE6insertENS0_8iteratorERKh:
  359|    119|    iterator insert(iterator pos, const T& value) {
  360|    119|        size_type p = pos - begin();
  361|    119|        size_type new_size = size() + 1;
  362|    119|        if (capacity() < new_size) {
  ------------------
  |  Branch (362:13): [True: 0, False: 119]
  ------------------
  363|      0|            change_capacity(new_size + (new_size >> 1));
  364|      0|        }
  365|    119|        T* ptr = item_ptr(p);
  366|    119|        T* dst = ptr + 1;
  367|    119|        memmove(dst, ptr, (size() - p) * sizeof(T));
  368|    119|        _size++;
  369|    119|        new(static_cast<void*>(ptr)) T(value);
  370|    119|        return iterator(ptr);
  371|    119|    }
_ZN9prevectorILj28EhjiE5beginEv:
  302|    119|    iterator begin() { return iterator(item_ptr(0)); }
_ZmiN9prevectorILj28EhjiE8iteratorES1_:
   66|    119|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj28EhjiE8iteratordeEv:
   59|    238|        T& operator*() const { return *ptr; }
_ZNK9prevectorILj28EhjiE8capacityEv:
  312|    682|    size_t capacity() const {
  313|    682|        if (is_direct()) {
  ------------------
  |  Branch (313:13): [True: 682, False: 0]
  ------------------
  314|    682|            return N;
  315|    682|        } else {
  316|      0|            return _union.indirect_contents.capacity;
  317|      0|        }
  318|    682|    }
_ZN9prevectorILj28EhjiE15change_capacityEj:
  175|  1.80k|    void change_capacity(size_type new_capacity) {
  176|  1.80k|        if (new_capacity <= N) {
  ------------------
  |  Branch (176:13): [True: 1.35k, False: 448]
  ------------------
  177|  1.35k|            if (!is_direct()) {
  ------------------
  |  Branch (177:17): [True: 0, False: 1.35k]
  ------------------
  178|      0|                T* indirect = indirect_ptr(0);
  179|      0|                T* src = indirect;
  180|      0|                T* dst = direct_ptr(0);
  181|      0|                memcpy(dst, src, size() * sizeof(T));
  182|      0|                free(indirect);
  183|      0|                _size -= N + 1;
  184|      0|            }
  185|  1.35k|        } else {
  186|    448|            if (!is_direct()) {
  ------------------
  |  Branch (186:17): [True: 0, False: 448]
  ------------------
  187|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  188|       |                    success. These should instead use an allocator or new/delete so that handlers
  189|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  190|      0|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  191|      0|                assert(_union.indirect_contents.indirect);
  192|      0|                _union.indirect_contents.capacity = new_capacity;
  193|    448|            } else {
  194|    448|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  195|    448|                assert(new_indirect);
  196|    448|                T* src = direct_ptr(0);
  197|    448|                T* dst = reinterpret_cast<T*>(new_indirect);
  198|    448|                memcpy(dst, src, size() * sizeof(T));
  199|    448|                _union.indirect_contents.indirect = new_indirect;
  200|    448|                _union.indirect_contents.capacity = new_capacity;
  201|    448|                _size += N + 1;
  202|    448|            }
  203|    448|        }
  204|  1.80k|    }
_ZNK9prevectorILj28EhjiE8item_ptrEi:
  207|  2.38k|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (207:59): [True: 648, False: 1.73k]
  ------------------
_ZNK9prevectorILj28EhjiE10direct_ptrEi:
  170|    648|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj28EhjiE12indirect_ptrEi:
  172|  1.73k|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZNK9prevectorILj28EhjiE4sizeEv:
  294|  9.55k|    size_type size() const {
  295|  9.55k|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (295:16): [True: 7.21k, False: 2.34k]
  ------------------
  296|  9.55k|    }
_ZN9prevectorILj28EhjiE5clearEv:
  355|  1.35k|    void clear() {
  356|  1.35k|        resize(0);
  357|  1.35k|    }
_ZN9prevectorILj28EhjiE6resizeEj:
  328|  2.11k|    void resize(size_type new_size) {
  329|  2.11k|        size_type cur_size = size();
  330|  2.11k|        if (cur_size == new_size) {
  ------------------
  |  Branch (330:13): [True: 1.55k, False: 563]
  ------------------
  331|  1.55k|            return;
  332|  1.55k|        }
  333|    563|        if (cur_size > new_size) {
  ------------------
  |  Branch (333:13): [True: 0, False: 563]
  ------------------
  334|      0|            erase(item_ptr(new_size), end());
  335|      0|            return;
  336|      0|        }
  337|    563|        if (new_size > capacity()) {
  ------------------
  |  Branch (337:13): [True: 448, False: 115]
  ------------------
  338|    448|            change_capacity(new_size);
  339|    448|        }
  340|    563|        ptrdiff_t increase = new_size - cur_size;
  341|    563|        fill(item_ptr(cur_size), increase);
  342|    563|        _size += increase;
  343|    563|    }
_ZN9prevectorILj28EhjiE4fillEPhlRKh:
  209|    563|    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
  210|    563|        std::fill_n(dst, count, value);
  211|    563|    }
_ZN9prevectorILj28EhjiE13shrink_to_fitEv:
  351|  1.35k|    void shrink_to_fit() {
  352|  1.35k|        change_capacity(size());
  353|  1.35k|    }
_ZN9prevectorILj33EhjiE4dataEv:
  533|    501|    value_type* data() {
  534|    501|        return item_ptr(0);
  535|    501|    }
_ZN9prevectorILj33EhjiE8item_ptrEi:
  206|  1.39k|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (206:47): [True: 1.39k, False: 0]
  ------------------
_ZNK9prevectorILj33EhjiE9is_directEv:
  173|  4.04k|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj33EhjiE10direct_ptrEi:
  169|  1.39k|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZNK9prevectorILj33EhjiE4sizeEv:
  294|    695|    size_type size() const {
  295|    695|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (295:16): [True: 695, False: 0]
  ------------------
  296|    695|    }
_ZNK9prevectorILj28EhjiE4dataEv:
  537|    660|    const value_type* data() const {
  538|    660|        return item_ptr(0);
  539|    660|    }
_ZN9prevectorILj28EhjiE4dataEv:
  533|    572|    value_type* data() {
  534|    572|        return item_ptr(0);
  535|    572|    }
_ZNK9prevectorILj28EhjiEixEj:
  324|  1.72k|    const T& operator[](size_type pos) const {
  325|  1.72k|        return *item_ptr(pos);
  326|  1.72k|    }
_ZN9prevectorILj28EhjiED2Ev:
  474|  1.35k|    ~prevector() {
  475|  1.35k|        if (!is_direct()) {
  ------------------
  |  Branch (475:13): [True: 448, False: 904]
  ------------------
  476|    448|            free(_union.indirect_contents.indirect);
  477|    448|            _union.indirect_contents.indirect = nullptr;
  478|    448|        }
  479|  1.35k|    }
_ZN9prevectorILj28EhjiEC2Ev:
  243|  1.35k|    prevector() = default;
_ZN9prevectorILj28EhjiE8iteratorC2EPh:
   58|    357|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj28EhjiEixEj:
  320|    605|    T& operator[](size_type pos) {
  321|    605|        return *item_ptr(pos);
  322|    605|    }
_ZN9prevectorILj33EhjiEC2EjRKh:
  249|    307|    explicit prevector(size_type n, const T& val) {
  250|    307|        change_capacity(n);
  251|    307|        _size += n;
  252|    307|        fill(item_ptr(0), n, val);
  253|    307|    }
_ZN9prevectorILj33EhjiE15change_capacityEj:
  175|    307|    void change_capacity(size_type new_capacity) {
  176|    307|        if (new_capacity <= N) {
  ------------------
  |  Branch (176:13): [True: 307, False: 0]
  ------------------
  177|    307|            if (!is_direct()) {
  ------------------
  |  Branch (177:17): [True: 0, False: 307]
  ------------------
  178|      0|                T* indirect = indirect_ptr(0);
  179|      0|                T* src = indirect;
  180|      0|                T* dst = direct_ptr(0);
  181|      0|                memcpy(dst, src, size() * sizeof(T));
  182|      0|                free(indirect);
  183|      0|                _size -= N + 1;
  184|      0|            }
  185|    307|        } else {
  186|      0|            if (!is_direct()) {
  ------------------
  |  Branch (186:17): [True: 0, False: 0]
  ------------------
  187|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  188|       |                    success. These should instead use an allocator or new/delete so that handlers
  189|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  190|      0|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  191|      0|                assert(_union.indirect_contents.indirect);
  192|      0|                _union.indirect_contents.capacity = new_capacity;
  193|      0|            } else {
  194|      0|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  195|      0|                assert(new_indirect);
  196|      0|                T* src = direct_ptr(0);
  197|      0|                T* dst = reinterpret_cast<T*>(new_indirect);
  198|      0|                memcpy(dst, src, size() * sizeof(T));
  199|      0|                _union.indirect_contents.indirect = new_indirect;
  200|      0|                _union.indirect_contents.capacity = new_capacity;
  201|      0|                _size += N + 1;
  202|      0|            }
  203|      0|        }
  204|    307|    }
_ZN9prevectorILj33EhjiE4fillEPhlRKh:
  209|    501|    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
  210|    501|        std::fill_n(dst, count, value);
  211|    501|    }
_ZN9prevectorILj33EhjiED2Ev:
  474|  1.16k|    ~prevector() {
  475|  1.16k|        if (!is_direct()) {
  ------------------
  |  Branch (475:13): [True: 0, False: 1.16k]
  ------------------
  476|      0|            free(_union.indirect_contents.indirect);
  477|      0|            _union.indirect_contents.indirect = nullptr;
  478|      0|        }
  479|  1.16k|    }
_ZN9prevectorILj33EhjiEC2Ev:
  243|    854|    prevector() = default;
_ZN9prevectorILj33EhjiEixEj:
  320|    388|    T& operator[](size_type pos) {
  321|    388|        return *item_ptr(pos);
  322|    388|    }
_ZN9prevectorILj33EhjiE6resizeEj:
  328|    194|    void resize(size_type new_size) {
  329|    194|        size_type cur_size = size();
  330|    194|        if (cur_size == new_size) {
  ------------------
  |  Branch (330:13): [True: 0, False: 194]
  ------------------
  331|      0|            return;
  332|      0|        }
  333|    194|        if (cur_size > new_size) {
  ------------------
  |  Branch (333:13): [True: 0, False: 194]
  ------------------
  334|      0|            erase(item_ptr(new_size), end());
  335|      0|            return;
  336|      0|        }
  337|    194|        if (new_size > capacity()) {
  ------------------
  |  Branch (337:13): [True: 0, False: 194]
  ------------------
  338|      0|            change_capacity(new_size);
  339|      0|        }
  340|    194|        ptrdiff_t increase = new_size - cur_size;
  341|    194|        fill(item_ptr(cur_size), increase);
  342|    194|        _size += increase;
  343|    194|    }
_ZNK9prevectorILj33EhjiE8capacityEv:
  312|    194|    size_t capacity() const {
  313|    194|        if (is_direct()) {
  ------------------
  |  Branch (313:13): [True: 194, False: 0]
  ------------------
  314|    194|            return N;
  315|    194|        } else {
  316|      0|            return _union.indirect_contents.capacity;
  317|      0|        }
  318|    194|    }
_ZNK9prevectorILj33EhjiE4dataEv:
  537|    301|    const value_type* data() const {
  538|    301|        return item_ptr(0);
  539|    301|    }
_ZNK9prevectorILj33EhjiE8item_ptrEi:
  207|    301|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (207:59): [True: 301, False: 0]
  ------------------
_ZNK9prevectorILj33EhjiE10direct_ptrEi:
  170|    301|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }

_ZN6CTxOutC2Ev:
  156|  1.35k|    {
  157|  1.35k|        SetNull();
  158|  1.35k|    }
_ZN6CTxOut7SetNullEv:
  165|  1.35k|    {
  166|  1.35k|        nValue = -1;
  167|  1.35k|        scriptPubKey.clear();
  168|  1.35k|    }
_ZNK6CTxOut6IsNullEv:
  171|    854|    {
  172|    854|        return (nValue == -1);
  173|    854|    }

_ZNK7CPubKey12IsFullyValidEv:
  314|    270|bool CPubKey::IsFullyValid() const {
  315|    270|    if (!IsValid())
  ------------------
  |  Branch (315:9): [True: 0, False: 270]
  ------------------
  316|      0|        return false;
  317|    270|    secp256k1_pubkey pubkey;
  318|    270|    return secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size());
  319|    270|}
_ZN7CPubKey10DecompressEv:
  321|    288|bool CPubKey::Decompress() {
  322|    288|    if (!IsValid())
  ------------------
  |  Branch (322:9): [True: 0, False: 288]
  ------------------
  323|      0|        return false;
  324|    288|    secp256k1_pubkey pubkey;
  325|    288|    if (!secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size())) {
  ------------------
  |  Branch (325:9): [True: 107, False: 181]
  ------------------
  326|    107|        return false;
  327|    107|    }
  328|    181|    unsigned char pub[SIZE];
  329|    181|    size_t publen = SIZE;
  330|    181|    secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
  ------------------
  |  |  213|    181|#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION)
  |  |  ------------------
  |  |  |  |  193|    181|#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
  |  |  ------------------
  ------------------
  331|    181|    Set(pub, pub + publen);
  332|    181|    return true;
  333|    288|}

_ZN6CKeyIDC2Ev:
   26|    854|    CKeyID() : uint160() {}
_ZN7CPubKey6GetLenEh:
   61|  2.04k|    {
   62|  2.04k|        if (chHeader == 2 || chHeader == 3)
  ------------------
  |  Branch (62:13): [True: 511, False: 1.53k]
  |  Branch (62:30): [True: 360, False: 1.17k]
  ------------------
   63|    871|            return COMPRESSED_SIZE;
   64|  1.17k|        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
  ------------------
  |  Branch (64:13): [True: 1.17k, False: 0]
  |  Branch (64:30): [True: 0, False: 0]
  |  Branch (64:47): [True: 0, False: 0]
  ------------------
   65|  1.17k|            return SIZE;
   66|      0|        return 0;
   67|  1.17k|    }
_ZN7CPubKey10InvalidateEv:
   71|    848|    {
   72|    848|        vch[0] = 0xFF;
   73|    848|    }
_ZN7CPubKeyC2Ev:
   83|    848|    {
   84|    848|        Invalidate();
   85|    848|    }
_ZN7CPubKeyC2E4SpanIKhE:
  107|    288|    {
  108|    288|        Set(_vch.begin(), _vch.end());
  109|    288|    }
_ZNK7CPubKey4sizeEv:
  112|  1.29k|    unsigned int size() const { return GetLen(vch[0]); }
_ZNK7CPubKey5beginEv:
  114|    181|    const unsigned char* begin() const { return vch; }
_ZNK7CPubKeyixEj:
  116|    932|    const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
_ZNK7CPubKey7IsValidEv:
  190|    558|    {
  191|    558|        return size() > 0;
  192|    558|    }
_ZN7CPubKey3SetIPKhEEvT_S3_:
   90|    565|    {
   91|    565|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 565]
  ------------------
   92|    565|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 565, False: 0]
  |  Branch (92:20): [True: 565, False: 0]
  ------------------
   93|    565|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|      0|        else
   95|      0|            Invalidate();
   96|    565|    }
_ZN7CPubKey3SetIPhEEvT_S2_:
   90|    181|    {
   91|    181|        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
  ------------------
  |  Branch (91:19): [True: 0, False: 181]
  ------------------
   92|    181|        if (len && len == (pend - pbegin))
  ------------------
  |  Branch (92:13): [True: 181, False: 0]
  |  Branch (92:20): [True: 181, False: 0]
  ------------------
   93|    181|            memcpy(vch, (unsigned char*)&pbegin[0], len);
   94|      0|        else
   95|      0|            Invalidate();
   96|    181|    }

_ZN7CScriptlsE10opcodetype:
  480|    119|    {
  481|    119|        if (opcode < 0 || opcode > 0xff)
  ------------------
  |  Branch (481:13): [True: 0, False: 119]
  |  Branch (481:27): [True: 0, False: 119]
  ------------------
  482|      0|            throw std::runtime_error("CScript::operator<<(): invalid opcode");
  483|    119|        insert(end(), (unsigned char)opcode);
  484|    119|        return *this;
  485|    119|    }
_ZN7CScript5clearEv:
  577|  1.35k|    {
  578|       |        // The default prevector::clear() does not release memory
  579|  1.35k|        CScriptBase::clear();
  580|  1.35k|        shrink_to_fit();
  581|  1.35k|    }
_ZN9CScriptIDC2Ev:
  604|    849|    CScriptID() : BaseHash() {}
_ZN7CScriptC2Ev:
  461|  1.35k|    CScript() = default;

secp256k1.c:secp256k1_eckey_pubkey_parse:
   17|    558|static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size) {
   18|    558|    if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  216|    576|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
                  if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) {
  ------------------
  |  |  217|    118|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (18:9): [True: 288, False: 270]
  |  Branch (18:24): [True: 170, False: 118]
  |  Branch (18:63): [True: 118, False: 0]
  ------------------
   19|    288|        secp256k1_fe x;
   20|    288|        return secp256k1_fe_set_b32_limit(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD);
  ------------------
  |  |   88|    288|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
                      return secp256k1_fe_set_b32_limit(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD);
  ------------------
  |  |  217|    287|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
  |  Branch (20:16): [True: 287, False: 1]
  |  Branch (20:57): [True: 181, False: 106]
  ------------------
   21|    288|    } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  218|    540|#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04
  ------------------
                  } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  219|    270|#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06
  ------------------
                  } else if (size == 65 && (pub[0] == SECP256K1_TAG_PUBKEY_UNCOMPRESSED || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  220|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (21:16): [True: 270, False: 0]
  |  Branch (21:31): [True: 270, False: 0]
  |  Branch (21:78): [True: 0, False: 0]
  |  Branch (21:124): [True: 0, False: 0]
  ------------------
   22|    270|        secp256k1_fe x, y;
   23|    270|        if (!secp256k1_fe_set_b32_limit(&x, pub+1) || !secp256k1_fe_set_b32_limit(&y, pub+33)) {
  ------------------
  |  |   88|    270|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
                      if (!secp256k1_fe_set_b32_limit(&x, pub+1) || !secp256k1_fe_set_b32_limit(&y, pub+33)) {
  ------------------
  |  |   88|    269|#  define secp256k1_fe_set_b32_limit secp256k1_fe_impl_set_b32_limit
  ------------------
  |  Branch (23:13): [True: 1, False: 269]
  |  Branch (23:55): [True: 1, False: 268]
  ------------------
   24|      2|            return 0;
   25|      2|        }
   26|    268|        secp256k1_ge_set_xy(elem, &x, &y);
   27|    268|        if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  219|    536|#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06
  ------------------
                      if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) &&
  ------------------
  |  |  220|    268|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (27:14): [True: 0, False: 268]
  |  Branch (27:60): [True: 0, False: 268]
  ------------------
   28|    268|            secp256k1_fe_is_odd(&y) != (pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |   85|      0|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
                          secp256k1_fe_is_odd(&y) != (pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) {
  ------------------
  |  |  220|      0|#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07
  ------------------
  |  Branch (28:13): [True: 0, False: 0]
  ------------------
   29|      0|            return 0;
   30|      0|        }
   31|    268|        return secp256k1_ge_is_valid_var(elem);
   32|    268|    } else {
   33|      0|        return 0;
   34|      0|    }
   35|    558|}
secp256k1.c:secp256k1_eckey_pubkey_serialize:
   37|    181|static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, int compressed) {
   38|    181|    if (secp256k1_ge_is_infinity(elem)) {
  ------------------
  |  Branch (38:9): [True: 0, False: 181]
  ------------------
   39|      0|        return 0;
   40|      0|    }
   41|    181|    secp256k1_fe_normalize_var(&elem->x);
  ------------------
  |  |   80|    181|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   42|    181|    secp256k1_fe_normalize_var(&elem->y);
  ------------------
  |  |   80|    181|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
   43|    181|    secp256k1_fe_get_b32(&pub[1], &elem->x);
  ------------------
  |  |   89|    181|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   44|    181|    if (compressed) {
  ------------------
  |  Branch (44:9): [True: 0, False: 181]
  ------------------
   45|      0|        *size = 33;
   46|      0|        pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |   85|      0|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
                      pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  217|      0|#define SECP256K1_TAG_PUBKEY_ODD 0x03
  ------------------
                      pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN;
  ------------------
  |  |  216|      0|#define SECP256K1_TAG_PUBKEY_EVEN 0x02
  ------------------
  |  Branch (46:18): [True: 0, False: 0]
  ------------------
   47|    181|    } else {
   48|    181|        *size = 65;
   49|    181|        pub[0] = SECP256K1_TAG_PUBKEY_UNCOMPRESSED;
  ------------------
  |  |  218|    181|#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04
  ------------------
   50|    181|        secp256k1_fe_get_b32(&pub[33], &elem->y);
  ------------------
  |  |   89|    181|#  define secp256k1_fe_get_b32 secp256k1_fe_impl_get_b32
  ------------------
   51|    181|    }
   52|    181|    return 1;
   53|    181|}

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

secp256k1.c:secp256k1_fe_impl_sqr:
  345|  73.7k|SECP256K1_INLINE static void secp256k1_fe_impl_sqr(secp256k1_fe *r, const secp256k1_fe *a) {
  346|  73.7k|    secp256k1_fe_sqr_inner(r->n, a->n);
  347|  73.7k|}
secp256k1.c:secp256k1_fe_impl_mul:
  341|  4.28k|SECP256K1_INLINE static void secp256k1_fe_impl_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) {
  342|  4.28k|    secp256k1_fe_mul_inner(r->n, a->n, b->n);
  343|  4.28k|}
secp256k1.c:secp256k1_fe_impl_add_int:
  329|    555|SECP256K1_INLINE static void secp256k1_fe_impl_add_int(secp256k1_fe *r, int a) {
  330|    555|    r->n[0] += a;
  331|    555|}
secp256k1.c:secp256k1_fe_impl_to_storage:
  428|    724|static void secp256k1_fe_impl_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) {
  429|    724|    r->n[0] = a->n[0] | a->n[1] << 52;
  430|    724|    r->n[1] = a->n[1] >> 12 | a->n[2] << 40;
  431|    724|    r->n[2] = a->n[2] >> 24 | a->n[3] << 28;
  432|    724|    r->n[3] = a->n[3] >> 36 | a->n[4] << 16;
  433|    724|}
secp256k1.c:secp256k1_fe_impl_from_storage:
  435|    362|static SECP256K1_INLINE void secp256k1_fe_impl_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) {
  436|    362|    r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL;
  437|    362|    r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL);
  438|    362|    r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL);
  439|    362|    r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL);
  440|    362|    r->n[4] = a->n[3] >> 16;
  441|    362|}
secp256k1.c:secp256k1_fe_impl_is_zero:
  206|    181|SECP256K1_INLINE static int secp256k1_fe_impl_is_zero(const secp256k1_fe *a) {
  207|    181|    const uint64_t *t = a->n;
  208|    181|    return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
  209|    181|}
secp256k1.c:secp256k1_fe_impl_add:
  333|    555|SECP256K1_INLINE static void secp256k1_fe_impl_add(secp256k1_fe *r, const secp256k1_fe *a) {
  334|    555|    r->n[0] += a->n[0];
  335|    555|    r->n[1] += a->n[1];
  336|    555|    r->n[2] += a->n[2];
  337|    555|    r->n[3] += a->n[3];
  338|    555|    r->n[4] += a->n[4];
  339|    555|}
secp256k1.c:secp256k1_fe_impl_negate_unchecked:
  306|    673|SECP256K1_INLINE static void secp256k1_fe_impl_negate_unchecked(secp256k1_fe *r, const secp256k1_fe *a, int m) {
  307|       |    /* For all legal values of m (0..31), the following properties hold: */
  308|    673|    VERIFY_CHECK(0xFFFFEFFFFFC2FULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  309|    673|    VERIFY_CHECK(0xFFFFFFFFFFFFFULL * 2 * (m + 1) >= 0xFFFFFFFFFFFFFULL * 2 * m);
  310|    673|    VERIFY_CHECK(0x0FFFFFFFFFFFFULL * 2 * (m + 1) >= 0x0FFFFFFFFFFFFULL * 2 * m);
  311|       |
  312|       |    /* Due to the properties above, the left hand in the subtractions below is never less than
  313|       |     * the right hand. */
  314|    673|    r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0];
  315|    673|    r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1];
  316|    673|    r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2];
  317|    673|    r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3];
  318|    673|    r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4];
  319|    673|}
secp256k1.c:secp256k1_fe_impl_normalizes_to_zero:
  137|    555|static int secp256k1_fe_impl_normalizes_to_zero(const secp256k1_fe *r) {
  138|    555|    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|    555|    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|    555|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  145|       |
  146|       |    /* The first pass ensures the magnitude is 1, ... */
  147|    555|    t0 += x * 0x1000003D1ULL;
  148|    555|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0  = t0; z1  = t0 ^ 0x1000003D0ULL;
  149|    555|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
  150|    555|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
  151|    555|    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
  152|    555|                                                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|    555|    VERIFY_CHECK(t4 >> 49 == 0);
  156|       |
  157|    555|    return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
  158|    555|}
secp256k1.c:secp256k1_fe_impl_set_b32_limit:
  265|    827|static int secp256k1_fe_impl_set_b32_limit(secp256k1_fe *r, const unsigned char *a) {
  266|    827|    secp256k1_fe_impl_set_b32_mod(r, a);
  267|    827|    return !((r->n[4] == 0x0FFFFFFFFFFFFULL) & ((r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL) & (r->n[0] >= 0xFFFFEFFFFFC2FULL));
  268|    827|}
secp256k1.c:secp256k1_fe_impl_get_b32:
  271|    362|static void secp256k1_fe_impl_get_b32(unsigned char *r, const secp256k1_fe *a) {
  272|    362|    r[0] = (a->n[4] >> 40) & 0xFF;
  273|    362|    r[1] = (a->n[4] >> 32) & 0xFF;
  274|    362|    r[2] = (a->n[4] >> 24) & 0xFF;
  275|    362|    r[3] = (a->n[4] >> 16) & 0xFF;
  276|    362|    r[4] = (a->n[4] >> 8) & 0xFF;
  277|    362|    r[5] = a->n[4] & 0xFF;
  278|    362|    r[6] = (a->n[3] >> 44) & 0xFF;
  279|    362|    r[7] = (a->n[3] >> 36) & 0xFF;
  280|    362|    r[8] = (a->n[3] >> 28) & 0xFF;
  281|    362|    r[9] = (a->n[3] >> 20) & 0xFF;
  282|    362|    r[10] = (a->n[3] >> 12) & 0xFF;
  283|    362|    r[11] = (a->n[3] >> 4) & 0xFF;
  284|    362|    r[12] = ((a->n[2] >> 48) & 0xF) | ((a->n[3] & 0xF) << 4);
  285|    362|    r[13] = (a->n[2] >> 40) & 0xFF;
  286|    362|    r[14] = (a->n[2] >> 32) & 0xFF;
  287|    362|    r[15] = (a->n[2] >> 24) & 0xFF;
  288|    362|    r[16] = (a->n[2] >> 16) & 0xFF;
  289|    362|    r[17] = (a->n[2] >> 8) & 0xFF;
  290|    362|    r[18] = a->n[2] & 0xFF;
  291|    362|    r[19] = (a->n[1] >> 44) & 0xFF;
  292|    362|    r[20] = (a->n[1] >> 36) & 0xFF;
  293|    362|    r[21] = (a->n[1] >> 28) & 0xFF;
  294|    362|    r[22] = (a->n[1] >> 20) & 0xFF;
  295|    362|    r[23] = (a->n[1] >> 12) & 0xFF;
  296|    362|    r[24] = (a->n[1] >> 4) & 0xFF;
  297|    362|    r[25] = ((a->n[0] >> 48) & 0xF) | ((a->n[1] & 0xF) << 4);
  298|    362|    r[26] = (a->n[0] >> 40) & 0xFF;
  299|    362|    r[27] = (a->n[0] >> 32) & 0xFF;
  300|    362|    r[28] = (a->n[0] >> 24) & 0xFF;
  301|    362|    r[29] = (a->n[0] >> 16) & 0xFF;
  302|    362|    r[30] = (a->n[0] >> 8) & 0xFF;
  303|    362|    r[31] = a->n[0] & 0xFF;
  304|    362|}
secp256k1.c:secp256k1_fe_impl_normalize_var:
   99|    649|static void secp256k1_fe_impl_normalize_var(secp256k1_fe *r) {
  100|    649|    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|    649|    uint64_t m;
  104|    649|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
  105|       |
  106|       |    /* The first pass ensures the magnitude is 1, ... */
  107|    649|    t0 += x * 0x1000003D1ULL;
  108|    649|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  109|    649|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
  110|    649|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
  111|    649|    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|    649|    VERIFY_CHECK(t4 >> 49 == 0);
  115|       |
  116|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
  117|    649|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
  118|    649|        & (t0 >= 0xFFFFEFFFFFC2FULL));
  119|       |
  120|    649|    if (x) {
  ------------------
  |  Branch (120:9): [True: 2, False: 647]
  ------------------
  121|      2|        t0 += 0x1000003D1ULL;
  122|      2|        t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
  123|      2|        t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
  124|      2|        t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
  125|      2|        t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
  126|       |
  127|       |        /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */
  128|      2|        VERIFY_CHECK(t4 >> 48 == x);
  129|       |
  130|       |        /* Mask off the possible multiple of 2^256 from the final reduction */
  131|      2|        t4 &= 0x0FFFFFFFFFFFFULL;
  132|      2|    }
  133|       |
  134|    649|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
  135|    649|}
secp256k1.c:secp256k1_fe_impl_is_odd:
  211|    287|SECP256K1_INLINE static int secp256k1_fe_impl_is_odd(const secp256k1_fe *a) {
  212|    287|    return a->n[0] & 1;
  213|    287|}
secp256k1.c:secp256k1_fe_impl_set_b32_mod:
  228|    827|static void secp256k1_fe_impl_set_b32_mod(secp256k1_fe *r, const unsigned char *a) {
  229|    827|    r->n[0] = (uint64_t)a[31]
  230|    827|            | ((uint64_t)a[30] << 8)
  231|    827|            | ((uint64_t)a[29] << 16)
  232|    827|            | ((uint64_t)a[28] << 24)
  233|    827|            | ((uint64_t)a[27] << 32)
  234|    827|            | ((uint64_t)a[26] << 40)
  235|    827|            | ((uint64_t)(a[25] & 0xF)  << 48);
  236|    827|    r->n[1] = (uint64_t)((a[25] >> 4) & 0xF)
  237|    827|            | ((uint64_t)a[24] << 4)
  238|    827|            | ((uint64_t)a[23] << 12)
  239|    827|            | ((uint64_t)a[22] << 20)
  240|    827|            | ((uint64_t)a[21] << 28)
  241|    827|            | ((uint64_t)a[20] << 36)
  242|    827|            | ((uint64_t)a[19] << 44);
  243|    827|    r->n[2] = (uint64_t)a[18]
  244|    827|            | ((uint64_t)a[17] << 8)
  245|    827|            | ((uint64_t)a[16] << 16)
  246|    827|            | ((uint64_t)a[15] << 24)
  247|    827|            | ((uint64_t)a[14] << 32)
  248|    827|            | ((uint64_t)a[13] << 40)
  249|    827|            | ((uint64_t)(a[12] & 0xF) << 48);
  250|    827|    r->n[3] = (uint64_t)((a[12] >> 4) & 0xF)
  251|    827|            | ((uint64_t)a[11] << 4)
  252|    827|            | ((uint64_t)a[10] << 12)
  253|    827|            | ((uint64_t)a[9]  << 20)
  254|    827|            | ((uint64_t)a[8]  << 28)
  255|    827|            | ((uint64_t)a[7]  << 36)
  256|    827|            | ((uint64_t)a[6]  << 44);
  257|    827|    r->n[4] = (uint64_t)a[5]
  258|    827|            | ((uint64_t)a[4] << 8)
  259|    827|            | ((uint64_t)a[3] << 16)
  260|    827|            | ((uint64_t)a[2] << 24)
  261|    827|            | ((uint64_t)a[1] << 32)
  262|    827|            | ((uint64_t)a[0] << 40);
  263|    827|}
secp256k1.c:secp256k1_fe_impl_normalize:
   43|    724|static void secp256k1_fe_impl_normalize(secp256k1_fe *r) {
   44|    724|    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|    724|    uint64_t m;
   48|    724|    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
   49|       |
   50|       |    /* The first pass ensures the magnitude is 1, ... */
   51|    724|    t0 += x * 0x1000003D1ULL;
   52|    724|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   53|    724|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
   54|    724|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
   55|    724|    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|    724|    VERIFY_CHECK(t4 >> 49 == 0);
   59|       |
   60|       |    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
   61|    724|    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
   62|    724|        & (t0 >= 0xFFFFEFFFFFC2FULL));
   63|       |
   64|       |    /* Apply the final reduction (for constant-time behaviour, we do it always) */
   65|    724|    t0 += x * 0x1000003D1ULL;
   66|    724|    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
   67|    724|    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
   68|    724|    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
   69|    724|    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|    724|    VERIFY_CHECK(t4 >> 48 == x);
   73|       |
   74|       |    /* Mask off the possible multiple of 2^256 from the final reduction */
   75|    724|    t4 &= 0x0FFFFFFFFFFFFULL;
   76|       |
   77|    724|    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
   78|    724|}

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

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

secp256k1.c:secp256k1_ge_set_xy:
  132|    268|static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) {
  133|    268|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  344|    268|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  134|    268|    SECP256K1_FE_VERIFY(y);
  ------------------
  |  |  344|    268|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  135|       |
  136|    268|    r->infinity = 0;
  137|    268|    r->x = *x;
  138|    268|    r->y = *y;
  139|       |
  140|    268|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|    268|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  141|    268|}
secp256k1.c:secp256k1_ge_verify:
   78|  1.90k|static void secp256k1_ge_verify(const secp256k1_ge *a) {
   79|  1.90k|    SECP256K1_FE_VERIFY(&a->x);
  ------------------
  |  |  344|  1.90k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   80|  1.90k|    SECP256K1_FE_VERIFY(&a->y);
  ------------------
  |  |  344|  1.90k|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
   81|  1.90k|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->x, SECP256K1_GE_X_MAGNITUDE_MAX);
  ------------------
  |  |  348|  1.90k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   82|  1.90k|    SECP256K1_FE_VERIFY_MAGNITUDE(&a->y, SECP256K1_GE_Y_MAGNITUDE_MAX);
  ------------------
  |  |  348|  1.90k|#define SECP256K1_FE_VERIFY_MAGNITUDE(a, m) secp256k1_fe_verify_magnitude(a, m)
  ------------------
   83|  1.90k|    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
   84|  1.90k|    (void)a;
   85|  1.90k|}
secp256k1.c:secp256k1_ge_is_valid_var:
  408|    268|static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
  409|    268|    secp256k1_fe y2, x3;
  410|    268|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|    268|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  411|       |
  412|    268|    if (a->infinity) {
  ------------------
  |  Branch (412:9): [True: 0, False: 268]
  ------------------
  413|      0|        return 0;
  414|      0|    }
  415|       |    /* y^2 = x^3 + 7 */
  416|    268|    secp256k1_fe_sqr(&y2, &a->y);
  ------------------
  |  |   94|    268|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  417|    268|    secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   94|    268|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
                  secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
  ------------------
  |  |   93|    268|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  418|    268|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|    268|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|    268|#define SECP256K1_B 7
  ------------------
  419|    268|    return secp256k1_fe_equal(&y2, &x3);
  420|    268|}
secp256k1.c:secp256k1_ge_is_in_correct_subgroup:
  886|    362|static int secp256k1_ge_is_in_correct_subgroup(const secp256k1_ge* ge) {
  887|       |#ifdef EXHAUSTIVE_TEST_ORDER
  888|       |    secp256k1_gej out;
  889|       |    int i;
  890|       |    SECP256K1_GE_VERIFY(ge);
  891|       |
  892|       |    /* A very simple EC multiplication ladder that avoids a dependency on ecmult. */
  893|       |    secp256k1_gej_set_infinity(&out);
  894|       |    for (i = 0; i < 32; ++i) {
  895|       |        secp256k1_gej_double_var(&out, &out, NULL);
  896|       |        if ((((uint32_t)EXHAUSTIVE_TEST_ORDER) >> (31 - i)) & 1) {
  897|       |            secp256k1_gej_add_ge_var(&out, &out, ge, NULL);
  898|       |        }
  899|       |    }
  900|       |    return secp256k1_gej_is_infinity(&out);
  901|       |#else
  902|    362|    SECP256K1_GE_VERIFY(ge);
  ------------------
  |  |  206|    362|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  903|       |
  904|    362|    (void)ge;
  905|       |    /* The real secp256k1 group has cofactor 1, so the subgroup is the entire curve. */
  906|    362|    return 1;
  907|    362|#endif
  908|    362|}
secp256k1.c:secp256k1_ge_to_bytes:
  937|    362|static void secp256k1_ge_to_bytes(unsigned char *buf, const secp256k1_ge *a) {
  938|    362|    secp256k1_ge_storage s;
  939|       |
  940|       |    /* We require that the secp256k1_ge_storage type is exactly 64 bytes.
  941|       |     * This is formally not guaranteed by the C standard, but should hold on any
  942|       |     * sane compiler in the real world. */
  943|    362|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   64|    362|#define STATIC_ASSERT(expr) do { \
  |  |   65|    362|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (65:12): [Folded - Ignored]
  |  |  ------------------
  |  |   66|    362|        case 0: \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 362, False: 0]
  |  |  ------------------
  |  |   67|    362|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   68|    362|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (68:9): [True: 0, False: 362]
  |  |  ------------------
  |  |   69|    362|        ; \
  |  |   70|    362|    } \
  |  |   71|    362|} while(0)
  |  |  ------------------
  |  |  |  Branch (71:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  944|    362|    VERIFY_CHECK(!secp256k1_ge_is_infinity(a));
  945|    362|    secp256k1_ge_to_storage(&s, a);
  946|    362|    memcpy(buf, &s, 64);
  947|    362|}
secp256k1.c:secp256k1_ge_to_storage:
  839|    362|static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) {
  840|    362|    secp256k1_fe x, y;
  841|    362|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|    362|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  842|    362|    VERIFY_CHECK(!a->infinity);
  843|       |
  844|    362|    x = a->x;
  845|    362|    secp256k1_fe_normalize(&x);
  ------------------
  |  |   78|    362|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  846|    362|    y = a->y;
  847|    362|    secp256k1_fe_normalize(&y);
  ------------------
  |  |   78|    362|#  define secp256k1_fe_normalize secp256k1_fe_impl_normalize
  ------------------
  848|    362|    secp256k1_fe_to_storage(&r->x, &x);
  ------------------
  |  |   96|    362|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  849|    362|    secp256k1_fe_to_storage(&r->y, &y);
  ------------------
  |  |   96|    362|#  define secp256k1_fe_to_storage secp256k1_fe_impl_to_storage
  ------------------
  850|    362|}
secp256k1.c:secp256k1_ge_clear:
  305|    364|static void secp256k1_ge_clear(secp256k1_ge *r) {
  306|    364|    secp256k1_memclear(r, sizeof(secp256k1_ge));
  307|    364|}
secp256k1.c:secp256k1_ge_from_bytes:
  949|    181|static void secp256k1_ge_from_bytes(secp256k1_ge *r, const unsigned char *buf) {
  950|    181|    secp256k1_ge_storage s;
  951|       |
  952|    181|    STATIC_ASSERT(sizeof(secp256k1_ge_storage) == 64);
  ------------------
  |  |   64|    181|#define STATIC_ASSERT(expr) do { \
  |  |   65|    181|    switch(0) { \
  |  |  ------------------
  |  |  |  Branch (65:12): [Folded - Ignored]
  |  |  ------------------
  |  |   66|    181|        case 0: \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 181, False: 0]
  |  |  ------------------
  |  |   67|    181|        /* If expr evaluates to 0, we have two case labels "0", which is illegal. */ \
  |  |   68|    181|        case /* ERROR: static assertion failed */ (expr): \
  |  |  ------------------
  |  |  |  Branch (68:9): [True: 0, False: 181]
  |  |  ------------------
  |  |   69|    181|        ; \
  |  |   70|    181|    } \
  |  |   71|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (71:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  953|    181|    memcpy(&s, buf, 64);
  954|    181|    secp256k1_ge_from_storage(r, &s);
  955|    181|}
secp256k1.c:secp256k1_ge_from_storage:
  852|    181|static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) {
  853|    181|    secp256k1_fe_from_storage(&r->x, &a->x);
  ------------------
  |  |   97|    181|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  854|    181|    secp256k1_fe_from_storage(&r->y, &a->y);
  ------------------
  |  |   97|    181|#  define secp256k1_fe_from_storage secp256k1_fe_impl_from_storage
  ------------------
  855|    181|    r->infinity = 0;
  856|       |
  857|    181|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|    181|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  858|    181|}
secp256k1.c:secp256k1_ge_set_xo_var:
  309|    287|static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) {
  310|    287|    secp256k1_fe x2, x3;
  311|    287|    int ret;
  312|    287|    SECP256K1_FE_VERIFY(x);
  ------------------
  |  |  344|    287|#define SECP256K1_FE_VERIFY(a) secp256k1_fe_verify(a)
  ------------------
  313|       |
  314|    287|    r->x = *x;
  315|    287|    secp256k1_fe_sqr(&x2, x);
  ------------------
  |  |   94|    287|#  define secp256k1_fe_sqr secp256k1_fe_impl_sqr
  ------------------
  316|    287|    secp256k1_fe_mul(&x3, x, &x2);
  ------------------
  |  |   93|    287|#  define secp256k1_fe_mul secp256k1_fe_impl_mul
  ------------------
  317|    287|    r->infinity = 0;
  318|    287|    secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |  102|    287|#  define secp256k1_fe_add_int secp256k1_fe_impl_add_int
  ------------------
                  secp256k1_fe_add_int(&x3, SECP256K1_B);
  ------------------
  |  |   73|    287|#define SECP256K1_B 7
  ------------------
  319|    287|    ret = secp256k1_fe_sqrt(&r->y, &x3);
  320|    287|    secp256k1_fe_normalize_var(&r->y);
  ------------------
  |  |   80|    287|#  define secp256k1_fe_normalize_var secp256k1_fe_impl_normalize_var
  ------------------
  321|    287|    if (secp256k1_fe_is_odd(&r->y) != odd) {
  ------------------
  |  |   85|    287|#  define secp256k1_fe_is_odd secp256k1_fe_impl_is_odd
  ------------------
  |  Branch (321:9): [True: 118, False: 169]
  ------------------
  322|    118|        secp256k1_fe_negate(&r->y, &r->y, 1);
  ------------------
  |  |  211|    118|#define secp256k1_fe_negate(r, a, m) ASSERT_INT_CONST_AND_DO(m, secp256k1_fe_negate_unchecked(r, a, m))
  |  |  ------------------
  |  |  |  |   77|    118|#define ASSERT_INT_CONST_AND_DO(expr, stmt) do { \
  |  |  |  |   78|    118|    switch(42) { \
  |  |  |  |   79|      0|        /* C allows only integer constant expressions as case labels. */ \
  |  |  |  |   80|      0|        case /* ERROR: integer argument is not constant */ (expr): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (80:9): [True: 0, False: 118]
  |  |  |  |  ------------------
  |  |  |  |   81|      0|            break; \
  |  |  |  |   82|    118|        default: ; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:9): [True: 118, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   83|    118|    } \
  |  |  |  |   84|    118|    stmt; \
  |  |  |  |   85|    118|} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:9): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|    118|    }
  324|       |
  325|    287|    SECP256K1_GE_VERIFY(r);
  ------------------
  |  |  206|    287|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  326|    287|    return ret;
  327|    287|}
secp256k1.c:secp256k1_ge_is_infinity:
  143|    181|static int secp256k1_ge_is_infinity(const secp256k1_ge *a) {
  144|    181|    SECP256K1_GE_VERIFY(a);
  ------------------
  |  |  206|    181|#define SECP256K1_GE_VERIFY(a) secp256k1_ge_verify(a)
  ------------------
  145|       |
  146|    181|    return a->infinity;
  147|    181|}

secp256k1.c:secp256k1_u128_mul:
   11|   234k|static SECP256K1_INLINE void secp256k1_u128_mul(secp256k1_uint128 *r, uint64_t a, uint64_t b) {
   12|   234k|   *r = (uint128_t)a * b;
   13|   234k|}
secp256k1.c:secp256k1_u128_accum_mul:
   15|  1.44M|static SECP256K1_INLINE void secp256k1_u128_accum_mul(secp256k1_uint128 *r, uint64_t a, uint64_t b) {
   16|  1.44M|   *r += (uint128_t)a * b;
   17|  1.44M|}
secp256k1.c:secp256k1_u128_to_u64:
   28|  1.01M|static SECP256K1_INLINE uint64_t secp256k1_u128_to_u64(const secp256k1_uint128 *a) {
   29|  1.01M|   return (uint64_t)(*a);
   30|  1.01M|}
secp256k1.c:secp256k1_u128_rshift:
   23|   780k|static SECP256K1_INLINE void secp256k1_u128_rshift(secp256k1_uint128 *r, unsigned int n) {
   24|   780k|   VERIFY_CHECK(n < 128);
   25|   780k|   *r >>= n;
   26|   780k|}
secp256k1.c:secp256k1_u128_accum_u64:
   19|  78.0k|static SECP256K1_INLINE void secp256k1_u128_accum_u64(secp256k1_uint128 *r, uint64_t a) {
   20|  78.0k|   *r += a;
   21|  78.0k|}

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

secp256k1_context_preallocated_destroy:
  176|      2|void secp256k1_context_preallocated_destroy(secp256k1_context* ctx) {
  177|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  178|       |
  179|       |    /* Defined as noop */
  180|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (180:9): [True: 0, False: 2]
  ------------------
  181|      0|        return;
  182|      0|    }
  183|       |
  184|      2|    secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx);
  185|      2|}
secp256k1_context_destroy:
  187|      2|void secp256k1_context_destroy(secp256k1_context* ctx) {
  188|      2|    ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
  ------------------
  |  |   52|      2|#define ARG_CHECK_VOID(cond) do { \
  |  |   53|      2|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|      4|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (136:39): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   55|      0|        return; \
  |  |   56|      0|    } \
  |  |   57|      2|} while(0)
  |  |  ------------------
  |  |  |  Branch (57:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  189|       |
  190|       |    /* Defined as noop */
  191|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (191:9): [True: 0, False: 2]
  ------------------
  192|      0|        return;
  193|      0|    }
  194|       |
  195|      2|    secp256k1_context_preallocated_destroy(ctx);
  196|      2|    free(ctx);
  197|      2|}
secp256k1_ec_pubkey_parse:
  250|    558|int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) {
  251|    558|    secp256k1_ge Q;
  252|       |
  253|    558|    VERIFY_CHECK(ctx != NULL);
  254|    558|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|    558|#define ARG_CHECK(cond) do { \
  |  |   46|    558|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    558|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 558]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    558|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  255|    558|    memset(pubkey, 0, sizeof(*pubkey));
  256|    558|    ARG_CHECK(input != NULL);
  ------------------
  |  |   45|    558|#define ARG_CHECK(cond) do { \
  |  |   46|    558|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    558|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 558]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    558|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  257|    558|    if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) {
  ------------------
  |  Branch (257:9): [True: 196, False: 362]
  ------------------
  258|    196|        return 0;
  259|    196|    }
  260|    362|    if (!secp256k1_ge_is_in_correct_subgroup(&Q)) {
  ------------------
  |  Branch (260:9): [True: 0, False: 362]
  ------------------
  261|      0|        return 0;
  262|      0|    }
  263|    362|    secp256k1_pubkey_save(pubkey, &Q);
  264|    362|    secp256k1_ge_clear(&Q);
  265|    362|    return 1;
  266|    362|}
secp256k1_ec_pubkey_serialize:
  268|    181|int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
  269|    181|    secp256k1_ge Q;
  270|    181|    size_t len;
  271|    181|    int ret = 0;
  272|       |
  273|    181|    VERIFY_CHECK(ctx != NULL);
  274|    181|    ARG_CHECK(outputlen != NULL);
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    181|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|    181|    ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33u : 65u));
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    362|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  |  Branch (136:39): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  276|    181|    len = *outputlen;
  277|    181|    *outputlen = 0;
  278|    181|    ARG_CHECK(output != NULL);
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    181|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  279|    181|    memset(output, 0, len);
  280|    181|    ARG_CHECK(pubkey != NULL);
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    181|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  281|    181|    ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION);
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    181|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  282|    181|    if (secp256k1_pubkey_load(ctx, &Q, pubkey)) {
  ------------------
  |  Branch (282:9): [True: 181, False: 0]
  ------------------
  283|    181|        ret = secp256k1_eckey_pubkey_serialize(&Q, output, &len, flags & SECP256K1_FLAGS_BIT_COMPRESSION);
  ------------------
  |  |  198|    181|#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8)
  ------------------
  284|    181|        if (ret) {
  ------------------
  |  Branch (284:13): [True: 181, False: 0]
  ------------------
  285|    181|            *outputlen = len;
  286|    181|        }
  287|    181|    }
  288|    181|    return ret;
  289|    181|}
secp256k1.c:secp256k1_context_is_proper:
   82|      4|static int secp256k1_context_is_proper(const secp256k1_context* ctx) {
   83|      4|    return secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx);
   84|      4|}
secp256k1.c:secp256k1_pubkey_save:
  246|    362|static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) {
  247|    362|    secp256k1_ge_to_bytes(pubkey->data, ge);
  248|    362|}
secp256k1.c:secp256k1_pubkey_load:
  240|    181|static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) {
  241|    181|    secp256k1_ge_from_bytes(ge, pubkey->data);
  242|    181|    ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));
  ------------------
  |  |   45|    181|#define ARG_CHECK(cond) do { \
  |  |   46|    181|    if (EXPECT(!(cond), 0)) { \
  |  |  ------------------
  |  |  |  |  136|    181|#define EXPECT(x,c) __builtin_expect((x),(c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (136:21): [True: 0, False: 181]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|        secp256k1_callback_call(&ctx->illegal_callback, #cond); \
  |  |   48|      0|        return 0; \
  |  |   49|      0|    } \
  |  |   50|    181|} while(0)
  |  |  ------------------
  |  |  |  Branch (50:9): [Folded - Ignored]
  |  |  ------------------
  ------------------
  243|    181|    return 1;
  244|    181|}

secp256k1.c:secp256k1_memclear:
  223|    368|static SECP256K1_INLINE void secp256k1_memclear(void *ptr, size_t len) {
  224|       |#if defined(_MSC_VER)
  225|       |    /* SecureZeroMemory is guaranteed not to be optimized out by MSVC. */
  226|       |    SecureZeroMemory(ptr, len);
  227|       |#elif defined(__GNUC__)
  228|       |    /* We use a memory barrier that scares the compiler away from optimizing out the memset.
  229|       |     *
  230|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
  231|       |     * in BoringSSL (ISC License):
  232|       |     *    As best as we can tell, this is sufficient to break any optimisations that
  233|       |     *    might try to eliminate "superfluous" memsets.
  234|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
  235|       |     * is pretty efficient, because the compiler can still implement the memset() efficently,
  236|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
  237|       |     * Yang et al. (USENIX Security 2017) for more background.
  238|       |     */
  239|    368|    memset(ptr, 0, len);
  240|    368|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
  241|       |#else
  242|       |    void *(*volatile const volatile_memset)(void *, int, size_t) = memset;
  243|       |    volatile_memset(ptr, 0, len);
  244|       |#endif
  245|       |#ifdef VERIFY
  246|       |    SECP256K1_CHECKMEM_UNDEFINE(ptr, len);
  247|       |#endif
  248|    368|}

_Z13ser_readdata8I10DataStreamEhRT_:
   84|  7.59k|{
   85|  7.59k|    uint8_t obj;
   86|  7.59k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|  7.59k|    return obj;
   88|  7.59k|}
_Z11UnserializeI10DataStreamR7WrapperI15VarIntFormatterIL10VarIntMode0EERjEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  1.13k|{
  763|  1.13k|    a.Unserialize(is);
  764|  1.13k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERjE11UnserializeI10DataStreamEEvRT_:
  483|  2.48k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode0EE5UnserI10DataStreamjEEvRT_RT0_:
  514|  2.48k|    {
  515|  2.48k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  2.48k|    }
_Z10ReadVarIntI10DataStreamL10VarIntMode0EjET1_RT_:
  453|  2.48k|{
  454|  2.48k|    CheckVarIntMode<Mode, I>();
  455|  2.48k|    I n = 0;
  456|  3.37k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  3.37k|        unsigned char chData = ser_readdata8(is);
  458|  3.37k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 17, False: 3.35k]
  ------------------
  459|     17|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|     17|        }
  461|  3.35k|        n = (n << 7) | (chData & 0x7F);
  462|  3.35k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 892, False: 2.46k]
  ------------------
  463|    892|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 1, False: 891]
  ------------------
  464|      1|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|      1|            }
  466|    891|            n++;
  467|  2.46k|        } else {
  468|  2.46k|            return n;
  469|  2.46k|        }
  470|  3.35k|    }
  471|  2.48k|}
_ZN15CheckVarIntModeIL10VarIntMode0EjEC2Ev:
  410|  3.99k|    {
  411|  3.99k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  3.99k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  3.99k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERjEC2ES3_:
  481|  3.99k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z11UnserializeI10DataStreamR7WrapperI15VarIntFormatterIL10VarIntMode0EERmEQ14UnserializableIT0_T_EEvRS9_OS8_:
  762|  1.27k|{
  763|  1.27k|    a.Unserialize(is);
  764|  1.27k|}
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmE11UnserializeI10DataStreamEEvRT_:
  483|  1.27k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN15VarIntFormatterIL10VarIntMode0EE5UnserI10DataStreammEEvRT_RT0_:
  514|  1.27k|    {
  515|  1.27k|        v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
  516|  1.27k|    }
_Z10ReadVarIntI10DataStreamL10VarIntMode0EmET1_RT_:
  453|  1.27k|{
  454|  1.27k|    CheckVarIntMode<Mode, I>();
  455|  1.27k|    I n = 0;
  456|  4.21k|    while(true) {
  ------------------
  |  Branch (456:11): [Folded - Ignored]
  ------------------
  457|  4.21k|        unsigned char chData = ser_readdata8(is);
  458|  4.21k|        if (n > (std::numeric_limits<I>::max() >> 7)) {
  ------------------
  |  Branch (458:13): [True: 13, False: 4.20k]
  ------------------
  459|     13|           throw std::ios_base::failure("ReadVarInt(): size too large");
  460|     13|        }
  461|  4.20k|        n = (n << 7) | (chData & 0x7F);
  462|  4.20k|        if (chData & 0x80) {
  ------------------
  |  Branch (462:13): [True: 2.94k, False: 1.26k]
  ------------------
  463|  2.94k|            if (n == std::numeric_limits<I>::max()) {
  ------------------
  |  Branch (463:17): [True: 1, False: 2.94k]
  ------------------
  464|      1|                throw std::ios_base::failure("ReadVarInt(): size too large");
  465|      1|            }
  466|  2.94k|            n++;
  467|  2.94k|        } else {
  468|  1.26k|            return n;
  469|  1.26k|        }
  470|  4.20k|    }
  471|  1.27k|}
_ZN15CheckVarIntModeIL10VarIntMode0EmEC2Ev:
  410|  2.13k|    {
  411|  2.13k|        static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
  412|  2.13k|        static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
  413|  2.13k|    }
_ZN7WrapperI15VarIntFormatterIL10VarIntMode0EERmEC2ES3_:
  481|  2.13k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z11UnserializeI10DataStreamR4CoinQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  1.35k|{
  763|  1.35k|    a.Unserialize(is);
  764|  1.35k|}
_Z11UnserializeI10DataStream7WrapperI15VarIntFormatterIL10VarIntMode0EERjEQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  1.35k|{
  763|  1.35k|    a.Unserialize(is);
  764|  1.35k|}
coins_view.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERjE7WrapperIT_RT0_EOS6_:
  497|  1.13k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z11UnserializeI10DataStream7WrapperI16TxOutCompressionR6CTxOutEQ14UnserializableIT0_T_EEvRS7_OS6_:
  762|  1.27k|{
  763|  1.27k|    a.Unserialize(is);
  764|  1.27k|}
_ZN7WrapperI16TxOutCompressionR6CTxOutE11UnserializeI10DataStreamEEvRT_:
  483|  1.27k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_ZN16TxOutCompression5UnserI10DataStreamEEvRT_R6CTxOut:
  180|  1.27k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJ7WrapperI17AmountCompressionRlES2_I17ScriptCompressionR7CScriptEEEEvRT_DpOT0_:
 1033|  1.27k|    {
 1034|  1.27k|        ::UnserializeMany(s, args...);
 1035|  1.27k|    }
_Z15UnserializeManyI10DataStreamJR7WrapperI17AmountCompressionRlERS1_I17ScriptCompressionR7CScriptEEEvRT_DpOT0_:
 1001|  1.27k|{
 1002|  1.27k|    (::Unserialize(s, args), ...);
 1003|  1.27k|}
_Z11UnserializeI10DataStreamR7WrapperI17AmountCompressionRlEQ14UnserializableIT0_T_EEvRS7_OS6_:
  762|  1.27k|{
  763|  1.27k|    a.Unserialize(is);
  764|  1.27k|}
_ZN7WrapperI17AmountCompressionRlE11UnserializeI10DataStreamEEvRT_:
  483|  1.27k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
coins_view.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERmE7WrapperIT_RT0_EOS6_:
  497|  1.27k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z11UnserializeI10DataStreamR7WrapperI17ScriptCompressionR7CScriptEQ14UnserializableIT0_T_EEvRS8_OS7_:
  762|  1.13k|{
  763|  1.13k|    a.Unserialize(is);
  764|  1.13k|}
_ZN7WrapperI17ScriptCompressionR7CScriptE11UnserializeI10DataStreamEEvRT_:
  483|  1.13k|    template<typename Stream> void Unserialize(Stream &s) { Formatter().Unser(s, m_object); }
_Z11UnserializeI10DataStreamTk9BasicBytehEvRT_4SpanIT0_E:
  283|    879|template <typename Stream, BasicByte B> void Unserialize(Stream& s, Span<B> span) { s.read(AsWritableBytes(span)); }
coins_view.cpp:_ZL5UsingI17AmountCompressionRlE7WrapperIT_RT0_EOS4_:
  497|  1.27k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17AmountCompressionRlEC2ES1_:
  481|  1.27k|    explicit Wrapper(T obj) : m_object(obj) {}
coins_view.cpp:_ZL5UsingI17ScriptCompressionR7CScriptE7WrapperIT_RT0_EOS5_:
  497|  1.27k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17ScriptCompressionR7CScriptEC2ES2_:
  481|  1.27k|    explicit Wrapper(T obj) : m_object(obj) {}
_ZN7WrapperI16TxOutCompressionR6CTxOutEC2ES2_:
  481|  1.27k|    explicit Wrapper(T obj) : m_object(obj) {}
_Z14ser_writedata8I10DataStreamEvRT_h:
   55|  3.81k|{
   56|  3.81k|    s.write(AsBytes(Span{&obj, 1}));
   57|  3.81k|}
_Z9SerializeI10DataStreamTk9BasicByteKhEvRT_4SpanIT0_E:
  268|    660|template <typename Stream, BasicByte B> void Serialize(Stream& s, Span<B> span) { s.write(AsBytes(span)); }
deserialize.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EERjE7WrapperIT_RT0_EOS6_:
  497|  2.86k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN15VarIntFormatterIL10VarIntMode0EE3SerI10DataStreamjEEvRT_T0_:
  509|  1.51k|    {
  510|  1.51k|        WriteVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s, v);
  511|  1.51k|    }
_Z11WriteVarIntI10DataStreamL10VarIntMode0EjEvRT_T1_:
  435|  1.51k|{
  436|  1.51k|    CheckVarIntMode<Mode, I>();
  437|  1.51k|    unsigned char tmp[(sizeof(n)*8+6)/7];
  438|  1.51k|    int len=0;
  439|  1.77k|    while(true) {
  ------------------
  |  Branch (439:11): [Folded - Ignored]
  ------------------
  440|  1.77k|        tmp[len] = (n & 0x7F) | (len ? 0x80 : 0x00);
  ------------------
  |  Branch (440:34): [True: 258, False: 1.51k]
  ------------------
  441|  1.77k|        if (n <= 0x7F)
  ------------------
  |  Branch (441:13): [True: 1.51k, False: 258]
  ------------------
  442|  1.51k|            break;
  443|    258|        n = (n >> 7) - 1;
  444|    258|        len++;
  445|    258|    }
  446|  1.77k|    do {
  447|  1.77k|        ser_writedata8(os, tmp[len]);
  448|  1.77k|    } while(len--);
  ------------------
  |  Branch (448:13): [True: 258, False: 1.51k]
  ------------------
  449|  1.51k|}
_ZN15VarIntFormatterIL10VarIntMode0EE3SerI10DataStreammEEvRT_T0_:
  509|    854|    {
  510|    854|        WriteVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s, v);
  511|    854|    }
_Z11WriteVarIntI10DataStreamL10VarIntMode0EmEvRT_T1_:
  435|    854|{
  436|    854|    CheckVarIntMode<Mode, I>();
  437|    854|    unsigned char tmp[(sizeof(n)*8+6)/7];
  438|    854|    int len=0;
  439|  2.04k|    while(true) {
  ------------------
  |  Branch (439:11): [Folded - Ignored]
  ------------------
  440|  2.04k|        tmp[len] = (n & 0x7F) | (len ? 0x80 : 0x00);
  ------------------
  |  Branch (440:34): [True: 1.18k, False: 854]
  ------------------
  441|  2.04k|        if (n <= 0x7F)
  ------------------
  |  Branch (441:13): [True: 854, False: 1.18k]
  ------------------
  442|    854|            break;
  443|  1.18k|        n = (n >> 7) - 1;
  444|  1.18k|        len++;
  445|  1.18k|    }
  446|  2.04k|    do {
  447|  2.04k|        ser_writedata8(os, tmp[len]);
  448|  2.04k|    } while(len--);
  ------------------
  |  Branch (448:13): [True: 1.18k, False: 854]
  ------------------
  449|    854|}
_Z9SerializeI10DataStream7WrapperI15VarIntFormatterIL10VarIntMode0EERjEQ12SerializableIT0_T_EEvRS8_RKS7_:
  753|  1.51k|{
  754|  1.51k|    a.Serialize(os);
  755|  1.51k|}
_ZNK7WrapperI15VarIntFormatterIL10VarIntMode0EERjE9SerializeI10DataStreamEEvRT_:
  482|  1.51k|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_Z9SerializeI10DataStream7WrapperI16TxOutCompressionRK6CTxOutEQ12SerializableIT0_T_EEvRS8_RKS7_:
  753|    854|{
  754|    854|    a.Serialize(os);
  755|    854|}
_ZNK7WrapperI16TxOutCompressionRK6CTxOutE9SerializeI10DataStreamEEvRT_:
  482|    854|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_ZN16TxOutCompression3SerI10DataStreamEEvRT_RK6CTxOut:
  178|    854|    static void Ser(Stream& s, const cls& obj) { SerializationOps(obj, s, ActionSerialize{}); } \
_ZN15ActionSerialize16SerReadWriteManyI10DataStreamJ7WrapperI17AmountCompressionRKlES2_I17ScriptCompressionRK7CScriptEEEEvRT_DpRKT0_:
 1013|    854|    {
 1014|    854|        ::SerializeMany(s, args...);
 1015|    854|    }
_Z13SerializeManyI10DataStreamJ7WrapperI17AmountCompressionRKlES1_I17ScriptCompressionRK7CScriptEEEvRT_DpRKT0_:
  995|    854|{
  996|    854|    (::Serialize(s, args), ...);
  997|    854|}
_Z9SerializeI10DataStream7WrapperI17AmountCompressionRKlEQ12SerializableIT0_T_EEvRS7_RKS6_:
  753|    854|{
  754|    854|    a.Serialize(os);
  755|    854|}
_ZNK7WrapperI17AmountCompressionRKlE9SerializeI10DataStreamEEvRT_:
  482|    854|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_Z9SerializeI10DataStream7WrapperI15VarIntFormatterIL10VarIntMode0EERmEQ12SerializableIT0_T_EEvRS8_RKS7_:
  753|    854|{
  754|    854|    a.Serialize(os);
  755|    854|}
_ZNK7WrapperI15VarIntFormatterIL10VarIntMode0EERmE9SerializeI10DataStreamEEvRT_:
  482|    854|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
deserialize.cpp:_ZL5UsingI15VarIntFormatterIL10VarIntMode0EEmE7WrapperIT_RT0_EOS5_:
  497|    854|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_Z9SerializeI10DataStream7WrapperI17ScriptCompressionRK7CScriptEQ12SerializableIT0_T_EEvRS8_RKS7_:
  753|    854|{
  754|    854|    a.Serialize(os);
  755|    854|}
_ZNK7WrapperI17ScriptCompressionRK7CScriptE9SerializeI10DataStreamEEvRT_:
  482|    854|    template<typename Stream> void Serialize(Stream &s) const { Formatter().Ser(s, m_object); }
_Z9SerializeI10DataStreamTk9BasicBytehEvRT_4SpanIT0_E:
  268|    194|template <typename Stream, BasicByte B> void Serialize(Stream& s, Span<B> span) { s.write(AsBytes(span)); }
deserialize.cpp:_ZL5UsingI17AmountCompressionRKlE7WrapperIT_RT0_EOS5_:
  497|    854|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17AmountCompressionRKlEC2ES2_:
  481|    854|    explicit Wrapper(T obj) : m_object(obj) {}
deserialize.cpp:_ZL5UsingI17ScriptCompressionRK7CScriptE7WrapperIT_RT0_EOS6_:
  497|    854|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI17ScriptCompressionRK7CScriptEC2ES3_:
  481|    854|    explicit Wrapper(T obj) : m_object(obj) {}
deserialize.cpp:_ZL5UsingI16TxOutCompressionRK6CTxOutE7WrapperIT_RT0_EOS6_:
  497|    854|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
_ZN7WrapperI16TxOutCompressionRK6CTxOutEC2ES3_:
  481|    854|    explicit Wrapper(T obj) : m_object(obj) {}
_Z9SerializeI10DataStream4CoinQ12SerializableIT0_T_EEvRS3_RKS2_:
  753|    854|{
  754|    854|    a.Serialize(os);
  755|    854|}
deserialize.cpp:_ZL5UsingI16TxOutCompressionR6CTxOutE7WrapperIT_RT0_EOS5_:
  497|  1.27k|static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }

_ZNK4SpanIKSt4byteE4sizeEv:
  187|  1.35k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKSt4byteE4dataEv:
  174|  2.70k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE5beginEv:
  175|    288|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKhE3endEv:
  176|    288|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZNK4SpanIhE4dataEv:
  174|  12.4k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE4dataEv:
  174|  2.01k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanISt4byteE4sizeEv:
  187|  24.6k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanISt4byteE4dataEv:
  174|  7.89k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKSt4byteE5beginEv:
  175|  4.66k|    constexpr C* begin() const noexcept { return m_data; }
_ZNK4SpanIKSt4byteE3endEv:
  176|  4.66k|    constexpr C* end() const noexcept { return m_data + m_size; }
_ZNK4SpanIKhE10size_bytesEv:
  188|  2.01k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIKhE4SpanIKSt4byteES1_IT_E:
  259|  2.01k|{
  260|  2.01k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|  2.01k|}
_ZN4SpanIKSt4byteEC2IS1_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S1_EE5valueEiE4typeELi0EEEPS6_m:
  119|  6.01k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanIhE10size_bytesEv:
  188|  12.4k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIhE4SpanIKSt4byteES0_IT_E:
  259|  4.00k|{
  260|  4.00k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|  4.00k|}
_ZN4SpanISt4byteEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  8.47k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIhE4SpanISt4byteES0_IT_E:
  264|  8.47k|{
  265|  8.47k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|  8.47k|}
_ZN4SpanIhEC2IhTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_hEE5valueEiE4typeELi0EEEPS4_m:
  119|  11.4k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZN4SpanIKhEC2INSt3__14spanIS0_Lm18446744073709551615EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.35k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2I9prevectorILj33EhjiEEERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS6_14remove_pointerIDTcldtclsr3stdE7declvalIS5_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS5_EE4sizeEEmEE5valueEDnE4typeE:
  165|    501|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIhEC2I7CScriptEERT_NSt3__19enable_ifIXaaaantsr7is_SpanIS3_EE5valuesr3std14is_convertibleIPA_NS5_14remove_pointerIDTcldtclsr3stdE7declvalIS4_EE4dataEEE4typeEPA_hEE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS4_EE4sizeEEmEE5valueEDnE4typeE:
  165|    572|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2I7CScriptEERKT_NSt3__19enable_ifIXaaaantsr7is_SpanIS4_EE5valuesr3std14is_convertibleIPA_NS7_14remove_pointerIDTcldtclsr3stdE7declvalIS6_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS6_EE4sizeEEmEE5valueEDnE4typeE:
  172|    660|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKhEC2ILi33EEERAT__S0_:
  151|    288|    constexpr Span(C (&a)[N]) noexcept : m_data(a), m_size(N) {}

_ZN10DataStreamC2E4SpanIKhE:
  165|  1.35k|    explicit DataStream(Span<const uint8_t> sp) : DataStream{AsBytes(sp)} {}
_ZN10DataStreamC2E4SpanIKSt4byteE:
  166|  1.35k|    explicit DataStream(Span<const value_type> sp) : vch(sp.data(), sp.data() + sp.size()) {}
_ZNK10DataStream5emptyEv:
  182|    854|    bool empty() const                               { return vch.size() == m_read_pos; }
_ZN10DataStream4readE4SpanISt4byteE:
  219|  8.47k|    {
  220|  8.47k|        if (dst.size() == 0) return;
  ------------------
  |  Branch (220:13): [True: 203, False: 8.27k]
  ------------------
  221|       |
  222|       |        // Read from the beginning of the buffer
  223|  8.27k|        auto next_read_pos{CheckedAdd(m_read_pos, dst.size())};
  224|  8.27k|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (224:13): [True: 0, False: 8.27k]
  |  Branch (224:43): [True: 372, False: 7.89k]
  ------------------
  225|    372|            throw std::ios_base::failure("DataStream::read(): end of data");
  226|    372|        }
  227|  7.89k|        memcpy(dst.data(), &vch[m_read_pos], dst.size());
  228|  7.89k|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (228:13): [True: 1.27k, False: 6.62k]
  ------------------
  229|  1.27k|            m_read_pos = 0;
  230|  1.27k|            vch.clear();
  231|  1.27k|            return;
  232|  1.27k|        }
  233|  6.62k|        m_read_pos = next_read_pos.value();
  234|  6.62k|    }
_ZN10DataStream6ignoreEm:
  237|    119|    {
  238|       |        // Ignore from the beginning of the buffer
  239|    119|        auto next_read_pos{CheckedAdd(m_read_pos, num_ignore)};
  240|    119|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (240:13): [True: 0, False: 119]
  |  Branch (240:43): [True: 94, False: 25]
  ------------------
  241|     94|            throw std::ios_base::failure("DataStream::ignore(): end of data");
  242|     94|        }
  243|     25|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (243:13): [True: 1, False: 24]
  ------------------
  244|      1|            m_read_pos = 0;
  245|      1|            vch.clear();
  246|      1|            return;
  247|      1|        }
  248|     24|        m_read_pos = next_read_pos.value();
  249|     24|    }
_ZN10DataStream5writeE4SpanIKSt4byteE:
  252|  4.66k|    {
  253|       |        // Write to the end of the buffer
  254|  4.66k|        vch.insert(vch.end(), src.begin(), src.end());
  255|  4.66k|    }
_ZN10DataStreamC2Ev:
  164|    854|    explicit DataStream() = default;
_ZN10DataStreamrsIR4CoinEERS_OT_:
  266|  1.35k|    {
  267|  1.35k|        ::Unserialize(*this, obj);
  268|  1.35k|        return (*this);
  269|  1.35k|    }
_ZN10DataStreamrsI7WrapperI15VarIntFormatterIL10VarIntMode0EERmEEERS_OT_:
  266|  1.27k|    {
  267|  1.27k|        ::Unserialize(*this, obj);
  268|  1.27k|        return (*this);
  269|  1.27k|    }
_ZN10DataStreamrsI7WrapperI15VarIntFormatterIL10VarIntMode0EERjEEERS_OT_:
  266|  1.13k|    {
  267|  1.13k|        ::Unserialize(*this, obj);
  268|  1.13k|        return (*this);
  269|  1.13k|    }
_ZN10DataStreamrsI4SpanIhEEERS_OT_:
  266|    879|    {
  267|    879|        ::Unserialize(*this, obj);
  268|    879|        return (*this);
  269|    879|    }
_ZN10DataStreamlsI4SpanIKhEEERS_RKT_:
  259|    660|    {
  260|    660|        ::Serialize(*this, obj);
  261|    660|        return (*this);
  262|    660|    }
_ZN10DataStreamlsI7WrapperI15VarIntFormatterIL10VarIntMode0EERmEEERS_RKT_:
  259|    854|    {
  260|    854|        ::Serialize(*this, obj);
  261|    854|        return (*this);
  262|    854|    }
_ZN10DataStreamlsI4SpanIhEEERS_RKT_:
  259|    194|    {
  260|    194|        ::Serialize(*this, obj);
  261|    194|        return (*this);
  262|    194|    }
_ZN10DataStreamlsI7WrapperI15VarIntFormatterIL10VarIntMode0EERjEEERS_RKT_:
  259|    660|    {
  260|    660|        ::Serialize(*this, obj);
  261|    660|        return (*this);
  262|    660|    }
_ZN10DataStreamlsI4CoinEERS_RKT_:
  259|    854|    {
  260|    854|        ::Serialize(*this, obj);
  261|    854|        return (*this);
  262|    854|    }

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

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

_Z13LeaveCriticalv:
   76|      2|inline void LeaveCritical() {}
_Z10DeleteLockPv:
   82|      4|inline void DeleteLock(void* cs) {}
_Z17MaybeCheckNotHeldI14AnnotatedMixinINSt3__115recursive_mutexEEERT_S5_:
  253|      2|inline MutexType& MaybeCheckNotHeld(MutexType& m) LOCKS_EXCLUDED(m) LOCK_RETURNED(m) { return m; }
_Z13EnterCriticalINSt3__115recursive_mutexEEvPKcS3_iPT_b:
   75|      2|inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, MutexType* cs, bool fTry = false) {}
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEE5EnterEPKcS6_i:
  157|      2|    {
  158|      2|        EnterCritical(pszName, pszFile, nLine, Base::mutex());
  159|       |#ifdef DEBUG_LOCKCONTENTION
  160|       |        if (Base::try_lock()) return;
  161|       |        LOG_TIME_MICROS_WITH_CATEGORY(strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine), BCLog::LOCK);
  162|       |#endif
  163|      2|        Base::lock();
  164|      2|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEEC2ERS3_PKcS7_ib:
  177|      2|    UniqueLock(MutexType& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)
  178|      2|    {
  179|      2|        if (fTry)
  ------------------
  |  Branch (179:13): [True: 0, False: 2]
  ------------------
  180|      0|            TryEnter(pszName, pszFile, nLine);
  181|      2|        else
  182|      2|            Enter(pszName, pszFile, nLine);
  183|      2|    }
_ZN10UniqueLockI14AnnotatedMixinINSt3__115recursive_mutexEEED2Ev:
  197|      2|    {
  198|      2|        if (Base::owns_lock())
  ------------------
  |  Branch (198:13): [True: 2, False: 0]
  ------------------
  199|      2|            LeaveCritical();
  200|      2|    }
_ZN14AnnotatedMixinINSt3__15mutexEED2Ev:
   94|      2|    ~AnnotatedMixin() {
   95|      2|        DeleteLock((void*)this);
   96|      2|    }
_ZN14AnnotatedMixinINSt3__115recursive_mutexEED2Ev:
   94|      2|    ~AnnotatedMixin() {
   95|      2|        DeleteLock((void*)this);
   96|      2|    }

_Z29coins_deserialize_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
   51|  1.35k|    {                                                      \
   52|  1.35k|        try {                                              \
   53|  1.35k|            code                                           \
   54|  1.35k|        } catch (const invalid_fuzzing_input_exception&) { \
   55|    498|        }                                                  \
   56|  1.35k|    }
deserialize.cpp:_ZN12_GLOBAL__N_127DeserializeFromFuzzingInputIR4CoinEEvNSt3__14spanIKhLm18446744073709551615EEEOT_:
  109|  1.35k|{
  110|  1.35k|    DataStream ds{buffer};
  111|  1.35k|    try {
  112|  1.35k|        ds >> obj;
  113|  1.35k|    } catch (const std::ios_base::failure&) {
  114|    498|        throw invalid_fuzzing_input_exception();
  115|    498|    }
  116|    854|    assert(buffer.empty() || !Serialize(obj).empty());
  117|    854|}
deserialize.cpp:_ZN12_GLOBAL__N_19SerializeI4CoinEE10DataStreamRKT_:
   93|    854|{
   94|    854|    DataStream ds{};
   95|    854|    ds << obj;
   96|    854|    return ds;
   97|    854|}

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

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

_ZN17BasicTestingSetupD2Ev:
  199|      2|{
  200|      2|    m_node.ecc_context.reset();
  201|      2|    m_node.kernel.reset();
  202|       |    if constexpr (!G_FUZZING) {
  203|       |        SetMockTime(0s); // Reset mocktime for following tests
  204|       |    }
  205|      2|    LogInstance().DisconnectTestLogger();
  206|      2|    if (m_has_custom_datadir) {
  ------------------
  |  Branch (206:9): [True: 0, False: 2]
  ------------------
  207|       |        // Only remove the lock file, preserve the data directory.
  208|      0|        UnlockDirectory(m_path_lock, ".lock");
  209|      0|        fs::remove(m_path_lock / ".lock");
  210|      2|    } else {
  211|      2|        fs::remove_all(m_path_root);
  212|      2|    }
  213|      2|    gArgs.ClearArgs();
  214|      2|}

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

_ZN7uint160C2Ev:
  192|  1.70k|    constexpr uint160() = default;
_ZN9base_blobILj160EEC2Ev:
   35|  1.70k|    constexpr base_blob() : m_data() {}

_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|  1.35k|{
   53|  1.35k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  1.35k|    ) {
   58|  1.35k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 1.35k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  1.35k|    }
   62|  1.35k|    return std::forward<T>(val);
   63|  1.35k|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|  1.35k|{
   53|  1.35k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  1.35k|    ) {
   58|  1.35k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 1.35k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  1.35k|    }
   62|  1.35k|    return std::forward<T>(val);
   63|  1.35k|}

_ZN8BaseHashI7uint160EC2Ev:
   15|    849|    BaseHash() : m_hash() {}

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

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

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

