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

_Z16le16toh_internalt:
   29|  1.96k|{
   30|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_16(little_endian_16bits);
   31|  1.96k|        else return little_endian_16bits;
   32|  1.96k|}
_Z16le64toh_internalm:
   69|     86|{
   70|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_64(little_endian_64bits);
   71|     86|        else return little_endian_64bits;
   72|     86|}
_Z16le32toh_internalj:
   49|    304|{
   50|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(little_endian_32bits);
   51|    304|        else return little_endian_32bits;
   52|    304|}

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

_Z8ReadLE16ITk8ByteTypehEtPKT_:
   20|    788|{
   21|    788|    uint16_t x;
   22|    788|    memcpy(&x, ptr, 2);
   23|    788|    return le16toh_internal(x);
   24|    788|}
_Z8ReadLE32ITk8ByteTypehEjPKT_:
   28|     62|{
   29|     62|    uint32_t x;
   30|     62|    memcpy(&x, ptr, 4);
   31|     62|    return le32toh_internal(x);
   32|     62|}

_ZN9ChainCodeD2Ev:
   28|      2|    ~ChainCode() { memory_cleanse(data(), size()); }

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

_ZN9prevectorILj36EhjiE6insertITkNSt3__114input_iteratorENS0_8iteratorEEEvS3_T_S4_:
  335|  37.7k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  336|  37.7k|        size_type p = pos - begin();
  337|  37.7k|        difference_type count = last - first;
  338|  37.7k|        size_type new_size = size() + count;
  339|  37.7k|        if (capacity() < new_size) {
  ------------------
  |  Branch (339:13): [True: 6.16k, False: 31.5k]
  ------------------
  340|  6.16k|            change_capacity(new_size + (new_size >> 1));
  341|  6.16k|        }
  342|  37.7k|        T* ptr = item_ptr(p);
  343|  37.7k|        T* dst = ptr + count;
  344|  37.7k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  345|  37.7k|        _size += count;
  346|  37.7k|        fill(ptr, first, last);
  347|  37.7k|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS0_8iteratorEEEvPhT_S5_:
  167|  37.7k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|  1.15M|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 1.12M, False: 37.7k]
  ------------------
  169|  1.12M|            new(static_cast<void*>(dst)) T(*first);
  170|  1.12M|            ++dst;
  171|  1.12M|            ++first;
  172|  1.12M|        }
  173|  37.7k|    }
_ZNK9prevectorILj36EhjiE8iteratoreqES1_:
   74|  1.15M|        bool operator==(iterator x) const { return ptr == x.ptr; }
_ZN9prevectorILj36EhjiE8iteratorppEv:
   64|  1.12M|        iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj16EhjiE9is_directEv:
  126|     16|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj16EhjiED2Ev:
  422|     16|    ~prevector() {
  423|     16|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 0, False: 16]
  ------------------
  424|      0|            free(_union.indirect_contents.indirect);
  425|      0|            _union.indirect_contents.indirect = nullptr;
  426|      0|        }
  427|     16|    }
_ZN9prevectorILj36EhjiEC2EOS0_:
  224|   533k|        : _union(std::move(other._union)), _size(other._size)
  225|   533k|    {
  226|   533k|        other._size = 0;
  227|   533k|    }
_ZN9prevectorILj36EhjiE9push_backERKh:
  392|  61.7k|    void push_back(const T& value) {
  393|  61.7k|        emplace_back(value);
  394|  61.7k|    }
_ZN9prevectorILj36EhjiE12emplace_backIJRKhEEEvDpOT_:
  383|  61.7k|    void emplace_back(Args&&... args) {
  384|  61.7k|        size_type new_size = size() + 1;
  385|  61.7k|        if (capacity() < new_size) {
  ------------------
  |  Branch (385:13): [True: 227, False: 61.5k]
  ------------------
  386|    227|            change_capacity(new_size + (new_size >> 1));
  387|    227|        }
  388|  61.7k|        new(item_ptr(size())) T(std::forward<Args>(args)...);
  389|  61.7k|        _size++;
  390|  61.7k|    }
_ZN9prevectorILj36EhjiE20resize_uninitializedEj:
  349|  4.40k|    inline void resize_uninitialized(size_type new_size) {
  350|       |        // resize_uninitialized changes the size of the prevector but does not initialize it.
  351|       |        // If size < new_size, the added elements must be initialized explicitly.
  352|  4.40k|        if (capacity() < new_size) {
  ------------------
  |  Branch (352:13): [True: 2.58k, False: 1.81k]
  ------------------
  353|  2.58k|            change_capacity(new_size);
  354|  2.58k|            _size += new_size - size();
  355|  2.58k|            return;
  356|  2.58k|        }
  357|  1.81k|        if (new_size < size()) {
  ------------------
  |  Branch (357:13): [True: 0, False: 1.81k]
  ------------------
  358|      0|            erase(item_ptr(new_size), end());
  359|  1.81k|        } else {
  360|  1.81k|            _size += new_size - size();
  361|  1.81k|        }
  362|  1.81k|    }
_ZN9prevectorILj36EhjiEaSEOS0_:
  237|   227k|    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
  238|   227k|        if (!is_direct()) {
  ------------------
  |  Branch (238:13): [True: 0, False: 227k]
  ------------------
  239|      0|            free(_union.indirect_contents.indirect);
  240|      0|        }
  241|   227k|        _union = std::move(other._union);
  242|   227k|        _size = other._size;
  243|   227k|        other._size = 0;
  244|   227k|        return *this;
  245|   227k|    }
_ZNK9prevectorILj36EhjiE14const_iteratoreqES1_:
  102|  48.0M|        bool operator==(const_iterator x) const { return ptr == x.ptr; }
_ZN9prevectorILj36EhjiE14const_iteratorppEv:
   92|  25.3M|        const_iterator& operator++() { ptr++; return *this; }
_ZN9prevectorILj36EhjiE8item_ptrEi:
  159|  1.32M|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (159:47): [True: 743k, False: 584k]
  ------------------
_ZNK9prevectorILj36EhjiE9is_directEv:
  126|  55.0M|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj36EhjiE10direct_ptrEi:
  122|   751k|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj36EhjiE12indirect_ptrEi:
  124|   584k|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj36EhjiE15change_capacityEj:
  128|  11.7k|    void change_capacity(size_type new_capacity) {
  129|  11.7k|        if (new_capacity <= N) {
  ------------------
  |  Branch (129:13): [True: 0, False: 11.7k]
  ------------------
  130|      0|            if (!is_direct()) {
  ------------------
  |  Branch (130:17): [True: 0, False: 0]
  ------------------
  131|      0|                T* indirect = indirect_ptr(0);
  132|      0|                T* src = indirect;
  133|      0|                T* dst = direct_ptr(0);
  134|      0|                memcpy(dst, src, size() * sizeof(T));
  135|      0|                free(indirect);
  136|      0|                _size -= N + 1;
  137|      0|            }
  138|  11.7k|        } else {
  139|  11.7k|            if (!is_direct()) {
  ------------------
  |  Branch (139:17): [True: 4.13k, False: 7.64k]
  ------------------
  140|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  141|       |                    success. These should instead use an allocator or new/delete so that handlers
  142|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  143|  4.13k|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  144|  4.13k|                assert(_union.indirect_contents.indirect);
  ------------------
  |  Branch (144:17): [True: 4.13k, False: 0]
  ------------------
  145|  4.13k|                _union.indirect_contents.capacity = new_capacity;
  146|  7.64k|            } else {
  147|  7.64k|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  148|  7.64k|                assert(new_indirect);
  ------------------
  |  Branch (148:17): [True: 7.64k, False: 0]
  ------------------
  149|  7.64k|                T* src = direct_ptr(0);
  150|  7.64k|                T* dst = reinterpret_cast<T*>(new_indirect);
  151|  7.64k|                memcpy(dst, src, size() * sizeof(T));
  152|  7.64k|                _union.indirect_contents.indirect = new_indirect;
  153|  7.64k|                _union.indirect_contents.capacity = new_capacity;
  154|  7.64k|                _size += N + 1;
  155|  7.64k|            }
  156|  11.7k|        }
  157|  11.7k|    }
_ZNK9prevectorILj36EhjiE3endEv:
  258|  25.3M|    const_iterator end() const { return const_iterator(item_ptr(size())); }
_ZNK9prevectorILj36EhjiE8item_ptrEi:
  160|  25.3M|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (160:59): [True: 21.3k, False: 25.3M]
  ------------------
_ZNK9prevectorILj36EhjiE10direct_ptrEi:
  123|  21.3k|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj36EhjiE12indirect_ptrEi:
  125|  25.3M|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZNK9prevectorILj36EhjiE4sizeEv:
  247|  26.8M|    size_type size() const {
  248|  26.8M|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (248:16): [True: 882k, False: 25.9M]
  ------------------
  249|  26.8M|    }
_ZNK9prevectorILj36EhjiE5beginEv:
  256|  6.65k|    const_iterator begin() const { return const_iterator(item_ptr(0)); }
_ZNK9prevectorILj36EhjiE14const_iteratordeEv:
   89|   168M|        const T& operator*() const { return *ptr; }
_ZNK9prevectorILj36EhjiEeqERKS0_:
  429|  1.20k|    constexpr bool operator==(const prevector& other) const {
  430|  1.20k|        return std::ranges::equal(*this, other);
  431|  1.20k|    }
_ZNK9prevectorILj36EhjiE14const_iteratorssES1_:
  103|  25.3M|        auto operator<=>(const_iterator x) const { return ptr <=> x.ptr; }
_ZNK9prevectorILj36EhjiE14const_iteratorptEv:
   90|  46.2M|        const T* operator->() const { return ptr; }
_ZN9prevectorILj36EhjiEC2Ev:
  196|   345k|    prevector() = default;
_ZN9prevectorILj36EhjiE6insertENS0_8iteratorERKh:
  307|   323k|    iterator insert(iterator pos, const T& value) {
  308|   323k|        size_type p = pos - begin();
  309|   323k|        size_type new_size = size() + 1;
  310|   323k|        if (capacity() < new_size) {
  ------------------
  |  Branch (310:13): [True: 2.33k, False: 320k]
  ------------------
  311|  2.33k|            change_capacity(new_size + (new_size >> 1));
  312|  2.33k|        }
  313|   323k|        T* ptr = item_ptr(p);
  314|   323k|        T* dst = ptr + 1;
  315|   323k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  316|   323k|        _size++;
  317|   323k|        new(static_cast<void*>(ptr)) T(value);
  318|   323k|        return iterator(ptr);
  319|   323k|    }
_ZmiN9prevectorILj36EhjiE8iteratorES1_:
   68|   433k|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj36EhjiE8iteratordeEv:
   61|  1.98M|        T& operator*() const { return *ptr; }
_ZNK9prevectorILj36EhjiE8capacityEv:
  260|   461k|    size_t capacity() const {
  261|   461k|        if (is_direct()) {
  ------------------
  |  Branch (261:13): [True: 269k, False: 192k]
  ------------------
  262|   269k|            return N;
  263|   269k|        } else {
  264|   192k|            return _union.indirect_contents.capacity;
  265|   192k|        }
  266|   461k|    }
_ZN9prevectorILj36EhjiE8iteratorC2EPh:
   60|  1.18M|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj36EhjiE6insertITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvNS0_8iteratorET_S8_:
  335|  34.4k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  336|  34.4k|        size_type p = pos - begin();
  337|  34.4k|        difference_type count = last - first;
  338|  34.4k|        size_type new_size = size() + count;
  339|  34.4k|        if (capacity() < new_size) {
  ------------------
  |  Branch (339:13): [True: 471, False: 33.9k]
  ------------------
  340|    471|            change_capacity(new_size + (new_size >> 1));
  341|    471|        }
  342|  34.4k|        T* ptr = item_ptr(p);
  343|  34.4k|        T* dst = ptr + count;
  344|  34.4k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  345|  34.4k|        _size += count;
  346|  34.4k|        fill(ptr, first, last);
  347|  34.4k|    }
_ZN9prevectorILj36EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvPhT_S8_:
  167|  34.4k|    void fill(T* dst, InputIterator first, InputIterator last) {
  168|   279k|        while (first != last) {
  ------------------
  |  Branch (168:16): [True: 244k, False: 34.4k]
  ------------------
  169|   244k|            new(static_cast<void*>(dst)) T(*first);
  170|   244k|            ++dst;
  171|   244k|            ++first;
  172|   244k|        }
  173|  34.4k|    }
_ZN9prevectorILj36EhjiE3endEv:
  257|   433k|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj36EhjiE5beginEv:
  255|   433k|    iterator begin() { return iterator(item_ptr(0)); }
_ZN9prevectorILj36EhjiEixEj:
  268|  4.40k|    T& operator[](size_type pos) {
  269|  4.40k|        return *item_ptr(pos);
  270|  4.40k|    }
_ZN9prevectorILj36EhjiE5clearEv:
  303|  4.55k|    void clear() {
  304|  4.55k|        resize(0);
  305|  4.55k|    }
_ZN9prevectorILj36EhjiE6resizeEj:
  276|  4.55k|    void resize(size_type new_size) {
  277|  4.55k|        size_type cur_size = size();
  278|  4.55k|        if (cur_size == new_size) {
  ------------------
  |  Branch (278:13): [True: 4.55k, False: 0]
  ------------------
  279|  4.55k|            return;
  280|  4.55k|        }
  281|      0|        if (cur_size > new_size) {
  ------------------
  |  Branch (281:13): [True: 0, False: 0]
  ------------------
  282|      0|            erase(item_ptr(new_size), end());
  283|      0|            return;
  284|      0|        }
  285|      0|        if (new_size > capacity()) {
  ------------------
  |  Branch (285:13): [True: 0, False: 0]
  ------------------
  286|      0|            change_capacity(new_size);
  287|      0|        }
  288|      0|        ptrdiff_t increase = new_size - cur_size;
  289|      0|        fill(item_ptr(cur_size), increase);
  290|      0|        _size += increase;
  291|      0|    }
_ZN9prevectorILj36EhjiED2Ev:
  422|   879k|    ~prevector() {
  423|   879k|        if (!is_direct()) {
  ------------------
  |  Branch (423:13): [True: 7.64k, False: 871k]
  ------------------
  424|  7.64k|            free(_union.indirect_contents.indirect);
  425|  7.64k|            _union.indirect_contents.indirect = nullptr;
  426|  7.64k|        }
  427|   879k|    }
_ZN9prevectorILj36EhjiE14const_iteratorC2EPKh:
   87|  56.1M|        const_iterator(const T* ptr_) : ptr(ptr_) {}
_ZNK9prevectorILj36EhjiE14const_iteratorplEj:
   97|  30.7M|        const_iterator operator+(size_type n) const { return const_iterator(ptr + n); }
_ZmiN9prevectorILj36EhjiE14const_iteratorES1_:
   96|  71.7M|        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
_ZN9prevectorILj36EhjiE14const_iteratorppEi:
   94|  25.3M|        const_iterator operator++(int) { const_iterator copy(*this); ++(*this); return copy; }
_ZNK9prevectorILj36EhjiE14const_iteratorixEj:
   91|    850|        const T& operator[](size_type pos) const { return ptr[pos]; }
_ZN9prevectorILj36EhjiE14const_iteratorpLEj:
   99|  15.4M|        const_iterator& operator+=(size_type n) { ptr += n; return *this; }

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

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

_ZN10miniscript8internal12SanitizeTypeENS_4TypeE:
   19|  11.2M|Type SanitizeType(Type e) {
   20|  11.2M|    int num_types = (e << "K"_mst) + (e << "V"_mst) + (e << "B"_mst) + (e << "W"_mst);
   21|  11.2M|    if (num_types == 0) return ""_mst; // No valid type, don't care about the rest
  ------------------
  |  Branch (21:9): [True: 765, False: 11.2M]
  ------------------
   22|  11.2M|    CHECK_NONFATAL(num_types == 1); // K, V, B, W all conflict with each other
  ------------------
  |  |  113|  11.2M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   23|  11.2M|    CHECK_NONFATAL(!(e << "z"_mst) || !(e << "o"_mst)); // z conflicts with o
  ------------------
  |  |  113|  21.9M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 666k, False: 10.6M]
  |  |  |  Branch (113:28): [True: 10.6M, False: 0]
  |  |  ------------------
  ------------------
   24|  11.2M|    CHECK_NONFATAL(!(e << "n"_mst) || !(e << "z"_mst)); // n conflicts with z
  ------------------
  |  |  113|  11.5M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.0M, False: 205k]
  |  |  |  Branch (113:28): [True: 205k, False: 0]
  |  |  ------------------
  ------------------
   25|  11.2M|    CHECK_NONFATAL(!(e << "n"_mst) || !(e << "W"_mst)); // n conflicts with W
  ------------------
  |  |  113|  11.5M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.0M, False: 205k]
  |  |  |  Branch (113:28): [True: 205k, False: 0]
  |  |  ------------------
  ------------------
   26|  11.2M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "d"_mst)); // V conflicts with d
  ------------------
  |  |  113|  11.4M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.1M, False: 155k]
  |  |  |  Branch (113:28): [True: 155k, False: 0]
  |  |  ------------------
  ------------------
   27|  11.2M|    CHECK_NONFATAL(!(e << "K"_mst) ||  (e << "u"_mst)); // K implies u
  ------------------
  |  |  113|  11.3M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.2M, False: 25.5k]
  |  |  |  Branch (113:28): [True: 25.5k, False: 0]
  |  |  ------------------
  ------------------
   28|  11.2M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "u"_mst)); // V conflicts with u
  ------------------
  |  |  113|  11.4M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.1M, False: 155k]
  |  |  |  Branch (113:28): [True: 155k, False: 0]
  |  |  ------------------
  ------------------
   29|  11.2M|    CHECK_NONFATAL(!(e << "e"_mst) || !(e << "f"_mst)); // e conflicts with f
  ------------------
  |  |  113|  22.1M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 480k, False: 10.8M]
  |  |  |  Branch (113:28): [True: 10.8M, False: 0]
  |  |  ------------------
  ------------------
   30|  11.2M|    CHECK_NONFATAL(!(e << "e"_mst) ||  (e << "d"_mst)); // e implies d
  ------------------
  |  |  113|  22.1M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 480k, False: 10.8M]
  |  |  |  Branch (113:28): [True: 10.8M, False: 0]
  |  |  ------------------
  ------------------
   31|  11.2M|    CHECK_NONFATAL(!(e << "V"_mst) || !(e << "e"_mst)); // V conflicts with e
  ------------------
  |  |  113|  11.4M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.1M, False: 155k]
  |  |  |  Branch (113:28): [True: 155k, False: 0]
  |  |  ------------------
  ------------------
   32|  11.2M|    CHECK_NONFATAL(!(e << "d"_mst) || !(e << "f"_mst)); // d conflicts with f
  ------------------
  |  |  113|  22.2M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 380k, False: 10.9M]
  |  |  |  Branch (113:28): [True: 10.9M, False: 0]
  |  |  ------------------
  ------------------
   33|  11.2M|    CHECK_NONFATAL(!(e << "V"_mst) ||  (e << "f"_mst)); // V implies f
  ------------------
  |  |  113|  11.4M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.1M, False: 155k]
  |  |  |  Branch (113:28): [True: 155k, False: 0]
  |  |  ------------------
  ------------------
   34|  11.2M|    CHECK_NONFATAL(!(e << "K"_mst) ||  (e << "s"_mst)); // K implies s
  ------------------
  |  |  113|  11.3M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 11.2M, False: 25.5k]
  |  |  |  Branch (113:28): [True: 25.5k, False: 0]
  |  |  ------------------
  ------------------
   35|  11.2M|    CHECK_NONFATAL(!(e << "z"_mst) ||  (e << "m"_mst)); // z implies m
  ------------------
  |  |  113|  21.9M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 666k, False: 10.6M]
  |  |  |  Branch (113:28): [True: 10.6M, False: 0]
  |  |  ------------------
  ------------------
   36|  11.2M|    return e;
   37|  11.2M|}
_ZN10miniscript8internal11ComputeTypeENS_8FragmentENS_4TypeES2_S2_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEjmmmNS_17MiniscriptContextE:
   40|  11.2M|                 size_t data_size, size_t n_subs, size_t n_keys, MiniscriptContext ms_ctx) {
   41|       |    // Sanity check on data
   42|  11.2M|    if (fragment == Fragment::SHA256 || fragment == Fragment::HASH256) {
  ------------------
  |  Branch (42:9): [True: 2.98k, False: 11.2M]
  |  Branch (42:41): [True: 5.29k, False: 11.2M]
  ------------------
   43|  8.27k|        CHECK_NONFATAL(data_size == 32);
  ------------------
  |  |  113|  8.27k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   44|  11.2M|    } else if (fragment == Fragment::RIPEMD160 || fragment == Fragment::HASH160) {
  ------------------
  |  Branch (44:16): [True: 2.36k, False: 11.2M]
  |  Branch (44:51): [True: 2.80k, False: 11.2M]
  ------------------
   45|  5.17k|        CHECK_NONFATAL(data_size == 20);
  ------------------
  |  |  113|  5.17k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   46|  11.2M|    } else {
   47|  11.2M|        CHECK_NONFATAL(data_size == 0);
  ------------------
  |  |  113|  11.2M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   48|  11.2M|    }
   49|       |    // Sanity check on k
   50|  11.2M|    if (fragment == Fragment::OLDER || fragment == Fragment::AFTER) {
  ------------------
  |  Branch (50:9): [True: 28.3k, False: 11.2M]
  |  Branch (50:40): [True: 11.2k, False: 11.2M]
  ------------------
   51|  39.6k|        CHECK_NONFATAL(k >= 1 && k < 0x80000000UL);
  ------------------
  |  |  113|  79.3k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 39.6k, False: 0]
  |  |  |  Branch (113:28): [True: 39.6k, False: 0]
  |  |  ------------------
  ------------------
   52|  11.2M|    } else if (fragment == Fragment::MULTI || fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (52:16): [True: 769, False: 11.2M]
  |  Branch (52:47): [True: 1.68k, False: 11.2M]
  ------------------
   53|  2.45k|        CHECK_NONFATAL(k >= 1 && k <= n_keys);
  ------------------
  |  |  113|  4.90k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 2.45k, False: 0]
  |  |  |  Branch (113:28): [True: 2.45k, False: 0]
  |  |  ------------------
  ------------------
   54|  11.2M|    } else if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (54:16): [True: 37.1k, False: 11.2M]
  ------------------
   55|  37.1k|        CHECK_NONFATAL(k >= 1 && k <= n_subs);
  ------------------
  |  |  113|  74.2k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 37.1k, False: 0]
  |  |  |  Branch (113:28): [True: 37.1k, False: 0]
  |  |  ------------------
  ------------------
   56|  11.2M|    } else {
   57|  11.2M|        CHECK_NONFATAL(k == 0);
  ------------------
  |  |  113|  11.2M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   58|  11.2M|    }
   59|       |    // Sanity check on subs
   60|  11.2M|    if (fragment == Fragment::AND_V || fragment == Fragment::AND_B || fragment == Fragment::OR_B ||
  ------------------
  |  Branch (60:9): [True: 65.2k, False: 11.2M]
  |  Branch (60:40): [True: 8.29k, False: 11.2M]
  |  Branch (60:71): [True: 22.5k, False: 11.2M]
  ------------------
   61|  11.2M|        fragment == Fragment::OR_C || fragment == Fragment::OR_I || fragment == Fragment::OR_D) {
  ------------------
  |  Branch (61:9): [True: 10.8k, False: 11.1M]
  |  Branch (61:39): [True: 54.5k, False: 11.1M]
  |  Branch (61:69): [True: 10.0k, False: 11.1M]
  ------------------
   62|   171k|        CHECK_NONFATAL(n_subs == 2);
  ------------------
  |  |  113|   171k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   63|  11.1M|    } else if (fragment == Fragment::ANDOR) {
  ------------------
  |  Branch (63:16): [True: 48.8k, False: 11.0M]
  ------------------
   64|  48.8k|        CHECK_NONFATAL(n_subs == 3);
  ------------------
  |  |  113|  48.8k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   65|  11.0M|    } else if (fragment == Fragment::WRAP_A || fragment == Fragment::WRAP_S || fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (65:16): [True: 50.4k, False: 11.0M]
  |  Branch (65:48): [True: 15.5k, False: 11.0M]
  |  Branch (65:80): [True: 11.9k, False: 11.0M]
  ------------------
   66|  11.0M|               fragment == Fragment::WRAP_D || fragment == Fragment::WRAP_V || fragment == Fragment::WRAP_J ||
  ------------------
  |  Branch (66:16): [True: 18.7k, False: 10.9M]
  |  Branch (66:48): [True: 113k, False: 10.8M]
  |  Branch (66:80): [True: 19.0k, False: 10.8M]
  ------------------
   67|  10.8M|               fragment == Fragment::WRAP_N) {
  ------------------
  |  Branch (67:16): [True: 718k, False: 10.1M]
  ------------------
   68|   948k|        CHECK_NONFATAL(n_subs == 1);
  ------------------
  |  |  113|   948k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   69|  10.1M|    } else if (fragment != Fragment::THRESH) {
  ------------------
  |  Branch (69:16): [True: 10.0M, False: 37.1k]
  ------------------
   70|  10.0M|        CHECK_NONFATAL(n_subs == 0);
  ------------------
  |  |  113|  10.0M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   71|  10.0M|    }
   72|       |    // Sanity check on keys
   73|  11.2M|    if (fragment == Fragment::PK_K || fragment == Fragment::PK_H) {
  ------------------
  |  Branch (73:9): [True: 5.52k, False: 11.2M]
  |  Branch (73:39): [True: 14.1k, False: 11.2M]
  ------------------
   74|  19.6k|        CHECK_NONFATAL(n_keys == 1);
  ------------------
  |  |  113|  19.6k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   75|  11.2M|    } else if (fragment == Fragment::MULTI) {
  ------------------
  |  Branch (75:16): [True: 769, False: 11.2M]
  ------------------
   76|    769|        CHECK_NONFATAL(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTISIG);
  ------------------
  |  |  113|  1.53k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 769, False: 0]
  |  |  |  Branch (113:28): [True: 769, False: 0]
  |  |  ------------------
  ------------------
   77|    769|        CHECK_NONFATAL(!IsTapscript(ms_ctx));
  ------------------
  |  |  113|    769|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   78|  11.2M|    } else if (fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (78:16): [True: 1.68k, False: 11.2M]
  ------------------
   79|  1.68k|        CHECK_NONFATAL(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTI_A);
  ------------------
  |  |  113|  3.36k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  |  |  ------------------
  |  |  |  Branch (113:28): [True: 1.68k, False: 0]
  |  |  |  Branch (113:28): [True: 1.68k, False: 0]
  |  |  ------------------
  ------------------
   80|  1.68k|        CHECK_NONFATAL(IsTapscript(ms_ctx));
  ------------------
  |  |  113|  1.68k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   81|  11.2M|    } else {
   82|  11.2M|        CHECK_NONFATAL(n_keys == 0);
  ------------------
  |  |  113|  11.2M|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
   83|  11.2M|    }
   84|       |
   85|       |    // Below is the per-fragment logic for computing the expression types.
   86|       |    // It heavily relies on Type's << operator (where "X << a_mst" means
   87|       |    // "X has all properties listed in a").
   88|  11.2M|    switch (fragment) {
  ------------------
  |  Branch (88:13): [True: 11.2M, False: 0]
  ------------------
   89|  5.52k|        case Fragment::PK_K: return "Konudemsxk"_mst;
  ------------------
  |  Branch (89:9): [True: 5.52k, False: 11.2M]
  ------------------
   90|  14.1k|        case Fragment::PK_H: return "Knudemsxk"_mst;
  ------------------
  |  Branch (90:9): [True: 14.1k, False: 11.2M]
  ------------------
   91|  28.3k|        case Fragment::OLDER: return
  ------------------
  |  Branch (91:9): [True: 28.3k, False: 11.2M]
  ------------------
   92|  28.3k|            "g"_mst.If(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) |
   93|  28.3k|            "h"_mst.If(!(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)) |
   94|  28.3k|            "Bzfmxk"_mst;
   95|  11.2k|        case Fragment::AFTER: return
  ------------------
  |  Branch (95:9): [True: 11.2k, False: 11.2M]
  ------------------
   96|  11.2k|            "i"_mst.If(k >= LOCKTIME_THRESHOLD) |
   97|  11.2k|            "j"_mst.If(k < LOCKTIME_THRESHOLD) |
   98|  11.2k|            "Bzfmxk"_mst;
   99|  2.98k|        case Fragment::SHA256: return "Bonudmk"_mst;
  ------------------
  |  Branch (99:9): [True: 2.98k, False: 11.2M]
  ------------------
  100|  2.36k|        case Fragment::RIPEMD160: return "Bonudmk"_mst;
  ------------------
  |  Branch (100:9): [True: 2.36k, False: 11.2M]
  ------------------
  101|  5.29k|        case Fragment::HASH256: return "Bonudmk"_mst;
  ------------------
  |  Branch (101:9): [True: 5.29k, False: 11.2M]
  ------------------
  102|  2.80k|        case Fragment::HASH160: return "Bonudmk"_mst;
  ------------------
  |  Branch (102:9): [True: 2.80k, False: 11.2M]
  ------------------
  103|  86.5k|        case Fragment::JUST_1: return "Bzufmxk"_mst;
  ------------------
  |  Branch (103:9): [True: 86.5k, False: 11.2M]
  ------------------
  104|  9.93M|        case Fragment::JUST_0: return "Bzudemsxk"_mst;
  ------------------
  |  Branch (104:9): [True: 9.93M, False: 1.36M]
  ------------------
  105|  50.4k|        case Fragment::WRAP_A: return
  ------------------
  |  Branch (105:9): [True: 50.4k, False: 11.2M]
  ------------------
  106|  50.4k|            "W"_mst.If(x << "B"_mst) | // W=B_x
  107|  50.4k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  108|  50.4k|            (x & "udfems"_mst) | // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  109|  50.4k|            "x"_mst; // x
  110|  15.5k|        case Fragment::WRAP_S: return
  ------------------
  |  Branch (110:9): [True: 15.5k, False: 11.2M]
  ------------------
  111|  15.5k|            "W"_mst.If(x << "Bo"_mst) | // W=B_x*o_x
  112|  15.5k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  113|  15.5k|            (x & "udfemsx"_mst); // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x, x=x_x
  114|  11.9k|        case Fragment::WRAP_C: return
  ------------------
  |  Branch (114:9): [True: 11.9k, False: 11.2M]
  ------------------
  115|  11.9k|            "B"_mst.If(x << "K"_mst) | // B=K_x
  116|  11.9k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  117|  11.9k|            (x & "ondfem"_mst) | // o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x
  118|  11.9k|            "us"_mst; // u, s
  119|  18.7k|        case Fragment::WRAP_D: return
  ------------------
  |  Branch (119:9): [True: 18.7k, False: 11.2M]
  ------------------
  120|  18.7k|            "B"_mst.If(x << "Vz"_mst) | // B=V_x*z_x
  121|  18.7k|            "o"_mst.If(x << "z"_mst) | // o=z_x
  122|  18.7k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  123|  18.7k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  124|  18.7k|            (x & "ms"_mst) | // m=m_x, s=s_x
  125|       |            // NOTE: 'd:' is 'u' under Tapscript but not P2WSH as MINIMALIF is only a policy rule there.
  126|  18.7k|            "u"_mst.If(IsTapscript(ms_ctx)) |
  127|  18.7k|            "ndx"_mst; // n, d, x
  128|   113k|        case Fragment::WRAP_V: return
  ------------------
  |  Branch (128:9): [True: 113k, False: 11.1M]
  ------------------
  129|   113k|            "V"_mst.If(x << "B"_mst) | // V=B_x
  130|   113k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  131|   113k|            (x & "zonms"_mst) | // z=z_x, o=o_x, n=n_x, m=m_x, s=s_x
  132|   113k|            "fx"_mst; // f, x
  133|  19.0k|        case Fragment::WRAP_J: return
  ------------------
  |  Branch (133:9): [True: 19.0k, False: 11.2M]
  ------------------
  134|  19.0k|            "B"_mst.If(x << "Bn"_mst) | // B=B_x*n_x
  135|  19.0k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  136|  19.0k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  137|  19.0k|            (x & "oums"_mst) | // o=o_x, u=u_x, m=m_x, s=s_x
  138|  19.0k|            "ndx"_mst; // n, d, x
  139|   718k|        case Fragment::WRAP_N: return
  ------------------
  |  Branch (139:9): [True: 718k, False: 10.5M]
  ------------------
  140|   718k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  141|   718k|            (x & "Bzondfems"_mst) | // B=B_x, z=z_x, o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  142|   718k|            "ux"_mst; // u, x
  143|  65.2k|        case Fragment::AND_V: return
  ------------------
  |  Branch (143:9): [True: 65.2k, False: 11.2M]
  ------------------
  144|  65.2k|            (y & "KVB"_mst).If(x << "V"_mst) | // B=V_x*B_y, V=V_x*V_y, K=V_x*K_y
  145|  65.2k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  146|  65.2k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  147|  65.2k|            (x & y & "mz"_mst) | // m=m_x*m_y, z=z_x*z_y
  148|  65.2k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  149|  65.2k|            "f"_mst.If((y << "f"_mst) || (x << "s"_mst)) | // f=f_y+s_x
  ------------------
  |  Branch (149:24): [True: 33.1k, False: 32.0k]
  |  Branch (149:42): [True: 18.4k, False: 13.6k]
  ------------------
  150|  65.2k|            (y & "ux"_mst) | // u=u_y, x=x_y
  151|  65.2k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  152|  65.2k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (152:24): [True: 62.0k, False: 3.19k]
  ------------------
  153|  62.0k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (153:20): [True: 11.2k, False: 50.7k]
  |  Branch (153:38): [True: 3.05k, False: 8.20k]
  ------------------
  154|  58.9k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (154:18): [True: 7.47k, False: 51.5k]
  |  Branch (154:36): [True: 214, False: 7.25k]
  ------------------
  155|  58.7k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (155:18): [True: 1.98k, False: 56.7k]
  |  Branch (155:36): [True: 1.70k, False: 280]
  ------------------
  156|  57.0k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*!(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (156:18): [True: 6.39k, False: 50.6k]
  |  Branch (156:36): [True: 82, False: 6.31k]
  ------------------
  157|  8.29k|        case Fragment::AND_B: return
  ------------------
  |  Branch (157:9): [True: 8.29k, False: 11.2M]
  ------------------
  158|  8.29k|            (x & "B"_mst).If(y << "W"_mst) | // B=B_x*W_y
  159|  8.29k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  160|  8.29k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  161|  8.29k|            (x & y & "e"_mst).If((x & y) << "s"_mst) | // e=e_x*e_y*s_x*s_y
  162|  8.29k|            (x & y & "dzm"_mst) | // d=d_x*d_y, z=z_x*z_y, m=m_x*m_y
  163|  8.29k|            "f"_mst.If(((x & y) << "f"_mst) || (x << "sf"_mst) || (y << "sf"_mst)) | // f=f_x*f_y + f_x*s_x + f_y*s_y
  ------------------
  |  Branch (163:24): [True: 5.04k, False: 3.24k]
  |  Branch (163:48): [True: 418, False: 2.82k]
  |  Branch (163:67): [True: 449, False: 2.38k]
  ------------------
  164|  8.29k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  165|  8.29k|            "ux"_mst | // u, x
  166|  8.29k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  167|  8.29k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (167:24): [True: 7.77k, False: 520]
  ------------------
  168|  7.77k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (168:20): [True: 854, False: 6.91k]
  |  Branch (168:38): [True: 463, False: 391]
  ------------------
  169|  7.30k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (169:18): [True: 1.46k, False: 5.84k]
  |  Branch (169:36): [True: 158, False: 1.30k]
  ------------------
  170|  7.15k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (170:18): [True: 275, False: 6.87k]
  |  Branch (170:36): [True: 139, False: 136]
  ------------------
  171|  7.01k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*!(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (171:18): [True: 403, False: 6.60k]
  |  Branch (171:36): [True: 8, False: 395]
  ------------------
  172|  22.5k|        case Fragment::OR_B: return
  ------------------
  |  Branch (172:9): [True: 22.5k, False: 11.2M]
  ------------------
  173|  22.5k|            "B"_mst.If(x << "Bd"_mst && y << "Wd"_mst) | // B=B_x*d_x*W_x*d_y
  ------------------
  |  Branch (173:24): [True: 22.5k, False: 17]
  |  Branch (173:41): [True: 22.5k, False: 6]
  ------------------
  174|  22.5k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  175|  22.5k|            (x & y & "m"_mst).If((x | y) << "s"_mst && (x & y) << "e"_mst) | // m=m_x*m_y*e_x*e_y*(s_x+s_y)
  ------------------
  |  Branch (175:34): [True: 14.6k, False: 7.96k]
  |  Branch (175:56): [True: 13.6k, False: 911]
  ------------------
  176|  22.5k|            (x & y & "zse"_mst) | // z=z_x*z_y, s=s_x*s_y, e=e_x*e_y
  177|  22.5k|            "dux"_mst | // d, u, x
  178|  22.5k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  179|  22.5k|            (x & y & "k"_mst); // k=k_x*k_y
  180|  10.0k|        case Fragment::OR_D: return
  ------------------
  |  Branch (180:9): [True: 10.0k, False: 11.2M]
  ------------------
  181|  10.0k|            (y & "B"_mst).If(x << "Bdu"_mst) | // B=B_y*B_x*d_x*u_x
  182|  10.0k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  183|  10.0k|            (x & y & "m"_mst).If(x << "e"_mst && (x | y) << "s"_mst) | // m=m_x*m_y*e_x*(s_x+s_y)
  ------------------
  |  Branch (183:34): [True: 8.18k, False: 1.87k]
  |  Branch (183:50): [True: 6.70k, False: 1.47k]
  ------------------
  184|  10.0k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  185|  10.0k|            (y & "ufde"_mst) | // u=u_y, f=f_y, d=d_y, e=e_y
  186|  10.0k|            "x"_mst | // x
  187|  10.0k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  188|  10.0k|            (x & y & "k"_mst); // k=k_x*k_y
  189|  10.8k|        case Fragment::OR_C: return
  ------------------
  |  Branch (189:9): [True: 10.8k, False: 11.2M]
  ------------------
  190|  10.8k|            (y & "V"_mst).If(x << "Bdu"_mst) | // V=V_y*B_x*u_x*d_x
  191|  10.8k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  192|  10.8k|            (x & y & "m"_mst).If(x << "e"_mst && (x | y) << "s"_mst) | // m=m_x*m_y*e_x*(s_x+s_y)
  ------------------
  |  Branch (192:34): [True: 9.11k, False: 1.76k]
  |  Branch (192:50): [True: 3.88k, False: 5.22k]
  ------------------
  193|  10.8k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  194|  10.8k|            "fx"_mst | // f, x
  195|  10.8k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  196|  10.8k|            (x & y & "k"_mst); // k=k_x*k_y
  197|  54.5k|        case Fragment::OR_I: return
  ------------------
  |  Branch (197:9): [True: 54.5k, False: 11.2M]
  ------------------
  198|  54.5k|            (x & y & "VBKufs"_mst) | // V=V_x*V_y, B=B_x*B_y, K=K_x*K_y, u=u_x*u_y, f=f_x*f_y, s=s_x*s_y
  199|  54.5k|            "o"_mst.If((x & y) << "z"_mst) | // o=z_x*z_y
  200|  54.5k|            ((x | y) & "e"_mst).If((x | y) << "f"_mst) | // e=e_x*f_y+f_x*e_y
  201|  54.5k|            (x & y & "m"_mst).If((x | y) << "s"_mst) | // m=m_x*m_y*(s_x+s_y)
  202|  54.5k|            ((x | y) & "d"_mst) | // d=d_x+d_y
  203|  54.5k|            "x"_mst | // x
  204|  54.5k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  205|  54.5k|            (x & y & "k"_mst); // k=k_x*k_y
  206|  48.8k|        case Fragment::ANDOR: return
  ------------------
  |  Branch (206:9): [True: 48.8k, False: 11.2M]
  ------------------
  207|  48.8k|            (y & z & "BKV"_mst).If(x << "Bdu"_mst) | // B=B_x*d_x*u_x*B_y*B_z, K=B_x*d_x*u_x*K_y*K_z, V=B_x*d_x*u_x*V_y*V_z
  208|  48.8k|            (x & y & z & "z"_mst) | // z=z_x*z_y*z_z
  209|  48.8k|            ((x | (y & z)) & "o"_mst).If((x | (y & z)) << "z"_mst) | // o=o_x*z_y*z_z+z_x*o_y*o_z
  210|  48.8k|            (y & z & "u"_mst) | // u=u_y*u_z
  211|  48.8k|            (z & "f"_mst).If((x << "s"_mst) || (y << "f"_mst)) | // f=(s_x+f_y)*f_z
  ------------------
  |  Branch (211:30): [True: 45.1k, False: 3.66k]
  |  Branch (211:48): [True: 1.87k, False: 1.79k]
  ------------------
  212|  48.8k|            (z & "d"_mst) | // d=d_z
  213|  48.8k|            (z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_z*(s_x+f_y)
  ------------------
  |  Branch (213:30): [True: 45.1k, False: 3.66k]
  |  Branch (213:46): [True: 1.87k, False: 1.79k]
  ------------------
  214|  48.8k|            (x & y & z & "m"_mst).If(x << "e"_mst && (x | y | z) << "s"_mst) | // m=m_x*m_y*m_z*e_x*(s_x+s_y+s_z)
  ------------------
  |  Branch (214:38): [True: 47.8k, False: 963]
  |  Branch (214:54): [True: 46.8k, False: 991]
  ------------------
  215|  48.8k|            (z & (x | y) & "s"_mst) | // s=s_z*(s_x+s_y)
  216|  48.8k|            "x"_mst | // x
  217|  48.8k|            ((x | y | z) & "ghij"_mst) | // g=g_x+g_y+g_z, h=h_x+h_y+h_z, i=i_x+i_y+i_z, j=j_x+j_y_j_z
  218|  48.8k|            "k"_mst.If(((x & y & z) << "k"_mst) &&
  ------------------
  |  Branch (218:24): [True: 40.8k, False: 7.99k]
  ------------------
  219|  40.8k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (219:20): [True: 917, False: 39.8k]
  |  Branch (219:38): [True: 381, False: 536]
  ------------------
  220|  40.4k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (220:18): [True: 8.03k, False: 32.3k]
  |  Branch (220:36): [True: 3.73k, False: 4.29k]
  ------------------
  221|  36.6k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (221:18): [True: 309, False: 36.3k]
  |  Branch (221:36): [True: 71, False: 238]
  ------------------
  222|  36.6k|                ((x << "j"_mst) && (y << "i"_mst)))); // k=k_x*k_y*k_z* !(g_x*h_y + h_x*g_y + i_x*j_y + j_x*i_y)
  ------------------
  |  Branch (222:18): [True: 739, False: 35.8k]
  |  Branch (222:36): [True: 3, False: 736]
  ------------------
  223|    769|        case Fragment::MULTI: {
  ------------------
  |  Branch (223:9): [True: 769, False: 11.2M]
  ------------------
  224|    769|            return "Bnudemsk"_mst;
  225|      0|        }
  226|  1.68k|        case Fragment::MULTI_A: {
  ------------------
  |  Branch (226:9): [True: 1.68k, False: 11.2M]
  ------------------
  227|  1.68k|            return "Budemsk"_mst;
  228|      0|        }
  229|  37.1k|        case Fragment::THRESH: {
  ------------------
  |  Branch (229:9): [True: 37.1k, False: 11.2M]
  ------------------
  230|  37.1k|            bool all_e = true;
  231|  37.1k|            bool all_m = true;
  232|  37.1k|            uint32_t args = 0;
  233|  37.1k|            uint32_t num_s = 0;
  234|  37.1k|            Type acc_tl = "k"_mst;
  235|   100k|            for (size_t i = 0; i < sub_types.size(); ++i) {
  ------------------
  |  Branch (235:32): [True: 63.2k, False: 37.0k]
  ------------------
  236|  63.2k|                Type t = sub_types[i];
  237|  63.2k|                if (!(t << (i ? "Wdu"_mst : "Bdu"_mst))) return ""_mst; // Require Bdu, Wdu, Wdu, ...
  ------------------
  |  Branch (237:21): [True: 75, False: 63.1k]
  |  Branch (237:29): [True: 26.1k, False: 37.1k]
  ------------------
  238|  63.1k|                if (!(t << "e"_mst)) all_e = false;
  ------------------
  |  Branch (238:21): [True: 2.01k, False: 61.1k]
  ------------------
  239|  63.1k|                if (!(t << "m"_mst)) all_m = false;
  ------------------
  |  Branch (239:21): [True: 2.00k, False: 61.1k]
  ------------------
  240|  63.1k|                if (t << "s"_mst) num_s += 1;
  ------------------
  |  Branch (240:21): [True: 47.2k, False: 15.9k]
  ------------------
  241|  63.1k|                args += (t << "z"_mst) ? 0 : (t << "o"_mst) ? 1 : 2;
  ------------------
  |  Branch (241:25): [True: 27.2k, False: 35.9k]
  |  Branch (241:46): [True: 1.93k, False: 33.9k]
  ------------------
  242|  63.1k|                acc_tl = ((acc_tl | t) & "ghij"_mst) |
  243|       |                    // Thresh contains a combination of timelocks if it has threshold > 1 and
  244|       |                    // it contains two different children that have different types of timelocks
  245|       |                    // Note how if any of the children don't have "k", the parent also does not have "k"
  246|  63.1k|                    "k"_mst.If(((acc_tl & t) << "k"_mst) && ((k <= 1) ||
  ------------------
  |  Branch (246:32): [True: 61.1k, False: 2.00k]
  |  Branch (246:62): [True: 45.9k, False: 15.1k]
  ------------------
  247|  15.1k|                        ((k > 1) && !(((acc_tl << "g"_mst) && (t << "h"_mst)) ||
  ------------------
  |  Branch (247:26): [True: 15.1k, False: 0]
  |  Branch (247:40): [True: 530, False: 14.6k]
  |  Branch (247:63): [True: 101, False: 429]
  ------------------
  248|  15.0k|                        ((acc_tl << "h"_mst) && (t << "g"_mst)) ||
  ------------------
  |  Branch (248:26): [True: 1.05k, False: 14.0k]
  |  Branch (248:49): [True: 505, False: 552]
  ------------------
  249|  14.5k|                        ((acc_tl << "i"_mst) && (t << "j"_mst)) ||
  ------------------
  |  Branch (249:26): [True: 421, False: 14.1k]
  |  Branch (249:49): [True: 201, False: 220]
  ------------------
  250|  14.3k|                        ((acc_tl << "j"_mst) && (t << "i"_mst))))));
  ------------------
  |  Branch (250:26): [True: 377, False: 14.0k]
  |  Branch (250:49): [True: 123, False: 254]
  ------------------
  251|  63.1k|            }
  252|  37.0k|            return "Bdu"_mst |
  253|  37.0k|                   "z"_mst.If(args == 0) | // z=all z
  254|  37.0k|                   "o"_mst.If(args == 1) | // o=all z except one o
  255|  37.0k|                   "e"_mst.If(all_e && num_s == n_subs) | // e=all e and all s
  ------------------
  |  Branch (255:31): [True: 35.0k, False: 1.97k]
  |  Branch (255:40): [True: 30.5k, False: 4.55k]
  ------------------
  256|  37.0k|                   "m"_mst.If(all_e && all_m && num_s >= n_subs - k) | // m=all e, >=(n-k) s
  ------------------
  |  Branch (256:31): [True: 35.0k, False: 1.97k]
  |  Branch (256:40): [True: 34.2k, False: 861]
  |  Branch (256:49): [True: 30.2k, False: 4.01k]
  ------------------
  257|  37.0k|                   "s"_mst.If(num_s >= n_subs - k + 1) |  // s= >=(n-k+1) s
  258|  37.0k|                   acc_tl; // timelock info
  259|  37.1k|            }
  260|  11.2M|    }
  261|  11.2M|    assert(false);
  ------------------
  |  Branch (261:5): [Folded, False: 0]
  ------------------
  262|      0|}
_ZN10miniscript8internal16ComputeScriptLenENS_8FragmentENS_4TypeEmjmmNS_17MiniscriptContextE:
  265|  11.2M|                        size_t n_keys, MiniscriptContext ms_ctx) {
  266|  11.2M|    switch (fragment) {
  ------------------
  |  Branch (266:13): [True: 11.2M, False: 0]
  ------------------
  267|  86.5k|        case Fragment::JUST_1:
  ------------------
  |  Branch (267:9): [True: 86.5k, False: 11.2M]
  ------------------
  268|  10.0M|        case Fragment::JUST_0: return 1;
  ------------------
  |  Branch (268:9): [True: 9.93M, False: 1.36M]
  ------------------
  269|  5.52k|        case Fragment::PK_K: return IsTapscript(ms_ctx) ? 33 : 34;
  ------------------
  |  Branch (269:9): [True: 5.52k, False: 11.2M]
  |  Branch (269:37): [True: 4.53k, False: 988]
  ------------------
  270|  14.1k|        case Fragment::PK_H: return 3 + 21;
  ------------------
  |  Branch (270:9): [True: 14.1k, False: 11.2M]
  ------------------
  271|  28.3k|        case Fragment::OLDER:
  ------------------
  |  Branch (271:9): [True: 28.3k, False: 11.2M]
  ------------------
  272|  39.6k|        case Fragment::AFTER: return 1 + BuildScript(k).size();
  ------------------
  |  Branch (272:9): [True: 11.2k, False: 11.2M]
  ------------------
  273|  5.29k|        case Fragment::HASH256:
  ------------------
  |  Branch (273:9): [True: 5.29k, False: 11.2M]
  ------------------
  274|  8.27k|        case Fragment::SHA256: return 4 + 2 + 33;
  ------------------
  |  Branch (274:9): [True: 2.98k, False: 11.2M]
  ------------------
  275|  2.80k|        case Fragment::HASH160:
  ------------------
  |  Branch (275:9): [True: 2.80k, False: 11.2M]
  ------------------
  276|  5.17k|        case Fragment::RIPEMD160: return 4 + 2 + 21;
  ------------------
  |  Branch (276:9): [True: 2.36k, False: 11.2M]
  ------------------
  277|    769|        case Fragment::MULTI: return 1 + BuildScript(n_keys).size() + BuildScript(k).size() + 34 * n_keys;
  ------------------
  |  Branch (277:9): [True: 769, False: 11.2M]
  ------------------
  278|  1.68k|        case Fragment::MULTI_A: return (1 + 32 + 1) * n_keys + BuildScript(k).size() + 1;
  ------------------
  |  Branch (278:9): [True: 1.68k, False: 11.2M]
  ------------------
  279|  65.2k|        case Fragment::AND_V: return subsize;
  ------------------
  |  Branch (279:9): [True: 65.2k, False: 11.2M]
  ------------------
  280|   113k|        case Fragment::WRAP_V: return subsize + (sub0typ << "x"_mst);
  ------------------
  |  Branch (280:9): [True: 113k, False: 11.1M]
  ------------------
  281|  15.5k|        case Fragment::WRAP_S:
  ------------------
  |  Branch (281:9): [True: 15.5k, False: 11.2M]
  ------------------
  282|  27.4k|        case Fragment::WRAP_C:
  ------------------
  |  Branch (282:9): [True: 11.9k, False: 11.2M]
  ------------------
  283|   746k|        case Fragment::WRAP_N:
  ------------------
  |  Branch (283:9): [True: 718k, False: 10.5M]
  ------------------
  284|   754k|        case Fragment::AND_B:
  ------------------
  |  Branch (284:9): [True: 8.29k, False: 11.2M]
  ------------------
  285|   777k|        case Fragment::OR_B: return subsize + 1;
  ------------------
  |  Branch (285:9): [True: 22.5k, False: 11.2M]
  ------------------
  286|  50.4k|        case Fragment::WRAP_A:
  ------------------
  |  Branch (286:9): [True: 50.4k, False: 11.2M]
  ------------------
  287|  61.3k|        case Fragment::OR_C: return subsize + 2;
  ------------------
  |  Branch (287:9): [True: 10.8k, False: 11.2M]
  ------------------
  288|  18.7k|        case Fragment::WRAP_D:
  ------------------
  |  Branch (288:9): [True: 18.7k, False: 11.2M]
  ------------------
  289|  28.8k|        case Fragment::OR_D:
  ------------------
  |  Branch (289:9): [True: 10.0k, False: 11.2M]
  ------------------
  290|  83.3k|        case Fragment::OR_I:
  ------------------
  |  Branch (290:9): [True: 54.5k, False: 11.2M]
  ------------------
  291|   132k|        case Fragment::ANDOR: return subsize + 3;
  ------------------
  |  Branch (291:9): [True: 48.8k, False: 11.2M]
  ------------------
  292|  19.0k|        case Fragment::WRAP_J: return subsize + 4;
  ------------------
  |  Branch (292:9): [True: 19.0k, False: 11.2M]
  ------------------
  293|  37.1k|        case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
  ------------------
  |  Branch (293:9): [True: 37.1k, False: 11.2M]
  ------------------
  294|  11.2M|    }
  295|  11.2M|    assert(false);
  ------------------
  |  Branch (295:5): [Folded, False: 0]
  ------------------
  296|      0|}
_ZN10miniscript8internal15DecomposeScriptERK7CScript:
  369|  4.23k|{
  370|  4.23k|    std::vector<Opcode> out;
  371|  4.23k|    CScript::const_iterator it = script.begin(), itend = script.end();
  372|  25.3M|    while (it != itend) {
  ------------------
  |  Branch (372:12): [True: 25.3M, False: 4.05k]
  ------------------
  373|  25.3M|        std::vector<unsigned char> push_data;
  374|  25.3M|        opcodetype opcode;
  375|  25.3M|        if (!script.GetOp(it, opcode, push_data)) {
  ------------------
  |  Branch (375:13): [True: 142, False: 25.3M]
  ------------------
  376|    142|            return {};
  377|  25.3M|        } else if (opcode >= OP_1 && opcode <= OP_16) {
  ------------------
  |  Branch (377:20): [True: 9.42M, False: 15.9M]
  |  Branch (377:38): [True: 249k, False: 9.17M]
  ------------------
  378|       |            // Deal with OP_n (GetOp does not turn them into pushes).
  379|   249k|            push_data.assign(1, CScript::DecodeOP_N(opcode));
  380|  25.0M|        } else if (opcode == OP_CHECKSIGVERIFY) {
  ------------------
  |  Branch (380:20): [True: 313k, False: 24.7M]
  ------------------
  381|       |            // Decompose OP_CHECKSIGVERIFY into OP_CHECKSIG OP_VERIFY
  382|   313k|            out.emplace_back(OP_CHECKSIG, std::vector<unsigned char>());
  383|   313k|            opcode = OP_VERIFY;
  384|  24.7M|        } else if (opcode == OP_CHECKMULTISIGVERIFY) {
  ------------------
  |  Branch (384:20): [True: 79.1k, False: 24.7M]
  ------------------
  385|       |            // Decompose OP_CHECKMULTISIGVERIFY into OP_CHECKMULTISIG OP_VERIFY
  386|  79.1k|            out.emplace_back(OP_CHECKMULTISIG, std::vector<unsigned char>());
  387|  79.1k|            opcode = OP_VERIFY;
  388|  24.7M|        } else if (opcode == OP_EQUALVERIFY) {
  ------------------
  |  Branch (388:20): [True: 1.88M, False: 22.8M]
  ------------------
  389|       |            // Decompose OP_EQUALVERIFY into OP_EQUAL OP_VERIFY
  390|  1.88M|            out.emplace_back(OP_EQUAL, std::vector<unsigned char>());
  391|  1.88M|            opcode = OP_VERIFY;
  392|  22.8M|        } else if (opcode == OP_NUMEQUALVERIFY) {
  ------------------
  |  Branch (392:20): [True: 5.02k, False: 22.8M]
  ------------------
  393|       |            // Decompose OP_NUMEQUALVERIFY into OP_NUMEQUAL OP_VERIFY
  394|  5.02k|            out.emplace_back(OP_NUMEQUAL, std::vector<unsigned char>());
  395|  5.02k|            opcode = OP_VERIFY;
  396|  22.8M|        } else if (IsPushdataOp(opcode)) {
  ------------------
  |  Branch (396:20): [True: 137k, False: 22.6M]
  ------------------
  397|   137k|            if (!CheckMinimalPush(push_data, opcode)) return {};
  ------------------
  |  Branch (397:17): [True: 36, False: 137k]
  ------------------
  398|  22.6M|        } else if (it != itend && (opcode == OP_CHECKSIG || opcode == OP_CHECKMULTISIG || opcode == OP_EQUAL || opcode == OP_NUMEQUAL) && (*it == OP_VERIFY)) {
  ------------------
  |  Branch (398:20): [True: 22.6M, False: 3.25k]
  |  Branch (398:36): [True: 22.0k, False: 22.6M]
  |  Branch (398:61): [True: 1.33k, False: 22.6M]
  |  Branch (398:91): [True: 57.6k, False: 22.5M]
  |  Branch (398:113): [True: 3.20k, False: 22.5M]
  |  Branch (398:139): [True: 1, False: 84.2k]
  ------------------
  399|       |            // Rule out non minimal VERIFY sequences
  400|      1|            return {};
  401|      1|        }
  402|  25.3M|        out.emplace_back(opcode, std::move(push_data));
  403|  25.3M|    }
  404|  4.05k|    std::reverse(out.begin(), out.end());
  405|  4.05k|    return out;
  406|  4.23k|}
_ZN10miniscript8internal17ParseScriptNumberERKNSt3__14pairI10opcodetypeNS1_6vectorIhNS1_9allocatorIhEEEEEE:
  408|   110k|std::optional<int64_t> ParseScriptNumber(const Opcode& in) {
  409|   110k|    if (in.first == OP_0) {
  ------------------
  |  Branch (409:9): [True: 39, False: 110k]
  ------------------
  410|     39|        return 0;
  411|     39|    }
  412|   110k|    if (!in.second.empty()) {
  ------------------
  |  Branch (412:9): [True: 110k, False: 237]
  ------------------
  413|   110k|        if (IsPushdataOp(in.first) && !CheckMinimalPush(in.second, in.first)) return {};
  ------------------
  |  Branch (413:13): [True: 41.3k, False: 69.0k]
  |  Branch (413:39): [True: 0, False: 41.3k]
  ------------------
  414|   110k|        try {
  415|   110k|            return CScriptNum(in.second, true).GetInt64();
  416|   110k|        } catch(const scriptnum_error&) {}
  417|   110k|    }
  418|    458|    return {};
  419|   110k|}

miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEED2Ev:
  553|  29.1M|    {
  554|       |        // Destroy the subexpressions iteratively after moving out their
  555|       |        // subexpressions to avoid a stack-overflow due to recursive calls to
  556|       |        // the subs' destructors.
  557|       |        // We move vectors in order to only update array-pointers inside them
  558|       |        // rather than moving individual Node instances which would involve
  559|       |        // moving/copying each Node field.
  560|  29.1M|        std::vector<std::vector<Node>> queue;
  561|  29.1M|        queue.push_back(std::move(subs));
  562|  30.2M|        do {
  563|  30.2M|            auto flattening{std::move(queue.back())};
  564|  30.2M|            queue.pop_back();
  565|  30.2M|            for (Node& n : flattening) {
  ------------------
  |  Branch (565:26): [True: 1.50M, False: 30.2M]
  ------------------
  566|  1.50M|                if (!n.subs.empty()) queue.push_back(std::move(n.subs));
  ------------------
  |  Branch (566:21): [True: 1.11M, False: 382k]
  ------------------
  567|  1.50M|            }
  568|  30.2M|        } while (!queue.empty());
  ------------------
  |  Branch (568:18): [True: 1.11M, False: 29.1M]
  ------------------
  569|  29.1M|    }
miniscript.cpp:_ZN10miniscript10FromScriptIN12_GLOBAL__N_119ScriptParserContextEEENSt3__18optionalINS_4NodeINT_3KeyEEEEERK7CScriptRKS6_:
 2692|  4.27k|{
 2693|  4.27k|    using namespace internal;
 2694|       |    // A too large Script is necessarily invalid, don't bother parsing it.
 2695|  4.27k|    if (script.size() > MaxScriptSize(ctx.MsContext())) return {};
  ------------------
  |  Branch (2695:9): [True: 33, False: 4.23k]
  ------------------
 2696|  4.23k|    auto decomposed = DecomposeScript(script);
 2697|  4.23k|    if (!decomposed) return {};
  ------------------
  |  Branch (2697:9): [True: 179, False: 4.05k]
  ------------------
 2698|  4.05k|    auto it = decomposed->begin();
 2699|  4.05k|    auto ret = DecodeScript<typename Ctx::Key>(it, decomposed->end(), ctx);
 2700|  4.05k|    if (!ret) return {};
  ------------------
  |  Branch (2700:9): [True: 2.72k, False: 1.33k]
  ------------------
 2701|  1.33k|    if (it != decomposed->end()) return {};
  ------------------
  |  Branch (2701:9): [True: 124, False: 1.20k]
  ------------------
 2702|  1.20k|    return ret;
 2703|  1.33k|}
miniscript.cpp:_ZN10miniscript8internal12DecodeScriptIN12_GLOBAL__N_119ScriptParserContext3KeyES3_NSt3__111__wrap_iterIPNS5_4pairI10opcodetypeNS5_6vectorIhNS5_9allocatorIhEEEEEEEEEENS5_8optionalINS_4NodeIT_EEEERT1_SL_RKT0_:
 2297|  4.05k|{
 2298|       |    // The two integers are used to hold state for thresh()
 2299|  4.05k|    std::vector<std::tuple<DecodeContext, int64_t, int64_t>> to_parse;
 2300|  4.05k|    std::vector<Node<Key>> constructed;
 2301|       |
 2302|       |    // This is the top level, so we assume the type is B
 2303|       |    // (in particular, disallowing top level W expressions)
 2304|  4.05k|    to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2305|       |
 2306|  38.0M|    while (!to_parse.empty()) {
  ------------------
  |  Branch (2306:12): [True: 38.0M, False: 1.63k]
  ------------------
 2307|       |        // Exit early if the Miniscript is not going to be valid.
 2308|  38.0M|        if (!constructed.empty() && !constructed.back().IsValid()) return {};
  ------------------
  |  Branch (2308:13): [True: 37.6M, False: 316k]
  |  Branch (2308:37): [True: 525, False: 37.6M]
  ------------------
 2309|       |
 2310|       |        // Get the current context we are decoding within
 2311|  38.0M|        auto [cur_context, n, k] = to_parse.back();
 2312|  38.0M|        to_parse.pop_back();
 2313|       |
 2314|  38.0M|        switch(cur_context) {
  ------------------
  |  Branch (2314:16): [True: 38.0M, False: 0]
  ------------------
 2315|  12.8M|        case DecodeContext::SINGLE_BKV_EXPR: {
  ------------------
  |  Branch (2315:9): [True: 12.8M, False: 25.1M]
  ------------------
 2316|  12.8M|            if (in >= last) return {};
  ------------------
  |  Branch (2316:17): [True: 119, False: 12.8M]
  ------------------
 2317|       |
 2318|       |            // Constants
 2319|  12.8M|            if (in[0].first == OP_1) {
  ------------------
  |  Branch (2319:17): [True: 86.5k, False: 12.7M]
  ------------------
 2320|  86.5k|                ++in;
 2321|  86.5k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1);
 2322|  86.5k|                break;
 2323|  86.5k|            }
 2324|  12.7M|            if (in[0].first == OP_0) {
  ------------------
  |  Branch (2324:17): [True: 9.93M, False: 2.84M]
  ------------------
 2325|  9.93M|                ++in;
 2326|  9.93M|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0);
 2327|  9.93M|                break;
 2328|  9.93M|            }
 2329|       |            // Public keys
 2330|  2.84M|            if (in[0].second.size() == 33 || in[0].second.size() == 32) {
  ------------------
  |  Branch (2330:17): [True: 4.87k, False: 2.84M]
  |  Branch (2330:46): [True: 645, False: 2.84M]
  ------------------
 2331|  5.52k|                auto key = ctx.FromPKBytes(in[0].second.begin(), in[0].second.end());
 2332|  5.52k|                if (!key) return {};
  ------------------
  |  Branch (2332:21): [True: 0, False: 5.52k]
  ------------------
 2333|  5.52k|                ++in;
 2334|  5.52k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(*key)));
 2335|  5.52k|                break;
 2336|  5.52k|            }
 2337|  2.84M|            if (last - in >= 5 && in[0].first == OP_VERIFY && in[1].first == OP_EQUAL && in[3].first == OP_HASH160 && in[4].first == OP_DUP && in[2].second.size() == 20) {
  ------------------
  |  Branch (2337:17): [True: 2.83M, False: 3.64k]
  |  Branch (2337:35): [True: 142k, False: 2.69M]
  |  Branch (2337:63): [True: 33.6k, False: 108k]
  |  Branch (2337:90): [True: 15.8k, False: 17.7k]
  |  Branch (2337:119): [True: 14.1k, False: 1.75k]
  |  Branch (2337:144): [True: 14.1k, False: 2]
  ------------------
 2338|  14.1k|                auto key = ctx.FromPKHBytes(in[2].second.begin(), in[2].second.end());
 2339|  14.1k|                if (!key) return {};
  ------------------
  |  Branch (2339:21): [True: 0, False: 14.1k]
  ------------------
 2340|  14.1k|                in += 5;
 2341|  14.1k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(*key)));
 2342|  14.1k|                break;
 2343|  14.1k|            }
 2344|       |            // Time locks
 2345|  2.82M|            std::optional<int64_t> num;
 2346|  2.82M|            if (last - in >= 2 && in[0].first == OP_CHECKSEQUENCEVERIFY && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2346:17): [True: 2.82M, False: 268]
  |  Branch (2346:17): [True: 28.4k, False: 2.79M]
  |  Branch (2346:35): [True: 28.4k, False: 2.79M]
  |  Branch (2346:76): [True: 28.4k, False: 22]
  ------------------
 2347|  28.4k|                in += 2;
 2348|  28.4k|                if (*num < 1 || *num > 0x7FFFFFFFL) return {};
  ------------------
  |  Branch (2348:21): [True: 45, False: 28.3k]
  |  Branch (2348:33): [True: 0, False: 28.3k]
  ------------------
 2349|  28.3k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OLDER, *num);
 2350|  28.3k|                break;
 2351|  28.4k|            }
 2352|  2.79M|            if (last - in >= 2 && in[0].first == OP_CHECKLOCKTIMEVERIFY && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2352:17): [True: 2.79M, False: 268]
  |  Branch (2352:17): [True: 11.3k, False: 2.78M]
  |  Branch (2352:35): [True: 11.3k, False: 2.78M]
  |  Branch (2352:76): [True: 11.3k, False: 8]
  ------------------
 2353|  11.3k|                in += 2;
 2354|  11.3k|                if (num < 1 || num > 0x7FFFFFFFL) return {};
  ------------------
  |  Branch (2354:21): [True: 49, False: 11.2k]
  |  Branch (2354:21): [True: 49, False: 11.2k]
  |  Branch (2354:32): [True: 0, False: 11.2k]
  ------------------
 2355|  11.2k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AFTER, *num);
 2356|  11.2k|                break;
 2357|  11.3k|            }
 2358|       |            // Hashes
 2359|  2.78M|            if (last - in >= 7 && in[0].first == OP_EQUAL && in[3].first == OP_VERIFY && in[4].first == OP_EQUAL && (num = ParseScriptNumber(in[5])) && num == 32 && in[6].first == OP_SIZE) {
  ------------------
  |  Branch (2359:17): [True: 2.78M, False: 5.03k]
  |  Branch (2359:17): [True: 13.4k, False: 2.77M]
  |  Branch (2359:35): [True: 57.3k, False: 2.72M]
  |  Branch (2359:62): [True: 23.6k, False: 33.6k]
  |  Branch (2359:90): [True: 23.0k, False: 598]
  |  Branch (2359:117): [True: 22.9k, False: 162]
  |  Branch (2359:153): [True: 13.7k, False: 9.14k]
  |  Branch (2359:166): [True: 13.4k, False: 275]
  ------------------
 2360|  13.4k|                if (in[2].first == OP_SHA256 && in[1].second.size() == 32) {
  ------------------
  |  Branch (2360:21): [True: 2.98k, False: 10.4k]
  |  Branch (2360:49): [True: 2.98k, False: 6]
  ------------------
 2361|  2.98k|                    constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::SHA256, in[1].second);
 2362|  2.98k|                    in += 7;
 2363|  2.98k|                    break;
 2364|  10.5k|                } else if (in[2].first == OP_RIPEMD160 && in[1].second.size() == 20) {
  ------------------
  |  Branch (2364:28): [True: 2.37k, False: 8.12k]
  |  Branch (2364:59): [True: 2.36k, False: 3]
  ------------------
 2365|  2.36k|                    constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::RIPEMD160, in[1].second);
 2366|  2.36k|                    in += 7;
 2367|  2.36k|                    break;
 2368|  8.13k|                } else if (in[2].first == OP_HASH256 && in[1].second.size() == 32) {
  ------------------
  |  Branch (2368:28): [True: 5.29k, False: 2.83k]
  |  Branch (2368:57): [True: 5.29k, False: 3]
  ------------------
 2369|  5.29k|                    constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH256, in[1].second);
 2370|  5.29k|                    in += 7;
 2371|  5.29k|                    break;
 2372|  5.29k|                } else if (in[2].first == OP_HASH160 && in[1].second.size() == 20) {
  ------------------
  |  Branch (2372:28): [True: 2.81k, False: 29]
  |  Branch (2372:57): [True: 2.80k, False: 7]
  ------------------
 2373|  2.80k|                    constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH160, in[1].second);
 2374|  2.80k|                    in += 7;
 2375|  2.80k|                    break;
 2376|  2.80k|                }
 2377|  13.4k|            }
 2378|       |            // Multi
 2379|  2.77M|            if (last - in >= 3 && in[0].first == OP_CHECKMULTISIG) {
  ------------------
  |  Branch (2379:17): [True: 2.77M, False: 1.07k]
  |  Branch (2379:35): [True: 986, False: 2.77M]
  ------------------
 2380|    986|                if (IsTapscript(ctx.MsContext())) return {};
  ------------------
  |  Branch (2380:21): [True: 3, False: 983]
  ------------------
 2381|    983|                std::vector<Key> keys;
 2382|    983|                const auto n = ParseScriptNumber(in[1]);
 2383|    983|                if (!n || last - in < 3 + *n) return {};
  ------------------
  |  Branch (2383:21): [True: 31, False: 952]
  |  Branch (2383:27): [True: 26, False: 926]
  ------------------
 2384|    926|                if (*n < 1 || *n > 20) return {};
  ------------------
  |  Branch (2384:21): [True: 53, False: 873]
  |  Branch (2384:31): [True: 6, False: 867]
  ------------------
 2385|  3.86k|                for (int i = 0; i < *n; ++i) {
  ------------------
  |  Branch (2385:33): [True: 3.01k, False: 851]
  ------------------
 2386|  3.01k|                    if (in[2 + i].second.size() != 33) return {};
  ------------------
  |  Branch (2386:25): [True: 16, False: 3.00k]
  ------------------
 2387|  3.00k|                    auto key = ctx.FromPKBytes(in[2 + i].second.begin(), in[2 + i].second.end());
 2388|  3.00k|                    if (!key) return {};
  ------------------
  |  Branch (2388:25): [True: 0, False: 3.00k]
  ------------------
 2389|  3.00k|                    keys.push_back(std::move(*key));
 2390|  3.00k|                }
 2391|    851|                const auto k = ParseScriptNumber(in[2 + *n]);
 2392|    851|                if (!k || *k < 1 || *k > *n) return {};
  ------------------
  |  Branch (2392:21): [True: 2, False: 849]
  |  Branch (2392:27): [True: 38, False: 811]
  |  Branch (2392:37): [True: 42, False: 769]
  ------------------
 2393|    769|                in += 3 + *n;
 2394|    769|                std::reverse(keys.begin(), keys.end());
 2395|    769|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), *k);
 2396|    769|                break;
 2397|    851|            }
 2398|       |            // Tapscript's equivalent of multi
 2399|  2.77M|            if (last - in >= 4 && in[0].first == OP_NUMEQUAL) {
  ------------------
  |  Branch (2399:17): [True: 2.76M, False: 2.01k]
  |  Branch (2399:35): [True: 1.84k, False: 2.76M]
  ------------------
 2400|  1.84k|                if (!IsTapscript(ctx.MsContext())) return {};
  ------------------
  |  Branch (2400:21): [True: 15, False: 1.82k]
  ------------------
 2401|       |                // The necessary threshold of signatures.
 2402|  1.82k|                const auto k = ParseScriptNumber(in[1]);
 2403|  1.82k|                if (!k) return {};
  ------------------
  |  Branch (2403:21): [True: 3, False: 1.82k]
  ------------------
 2404|  1.82k|                if (*k < 1 || *k > MAX_PUBKEYS_PER_MULTI_A) return {};
  ------------------
  |  Branch (2404:21): [True: 44, False: 1.77k]
  |  Branch (2404:31): [True: 25, False: 1.75k]
  ------------------
 2405|  1.75k|                if (last - in < 2 + *k * 2) return {};
  ------------------
  |  Branch (2405:21): [True: 7, False: 1.74k]
  ------------------
 2406|  1.74k|                std::vector<Key> keys;
 2407|  1.74k|                keys.reserve(*k);
 2408|       |                // Walk through the expected (pubkey, CHECKSIG[ADD]) pairs.
 2409|  1.78k|                for (int pos = 2;; pos += 2) {
 2410|  1.78k|                    if (last - in < pos + 2) return {};
  ------------------
  |  Branch (2410:25): [True: 3, False: 1.78k]
  ------------------
 2411|       |                    // Make sure it's indeed an x-only pubkey and a CHECKSIG[ADD], then parse the key.
 2412|  1.78k|                    if (in[pos].first != OP_CHECKSIGADD && in[pos].first != OP_CHECKSIG) return {};
  ------------------
  |  Branch (2412:25): [True: 1.73k, False: 49]
  |  Branch (2412:60): [True: 39, False: 1.69k]
  ------------------
 2413|  1.74k|                    if (in[pos + 1].second.size() != 32) return {};
  ------------------
  |  Branch (2413:25): [True: 19, False: 1.72k]
  ------------------
 2414|  1.72k|                    auto key = ctx.FromPKBytes(in[pos + 1].second.begin(), in[pos + 1].second.end());
 2415|  1.72k|                    if (!key) return {};
  ------------------
  |  Branch (2415:25): [True: 0, False: 1.72k]
  ------------------
 2416|  1.72k|                    keys.push_back(std::move(*key));
 2417|       |                    // Make sure early we don't parse an arbitrary large expression.
 2418|  1.72k|                    if (keys.size() > MAX_PUBKEYS_PER_MULTI_A) return {};
  ------------------
  |  Branch (2418:25): [True: 0, False: 1.72k]
  ------------------
 2419|       |                    // OP_CHECKSIG means it was the last one to parse.
 2420|  1.72k|                    if (in[pos].first == OP_CHECKSIG) break;
  ------------------
  |  Branch (2420:25): [True: 1.68k, False: 39]
  ------------------
 2421|  1.72k|                }
 2422|  1.68k|                if (keys.size() < (size_t)*k) return {};
  ------------------
  |  Branch (2422:21): [True: 1, False: 1.68k]
  ------------------
 2423|  1.68k|                in += 2 + keys.size() * 2;
 2424|  1.68k|                std::reverse(keys.begin(), keys.end());
 2425|  1.68k|                constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), *k);
 2426|  1.68k|                break;
 2427|  1.68k|            }
 2428|       |            /** In the following wrappers, we only need to push SINGLE_BKV_EXPR rather
 2429|       |             * than BKV_EXPR, because and_v commutes with these wrappers. For example,
 2430|       |             * c:and_v(X,Y) produces the same script as and_v(X,c:Y). */
 2431|       |            // c: wrapper
 2432|  2.76M|            if (in[0].first == OP_CHECKSIG) {
  ------------------
  |  Branch (2432:17): [True: 13.6k, False: 2.75M]
  ------------------
 2433|  13.6k|                ++in;
 2434|  13.6k|                to_parse.emplace_back(DecodeContext::CHECK, -1, -1);
 2435|  13.6k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2436|  13.6k|                break;
 2437|  13.6k|            }
 2438|       |            // v: wrapper
 2439|  2.75M|            if (in[0].first == OP_VERIFY) {
  ------------------
  |  Branch (2439:17): [True: 128k, False: 2.62M]
  ------------------
 2440|   128k|                ++in;
 2441|   128k|                to_parse.emplace_back(DecodeContext::VERIFY, -1, -1);
 2442|   128k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2443|   128k|                break;
 2444|   128k|            }
 2445|       |            // n: wrapper
 2446|  2.62M|            if (in[0].first == OP_0NOTEQUAL) {
  ------------------
  |  Branch (2446:17): [True: 779k, False: 1.84M]
  ------------------
 2447|   779k|                ++in;
 2448|   779k|                to_parse.emplace_back(DecodeContext::ZERO_NOTEQUAL, -1, -1);
 2449|   779k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2450|   779k|                break;
 2451|   779k|            }
 2452|       |            // Thresh
 2453|  1.84M|            if (last - in >= 3 && in[0].first == OP_EQUAL && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2453:17): [True: 1.84M, False: 323]
  |  Branch (2453:17): [True: 43.9k, False: 1.80M]
  |  Branch (2453:35): [True: 44.1k, False: 1.80M]
  |  Branch (2453:62): [True: 43.9k, False: 230]
  ------------------
 2454|  43.9k|                if (*num < 1) return {};
  ------------------
  |  Branch (2454:21): [True: 59, False: 43.9k]
  ------------------
 2455|  43.9k|                in += 2;
 2456|  43.9k|                to_parse.emplace_back(DecodeContext::THRESH_W, 0, *num);
 2457|  43.9k|                break;
 2458|  43.9k|            }
 2459|       |            // OP_ENDIF can be WRAP_J, WRAP_D, ANDOR, OR_C, OR_D, or OR_I
 2460|  1.80M|            if (in[0].first == OP_ENDIF) {
  ------------------
  |  Branch (2460:17): [True: 207k, False: 1.59M]
  ------------------
 2461|   207k|                ++in;
 2462|   207k|                to_parse.emplace_back(DecodeContext::ENDIF, -1, -1);
 2463|   207k|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2464|   207k|                break;
 2465|   207k|            }
 2466|       |            /** In and_b and or_b nodes, we only look for SINGLE_BKV_EXPR, because
 2467|       |             * or_b(and_v(X,Y),Z) has script [X] [Y] [Z] OP_BOOLOR, the same as
 2468|       |             * and_v(X,or_b(Y,Z)). In this example, the former of these is invalid as
 2469|       |             * miniscript, while the latter is valid. So we leave the and_v "outside"
 2470|       |             * while decoding. */
 2471|       |            // and_b
 2472|  1.59M|            if (in[0].first == OP_BOOLAND) {
  ------------------
  |  Branch (2472:17): [True: 16.1k, False: 1.57M]
  ------------------
 2473|  16.1k|                ++in;
 2474|  16.1k|                to_parse.emplace_back(DecodeContext::AND_B, -1, -1);
 2475|  16.1k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2476|  16.1k|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2477|  16.1k|                break;
 2478|  16.1k|            }
 2479|       |            // or_b
 2480|  1.57M|            if (in[0].first == OP_BOOLOR) {
  ------------------
  |  Branch (2480:17): [True: 1.57M, False: 992]
  ------------------
 2481|  1.57M|                ++in;
 2482|  1.57M|                to_parse.emplace_back(DecodeContext::OR_B, -1, -1);
 2483|  1.57M|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2484|  1.57M|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2485|  1.57M|                break;
 2486|  1.57M|            }
 2487|       |            // Unrecognised expression
 2488|    992|            return {};
 2489|  1.57M|        }
 2490|  11.7M|        case DecodeContext::BKV_EXPR: {
  ------------------
  |  Branch (2490:9): [True: 11.7M, False: 26.2M]
  ------------------
 2491|  11.7M|            to_parse.emplace_back(DecodeContext::MAYBE_AND_V, -1, -1);
 2492|  11.7M|            to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2493|  11.7M|            break;
 2494|  1.57M|        }
 2495|  1.63M|        case DecodeContext::W_EXPR: {
  ------------------
  |  Branch (2495:9): [True: 1.63M, False: 36.3M]
  ------------------
 2496|       |            // a: wrapper
 2497|  1.63M|            if (in >= last) return {};
  ------------------
  |  Branch (2497:17): [True: 41, False: 1.63M]
  ------------------
 2498|  1.63M|            if (in[0].first == OP_FROMALTSTACK) {
  ------------------
  |  Branch (2498:17): [True: 61.2k, False: 1.57M]
  ------------------
 2499|  61.2k|                ++in;
 2500|  61.2k|                to_parse.emplace_back(DecodeContext::ALT, -1, -1);
 2501|  1.57M|            } else {
 2502|  1.57M|                to_parse.emplace_back(DecodeContext::SWAP, -1, -1);
 2503|  1.57M|            }
 2504|  1.63M|            to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2505|  1.63M|            break;
 2506|  1.63M|        }
 2507|  10.1M|        case DecodeContext::MAYBE_AND_V: {
  ------------------
  |  Branch (2507:9): [True: 10.1M, False: 27.8M]
  ------------------
 2508|       |            // If we reach a potential AND_V top-level, check if the next part of the script could be another AND_V child
 2509|       |            // These op-codes cannot end any well-formed miniscript so cannot be used in an and_v node.
 2510|  10.1M|            if (in < last && in[0].first != OP_IF && in[0].first != OP_ELSE && in[0].first != OP_NOTIF && in[0].first != OP_TOALTSTACK && in[0].first != OP_SWAP) {
  ------------------
  |  Branch (2510:17): [True: 10.1M, False: 1.64k]
  |  Branch (2510:30): [True: 10.0M, False: 92.5k]
  |  Branch (2510:54): [True: 9.97M, False: 115k]
  |  Branch (2510:80): [True: 9.90M, False: 74.2k]
  |  Branch (2510:107): [True: 9.85M, False: 50.5k]
  |  Branch (2510:139): [True: 9.83M, False: 15.5k]
  ------------------
 2511|  9.83M|                to_parse.emplace_back(DecodeContext::AND_V, -1, -1);
 2512|       |                // BKV_EXPR can contain more AND_V nodes
 2513|  9.83M|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2514|  9.83M|            }
 2515|  10.1M|            break;
 2516|  1.63M|        }
 2517|  15.5k|        case DecodeContext::SWAP: {
  ------------------
  |  Branch (2517:9): [True: 15.5k, False: 37.9M]
  ------------------
 2518|  15.5k|            if (in >= last || in[0].first != OP_SWAP || constructed.empty()) return {};
  ------------------
  |  Branch (2518:17): [True: 23, False: 15.5k]
  |  Branch (2518:31): [True: 10, False: 15.5k]
  |  Branch (2518:57): [True: 0, False: 15.5k]
  ------------------
 2519|  15.5k|            ++in;
 2520|  15.5k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_S, Vector(std::move(constructed.back()))};
 2521|  15.5k|            break;
 2522|  15.5k|        }
 2523|  50.4k|        case DecodeContext::ALT: {
  ------------------
  |  Branch (2523:9): [True: 50.4k, False: 37.9M]
  ------------------
 2524|  50.4k|            if (in >= last || in[0].first != OP_TOALTSTACK || constructed.empty()) return {};
  ------------------
  |  Branch (2524:17): [True: 5, False: 50.4k]
  |  Branch (2524:31): [True: 9, False: 50.4k]
  |  Branch (2524:63): [True: 0, False: 50.4k]
  ------------------
 2525|  50.4k|            ++in;
 2526|  50.4k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_A, Vector(std::move(constructed.back()))};
 2527|  50.4k|            break;
 2528|  50.4k|        }
 2529|  11.9k|        case DecodeContext::CHECK: {
  ------------------
  |  Branch (2529:9): [True: 11.9k, False: 37.9M]
  ------------------
 2530|  11.9k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2530:17): [True: 0, False: 11.9k]
  ------------------
 2531|  11.9k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(std::move(constructed.back()))};
 2532|  11.9k|            break;
 2533|  11.9k|        }
 2534|  18.7k|        case DecodeContext::DUP_IF: {
  ------------------
  |  Branch (2534:9): [True: 18.7k, False: 37.9M]
  ------------------
 2535|  18.7k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2535:17): [True: 0, False: 18.7k]
  ------------------
 2536|  18.7k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_D, Vector(std::move(constructed.back()))};
 2537|  18.7k|            break;
 2538|  18.7k|        }
 2539|   113k|        case DecodeContext::VERIFY: {
  ------------------
  |  Branch (2539:9): [True: 113k, False: 37.8M]
  ------------------
 2540|   113k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2540:17): [True: 0, False: 113k]
  ------------------
 2541|   113k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_V, Vector(std::move(constructed.back()))};
 2542|   113k|            break;
 2543|   113k|        }
 2544|  19.0k|        case DecodeContext::NON_ZERO: {
  ------------------
  |  Branch (2544:9): [True: 19.0k, False: 37.9M]
  ------------------
 2545|  19.0k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2545:17): [True: 0, False: 19.0k]
  ------------------
 2546|  19.0k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_J, Vector(std::move(constructed.back()))};
 2547|  19.0k|            break;
 2548|  19.0k|        }
 2549|   718k|        case DecodeContext::ZERO_NOTEQUAL: {
  ------------------
  |  Branch (2549:9): [True: 718k, False: 37.2M]
  ------------------
 2550|   718k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2550:17): [True: 0, False: 718k]
  ------------------
 2551|   718k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_N, Vector(std::move(constructed.back()))};
 2552|   718k|            break;
 2553|   718k|        }
 2554|  65.2k|        case DecodeContext::AND_V: {
  ------------------
  |  Branch (2554:9): [True: 65.2k, False: 37.9M]
  ------------------
 2555|  65.2k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2555:17): [True: 0, False: 65.2k]
  ------------------
 2556|  65.2k|            BuildBack(ctx.MsContext(), Fragment::AND_V, constructed, /*reverse=*/true);
 2557|  65.2k|            break;
 2558|  65.2k|        }
 2559|  8.29k|        case DecodeContext::AND_B: {
  ------------------
  |  Branch (2559:9): [True: 8.29k, False: 38.0M]
  ------------------
 2560|  8.29k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2560:17): [True: 0, False: 8.29k]
  ------------------
 2561|  8.29k|            BuildBack(ctx.MsContext(), Fragment::AND_B, constructed, /*reverse=*/true);
 2562|  8.29k|            break;
 2563|  8.29k|        }
 2564|  22.5k|        case DecodeContext::OR_B: {
  ------------------
  |  Branch (2564:9): [True: 22.5k, False: 37.9M]
  ------------------
 2565|  22.5k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2565:17): [True: 0, False: 22.5k]
  ------------------
 2566|  22.5k|            BuildBack(ctx.MsContext(), Fragment::OR_B, constructed, /*reverse=*/true);
 2567|  22.5k|            break;
 2568|  22.5k|        }
 2569|  10.8k|        case DecodeContext::OR_C: {
  ------------------
  |  Branch (2569:9): [True: 10.8k, False: 37.9M]
  ------------------
 2570|  10.8k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2570:17): [True: 0, False: 10.8k]
  ------------------
 2571|  10.8k|            BuildBack(ctx.MsContext(), Fragment::OR_C, constructed, /*reverse=*/true);
 2572|  10.8k|            break;
 2573|  10.8k|        }
 2574|  10.0k|        case DecodeContext::OR_D: {
  ------------------
  |  Branch (2574:9): [True: 10.0k, False: 38.0M]
  ------------------
 2575|  10.0k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2575:17): [True: 0, False: 10.0k]
  ------------------
 2576|  10.0k|            BuildBack(ctx.MsContext(), Fragment::OR_D, constructed, /*reverse=*/true);
 2577|  10.0k|            break;
 2578|  10.0k|        }
 2579|  48.8k|        case DecodeContext::ANDOR: {
  ------------------
  |  Branch (2579:9): [True: 48.8k, False: 37.9M]
  ------------------
 2580|  48.8k|            if (constructed.size() < 3) return {};
  ------------------
  |  Branch (2580:17): [True: 0, False: 48.8k]
  ------------------
 2581|  48.8k|            Node left{std::move(constructed.back())};
 2582|  48.8k|            constructed.pop_back();
 2583|  48.8k|            Node right{std::move(constructed.back())};
 2584|  48.8k|            constructed.pop_back();
 2585|  48.8k|            Node mid{std::move(constructed.back())};
 2586|  48.8k|            constructed.back() = Node{internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(left), std::move(mid), std::move(right))};
 2587|  48.8k|            break;
 2588|  48.8k|        }
 2589|  76.4k|        case DecodeContext::THRESH_W: {
  ------------------
  |  Branch (2589:9): [True: 76.4k, False: 37.9M]
  ------------------
 2590|  76.4k|            if (in >= last) return {};
  ------------------
  |  Branch (2590:17): [True: 2, False: 76.4k]
  ------------------
 2591|  76.4k|            if (in[0].first == OP_ADD) {
  ------------------
  |  Branch (2591:17): [True: 37.3k, False: 39.1k]
  ------------------
 2592|  37.3k|                ++in;
 2593|  37.3k|                to_parse.emplace_back(DecodeContext::THRESH_W, n+1, k);
 2594|  37.3k|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2595|  39.1k|            } else {
 2596|  39.1k|                to_parse.emplace_back(DecodeContext::THRESH_E, n+1, k);
 2597|       |                // All children of thresh have type modifier d, so cannot be and_v
 2598|  39.1k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2599|  39.1k|            }
 2600|  76.4k|            break;
 2601|  76.4k|        }
 2602|  37.1k|        case DecodeContext::THRESH_E: {
  ------------------
  |  Branch (2602:9): [True: 37.1k, False: 37.9M]
  ------------------
 2603|  37.1k|            if (k < 1 || k > n || constructed.size() < static_cast<size_t>(n)) return {};
  ------------------
  |  Branch (2603:17): [True: 0, False: 37.1k]
  |  Branch (2603:26): [True: 50, False: 37.1k]
  |  Branch (2603:35): [True: 0, False: 37.1k]
  ------------------
 2604|  37.1k|            std::vector<Node<Key>> subs;
 2605|   101k|            for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (2605:29): [True: 63.9k, False: 37.1k]
  ------------------
 2606|  63.9k|                Node sub{std::move(constructed.back())};
 2607|  63.9k|                constructed.pop_back();
 2608|  63.9k|                subs.push_back(std::move(sub));
 2609|  63.9k|            }
 2610|  37.1k|            constructed.emplace_back(internal::NoDupCheck{}, ctx.MsContext(), Fragment::THRESH, std::move(subs), k);
 2611|  37.1k|            break;
 2612|  37.1k|        }
 2613|   175k|        case DecodeContext::ENDIF: {
  ------------------
  |  Branch (2613:9): [True: 175k, False: 37.8M]
  ------------------
 2614|   175k|            if (in >= last) return {};
  ------------------
  |  Branch (2614:17): [True: 28, False: 175k]
  ------------------
 2615|       |
 2616|       |            // could be andor or or_i
 2617|   175k|            if (in[0].first == OP_ELSE) {
  ------------------
  |  Branch (2617:17): [True: 115k, False: 60.6k]
  ------------------
 2618|   115k|                ++in;
 2619|   115k|                to_parse.emplace_back(DecodeContext::ENDIF_ELSE, -1, -1);
 2620|   115k|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2621|   115k|            }
 2622|       |            // could be j: or d: wrapper
 2623|  60.6k|            else if (in[0].first == OP_IF) {
  ------------------
  |  Branch (2623:22): [True: 37.8k, False: 22.7k]
  ------------------
 2624|  37.8k|                if (last - in >= 2 && in[1].first == OP_DUP) {
  ------------------
  |  Branch (2624:21): [True: 37.8k, False: 9]
  |  Branch (2624:39): [True: 18.7k, False: 19.0k]
  ------------------
 2625|  18.7k|                    in += 2;
 2626|  18.7k|                    to_parse.emplace_back(DecodeContext::DUP_IF, -1, -1);
 2627|  19.1k|                } else if (last - in >= 3 && in[1].first == OP_0NOTEQUAL && in[2].first == OP_SIZE) {
  ------------------
  |  Branch (2627:28): [True: 19.0k, False: 17]
  |  Branch (2627:46): [True: 19.0k, False: 22]
  |  Branch (2627:77): [True: 19.0k, False: 16]
  ------------------
 2628|  19.0k|                    in += 3;
 2629|  19.0k|                    to_parse.emplace_back(DecodeContext::NON_ZERO, -1, -1);
 2630|  19.0k|                }
 2631|     55|                else {
 2632|     55|                    return {};
 2633|     55|                }
 2634|       |            // could be or_c or or_d
 2635|  37.8k|            } else if (in[0].first == OP_NOTIF) {
  ------------------
  |  Branch (2635:24): [True: 22.7k, False: 7]
  ------------------
 2636|  22.7k|                ++in;
 2637|  22.7k|                to_parse.emplace_back(DecodeContext::ENDIF_NOTIF, -1, -1);
 2638|  22.7k|            }
 2639|      7|            else {
 2640|      7|                return {};
 2641|      7|            }
 2642|   175k|            break;
 2643|   175k|        }
 2644|   175k|        case DecodeContext::ENDIF_NOTIF: {
  ------------------
  |  Branch (2644:9): [True: 22.7k, False: 37.9M]
  ------------------
 2645|  22.7k|            if (in >= last) return {};
  ------------------
  |  Branch (2645:17): [True: 7, False: 22.7k]
  ------------------
 2646|  22.7k|            if (in[0].first == OP_IFDUP) {
  ------------------
  |  Branch (2646:17): [True: 10.7k, False: 12.0k]
  ------------------
 2647|  10.7k|                ++in;
 2648|  10.7k|                to_parse.emplace_back(DecodeContext::OR_D, -1, -1);
 2649|  12.0k|            } else {
 2650|  12.0k|                to_parse.emplace_back(DecodeContext::OR_C, -1, -1);
 2651|  12.0k|            }
 2652|       |            // or_c and or_d both require X to have type modifier d so, can't contain and_v
 2653|  22.7k|            to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2654|  22.7k|            break;
 2655|  22.7k|        }
 2656|   106k|        case DecodeContext::ENDIF_ELSE: {
  ------------------
  |  Branch (2656:9): [True: 106k, False: 37.9M]
  ------------------
 2657|   106k|            if (in >= last) return {};
  ------------------
  |  Branch (2657:17): [True: 15, False: 106k]
  ------------------
 2658|   106k|            if (in[0].first == OP_IF) {
  ------------------
  |  Branch (2658:17): [True: 54.5k, False: 51.4k]
  ------------------
 2659|  54.5k|                ++in;
 2660|  54.5k|                BuildBack(ctx.MsContext(), Fragment::OR_I, constructed, /*reverse=*/true);
 2661|  54.5k|            } else if (in[0].first == OP_NOTIF) {
  ------------------
  |  Branch (2661:24): [True: 51.4k, False: 8]
  ------------------
 2662|  51.4k|                ++in;
 2663|  51.4k|                to_parse.emplace_back(DecodeContext::ANDOR, -1, -1);
 2664|       |                // andor requires X to have type modifier d, so it can't be and_v
 2665|  51.4k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2666|  51.4k|            } else {
 2667|      8|                return {};
 2668|      8|            }
 2669|   106k|            break;
 2670|   106k|        }
 2671|  38.0M|        }
 2672|  38.0M|    }
 2673|  1.63k|    if (constructed.size() != 1) return {};
  ------------------
  |  Branch (2673:9): [True: 0, False: 1.63k]
  ------------------
 2674|  1.63k|    Node tl_node{std::move(constructed.front())};
 2675|  1.63k|    tl_node.DuplicateKeyCheck(ctx);
 2676|       |    // Note that due to how ComputeType works (only assign the type to the node if the
 2677|       |    // subs' types are valid) this would fail if any node of tree is badly typed.
 2678|  1.63k|    if (!tl_node.IsValidTopLevel()) return {};
  ------------------
  |  Branch (2678:9): [True: 304, False: 1.33k]
  ------------------
 2679|  1.33k|    return tl_node;
 2680|  1.63k|}
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE7IsValidEv:
 1675|  37.6M|    bool IsValid() const {
 1676|  37.6M|        if (GetType() == ""_mst) return false;
  ------------------
  |  Branch (1676:13): [True: 765, False: 37.6M]
  ------------------
 1677|  37.6M|        return ScriptSize() <= internal::MaxScriptSize(m_script_ctx);
 1678|  37.6M|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE7GetTypeEv:
 1617|  40.5M|    Type GetType() const { return typ; }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE10ScriptSizeEv:
 1559|  39.1M|    size_t ScriptSize() const { return scriptlen; }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEj:
 1731|  10.0M|        : fragment(nt), k(val), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE7CalcOpsEv:
 1004|  11.2M|    internal::Ops CalcOps() const {
 1005|  11.2M|        switch (fragment) {
  ------------------
  |  Branch (1005:17): [True: 11.2M, False: 0]
  ------------------
 1006|  86.5k|            case Fragment::JUST_1: return {0, 0, {}};
  ------------------
  |  Branch (1006:13): [True: 86.5k, False: 11.2M]
  ------------------
 1007|  9.93M|            case Fragment::JUST_0: return {0, {}, 0};
  ------------------
  |  Branch (1007:13): [True: 9.93M, False: 1.36M]
  ------------------
 1008|  5.52k|            case Fragment::PK_K: return {0, 0, 0};
  ------------------
  |  Branch (1008:13): [True: 5.52k, False: 11.2M]
  ------------------
 1009|  14.1k|            case Fragment::PK_H: return {3, 0, 0};
  ------------------
  |  Branch (1009:13): [True: 14.1k, False: 11.2M]
  ------------------
 1010|  28.3k|            case Fragment::OLDER:
  ------------------
  |  Branch (1010:13): [True: 28.3k, False: 11.2M]
  ------------------
 1011|  39.6k|            case Fragment::AFTER: return {1, 0, {}};
  ------------------
  |  Branch (1011:13): [True: 11.2k, False: 11.2M]
  ------------------
 1012|  2.98k|            case Fragment::SHA256:
  ------------------
  |  Branch (1012:13): [True: 2.98k, False: 11.2M]
  ------------------
 1013|  5.34k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1013:13): [True: 2.36k, False: 11.2M]
  ------------------
 1014|  10.6k|            case Fragment::HASH256:
  ------------------
  |  Branch (1014:13): [True: 5.29k, False: 11.2M]
  ------------------
 1015|  13.4k|            case Fragment::HASH160: return {4, 0, {}};
  ------------------
  |  Branch (1015:13): [True: 2.80k, False: 11.2M]
  ------------------
 1016|  65.2k|            case Fragment::AND_V: return {subs[0].ops.count + subs[1].ops.count, subs[0].ops.sat + subs[1].ops.sat, {}};
  ------------------
  |  Branch (1016:13): [True: 65.2k, False: 11.2M]
  ------------------
 1017|  8.29k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1017:13): [True: 8.29k, False: 11.2M]
  ------------------
 1018|  8.29k|                const auto count{1 + subs[0].ops.count + subs[1].ops.count};
 1019|  8.29k|                const auto sat{subs[0].ops.sat + subs[1].ops.sat};
 1020|  8.29k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1021|  8.29k|                return {count, sat, dsat};
 1022|  10.6k|            }
 1023|  22.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1023:13): [True: 22.5k, False: 11.2M]
  ------------------
 1024|  22.5k|                const auto count{1 + subs[0].ops.count + subs[1].ops.count};
 1025|  22.5k|                const auto sat{(subs[0].ops.sat + subs[1].ops.dsat) | (subs[1].ops.sat + subs[0].ops.dsat)};
 1026|  22.5k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1027|  22.5k|                return {count, sat, dsat};
 1028|  10.6k|            }
 1029|  10.0k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1029:13): [True: 10.0k, False: 11.2M]
  ------------------
 1030|  10.0k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count};
 1031|  10.0k|                const auto sat{subs[0].ops.sat | (subs[1].ops.sat + subs[0].ops.dsat)};
 1032|  10.0k|                const auto dsat{subs[0].ops.dsat + subs[1].ops.dsat};
 1033|  10.0k|                return {count, sat, dsat};
 1034|  10.6k|            }
 1035|  10.8k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1035:13): [True: 10.8k, False: 11.2M]
  ------------------
 1036|  10.8k|                const auto count{2 + subs[0].ops.count + subs[1].ops.count};
 1037|  10.8k|                const auto sat{subs[0].ops.sat | (subs[1].ops.sat + subs[0].ops.dsat)};
 1038|  10.8k|                return {count, sat, {}};
 1039|  10.6k|            }
 1040|  54.5k|            case Fragment::OR_I: {
  ------------------
  |  Branch (1040:13): [True: 54.5k, False: 11.2M]
  ------------------
 1041|  54.5k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count};
 1042|  54.5k|                const auto sat{subs[0].ops.sat | subs[1].ops.sat};
 1043|  54.5k|                const auto dsat{subs[0].ops.dsat | subs[1].ops.dsat};
 1044|  54.5k|                return {count, sat, dsat};
 1045|  10.6k|            }
 1046|  48.8k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1046:13): [True: 48.8k, False: 11.2M]
  ------------------
 1047|  48.8k|                const auto count{3 + subs[0].ops.count + subs[1].ops.count + subs[2].ops.count};
 1048|  48.8k|                const auto sat{(subs[1].ops.sat + subs[0].ops.sat) | (subs[0].ops.dsat + subs[2].ops.sat)};
 1049|  48.8k|                const auto dsat{subs[0].ops.dsat + subs[2].ops.dsat};
 1050|  48.8k|                return {count, sat, dsat};
 1051|  10.6k|            }
 1052|    769|            case Fragment::MULTI: return {1, (uint32_t)keys.size(), (uint32_t)keys.size()};
  ------------------
  |  Branch (1052:13): [True: 769, False: 11.2M]
  ------------------
 1053|  1.68k|            case Fragment::MULTI_A: return {(uint32_t)keys.size() + 1, 0, 0};
  ------------------
  |  Branch (1053:13): [True: 1.68k, False: 11.2M]
  ------------------
 1054|  15.5k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1054:13): [True: 15.5k, False: 11.2M]
  ------------------
 1055|  27.4k|            case Fragment::WRAP_C:
  ------------------
  |  Branch (1055:13): [True: 11.9k, False: 11.2M]
  ------------------
 1056|   746k|            case Fragment::WRAP_N: return {1 + subs[0].ops.count, subs[0].ops.sat, subs[0].ops.dsat};
  ------------------
  |  Branch (1056:13): [True: 718k, False: 10.5M]
  ------------------
 1057|  50.4k|            case Fragment::WRAP_A: return {2 + subs[0].ops.count, subs[0].ops.sat, subs[0].ops.dsat};
  ------------------
  |  Branch (1057:13): [True: 50.4k, False: 11.2M]
  ------------------
 1058|  18.7k|            case Fragment::WRAP_D: return {3 + subs[0].ops.count, subs[0].ops.sat, 0};
  ------------------
  |  Branch (1058:13): [True: 18.7k, False: 11.2M]
  ------------------
 1059|  19.0k|            case Fragment::WRAP_J: return {4 + subs[0].ops.count, subs[0].ops.sat, 0};
  ------------------
  |  Branch (1059:13): [True: 19.0k, False: 11.2M]
  ------------------
 1060|   113k|            case Fragment::WRAP_V: return {subs[0].ops.count + (subs[0].GetType() << "x"_mst), subs[0].ops.sat, {}};
  ------------------
  |  Branch (1060:13): [True: 113k, False: 11.1M]
  ------------------
 1061|  37.1k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1061:13): [True: 37.1k, False: 11.2M]
  ------------------
 1062|  37.1k|                uint32_t count = 0;
 1063|  37.1k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1064|  63.9k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1064:38): [True: 63.9k, False: 37.1k]
  ------------------
 1065|  63.9k|                    count += sub.ops.count + 1;
 1066|  63.9k|                    auto next_sats = Vector(sats[0] + sub.ops.dsat);
 1067|   571k|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub.ops.dsat) | (sats[j - 1] + sub.ops.sat));
  ------------------
  |  Branch (1067:40): [True: 507k, False: 63.9k]
  ------------------
 1068|  63.9k|                    next_sats.push_back(sats[sats.size() - 1] + sub.ops.sat);
 1069|  63.9k|                    sats = std::move(next_sats);
 1070|  63.9k|                }
 1071|  37.1k|                assert(k < sats.size());
  ------------------
  |  Branch (1071:17): [True: 37.1k, False: 0]
  ------------------
 1072|  37.1k|                return {count, sats[k], sats[0]};
 1073|  37.1k|            }
 1074|  11.2M|        }
 1075|  11.2M|        assert(false);
  ------------------
  |  Branch (1075:9): [Folded, False: 0]
  ------------------
 1076|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13CalcStackSizeEv:
 1078|  11.2M|    internal::StackSize CalcStackSize() const {
 1079|  11.2M|        using namespace internal;
 1080|  11.2M|        switch (fragment) {
  ------------------
  |  Branch (1080:17): [True: 11.2M, False: 0]
  ------------------
 1081|  9.93M|            case Fragment::JUST_0: return {{}, SatInfo::Push()};
  ------------------
  |  Branch (1081:13): [True: 9.93M, False: 1.36M]
  ------------------
 1082|  86.5k|            case Fragment::JUST_1: return {SatInfo::Push(), {}};
  ------------------
  |  Branch (1082:13): [True: 86.5k, False: 11.2M]
  ------------------
 1083|  28.3k|            case Fragment::OLDER:
  ------------------
  |  Branch (1083:13): [True: 28.3k, False: 11.2M]
  ------------------
 1084|  39.6k|            case Fragment::AFTER: return {SatInfo::Push() + SatInfo::Nop(), {}};
  ------------------
  |  Branch (1084:13): [True: 11.2k, False: 11.2M]
  ------------------
 1085|  5.52k|            case Fragment::PK_K: return {SatInfo::Push()};
  ------------------
  |  Branch (1085:13): [True: 5.52k, False: 11.2M]
  ------------------
 1086|  14.1k|            case Fragment::PK_H: return {SatInfo::OP_DUP() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY()};
  ------------------
  |  Branch (1086:13): [True: 14.1k, False: 11.2M]
  ------------------
 1087|  2.98k|            case Fragment::SHA256:
  ------------------
  |  Branch (1087:13): [True: 2.98k, False: 11.2M]
  ------------------
 1088|  5.34k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1088:13): [True: 2.36k, False: 11.2M]
  ------------------
 1089|  10.6k|            case Fragment::HASH256:
  ------------------
  |  Branch (1089:13): [True: 5.29k, False: 11.2M]
  ------------------
 1090|  13.4k|            case Fragment::HASH160: return {
  ------------------
  |  Branch (1090:13): [True: 2.80k, False: 11.2M]
  ------------------
 1091|  13.4k|                SatInfo::OP_SIZE() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1092|  13.4k|                {}
 1093|  13.4k|            };
 1094|  48.8k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1094:13): [True: 48.8k, False: 11.2M]
  ------------------
 1095|  48.8k|                const auto& x{subs[0].ss};
 1096|  48.8k|                const auto& y{subs[1].ss};
 1097|  48.8k|                const auto& z{subs[2].ss};
 1098|  48.8k|                return {
 1099|  48.8k|                    (x.Sat() + SatInfo::If() + y.Sat()) | (x.Dsat() + SatInfo::If() + z.Sat()),
 1100|  48.8k|                    x.Dsat() + SatInfo::If() + z.Dsat()
 1101|  48.8k|                };
 1102|  10.6k|            }
 1103|  65.2k|            case Fragment::AND_V: {
  ------------------
  |  Branch (1103:13): [True: 65.2k, False: 11.2M]
  ------------------
 1104|  65.2k|                const auto& x{subs[0].ss};
 1105|  65.2k|                const auto& y{subs[1].ss};
 1106|  65.2k|                return {x.Sat() + y.Sat(), {}};
 1107|  10.6k|            }
 1108|  8.29k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1108:13): [True: 8.29k, False: 11.2M]
  ------------------
 1109|  8.29k|                const auto& x{subs[0].ss};
 1110|  8.29k|                const auto& y{subs[1].ss};
 1111|  8.29k|                return {x.Sat() + y.Sat() + SatInfo::BinaryOp(), x.Dsat() + y.Dsat() + SatInfo::BinaryOp()};
 1112|  10.6k|            }
 1113|  22.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1113:13): [True: 22.5k, False: 11.2M]
  ------------------
 1114|  22.5k|                const auto& x{subs[0].ss};
 1115|  22.5k|                const auto& y{subs[1].ss};
 1116|  22.5k|                return {
 1117|  22.5k|                    ((x.Sat() + y.Dsat()) | (x.Dsat() + y.Sat())) + SatInfo::BinaryOp(),
 1118|  22.5k|                    x.Dsat() + y.Dsat() + SatInfo::BinaryOp()
 1119|  22.5k|                };
 1120|  10.6k|            }
 1121|  10.8k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1121:13): [True: 10.8k, False: 11.2M]
  ------------------
 1122|  10.8k|                const auto& x{subs[0].ss};
 1123|  10.8k|                const auto& y{subs[1].ss};
 1124|  10.8k|                return {(x.Sat() + SatInfo::If()) | (x.Dsat() + SatInfo::If() + y.Sat()), {}};
 1125|  10.6k|            }
 1126|  10.0k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1126:13): [True: 10.0k, False: 11.2M]
  ------------------
 1127|  10.0k|                const auto& x{subs[0].ss};
 1128|  10.0k|                const auto& y{subs[1].ss};
 1129|  10.0k|                return {
 1130|  10.0k|                    (x.Sat() + SatInfo::OP_IFDUP(true) + SatInfo::If()) | (x.Dsat() + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.Sat()),
 1131|  10.0k|                    x.Dsat() + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.Dsat()
 1132|  10.0k|                };
 1133|  10.6k|            }
 1134|  54.5k|            case Fragment::OR_I: {
  ------------------
  |  Branch (1134:13): [True: 54.5k, False: 11.2M]
  ------------------
 1135|  54.5k|                const auto& x{subs[0].ss};
 1136|  54.5k|                const auto& y{subs[1].ss};
 1137|  54.5k|                return {SatInfo::If() + (x.Sat() | y.Sat()), SatInfo::If() + (x.Dsat() | y.Dsat())};
 1138|  10.6k|            }
 1139|       |            // multi(k, key1, key2, ..., key_n) starts off with k+1 stack elements (a 0, plus k
 1140|       |            // signatures), then reaches n+k+3 stack elements after pushing the n keys, plus k and
 1141|       |            // n itself, and ends with 1 stack element (success or failure). Thus, it net removes
 1142|       |            // k elements (from k+1 to 1), while reaching k+n+2 more than it ends with.
 1143|    769|            case Fragment::MULTI: return {SatInfo(k, k + keys.size() + 2)};
  ------------------
  |  Branch (1143:13): [True: 769, False: 11.2M]
  ------------------
 1144|       |            // multi_a(k, key1, key2, ..., key_n) starts off with n stack elements (the
 1145|       |            // signatures), reaches 1 more (after the first key push), and ends with 1. Thus it net
 1146|       |            // removes n-1 elements (from n to 1) while reaching n more than it ends with.
 1147|  1.68k|            case Fragment::MULTI_A: return {SatInfo(keys.size() - 1, keys.size())};
  ------------------
  |  Branch (1147:13): [True: 1.68k, False: 11.2M]
  ------------------
 1148|  50.4k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1148:13): [True: 50.4k, False: 11.2M]
  ------------------
 1149|   769k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1149:13): [True: 718k, False: 10.5M]
  ------------------
 1150|   784k|            case Fragment::WRAP_S: return subs[0].ss;
  ------------------
  |  Branch (1150:13): [True: 15.5k, False: 11.2M]
  ------------------
 1151|  11.9k|            case Fragment::WRAP_C: return {
  ------------------
  |  Branch (1151:13): [True: 11.9k, False: 11.2M]
  ------------------
 1152|  11.9k|                subs[0].ss.Sat() + SatInfo::OP_CHECKSIG(),
 1153|  11.9k|                subs[0].ss.Dsat() + SatInfo::OP_CHECKSIG()
 1154|  11.9k|            };
 1155|  18.7k|            case Fragment::WRAP_D: return {
  ------------------
  |  Branch (1155:13): [True: 18.7k, False: 11.2M]
  ------------------
 1156|  18.7k|                SatInfo::OP_DUP() + SatInfo::If() + subs[0].ss.Sat(),
 1157|  18.7k|                SatInfo::OP_DUP() + SatInfo::If()
 1158|  18.7k|            };
 1159|   113k|            case Fragment::WRAP_V: return {subs[0].ss.Sat() + SatInfo::OP_VERIFY(), {}};
  ------------------
  |  Branch (1159:13): [True: 113k, False: 11.1M]
  ------------------
 1160|  19.0k|            case Fragment::WRAP_J: return {
  ------------------
  |  Branch (1160:13): [True: 19.0k, False: 11.2M]
  ------------------
 1161|  19.0k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If() + subs[0].ss.Sat(),
 1162|  19.0k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If()
 1163|  19.0k|            };
 1164|  37.1k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1164:13): [True: 37.1k, False: 11.2M]
  ------------------
 1165|       |                // sats[j] is the SatInfo corresponding to all traces reaching j satisfactions.
 1166|  37.1k|                auto sats = Vector(SatInfo::Empty());
 1167|   101k|                for (size_t i = 0; i < subs.size(); ++i) {
  ------------------
  |  Branch (1167:36): [True: 63.9k, False: 37.1k]
  ------------------
 1168|       |                    // Loop over the subexpressions, processing them one by one. After adding
 1169|       |                    // element i we need to add OP_ADD (if i>0).
 1170|  63.9k|                    auto add = i ? SatInfo::BinaryOp() : SatInfo::Empty();
  ------------------
  |  Branch (1170:32): [True: 26.8k, False: 37.1k]
  ------------------
 1171|       |                    // Construct a variable that will become the next sats, starting with index 0.
 1172|  63.9k|                    auto next_sats = Vector(sats[0] + subs[i].ss.Dsat() + add);
 1173|       |                    // Then loop to construct next_sats[1..i].
 1174|   571k|                    for (size_t j = 1; j < sats.size(); ++j) {
  ------------------
  |  Branch (1174:40): [True: 507k, False: 63.9k]
  ------------------
 1175|   507k|                        next_sats.push_back(((sats[j] + subs[i].ss.Dsat()) | (sats[j - 1] + subs[i].ss.Sat())) + add);
 1176|   507k|                    }
 1177|       |                    // Finally construct next_sats[i+1].
 1178|  63.9k|                    next_sats.push_back(sats[sats.size() - 1] + subs[i].ss.Sat() + add);
 1179|       |                    // Switch over.
 1180|  63.9k|                    sats = std::move(next_sats);
 1181|  63.9k|                }
 1182|       |                // To satisfy thresh we need k satisfactions; to dissatisfy we need 0. In both
 1183|       |                // cases a push of k and an OP_EQUAL follow.
 1184|  37.1k|                return {
 1185|  37.1k|                    sats[k] + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1186|  37.1k|                    sats[0] + SatInfo::Push() + SatInfo::OP_EQUAL()
 1187|  37.1k|                };
 1188|   769k|            }
 1189|  11.2M|        }
 1190|  11.2M|        assert(false);
  ------------------
  |  Branch (1190:9): [Folded, False: 0]
  ------------------
 1191|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE15CalcWitnessSizeEv:
 1193|  11.2M|    internal::WitnessSize CalcWitnessSize() const {
 1194|  11.2M|        const uint32_t sig_size = IsTapscript(m_script_ctx) ? 1 + 65 : 1 + 72;
  ------------------
  |  Branch (1194:35): [True: 10.8M, False: 487k]
  ------------------
 1195|  11.2M|        const uint32_t pubkey_size = IsTapscript(m_script_ctx) ? 1 + 32 : 1 + 33;
  ------------------
  |  Branch (1195:38): [True: 10.8M, False: 487k]
  ------------------
 1196|  11.2M|        switch (fragment) {
  ------------------
  |  Branch (1196:17): [True: 11.2M, False: 0]
  ------------------
 1197|  9.93M|            case Fragment::JUST_0: return {{}, 0};
  ------------------
  |  Branch (1197:13): [True: 9.93M, False: 1.36M]
  ------------------
 1198|  86.5k|            case Fragment::JUST_1:
  ------------------
  |  Branch (1198:13): [True: 86.5k, False: 11.2M]
  ------------------
 1199|   114k|            case Fragment::OLDER:
  ------------------
  |  Branch (1199:13): [True: 28.3k, False: 11.2M]
  ------------------
 1200|   126k|            case Fragment::AFTER: return {0, {}};
  ------------------
  |  Branch (1200:13): [True: 11.2k, False: 11.2M]
  ------------------
 1201|  5.52k|            case Fragment::PK_K: return {sig_size, 1};
  ------------------
  |  Branch (1201:13): [True: 5.52k, False: 11.2M]
  ------------------
 1202|  14.1k|            case Fragment::PK_H: return {sig_size + pubkey_size, 1 + pubkey_size};
  ------------------
  |  Branch (1202:13): [True: 14.1k, False: 11.2M]
  ------------------
 1203|  2.98k|            case Fragment::SHA256:
  ------------------
  |  Branch (1203:13): [True: 2.98k, False: 11.2M]
  ------------------
 1204|  5.34k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1204:13): [True: 2.36k, False: 11.2M]
  ------------------
 1205|  10.6k|            case Fragment::HASH256:
  ------------------
  |  Branch (1205:13): [True: 5.29k, False: 11.2M]
  ------------------
 1206|  13.4k|            case Fragment::HASH160: return {1 + 32, {}};
  ------------------
  |  Branch (1206:13): [True: 2.80k, False: 11.2M]
  ------------------
 1207|  48.8k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1207:13): [True: 48.8k, False: 11.2M]
  ------------------
 1208|  48.8k|                const auto sat{(subs[0].ws.sat + subs[1].ws.sat) | (subs[0].ws.dsat + subs[2].ws.sat)};
 1209|  48.8k|                const auto dsat{subs[0].ws.dsat + subs[2].ws.dsat};
 1210|  48.8k|                return {sat, dsat};
 1211|  10.6k|            }
 1212|  65.2k|            case Fragment::AND_V: return {subs[0].ws.sat + subs[1].ws.sat, {}};
  ------------------
  |  Branch (1212:13): [True: 65.2k, False: 11.2M]
  ------------------
 1213|  8.29k|            case Fragment::AND_B: return {subs[0].ws.sat + subs[1].ws.sat, subs[0].ws.dsat + subs[1].ws.dsat};
  ------------------
  |  Branch (1213:13): [True: 8.29k, False: 11.2M]
  ------------------
 1214|  22.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1214:13): [True: 22.5k, False: 11.2M]
  ------------------
 1215|  22.5k|                const auto sat{(subs[0].ws.dsat + subs[1].ws.sat) | (subs[0].ws.sat + subs[1].ws.dsat)};
 1216|  22.5k|                const auto dsat{subs[0].ws.dsat + subs[1].ws.dsat};
 1217|  22.5k|                return {sat, dsat};
 1218|  10.6k|            }
 1219|  10.8k|            case Fragment::OR_C: return {subs[0].ws.sat | (subs[0].ws.dsat + subs[1].ws.sat), {}};
  ------------------
  |  Branch (1219:13): [True: 10.8k, False: 11.2M]
  ------------------
 1220|  10.0k|            case Fragment::OR_D: return {subs[0].ws.sat | (subs[0].ws.dsat + subs[1].ws.sat), subs[0].ws.dsat + subs[1].ws.dsat};
  ------------------
  |  Branch (1220:13): [True: 10.0k, False: 11.2M]
  ------------------
 1221|  54.5k|            case Fragment::OR_I: return {(subs[0].ws.sat + 1 + 1) | (subs[1].ws.sat + 1), (subs[0].ws.dsat + 1 + 1) | (subs[1].ws.dsat + 1)};
  ------------------
  |  Branch (1221:13): [True: 54.5k, False: 11.2M]
  ------------------
 1222|    769|            case Fragment::MULTI: return {k * sig_size + 1, k + 1};
  ------------------
  |  Branch (1222:13): [True: 769, False: 11.2M]
  ------------------
 1223|  1.68k|            case Fragment::MULTI_A: return {k * sig_size + static_cast<uint32_t>(keys.size()) - k, static_cast<uint32_t>(keys.size())};
  ------------------
  |  Branch (1223:13): [True: 1.68k, False: 11.2M]
  ------------------
 1224|  50.4k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1224:13): [True: 50.4k, False: 11.2M]
  ------------------
 1225|   769k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1225:13): [True: 718k, False: 10.5M]
  ------------------
 1226|   784k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1226:13): [True: 15.5k, False: 11.2M]
  ------------------
 1227|   796k|            case Fragment::WRAP_C: return subs[0].ws;
  ------------------
  |  Branch (1227:13): [True: 11.9k, False: 11.2M]
  ------------------
 1228|  18.7k|            case Fragment::WRAP_D: return {1 + 1 + subs[0].ws.sat, 1};
  ------------------
  |  Branch (1228:13): [True: 18.7k, False: 11.2M]
  ------------------
 1229|   113k|            case Fragment::WRAP_V: return {subs[0].ws.sat, {}};
  ------------------
  |  Branch (1229:13): [True: 113k, False: 11.1M]
  ------------------
 1230|  19.0k|            case Fragment::WRAP_J: return {subs[0].ws.sat, 1};
  ------------------
  |  Branch (1230:13): [True: 19.0k, False: 11.2M]
  ------------------
 1231|  37.1k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1231:13): [True: 37.1k, False: 11.2M]
  ------------------
 1232|  37.1k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1233|  63.9k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1233:38): [True: 63.9k, False: 37.1k]
  ------------------
 1234|  63.9k|                    auto next_sats = Vector(sats[0] + sub.ws.dsat);
 1235|   571k|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub.ws.dsat) | (sats[j - 1] + sub.ws.sat));
  ------------------
  |  Branch (1235:40): [True: 507k, False: 63.9k]
  ------------------
 1236|  63.9k|                    next_sats.push_back(sats[sats.size() - 1] + sub.ws.sat);
 1237|  63.9k|                    sats = std::move(next_sats);
 1238|  63.9k|                }
 1239|  37.1k|                assert(k < sats.size());
  ------------------
  |  Branch (1239:17): [True: 37.1k, False: 0]
  ------------------
 1240|  37.1k|                return {sats[k], sats[0]};
 1241|  37.1k|            }
 1242|  11.2M|        }
 1243|  11.2M|        assert(false);
  ------------------
  |  Branch (1243:9): [Folded, False: 0]
  ------------------
 1244|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8CalcTypeEv:
  780|  11.2M|    Type CalcType() const {
  781|  11.2M|        using namespace internal;
  782|       |
  783|       |        // THRESH has a variable number of subexpressions
  784|  11.2M|        std::vector<Type> sub_types;
  785|  11.2M|        if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (785:13): [True: 37.1k, False: 11.2M]
  ------------------
  786|  63.9k|            for (const auto& sub : subs) sub_types.push_back(sub.GetType());
  ------------------
  |  Branch (786:34): [True: 63.9k, False: 37.1k]
  ------------------
  787|  37.1k|        }
  788|       |        // All other nodes than THRESH can be computed just from the types of the 0-3 subexpressions.
  789|  11.2M|        Type x = subs.size() > 0 ? subs[0].GetType() : ""_mst;
  ------------------
  |  Branch (789:18): [True: 1.20M, False: 10.0M]
  ------------------
  790|  11.2M|        Type y = subs.size() > 1 ? subs[1].GetType() : ""_mst;
  ------------------
  |  Branch (790:18): [True: 226k, False: 11.0M]
  ------------------
  791|  11.2M|        Type z = subs.size() > 2 ? subs[2].GetType() : ""_mst;
  ------------------
  |  Branch (791:18): [True: 54.5k, False: 11.2M]
  ------------------
  792|       |
  793|  11.2M|        return SanitizeType(ComputeType(fragment, x, y, z, sub_types, k, data.size(), subs.size(), keys.size(), m_script_ctx));
  794|  11.2M|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13CalcScriptLenEv:
  619|  11.2M|    {
  620|  11.2M|        size_t subsize = 0;
  621|  11.2M|        for (const auto& sub : subs) {
  ------------------
  |  Branch (621:30): [True: 1.50M, False: 11.2M]
  ------------------
  622|  1.50M|            subsize += sub.ScriptSize();
  623|  1.50M|        }
  624|  11.2M|        Type sub0type = subs.size() > 0 ? subs[0].GetType() : ""_mst;
  ------------------
  |  Branch (624:25): [True: 1.20M, False: 10.0M]
  ------------------
  625|  11.2M|        return internal::ComputeScriptLen(fragment, sub0type, subsize, k, subs.size(), keys.size(), m_script_ctx);
  626|  11.2M|    }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS3_NS9_9allocatorIS3_EEEEj:
 1727|  22.1k|        : fragment(nt), k(val), keys(std::move(key)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIhNS9_9allocatorIhEEEEj:
 1723|  13.4k|        : fragment(nt), k(val), data(std::move(arg)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS4_NS9_9allocatorIS4_EEEEj:
 1729|  1.20M|        : fragment(nt), k(val), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {}
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEaSEOS4_:
 1753|  1.16M|    Node& operator=(Node&&) noexcept = default;
miniscript.cpp:_ZN10miniscript8internal9BuildBackIN12_GLOBAL__N_119ScriptParserContext3KeyEEEvNS_17MiniscriptContextENS_8FragmentERNSt3__16vectorINS_4NodeIT_EENS7_9allocatorISB_EEEEb:
 1838|   171k|{
 1839|   171k|    Node<Key> child{std::move(constructed.back())};
 1840|   171k|    constructed.pop_back();
 1841|   171k|    if (reverse) {
  ------------------
  |  Branch (1841:9): [True: 171k, False: 0]
  ------------------
 1842|   171k|        constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(child), std::move(constructed.back()))};
 1843|   171k|    } else {
 1844|      0|        constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(constructed.back()), std::move(child))};
 1845|      0|    }
 1846|   171k|}
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2EOS4_:
 1752|  17.8M|    Node(Node&&) noexcept = default;
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_:
 1501|  1.63k|    {
 1502|       |        // We cannot use a lambda here, as lambdas are non assignable, and the set operations
 1503|       |        // below require moving the comparators around.
 1504|  1.63k|        struct Comp {
 1505|  1.63k|            const Ctx* ctx_ptr;
 1506|  1.63k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
 1507|  1.63k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
 1508|  1.63k|        };
 1509|       |
 1510|       |        // state in the recursive computation:
 1511|       |        // - std::nullopt means "this node has duplicates"
 1512|       |        // - an std::set means "this node has no duplicate keys, and they are: ...".
 1513|  1.63k|        using keyset = std::set<Key, Comp>;
 1514|  1.63k|        using state = std::optional<keyset>;
 1515|       |
 1516|  1.63k|        auto upfn = [&ctx](const Node& node, std::span<state> subs) -> state {
 1517|       |            // If this node is already known to have duplicates, nothing left to do.
 1518|  1.63k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
 1519|       |
 1520|       |            // Check if one of the children is already known to have duplicates.
 1521|  1.63k|            for (auto& sub : subs) {
 1522|  1.63k|                if (!sub.has_value()) {
 1523|  1.63k|                    node.has_duplicate_keys = true;
 1524|  1.63k|                    return {};
 1525|  1.63k|                }
 1526|  1.63k|            }
 1527|       |
 1528|       |            // Start building the set of keys involved in this node and children.
 1529|       |            // Start by keys in this node directly.
 1530|  1.63k|            size_t keys_count = node.keys.size();
 1531|  1.63k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1532|  1.63k|            if (key_set.size() != keys_count) {
 1533|       |                // It already has duplicates; bail out.
 1534|  1.63k|                node.has_duplicate_keys = true;
 1535|  1.63k|                return {};
 1536|  1.63k|            }
 1537|       |
 1538|       |            // Merge the keys from the children into this set.
 1539|  1.63k|            for (auto& sub : subs) {
 1540|  1.63k|                keys_count += sub->size();
 1541|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1542|       |                // logarithmic in the size of the first.
 1543|  1.63k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
 1544|  1.63k|                key_set.merge(*sub);
 1545|  1.63k|                if (key_set.size() != keys_count) {
 1546|  1.63k|                    node.has_duplicate_keys = true;
 1547|  1.63k|                    return {};
 1548|  1.63k|                }
 1549|  1.63k|            }
 1550|       |
 1551|  1.63k|            node.has_duplicate_keys = false;
 1552|  1.63k|            return key_set;
 1553|  1.63k|        };
 1554|       |
 1555|  1.63k|        TreeEval<state>(upfn);
 1556|  1.63k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS9_IS2_EEvSC_EUlRKS4_NS6_4spanISH_Lm18446744073709551615EEEE_EESA_T0_:
  748|  1.63k|    {
  749|  1.63k|        struct DummyState {};
  750|  1.63k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  751|  1.63k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  752|  1.63k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|  1.63k|                Result res{upfn(node, subs)};
  754|  1.63k|                return std::optional<Result>(std::move(res));
  755|  1.63k|            }
  756|  1.63k|        ));
  757|  1.63k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS4_8TreeEvalISH_ZNKS9_IS2_EEvSC_EUlRKS4_NS6_4spanISH_Lm18446744073709551615EEEE_EESA_T0_E10DummyStateZNKSI_ISH_SN_EESA_SO_EUlSP_SK_mE_ZNKSI_ISH_SN_EESA_SO_EUlSP_SK_SM_E_EENS7_ISA_EESO_T1_T2_:
  653|  1.63k|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|  1.63k|        struct StackElem
  656|  1.63k|        {
  657|  1.63k|            const Node& node; //!< The node being evaluated.
  658|  1.63k|            size_t expanded; //!< How many children of this node have been expanded.
  659|  1.63k|            State state; //!< The state for that node.
  660|       |
  661|  1.63k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|  1.63k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|  1.63k|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|  1.63k|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|  1.63k|        std::vector<Result> results;
  669|  1.63k|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|   777k|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 775k, False: 1.63k]
  ------------------
  688|   775k|            const Node& node = stack.back().node;
  689|   775k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 387k, False: 388k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   387k|                size_t child_index = stack.back().expanded++;
  694|   387k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   387k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   387k|                continue;
  697|   387k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|   775k|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 388k, False: 0]
  ------------------
  700|   388k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   388k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   388k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 388k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   388k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   388k|            results.push_back(std::move(*result));
  707|   388k|            stack.pop_back();
  708|   388k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|  1.63k|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 1.63k, False: 0]
  ------------------
  711|  1.63k|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|  1.63k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|  1.63k|        return std::move(results[0]);
  713|  1.63k|    }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS4_8TreeEvalISH_ZNKS9_IS2_EEvSC_EUlRKS4_NS6_4spanISH_Lm18446744073709551615EEEE_EESA_T0_E10DummyStateZNKSI_ISH_SN_EESA_SO_EUlSP_SK_mE_ZNKSI_ISH_SN_EESA_SO_EUlSP_SK_SM_E_EENS7_ISA_EESO_T1_T2_EN9StackElemC2ESK_mOSP_:
  662|   388k|                node(node_), expanded(exp_), state(std::move(state_)) {}
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS9_IS2_EEvSC_EUlRKS4_NS6_4spanISH_Lm18446744073709551615EEEE_EESA_T0_ENKUlZNKS5_ISH_SM_EESA_SN_E10DummyStateSJ_mE_clESO_SJ_m:
  751|   387k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS9_IS2_EEvSC_EUlRKS4_NS6_4spanISH_Lm18446744073709551615EEEE_EESA_T0_ENKUlZNKS5_ISH_SM_EESA_SN_E10DummyStateSJ_SL_E_clESO_SJ_SL_:
  752|   388k|            [&upfn](DummyState, const Node& node, std::span<Result> subs) {
  753|   388k|                Result res{upfn(node, subs)};
  754|   388k|                return std::optional<Result>(std::move(res));
  755|   388k|            }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_ENKUlRKS4_NSt3__14spanINSB_8optionalINSB_3setIS3_ZNKS5_IS2_EEvS8_E4CompNSB_9allocatorIS3_EEEEEELm18446744073709551615EEEE_clESA_SK_:
 1516|   388k|        auto upfn = [&ctx](const Node& node, std::span<state> subs) -> state {
 1517|       |            // If this node is already known to have duplicates, nothing left to do.
 1518|   388k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
  ------------------
  |  Branch (1518:17): [True: 0, False: 388k]
  |  Branch (1518:56): [True: 0, False: 0]
  ------------------
 1519|       |
 1520|       |            // Check if one of the children is already known to have duplicates.
 1521|   388k|            for (auto& sub : subs) {
  ------------------
  |  Branch (1521:28): [True: 385k, False: 375k]
  ------------------
 1522|   385k|                if (!sub.has_value()) {
  ------------------
  |  Branch (1522:21): [True: 13.6k, False: 372k]
  ------------------
 1523|  13.6k|                    node.has_duplicate_keys = true;
 1524|  13.6k|                    return {};
 1525|  13.6k|                }
 1526|   385k|            }
 1527|       |
 1528|       |            // Start building the set of keys involved in this node and children.
 1529|       |            // Start by keys in this node directly.
 1530|   375k|            size_t keys_count = node.keys.size();
 1531|   375k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1532|   375k|            if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1532:17): [True: 56, False: 375k]
  ------------------
 1533|       |                // It already has duplicates; bail out.
 1534|     56|                node.has_duplicate_keys = true;
 1535|     56|                return {};
 1536|     56|            }
 1537|       |
 1538|       |            // Merge the keys from the children into this set.
 1539|   375k|            for (auto& sub : subs) {
  ------------------
  |  Branch (1539:28): [True: 371k, False: 374k]
  ------------------
 1540|   371k|                keys_count += sub->size();
 1541|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1542|       |                // logarithmic in the size of the first.
 1543|   371k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
  ------------------
  |  Branch (1543:21): [True: 71.8k, False: 299k]
  ------------------
 1544|   371k|                key_set.merge(*sub);
 1545|   371k|                if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1545:21): [True: 236, False: 371k]
  ------------------
 1546|    236|                    node.has_duplicate_keys = true;
 1547|    236|                    return {};
 1548|    236|                }
 1549|   371k|            }
 1550|       |
 1551|   374k|            node.has_duplicate_keys = false;
 1552|   374k|            return key_set;
 1553|   375k|        };
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_EN4CompC2ERKS2_:
 1506|   375k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_ENK4CompclERKS3_SB_:
 1507|   104k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE15IsValidTopLevelEv:
 1681|  1.63k|    bool IsValidTopLevel() const { return IsValid() && GetType() << "B"_mst; }
  ------------------
  |  Branch (1681:43): [True: 1.39k, False: 240]
  |  Branch (1681:56): [True: 1.33k, False: 64]
  ------------------
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_:
  799|  1.20k|    {
  800|       |        // To construct the CScript for a Miniscript object, we use the TreeEval algorithm.
  801|       |        // The State is a boolean: whether or not the node's script expansion is followed
  802|       |        // by an OP_VERIFY (which may need to be combined with the last script opcode).
  803|  1.20k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  804|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  805|  1.20k|            if (node.fragment == Fragment::WRAP_V) return true;
  806|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  807|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  808|  1.20k|            if (node.fragment == Fragment::WRAP_S ||
  809|  1.20k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  810|  1.20k|            return false;
  811|  1.20k|        };
  812|       |        // The upward function computes for a node, given its followed-by-OP_VERIFY status
  813|       |        // and the CScripts of its child nodes, the CScript of the node.
  814|  1.20k|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  815|  1.20k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, std::span<CScript> subs) -> CScript {
  816|  1.20k|            switch (node.fragment) {
  817|  1.20k|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  818|  1.20k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  819|  1.20k|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  820|  1.20k|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  821|  1.20k|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  822|  1.20k|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  823|  1.20k|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  824|  1.20k|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  825|  1.20k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  826|  1.20k|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  827|  1.20k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  828|  1.20k|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  829|  1.20k|                case Fragment::WRAP_V: {
  830|  1.20k|                    if (node.subs[0].GetType() << "x"_mst) {
  831|  1.20k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  832|  1.20k|                    } else {
  833|  1.20k|                        return std::move(subs[0]);
  834|  1.20k|                    }
  835|  1.20k|                }
  836|  1.20k|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  837|  1.20k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  838|  1.20k|                case Fragment::JUST_1: return BuildScript(OP_1);
  839|  1.20k|                case Fragment::JUST_0: return BuildScript(OP_0);
  840|  1.20k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  841|  1.20k|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  842|  1.20k|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  843|  1.20k|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  844|  1.20k|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  845|  1.20k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  846|  1.20k|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  847|  1.20k|                case Fragment::MULTI: {
  848|  1.20k|                    CHECK_NONFATAL(!is_tapscript);
  849|  1.20k|                    CScript script = BuildScript(node.k);
  850|  1.20k|                    for (const auto& key : node.keys) {
  851|  1.20k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  852|  1.20k|                    }
  853|  1.20k|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  854|  1.20k|                }
  855|  1.20k|                case Fragment::MULTI_A: {
  856|  1.20k|                    CHECK_NONFATAL(is_tapscript);
  857|  1.20k|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  858|  1.20k|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  859|  1.20k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  860|  1.20k|                    }
  861|  1.20k|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  862|  1.20k|                }
  863|  1.20k|                case Fragment::THRESH: {
  864|  1.20k|                    CScript script = std::move(subs[0]);
  865|  1.20k|                    for (size_t i = 1; i < subs.size(); ++i) {
  866|  1.20k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  867|  1.20k|                    }
  868|  1.20k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  869|  1.20k|                }
  870|  1.20k|            }
  871|  1.20k|            assert(false);
  872|  1.20k|        };
  873|  1.20k|        return TreeEval<CScript>(false, downfn, upfn);
  874|  1.20k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalI7CScriptbRZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS7_IS2_EES6_SA_EUlbSC_NSt3__14spanIS6_Lm18446744073709551615EEEE_EES8_T0_OT1_T2_:
  732|  1.20k|    {
  733|       |        // Invoke TreeEvalMaybe with upfn wrapped to return std::optional<Result>, and then
  734|       |        // unconditionally dereference the result (it cannot be std::nullopt).
  735|  1.20k|        return std::move(*TreeEvalMaybe<Result>(std::move(root_state),
  736|  1.20k|            std::forward<DownFn>(downfn),
  737|  1.20k|            [&upfn](State&& state, const Node& node, std::span<Result> subs) {
  738|  1.20k|                Result res{upfn(std::move(state), node, subs)};
  739|  1.20k|                return std::optional<Result>(std::move(res));
  740|  1.20k|            }
  741|  1.20k|        ));
  742|  1.20k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeI7CScriptbZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS4_8TreeEvalIS6_bRSD_ZNKS7_IS2_EES6_SA_EUlbSC_NSt3__14spanIS6_Lm18446744073709551615EEEE_EES8_T0_OT1_T2_EUlObSC_SI_E_EENSG_8optionalIS8_EESK_SL_SN_:
  653|  1.20k|    {
  654|       |        /** Entries of the explicit stack tracked in this algorithm. */
  655|  1.20k|        struct StackElem
  656|  1.20k|        {
  657|  1.20k|            const Node& node; //!< The node being evaluated.
  658|  1.20k|            size_t expanded; //!< How many children of this node have been expanded.
  659|  1.20k|            State state; //!< The state for that node.
  660|       |
  661|  1.20k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  662|  1.20k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  663|  1.20k|        };
  664|       |        /* Stack of tree nodes being explored. */
  665|  1.20k|        std::vector<StackElem> stack;
  666|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  667|       |         * is implicitly defined by stack. */
  668|  1.20k|        std::vector<Result> results;
  669|  1.20k|        stack.emplace_back(*this, 0, std::move(root_state));
  670|       |
  671|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  672|       |         * State variables are omitted for simplicity.
  673|       |         *
  674|       |         * First: stack=[(A,0)] results=[]
  675|       |         *        stack=[(A,1),(B,0)] results=[]
  676|       |         *        stack=[(A,1)] results=[B]
  677|       |         *        stack=[(A,2),(C,0)] results=[B]
  678|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  679|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  680|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  681|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  682|       |         *        stack=[(A,2)] results=[B,C]
  683|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  684|       |         *        stack=[(A,3)] results=[B,C,F]
  685|       |         * Final: stack=[] results=[A]
  686|       |         */
  687|   510k|        while (stack.size()) {
  ------------------
  |  Branch (687:16): [True: 509k, False: 1.20k]
  ------------------
  688|   509k|            const Node& node = stack.back().node;
  689|   509k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (689:17): [True: 254k, False: 255k]
  ------------------
  690|       |                /* We encounter a tree node with at least one unexpanded child.
  691|       |                 * Expand it. By the time we hit this node again, the result of
  692|       |                 * that child (and all earlier children) will be at the end of `results`. */
  693|   254k|                size_t child_index = stack.back().expanded++;
  694|   254k|                State child_state = downfn(stack.back().state, node, child_index);
  695|   254k|                stack.emplace_back(node.subs[child_index], 0, std::move(child_state));
  696|   254k|                continue;
  697|   254k|            }
  698|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  699|   509k|            assert(results.size() >= node.subs.size());
  ------------------
  |  Branch (699:13): [True: 255k, False: 0]
  ------------------
  700|   255k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  701|   255k|                std::span<Result>{results}.last(node.subs.size()))};
  702|       |            // If evaluation returns std::nullopt, abort immediately.
  703|   255k|            if (!result) return {};
  ------------------
  |  Branch (703:17): [True: 0, False: 255k]
  ------------------
  704|       |            // Replace the last node.subs.size() elements of results with the new result.
  705|   255k|            results.erase(results.end() - node.subs.size(), results.end());
  706|   255k|            results.push_back(std::move(*result));
  707|   255k|            stack.pop_back();
  708|   255k|        }
  709|       |        // The final remaining results element is the root result, return it.
  710|  1.20k|        assert(results.size() >= 1);
  ------------------
  |  Branch (710:9): [True: 1.20k, False: 0]
  ------------------
  711|  1.20k|        CHECK_NONFATAL(results.size() == 1);
  ------------------
  |  |  113|  1.20k|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  712|  1.20k|        return std::move(results[0]);
  713|  1.20k|    }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeI7CScriptbZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS4_8TreeEvalIS6_bRSD_ZNKS7_IS2_EES6_SA_EUlbSC_NSt3__14spanIS6_Lm18446744073709551615EEEE_EES8_T0_OT1_T2_EUlObSC_SI_E_EENSG_8optionalIS8_EESK_SL_SN_EN9StackElemC2ESC_mSO_:
  662|   255k|                node(node_), expanded(exp_), state(std::move(state_)) {}
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_ENKUlbRKS4_mE_clEbSB_m:
  803|   254k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  804|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  805|   254k|            if (node.fragment == Fragment::WRAP_V) return true;
  ------------------
  |  Branch (805:17): [True: 7.57k, False: 246k]
  ------------------
  806|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  807|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  808|   246k|            if (node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (808:17): [True: 1.03k, False: 245k]
  ------------------
  809|   245k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  ------------------
  |  Branch (809:18): [True: 14.1k, False: 231k]
  |  Branch (809:54): [True: 7.07k, False: 7.07k]
  ------------------
  810|   238k|            return false;
  811|   246k|        };
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalI7CScriptbRZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS7_IS2_EES6_SA_EUlbSC_NSt3__14spanIS6_Lm18446744073709551615EEEE_EES8_T0_OT1_T2_ENKUlObSC_SH_E_clESN_SC_SH_:
  737|   255k|            [&upfn](State&& state, const Node& node, std::span<Result> subs) {
  738|   255k|                Result res{upfn(std::move(state), node, subs)};
  739|   255k|                return std::optional<Result>(std::move(res));
  740|   255k|            }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_ENKUlbRKS4_NSt3__14spanIS6_Lm18446744073709551615EEEE_clEbSB_SE_:
  815|   255k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, std::span<CScript> subs) -> CScript {
  816|   255k|            switch (node.fragment) {
  ------------------
  |  Branch (816:21): [True: 255k, False: 0]
  ------------------
  817|    214|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  ------------------
  |  Branch (817:17): [True: 214, False: 255k]
  ------------------
  818|  5.18k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  ------------------
  |  Branch (818:17): [True: 5.18k, False: 250k]
  ------------------
  819|  1.15k|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  ------------------
  |  Branch (819:17): [True: 1.15k, False: 254k]
  ------------------
  820|    857|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  ------------------
  |  Branch (820:17): [True: 857, False: 254k]
  ------------------
  821|     68|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (821:17): [True: 68, False: 255k]
  |  Branch (821:110): [True: 3, False: 65]
  ------------------
  822|     88|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (822:17): [True: 88, False: 255k]
  |  Branch (822:116): [True: 2, False: 86]
  ------------------
  823|     90|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (823:17): [True: 90, False: 255k]
  |  Branch (823:112): [True: 3, False: 87]
  ------------------
  824|     95|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (824:17): [True: 95, False: 255k]
  |  Branch (824:112): [True: 12, False: 83]
  ------------------
  825|  6.05k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  ------------------
  |  Branch (825:17): [True: 6.05k, False: 249k]
  ------------------
  826|  1.03k|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  ------------------
  |  Branch (826:17): [True: 1.03k, False: 254k]
  ------------------
  827|  3.04k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  ------------------
  |  Branch (827:17): [True: 3.04k, False: 252k]
  |  Branch (827:79): [True: 65, False: 2.98k]
  ------------------
  828|    339|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (828:17): [True: 339, False: 255k]
  ------------------
  829|  7.57k|                case Fragment::WRAP_V: {
  ------------------
  |  Branch (829:17): [True: 7.57k, False: 247k]
  ------------------
  830|  7.57k|                    if (node.subs[0].GetType() << "x"_mst) {
  ------------------
  |  Branch (830:25): [True: 6.93k, False: 640]
  ------------------
  831|  6.93k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  832|  6.93k|                    } else {
  833|    640|                        return std::move(subs[0]);
  834|    640|                    }
  835|  7.57k|                }
  836|    317|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (836:17): [True: 317, False: 255k]
  ------------------
  837|   182k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  ------------------
  |  Branch (837:17): [True: 182k, False: 72.9k]
  ------------------
  838|  4.17k|                case Fragment::JUST_1: return BuildScript(OP_1);
  ------------------
  |  Branch (838:17): [True: 4.17k, False: 251k]
  ------------------
  839|  16.9k|                case Fragment::JUST_0: return BuildScript(OP_0);
  ------------------
  |  Branch (839:17): [True: 16.9k, False: 238k]
  ------------------
  840|  7.07k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  ------------------
  |  Branch (840:17): [True: 7.07k, False: 248k]
  ------------------
  841|  1.47k|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  ------------------
  |  Branch (841:17): [True: 1.47k, False: 253k]
  ------------------
  842|  1.15k|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  ------------------
  |  Branch (842:17): [True: 1.15k, False: 254k]
  ------------------
  843|  1.82k|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (843:17): [True: 1.82k, False: 253k]
  ------------------
  844|    927|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (844:17): [True: 927, False: 254k]
  ------------------
  845|  2.02k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (845:17): [True: 2.02k, False: 253k]
  ------------------
  846|  4.50k|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (846:17): [True: 4.50k, False: 250k]
  ------------------
  847|    260|                case Fragment::MULTI: {
  ------------------
  |  Branch (847:17): [True: 260, False: 255k]
  ------------------
  848|    260|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |  113|    260|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  849|    260|                    CScript script = BuildScript(node.k);
  850|  1.13k|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (850:42): [True: 1.13k, False: 260]
  ------------------
  851|  1.13k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  852|  1.13k|                    }
  853|    260|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  ------------------
  |  Branch (853:77): [True: 51, False: 209]
  ------------------
  854|  7.57k|                }
  855|     25|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (855:17): [True: 25, False: 255k]
  ------------------
  856|     25|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |  113|     25|    inline_check_non_fatal(condition, std::source_location::current(), #condition)
  ------------------
  857|     25|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  858|     43|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  ------------------
  |  Branch (858:59): [True: 18, False: 25]
  ------------------
  859|     18|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  860|     18|                    }
  861|     25|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  ------------------
  |  Branch (861:67): [True: 19, False: 6]
  ------------------
  862|  7.57k|                }
  863|  6.37k|                case Fragment::THRESH: {
  ------------------
  |  Branch (863:17): [True: 6.37k, False: 249k]
  ------------------
  864|  6.37k|                    CScript script = std::move(subs[0]);
  865|  10.8k|                    for (size_t i = 1; i < subs.size(); ++i) {
  ------------------
  |  Branch (865:40): [True: 4.45k, False: 6.37k]
  ------------------
  866|  4.45k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  867|  4.45k|                    }
  868|  6.37k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (868:67): [True: 485, False: 5.89k]
  ------------------
  869|  7.57k|                }
  870|   255k|            }
  871|   255k|            assert(false);
  ------------------
  |  Branch (871:13): [Folded, False: 0]
  ------------------
  872|      0|        };
_ZNK10miniscript4Type2IfEb:
  157|  1.59M|    constexpr Type If(bool x) const { return Type(x ? m_flags : 0); }
  ------------------
  |  Branch (157:51): [True: 1.31M, False: 283k]
  ------------------
_ZN10miniscript4TypeC2Ej:
  135|  11.8M|    explicit constexpr Type(uint32_t flags) : m_flags(flags) {}
_ZNK10miniscript4TypeorES0_:
  142|  5.50M|    constexpr Type operator|(Type x) const { return Type(m_flags | x.m_flags); }
_ZNK10miniscript4TypeanES0_:
  145|  4.74M|    constexpr Type operator&(Type x) const { return Type(m_flags & x.m_flags); }
_ZNK10miniscript4TypeeqES0_:
  154|  37.6M|    constexpr bool operator==(Type x) const { return m_flags == x.m_flags; }
_ZN10miniscript8internal3OpsC2EjNS0_6MaxIntIjEES3_:
  397|  11.2M|    Ops(uint32_t in_count, MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : count(in_count), sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal7SatInfoC2Ev:
  452|  12.0M|    constexpr SatInfo() noexcept : valid(false), netdiff(0), exec(0) {}
_ZN10miniscript8internal7SatInfoC2Eii:
  456|  12.6M|        valid{true}, netdiff{in_netdiff}, exec{in_exec} {}
_ZN10miniscript8internalorERKNS0_7SatInfoES3_:
  464|   709k|    {
  465|       |        // Union with an empty set is itself.
  466|   709k|        if (!a.valid) return b;
  ------------------
  |  Branch (466:13): [True: 543k, False: 165k]
  ------------------
  467|   165k|        if (!b.valid) return a;
  ------------------
  |  Branch (467:13): [True: 73.0k, False: 92.3k]
  ------------------
  468|       |        // Otherwise the netdiff and exec of the union is the maximum of the individual values.
  469|  92.3k|        return {std::max(a.netdiff, b.netdiff), std::max(a.exec, b.exec)};
  470|   165k|    }
_ZN10miniscript8internalplERKNS0_7SatInfoES3_:
  474|  3.09M|    {
  475|       |        // Concatenation with an empty set yields an empty set.
  476|  3.09M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (476:13): [True: 1.62M, False: 1.47M]
  |  Branch (476:25): [True: 165k, False: 1.30M]
  ------------------
  477|       |        // Otherwise, the maximum stack size difference for the combined scripts is the sum of the
  478|       |        // netdiffs, and the maximum stack size difference anywhere is either b.exec (if the
  479|       |        // maximum occurred in b) or b.netdiff+a.exec (if the maximum occurred in a).
  480|  1.30M|        return {a.netdiff + b.netdiff, std::max(b.exec, b.netdiff + a.exec)};
  481|  3.09M|    }
_ZN10miniscript8internal7SatInfo5EmptyEv:
  484|  74.2k|    static constexpr SatInfo Empty() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo4PushEv:
  486|  10.1M|    static constexpr SatInfo Push() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo4HashEv:
  488|  27.5k|    static constexpr SatInfo Hash() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo3NopEv:
  490|  39.6k|    static constexpr SatInfo Nop() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo2IfEv:
  492|   383k|    static constexpr SatInfo If() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8BinaryOpEv:
  494|  88.5k|    static constexpr SatInfo BinaryOp() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo6OP_DUPEv:
  497|  51.6k|    static constexpr SatInfo OP_DUP() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo8OP_IFDUPEb:
  498|  30.1k|    static constexpr SatInfo OP_IFDUP(bool nonzero) noexcept { return {nonzero ? -1 : 0, 0}; }
  ------------------
  |  Branch (498:72): [True: 10.0k, False: 20.1k]
  ------------------
_ZN10miniscript8internal7SatInfo14OP_EQUALVERIFYEv:
  499|  27.5k|    static constexpr SatInfo OP_EQUALVERIFY() noexcept { return {2, 2}; }
_ZN10miniscript8internal7SatInfo8OP_EQUALEv:
  500|  87.6k|    static constexpr SatInfo OP_EQUAL() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo7OP_SIZEEv:
  501|  51.5k|    static constexpr SatInfo OP_SIZE() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo11OP_CHECKSIGEv:
  502|  23.8k|    static constexpr SatInfo OP_CHECKSIG() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo12OP_0NOTEQUALEv:
  503|  38.0k|    static constexpr SatInfo OP_0NOTEQUAL() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo9OP_VERIFYEv:
  504|   113k|    static constexpr SatInfo OP_VERIFY() noexcept { return {1, 1}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoES2_:
  512|  10.4M|    constexpr StackSize(SatInfo in_sat, SatInfo in_dsat) noexcept : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoE:
  513|  22.1k|    constexpr StackSize(SatInfo in_both) noexcept : sat(in_both), dsat(in_both) {};
_ZNK10miniscript8internal9StackSize3SatEv:
  515|  1.22M|    const SatInfo& Sat() const { return sat; }
_ZNK10miniscript8internal9StackSize4DsatEv:
  516|   987k|    const SatInfo& Dsat() const { return dsat; }
_ZN10miniscript8internal11WitnessSizeC2ENS0_6MaxIntIjEES3_:
  525|  10.5M|    WitnessSize(MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internal13MaxScriptSizeENS_17MiniscriptContextE:
  285|  37.6M|{
  286|  37.6M|    if (IsTapscript(ms_ctx)) {
  ------------------
  |  Branch (286:9): [True: 36.3M, False: 1.37M]
  ------------------
  287|       |        // Leaf scripts under Tapscript are not explicitly limited in size. They are only implicitly
  288|       |        // bounded by the maximum standard size of a spending transaction. Let the maximum script
  289|       |        // size conservatively be small enough such that even a maximum sized witness and a reasonably
  290|       |        // sized spending transaction can spend an output paying to this script without running into
  291|       |        // the maximum standard tx size limit.
  292|  36.3M|        constexpr auto max_size{MAX_STANDARD_TX_WEIGHT - TX_BODY_LEEWAY_WEIGHT - MAX_TAPSCRIPT_SAT_SIZE};
  293|  36.3M|        return max_size - GetSizeOfCompactSize(max_size);
  294|  36.3M|    }
  295|  1.37M|    return MAX_STANDARD_P2WSH_SCRIPT_SIZE;
  296|  37.6M|}
_ZN10miniscript11IsTapscriptENS_17MiniscriptContextE:
  260|  60.3M|{
  261|  60.3M|    switch (ms_ctx) {
  ------------------
  |  Branch (261:13): [True: 60.3M, False: 0]
  ------------------
  262|  2.35M|        case MiniscriptContext::P2WSH: return false;
  ------------------
  |  Branch (262:9): [True: 2.35M, False: 57.9M]
  ------------------
  263|  57.9M|        case MiniscriptContext::TAPSCRIPT: return true;
  ------------------
  |  Branch (263:9): [True: 57.9M, False: 2.35M]
  ------------------
  264|  60.3M|    }
  265|  60.3M|    assert(false);
  ------------------
  |  Branch (265:5): [Folded, False: 0]
  ------------------
  266|      0|}
_ZN10miniscript8internal6MaxIntIjEC2Ej:
  372|  21.8M|    MaxInt(I val) : valid(true), value(val) {}
_ZN10miniscript8internal6MaxIntIjEC2Ev:
  371|  22.8M|    MaxInt() : valid(false), value(0) {}
_ZN10miniscript8internalplERKNS0_6MaxIntIjEES4_:
  377|  3.28M|    friend MaxInt<I> operator+(const MaxInt<I>& a, const MaxInt<I>& b) {
  378|  3.28M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (378:13): [True: 2.09M, False: 1.19M]
  |  Branch (378:25): [True: 272k, False: 922k]
  ------------------
  379|   922k|        return a.value + b.value;
  380|  3.28M|    }
_ZN10miniscript8internalorERKNS0_6MaxIntIjEES4_:
  382|  1.41M|    friend MaxInt<I> operator|(const MaxInt<I>& a, const MaxInt<I>& b) {
  383|  1.41M|        if (!a.valid) return b;
  ------------------
  |  Branch (383:13): [True: 1.08M, False: 334k]
  ------------------
  384|   334k|        if (!b.valid) return a;
  ------------------
  |  Branch (384:13): [True: 149k, False: 184k]
  ------------------
  385|   184k|        return std::max(a.value, b.value);
  386|   334k|    }
_ZNK10miniscript4TypelsES0_:
  148|   249M|    constexpr bool operator<<(Type x) const { return (x.m_flags & ~m_flags) == 0; }

_Z11GetScriptOpRN9prevectorILj36EhjiE14const_iteratorES1_R10opcodetypePNSt3__16vectorIhNS5_9allocatorIhEEEE:
  314|  25.3M|{
  315|  25.3M|    opcodeRet = OP_INVALIDOPCODE;
  316|  25.3M|    if (pvchRet)
  ------------------
  |  Branch (316:9): [True: 25.3M, False: 0]
  ------------------
  317|  25.3M|        pvchRet->clear();
  318|  25.3M|    if (pc >= end)
  ------------------
  |  Branch (318:9): [True: 0, False: 25.3M]
  ------------------
  319|      0|        return false;
  320|       |
  321|       |    // Read instruction
  322|  25.3M|    if (end - pc < 1)
  ------------------
  |  Branch (322:9): [True: 0, False: 25.3M]
  ------------------
  323|      0|        return false;
  324|  25.3M|    unsigned int opcode = *pc++;
  325|       |
  326|       |    // Immediate operand
  327|  25.3M|    if (opcode <= OP_PUSHDATA4)
  ------------------
  |  Branch (327:9): [True: 15.4M, False: 9.88M]
  ------------------
  328|  15.4M|    {
  329|  15.4M|        unsigned int nSize = 0;
  330|  15.4M|        if (opcode < OP_PUSHDATA1)
  ------------------
  |  Branch (330:13): [True: 15.4M, False: 1.28k]
  ------------------
  331|  15.4M|        {
  332|  15.4M|            nSize = opcode;
  333|  15.4M|        }
  334|  1.28k|        else if (opcode == OP_PUSHDATA1)
  ------------------
  |  Branch (334:18): [True: 427, False: 858]
  ------------------
  335|    427|        {
  336|    427|            if (end - pc < 1)
  ------------------
  |  Branch (336:17): [True: 1, False: 426]
  ------------------
  337|      1|                return false;
  338|    426|            nSize = *pc++;
  339|    426|        }
  340|    858|        else if (opcode == OP_PUSHDATA2)
  ------------------
  |  Branch (340:18): [True: 792, False: 66]
  ------------------
  341|    792|        {
  342|    792|            if (end - pc < 2)
  ------------------
  |  Branch (342:17): [True: 4, False: 788]
  ------------------
  343|      4|                return false;
  344|    788|            nSize = ReadLE16(&pc[0]);
  345|    788|            pc += 2;
  346|    788|        }
  347|     66|        else if (opcode == OP_PUSHDATA4)
  ------------------
  |  Branch (347:18): [True: 66, False: 0]
  ------------------
  348|     66|        {
  349|     66|            if (end - pc < 4)
  ------------------
  |  Branch (349:17): [True: 4, False: 62]
  ------------------
  350|      4|                return false;
  351|     62|            nSize = ReadLE32(&pc[0]);
  352|     62|            pc += 4;
  353|     62|        }
  354|  15.4M|        if (end - pc < 0 || (unsigned int)(end - pc) < nSize)
  ------------------
  |  Branch (354:13): [True: 0, False: 15.4M]
  |  Branch (354:29): [True: 133, False: 15.4M]
  ------------------
  355|    133|            return false;
  356|  15.4M|        if (pvchRet)
  ------------------
  |  Branch (356:13): [True: 15.4M, False: 0]
  ------------------
  357|  15.4M|            pvchRet->assign(pc, pc + nSize);
  358|  15.4M|        pc += nSize;
  359|  15.4M|    }
  360|       |
  361|  25.3M|    opcodeRet = static_cast<opcodetype>(opcode);
  362|  25.3M|    return true;
  363|  25.3M|}
_Z16CheckMinimalPushRKNSt3__16vectorIhNS_9allocatorIhEEEE10opcodetype:
  373|   178k|bool CheckMinimalPush(const std::vector<unsigned char>& data, opcodetype opcode) {
  374|       |    // Excludes OP_1NEGATE, OP_1-16 since they are by definition minimal
  375|   178k|    assert(0 <= opcode && opcode <= OP_PUSHDATA4);
  ------------------
  |  Branch (375:5): [True: 178k, False: 0]
  |  Branch (375:5): [True: 178k, False: 0]
  |  Branch (375:5): [True: 178k, False: 0]
  ------------------
  376|   178k|    if (data.size() == 0) {
  ------------------
  |  Branch (376:9): [True: 7, False: 178k]
  ------------------
  377|       |        // Should have used OP_0.
  378|      7|        return opcode == OP_0;
  379|   178k|    } else if (data.size() == 1 && data[0] >= 1 && data[0] <= 16) {
  ------------------
  |  Branch (379:16): [True: 38.1k, False: 140k]
  |  Branch (379:36): [True: 37.2k, False: 839]
  |  Branch (379:52): [True: 8, False: 37.2k]
  ------------------
  380|       |        // Should have used OP_1 .. OP_16.
  381|      8|        return false;
  382|   178k|    } else if (data.size() == 1 && data[0] == 0x81) {
  ------------------
  |  Branch (382:16): [True: 38.1k, False: 140k]
  |  Branch (382:36): [True: 1, False: 38.1k]
  ------------------
  383|       |        // Should have used OP_1NEGATE.
  384|      1|        return false;
  385|   178k|    } else if (data.size() <= 75) {
  ------------------
  |  Branch (385:16): [True: 177k, False: 1.22k]
  ------------------
  386|       |        // Must have used a direct push (opcode indicating number of bytes pushed + those bytes).
  387|   177k|        return opcode == data.size();
  388|   177k|    } else if (data.size() <= 255) {
  ------------------
  |  Branch (388:16): [True: 420, False: 807]
  ------------------
  389|       |        // Must have used OP_PUSHDATA.
  390|    420|        return opcode == OP_PUSHDATA1;
  391|    807|    } else if (data.size() <= 65535) {
  ------------------
  |  Branch (391:16): [True: 785, False: 22]
  ------------------
  392|       |        // Must have used OP_PUSHDATA2.
  393|    785|        return opcode == OP_PUSHDATA2;
  394|    785|    }
  395|     22|    return true;
  396|   178k|}

_Z11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_:
  612|    214|{
  613|    214|    CScript ret;
  614|    214|    int cnt{0};
  615|       |
  616|    214|    ([&ret, &cnt] (Ts&& input) {
  617|    214|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    214|            if (cnt == 0) {
  620|    214|                ret = std::forward<Ts>(input);
  621|    214|            } else {
  622|    214|                ret.insert(ret.end(), input.begin(), input.end());
  623|    214|            }
  624|    214|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    214|            ret << input;
  627|    214|        }
  628|    214|        cnt++;
  629|    214|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    214|    return ret;
  632|    214|}
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_ENKUlS6_E_clES6_:
  616|    214|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    214|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    214|            ret << input;
  627|    214|        }
  628|    214|        cnt++;
  629|    214|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_:
  612|  1.13k|{
  613|  1.13k|    CScript ret;
  614|  1.13k|    int cnt{0};
  615|       |
  616|  1.13k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.13k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.13k|            if (cnt == 0) {
  620|  1.13k|                ret = std::forward<Ts>(input);
  621|  1.13k|            } else {
  622|  1.13k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.13k|            }
  624|  1.13k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.13k|            ret << input;
  627|  1.13k|        }
  628|  1.13k|        cnt++;
  629|  1.13k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.13k|    return ret;
  632|  1.13k|}
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS0_E_clESB_:
  616|  1.13k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.13k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.13k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 1.13k, False: 0]
  ------------------
  620|  1.13k|                ret = std::forward<Ts>(input);
  621|  1.13k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.13k|        cnt++;
  629|  1.13k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlS7_E_clES7_:
  616|  1.13k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.13k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.13k|            ret << input;
  627|  1.13k|        }
  628|  1.13k|        cnt++;
  629|  1.13k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_:
  612|     25|{
  613|     25|    CScript ret;
  614|     25|    int cnt{0};
  615|       |
  616|     25|    ([&ret, &cnt] (Ts&& input) {
  617|     25|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     25|            if (cnt == 0) {
  620|     25|                ret = std::forward<Ts>(input);
  621|     25|            } else {
  622|     25|                ret.insert(ret.end(), input.begin(), input.end());
  623|     25|            }
  624|     25|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     25|            ret << input;
  627|     25|        }
  628|     25|        cnt++;
  629|     25|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|     25|    return ret;
  632|     25|}
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlS6_E_clES6_:
  616|     25|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     25|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     25|            ret << input;
  627|     25|        }
  628|     25|        cnt++;
  629|     25|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlOS7_E_clESC_:
  616|     25|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     25|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     25|            ret << input;
  627|     25|        }
  628|     25|        cnt++;
  629|     25|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_:
  612|     18|{
  613|     18|    CScript ret;
  614|     18|    int cnt{0};
  615|       |
  616|     18|    ([&ret, &cnt] (Ts&& input) {
  617|     18|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     18|            if (cnt == 0) {
  620|     18|                ret = std::forward<Ts>(input);
  621|     18|            } else {
  622|     18|                ret.insert(ret.end(), input.begin(), input.end());
  623|     18|            }
  624|     18|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     18|            ret << input;
  627|     18|        }
  628|     18|        cnt++;
  629|     18|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|     18|    return ret;
  632|     18|}
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlOS0_E_clESC_:
  616|     18|    ([&ret, &cnt] (Ts&& input) {
  617|     18|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|     18|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 18, False: 0]
  ------------------
  620|     18|                ret = std::forward<Ts>(input);
  621|     18|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|     18|        cnt++;
  629|     18|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlS7_E_clES7_:
  616|     18|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     18|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     18|            ret << input;
  627|     18|        }
  628|     18|        cnt++;
  629|     18|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEE10opcodetypeEES0_DpOT_ENKUlOS8_E_clESC_:
  616|     18|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|     18|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|     18|            ret << input;
  627|     18|        }
  628|     18|        cnt++;
  629|     18|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  612|  5.18k|{
  613|  5.18k|    CScript ret;
  614|  5.18k|    int cnt{0};
  615|       |
  616|  5.18k|    ([&ret, &cnt] (Ts&& input) {
  617|  5.18k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  5.18k|            if (cnt == 0) {
  620|  5.18k|                ret = std::forward<Ts>(input);
  621|  5.18k|            } else {
  622|  5.18k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  5.18k|            }
  624|  5.18k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  5.18k|            ret << input;
  627|  5.18k|        }
  628|  5.18k|        cnt++;
  629|  5.18k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  5.18k|    return ret;
  632|  5.18k|}
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESA_:
  616|  5.18k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  5.18k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  5.18k|            ret << input;
  627|  5.18k|        }
  628|  5.18k|        cnt++;
  629|  5.18k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESA_:
  616|  5.18k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  5.18k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  5.18k|            ret << input;
  627|  5.18k|        }
  628|  5.18k|        cnt++;
  629|  5.18k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS5_E_clESA_:
  616|  5.18k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  5.18k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  5.18k|            ret << input;
  627|  5.18k|        }
  628|  5.18k|        cnt++;
  629|  5.18k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESA_:
  616|  5.18k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  5.18k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  5.18k|            ret << input;
  627|  5.18k|        }
  628|  5.18k|        cnt++;
  629|  5.18k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_:
  612|  2.01k|{
  613|  2.01k|    CScript ret;
  614|  2.01k|    int cnt{0};
  615|       |
  616|  2.01k|    ([&ret, &cnt] (Ts&& input) {
  617|  2.01k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  2.01k|            if (cnt == 0) {
  620|  2.01k|                ret = std::forward<Ts>(input);
  621|  2.01k|            } else {
  622|  2.01k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  2.01k|            }
  624|  2.01k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.01k|            ret << input;
  627|  2.01k|        }
  628|  2.01k|        cnt++;
  629|  2.01k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  2.01k|    return ret;
  632|  2.01k|}
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlS1_E_clES1_:
  616|  2.01k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.01k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.01k|            ret << input;
  627|  2.01k|        }
  628|  2.01k|        cnt++;
  629|  2.01k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlOS2_E_clES7_:
  616|  2.01k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.01k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.01k|            ret << input;
  627|  2.01k|        }
  628|  2.01k|        cnt++;
  629|  2.01k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  612|    341|{
  613|    341|    CScript ret;
  614|    341|    int cnt{0};
  615|       |
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|    341|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    341|            if (cnt == 0) {
  620|    341|                ret = std::forward<Ts>(input);
  621|    341|            } else {
  622|    341|                ret.insert(ret.end(), input.begin(), input.end());
  623|    341|            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    341|    return ret;
  632|    341|}
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E2_clESC_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOiE_clESC_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESC_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESC_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlS7_E_clES7_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESC_:
  616|    341|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    341|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    341|            ret << input;
  627|    341|        }
  628|    341|        cnt++;
  629|    341|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_:
  612|  6.05k|{
  613|  6.05k|    CScript ret;
  614|  6.05k|    int cnt{0};
  615|       |
  616|  6.05k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.05k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.05k|            if (cnt == 0) {
  620|  6.05k|                ret = std::forward<Ts>(input);
  621|  6.05k|            } else {
  622|  6.05k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  6.05k|            }
  624|  6.05k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.05k|            ret << input;
  627|  6.05k|        }
  628|  6.05k|        cnt++;
  629|  6.05k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  6.05k|    return ret;
  632|  6.05k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|  6.05k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  6.05k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.05k|            ret << input;
  627|  6.05k|        }
  628|  6.05k|        cnt++;
  629|  6.05k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|  6.05k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.05k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.05k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 6.05k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  6.05k|            } else {
  622|  6.05k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  6.05k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  6.05k|        cnt++;
  629|  6.05k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|  6.05k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  6.05k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.05k|            ret << input;
  627|  6.05k|        }
  628|  6.05k|        cnt++;
  629|  6.05k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_:
  612|  1.03k|{
  613|  1.03k|    CScript ret;
  614|  1.03k|    int cnt{0};
  615|       |
  616|  1.03k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.03k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.03k|            if (cnt == 0) {
  620|  1.03k|                ret = std::forward<Ts>(input);
  621|  1.03k|            } else {
  622|  1.03k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.03k|            }
  624|  1.03k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.03k|            ret << input;
  627|  1.03k|        }
  628|  1.03k|        cnt++;
  629|  1.03k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.03k|    return ret;
  632|  1.03k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlOS0_E_clES6_:
  616|  1.03k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.03k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.03k|            ret << input;
  627|  1.03k|        }
  628|  1.03k|        cnt++;
  629|  1.03k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlS2_E_clES2_:
  616|  1.03k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.03k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.03k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 1.03k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  1.03k|            } else {
  622|  1.03k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.03k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.03k|        cnt++;
  629|  1.03k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_:
  612|   192k|{
  613|   192k|    CScript ret;
  614|   192k|    int cnt{0};
  615|       |
  616|   192k|    ([&ret, &cnt] (Ts&& input) {
  617|   192k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   192k|            if (cnt == 0) {
  620|   192k|                ret = std::forward<Ts>(input);
  621|   192k|            } else {
  622|   192k|                ret.insert(ret.end(), input.begin(), input.end());
  623|   192k|            }
  624|   192k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   192k|            ret << input;
  627|   192k|        }
  628|   192k|        cnt++;
  629|   192k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|   192k|    return ret;
  632|   192k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  616|   192k|    ([&ret, &cnt] (Ts&& input) {
  617|   192k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|   192k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 192k, False: 0]
  ------------------
  620|   192k|                ret = std::forward<Ts>(input);
  621|   192k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|   192k|        cnt++;
  629|   192k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  616|   192k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|   192k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|   192k|            ret << input;
  627|   192k|        }
  628|   192k|        cnt++;
  629|   192k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_:
  612|    339|{
  613|    339|    CScript ret;
  614|    339|    int cnt{0};
  615|       |
  616|    339|    ([&ret, &cnt] (Ts&& input) {
  617|    339|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    339|            if (cnt == 0) {
  620|    339|                ret = std::forward<Ts>(input);
  621|    339|            } else {
  622|    339|                ret.insert(ret.end(), input.begin(), input.end());
  623|    339|            }
  624|    339|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    339|            ret << input;
  627|    339|        }
  628|    339|        cnt++;
  629|    339|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    339|    return ret;
  632|    339|}
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|    339|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    339|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    339|            ret << input;
  627|    339|        }
  628|    339|        cnt++;
  629|    339|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|    339|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    339|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    339|            ret << input;
  627|    339|        }
  628|    339|        cnt++;
  629|    339|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|    339|    ([&ret, &cnt] (Ts&& input) {
  617|    339|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    339|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 339]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|    339|            } else {
  622|    339|                ret.insert(ret.end(), input.begin(), input.end());
  623|    339|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    339|        cnt++;
  629|    339|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|    339|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    339|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    339|            ret << input;
  627|    339|        }
  628|    339|        cnt++;
  629|    339|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_:
  612|    317|{
  613|    317|    CScript ret;
  614|    317|    int cnt{0};
  615|       |
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|    317|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    317|            if (cnt == 0) {
  620|    317|                ret = std::forward<Ts>(input);
  621|    317|            } else {
  622|    317|                ret.insert(ret.end(), input.begin(), input.end());
  623|    317|            }
  624|    317|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    317|            ret << input;
  627|    317|        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    317|    return ret;
  632|    317|}
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E2_clES6_:
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    317|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    317|            ret << input;
  627|    317|        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    317|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    317|            ret << input;
  627|    317|        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    317|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    317|            ret << input;
  627|    317|        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|    317|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    317|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 317]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|    317|            } else {
  622|    317|                ret.insert(ret.end(), input.begin(), input.end());
  623|    317|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|    317|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    317|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    317|            ret << input;
  627|    317|        }
  628|    317|        cnt++;
  629|    317|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeEE7CScriptDpOT_:
  612|  21.1k|{
  613|  21.1k|    CScript ret;
  614|  21.1k|    int cnt{0};
  615|       |
  616|  21.1k|    ([&ret, &cnt] (Ts&& input) {
  617|  21.1k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  21.1k|            if (cnt == 0) {
  620|  21.1k|                ret = std::forward<Ts>(input);
  621|  21.1k|            } else {
  622|  21.1k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  21.1k|            }
  624|  21.1k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  21.1k|            ret << input;
  627|  21.1k|        }
  628|  21.1k|        cnt++;
  629|  21.1k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  21.1k|    return ret;
  632|  21.1k|}
_ZZ11BuildScriptIJ10opcodetypeEE7CScriptDpOT_ENKUlOS0_E_clES5_:
  616|  21.1k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  21.1k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  21.1k|            ret << input;
  627|  21.1k|        }
  628|  21.1k|        cnt++;
  629|  21.1k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_EES0_DpOT_:
  612|  7.07k|{
  613|  7.07k|    CScript ret;
  614|  7.07k|    int cnt{0};
  615|       |
  616|  7.07k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.07k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.07k|            if (cnt == 0) {
  620|  7.07k|                ret = std::forward<Ts>(input);
  621|  7.07k|            } else {
  622|  7.07k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  7.07k|            }
  624|  7.07k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  7.07k|            ret << input;
  627|  7.07k|        }
  628|  7.07k|        cnt++;
  629|  7.07k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  7.07k|    return ret;
  632|  7.07k|}
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlOS0_E_clES5_:
  616|  7.07k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.07k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.07k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 7.07k, False: 0]
  ------------------
  620|  7.07k|                ret = std::forward<Ts>(input);
  621|  7.07k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  7.07k|        cnt++;
  629|  7.07k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlS1_E_clES1_:
  616|  7.07k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.07k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.07k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 7.07k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  7.07k|            } else {
  622|  7.07k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  7.07k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  7.07k|        cnt++;
  629|  7.07k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_:
  612|  7.09k|{
  613|  7.09k|    CScript ret;
  614|  7.09k|    int cnt{0};
  615|       |
  616|  7.09k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.09k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.09k|            if (cnt == 0) {
  620|  7.09k|                ret = std::forward<Ts>(input);
  621|  7.09k|            } else {
  622|  7.09k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  7.09k|            }
  624|  7.09k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  7.09k|            ret << input;
  627|  7.09k|        }
  628|  7.09k|        cnt++;
  629|  7.09k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  7.09k|    return ret;
  632|  7.09k|}
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS0_E_clES6_:
  616|  7.09k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.09k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.09k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 7.09k, False: 0]
  ------------------
  620|  7.09k|                ret = std::forward<Ts>(input);
  621|  7.09k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  7.09k|        cnt++;
  629|  7.09k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlS1_E_clES1_:
  616|  7.09k|    ([&ret, &cnt] (Ts&& input) {
  617|  7.09k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  7.09k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 7.09k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  7.09k|            } else {
  622|  7.09k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  7.09k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  7.09k|        cnt++;
  629|  7.09k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS2_E_clES6_:
  616|  7.09k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  7.09k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  7.09k|            ret << input;
  627|  7.09k|        }
  628|  7.09k|        cnt++;
  629|  7.09k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_:
  612|  1.82k|{
  613|  1.82k|    CScript ret;
  614|  1.82k|    int cnt{0};
  615|       |
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.82k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.82k|            if (cnt == 0) {
  620|  1.82k|                ret = std::forward<Ts>(input);
  621|  1.82k|            } else {
  622|  1.82k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.82k|            }
  624|  1.82k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.82k|            ret << input;
  627|  1.82k|        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  1.82k|    return ret;
  632|  1.82k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.82k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.82k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 1.82k, False: 0]
  ------------------
  620|  1.82k|                ret = std::forward<Ts>(input);
  621|  1.82k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.82k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.82k|            ret << input;
  627|  1.82k|        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.82k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.82k|            ret << input;
  627|  1.82k|        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|  1.82k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  1.82k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 1.82k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  1.82k|            } else {
  622|  1.82k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  1.82k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  616|  1.82k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  1.82k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  1.82k|            ret << input;
  627|  1.82k|        }
  628|  1.82k|        cnt++;
  629|  1.82k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_:
  612|    927|{
  613|    927|    CScript ret;
  614|    927|    int cnt{0};
  615|       |
  616|    927|    ([&ret, &cnt] (Ts&& input) {
  617|    927|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    927|            if (cnt == 0) {
  620|    927|                ret = std::forward<Ts>(input);
  621|    927|            } else {
  622|    927|                ret.insert(ret.end(), input.begin(), input.end());
  623|    927|            }
  624|    927|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    927|            ret << input;
  627|    927|        }
  628|    927|        cnt++;
  629|    927|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    927|    return ret;
  632|    927|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  616|    927|    ([&ret, &cnt] (Ts&& input) {
  617|    927|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    927|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 927, False: 0]
  ------------------
  620|    927|                ret = std::forward<Ts>(input);
  621|    927|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    927|        cnt++;
  629|    927|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  616|    927|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    927|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    927|            ret << input;
  627|    927|        }
  628|    927|        cnt++;
  629|    927|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  616|    927|    ([&ret, &cnt] (Ts&& input) {
  617|    927|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    927|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 927]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|    927|            } else {
  622|    927|                ret.insert(ret.end(), input.begin(), input.end());
  623|    927|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    927|        cnt++;
  629|    927|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  616|    927|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    927|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    927|            ret << input;
  627|    927|        }
  628|    927|        cnt++;
  629|    927|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_:
  612|  2.02k|{
  613|  2.02k|    CScript ret;
  614|  2.02k|    int cnt{0};
  615|       |
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|  2.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  2.02k|            if (cnt == 0) {
  620|  2.02k|                ret = std::forward<Ts>(input);
  621|  2.02k|            } else {
  622|  2.02k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  2.02k|            }
  624|  2.02k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.02k|            ret << input;
  627|  2.02k|        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  2.02k|    return ret;
  632|  2.02k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.02k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.02k|            ret << input;
  627|  2.02k|        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E0_clES2_:
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|  2.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  2.02k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 2.02k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  2.02k|            } else {
  622|  2.02k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  2.02k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.02k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.02k|            ret << input;
  627|  2.02k|        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E_clES2_:
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|  2.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  2.02k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 2.02k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  2.02k|            } else {
  622|  2.02k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  2.02k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E_clES6_:
  616|  2.02k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  2.02k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  2.02k|            ret << input;
  627|  2.02k|        }
  628|  2.02k|        cnt++;
  629|  2.02k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_:
  612|  4.50k|{
  613|  4.50k|    CScript ret;
  614|  4.50k|    int cnt{0};
  615|       |
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|  4.50k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  4.50k|            if (cnt == 0) {
  620|  4.50k|                ret = std::forward<Ts>(input);
  621|  4.50k|            } else {
  622|  4.50k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  4.50k|            }
  624|  4.50k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  4.50k|            ret << input;
  627|  4.50k|        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  4.50k|    return ret;
  632|  4.50k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|  4.50k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  4.50k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 4.50k, False: 0]
  ------------------
  620|  4.50k|                ret = std::forward<Ts>(input);
  621|  4.50k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  4.50k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  4.50k|            ret << input;
  627|  4.50k|        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E0_clES2_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|  4.50k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  4.50k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 4.50k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  4.50k|            } else {
  622|  4.50k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  4.50k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  4.50k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  4.50k|            ret << input;
  627|  4.50k|        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|  4.50k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  4.50k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 0, False: 4.50k]
  ------------------
  620|      0|                ret = std::forward<Ts>(input);
  621|  4.50k|            } else {
  622|  4.50k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  4.50k|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  616|  4.50k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  4.50k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  4.50k|            ret << input;
  627|  4.50k|        }
  628|  4.50k|        cnt++;
  629|  4.50k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKjEE7CScriptDpOT_:
  612|    260|{
  613|    260|    CScript ret;
  614|    260|    int cnt{0};
  615|       |
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|    260|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    260|            if (cnt == 0) {
  620|    260|                ret = std::forward<Ts>(input);
  621|    260|            } else {
  622|    260|                ret.insert(ret.end(), input.begin(), input.end());
  623|    260|            }
  624|    260|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    260|            ret << input;
  627|    260|        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    260|    return ret;
  632|    260|}
_ZZ11BuildScriptIJRKjEE7CScriptDpOT_ENKUlS1_E_clES1_:
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    260|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    260|            ret << input;
  627|    260|        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_:
  612|    260|{
  613|    260|    CScript ret;
  614|    260|    int cnt{0};
  615|       |
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|    260|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    260|            if (cnt == 0) {
  620|    260|                ret = std::forward<Ts>(input);
  621|    260|            } else {
  622|    260|                ret.insert(ret.end(), input.begin(), input.end());
  623|    260|            }
  624|    260|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    260|            ret << input;
  627|    260|        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    260|    return ret;
  632|    260|}
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|    260|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    260|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 260, False: 0]
  ------------------
  620|    260|                ret = std::forward<Ts>(input);
  621|    260|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOmE_clES5_:
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    260|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    260|            ret << input;
  627|    260|        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  616|    260|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    260|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    260|            ret << input;
  627|    260|        }
  628|    260|        cnt++;
  629|    260|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_:
  612|  6.40k|{
  613|  6.40k|    CScript ret;
  614|  6.40k|    int cnt{0};
  615|       |
  616|  6.40k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.40k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.40k|            if (cnt == 0) {
  620|  6.40k|                ret = std::forward<Ts>(input);
  621|  6.40k|            } else {
  622|  6.40k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  6.40k|            }
  624|  6.40k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.40k|            ret << input;
  627|  6.40k|        }
  628|  6.40k|        cnt++;
  629|  6.40k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  6.40k|    return ret;
  632|  6.40k|}
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS0_E_clES7_:
  616|  6.40k|    ([&ret, &cnt] (Ts&& input) {
  617|  6.40k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  6.40k|            if (cnt == 0) {
  ------------------
  |  Branch (619:17): [True: 6.40k, False: 0]
  ------------------
  620|  6.40k|                ret = std::forward<Ts>(input);
  621|  6.40k|            } else {
  622|      0|                ret.insert(ret.end(), input.begin(), input.end());
  623|      0|            }
  624|       |        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|       |            ret << input;
  627|       |        }
  628|  6.40k|        cnt++;
  629|  6.40k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlS2_E_clES2_:
  616|  6.40k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  6.40k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.40k|            ret << input;
  627|  6.40k|        }
  628|  6.40k|        cnt++;
  629|  6.40k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS3_E_clES7_:
  616|  6.40k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  6.40k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  6.40k|            ret << input;
  627|  6.40k|        }
  628|  6.40k|        cnt++;
  629|  6.40k|    } (std::forward<Ts>(inputs)), ...);
_ZNK10CScriptNum8GetInt64Ev:
  335|   110k|    int64_t GetInt64() const { return m_value; }
_Z11BuildScriptIJRjEE7CScriptDpOT_:
  612|  79.2k|{
  613|  79.2k|    CScript ret;
  614|  79.2k|    int cnt{0};
  615|       |
  616|  79.2k|    ([&ret, &cnt] (Ts&& input) {
  617|  79.2k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|  79.2k|            if (cnt == 0) {
  620|  79.2k|                ret = std::forward<Ts>(input);
  621|  79.2k|            } else {
  622|  79.2k|                ret.insert(ret.end(), input.begin(), input.end());
  623|  79.2k|            }
  624|  79.2k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  79.2k|            ret << input;
  627|  79.2k|        }
  628|  79.2k|        cnt++;
  629|  79.2k|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|  79.2k|    return ret;
  632|  79.2k|}
_ZZ11BuildScriptIJRjEE7CScriptDpOT_ENKUlS0_E_clES0_:
  616|  79.2k|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|  79.2k|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|  79.2k|            ret << input;
  627|  79.2k|        }
  628|  79.2k|        cnt++;
  629|  79.2k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRmEE7CScriptDpOT_:
  612|    769|{
  613|    769|    CScript ret;
  614|    769|    int cnt{0};
  615|       |
  616|    769|    ([&ret, &cnt] (Ts&& input) {
  617|    769|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|    769|            if (cnt == 0) {
  620|    769|                ret = std::forward<Ts>(input);
  621|    769|            } else {
  622|    769|                ret.insert(ret.end(), input.begin(), input.end());
  623|    769|            }
  624|    769|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    769|            ret << input;
  627|    769|        }
  628|    769|        cnt++;
  629|    769|    } (std::forward<Ts>(inputs)), ...);
  630|       |
  631|    769|    return ret;
  632|    769|}
_ZZ11BuildScriptIJRmEE7CScriptDpOT_ENKUlS0_E_clES0_:
  616|    769|    ([&ret, &cnt] (Ts&& input) {
  617|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  618|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  619|       |            if (cnt == 0) {
  620|       |                ret = std::forward<Ts>(input);
  621|       |            } else {
  622|       |                ret.insert(ret.end(), input.begin(), input.end());
  623|       |            }
  624|    769|        } else {
  625|       |            // Otherwise invoke CScript::operator<<.
  626|    769|            ret << input;
  627|    769|        }
  628|    769|        cnt++;
  629|    769|    } (std::forward<Ts>(inputs)), ...);
_ZN7CScript16SerializationOpsI10SpanReaderS_17ActionUnserializeEEvRT0_RT_T1_:
  456|  4.55k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  148|  4.55k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_ZN7CScriptlsEl:
  468|  89.2k|    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
_ZN7CScript10push_int64El:
  435|  89.2k|    {
  436|  89.2k|        if (n == -1 || (n >= 1 && n <= 16))
  ------------------
  |  Branch (436:13): [True: 0, False: 89.2k]
  |  Branch (436:25): [True: 89.2k, False: 0]
  |  Branch (436:35): [True: 61.7k, False: 27.5k]
  ------------------
  437|  61.7k|        {
  438|  61.7k|            push_back(n + (OP_1 - 1));
  439|  61.7k|        }
  440|  27.5k|        else if (n == 0)
  ------------------
  |  Branch (440:18): [True: 0, False: 27.5k]
  ------------------
  441|      0|        {
  442|      0|            push_back(OP_0);
  443|      0|        }
  444|  27.5k|        else
  445|  27.5k|        {
  446|  27.5k|            *this << CScriptNum::serialize(n);
  447|  27.5k|        }
  448|  89.2k|        return *this;
  449|  89.2k|    }
_ZNK7CScript5GetOpERN9prevectorILj36EhjiE14const_iteratorER10opcodetypeRNSt3__16vectorIhNS6_9allocatorIhEEEE:
  498|  25.3M|    {
  499|  25.3M|        return GetScriptOp(pc, end(), opcodeRet, &vchRet);
  500|  25.3M|    }
_ZN7CScriptC2Ev:
  452|   345k|    CScript() = default;
_ZN10CScriptNum9serializeERKl:
  343|  27.5k|    {
  344|  27.5k|        if(value == 0)
  ------------------
  |  Branch (344:12): [True: 0, False: 27.5k]
  ------------------
  345|      0|            return std::vector<unsigned char>();
  346|       |
  347|  27.5k|        std::vector<unsigned char> result;
  348|  27.5k|        const bool neg = value < 0;
  349|  27.5k|        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
  ------------------
  |  Branch (349:29): [True: 0, False: 27.5k]
  ------------------
  350|       |
  351|   113k|        while(absvalue)
  ------------------
  |  Branch (351:15): [True: 85.6k, False: 27.5k]
  ------------------
  352|  85.6k|        {
  353|  85.6k|            result.push_back(absvalue & 0xff);
  354|  85.6k|            absvalue >>= 8;
  355|  85.6k|        }
  356|       |
  357|       |//    - If the most significant byte is >= 0x80 and the value is positive, push a
  358|       |//    new zero-byte to make the significant byte < 0x80 again.
  359|       |
  360|       |//    - If the most significant byte is >= 0x80 and the value is negative, push a
  361|       |//    new 0x80 byte that will be popped off when converting to an integral.
  362|       |
  363|       |//    - If the most significant byte is < 0x80 and the value is negative, add
  364|       |//    0x80 to it, since it will be subtracted and interpreted as a negative when
  365|       |//    converting to an integral.
  366|       |
  367|  27.5k|        if (result.back() & 0x80)
  ------------------
  |  Branch (367:13): [True: 872, False: 26.6k]
  ------------------
  368|    872|            result.push_back(neg ? 0x80 : 0);
  ------------------
  |  Branch (368:30): [True: 0, False: 872]
  ------------------
  369|  26.6k|        else if (neg)
  ------------------
  |  Branch (369:18): [True: 0, False: 26.6k]
  ------------------
  370|      0|            result.back() |= 0x80;
  371|       |
  372|  27.5k|        return result;
  373|  27.5k|    }
_ZN10CScriptNumC2ERKNSt3__16vectorIhNS0_9allocatorIhEEEEbm:
  248|   110k|    {
  249|   110k|        if (vch.size() > nMaxNumSize) {
  ------------------
  |  Branch (249:13): [True: 205, False: 110k]
  ------------------
  250|    205|            throw scriptnum_error("script number overflow");
  251|    205|        }
  252|   110k|        if (fRequireMinimal && vch.size() > 0) {
  ------------------
  |  Branch (252:13): [True: 110k, False: 0]
  |  Branch (252:32): [True: 110k, False: 0]
  ------------------
  253|       |            // Check that the number is encoded with the minimum possible
  254|       |            // number of bytes.
  255|       |            //
  256|       |            // If the most-significant-byte - excluding the sign bit - is zero
  257|       |            // then we're not minimal. Note how this test also rejects the
  258|       |            // negative-zero encoding, 0x80.
  259|   110k|            if ((vch.back() & 0x7f) == 0) {
  ------------------
  |  Branch (259:17): [True: 781, False: 109k]
  ------------------
  260|       |                // One exception: if there's more than one byte and the most
  261|       |                // significant bit of the second-most-significant-byte is set
  262|       |                // it would conflict with the sign bit. An example of this case
  263|       |                // is +-255, which encode to 0xff00 and 0xff80 respectively.
  264|       |                // (big-endian).
  265|    781|                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
  ------------------
  |  Branch (265:21): [True: 7, False: 774]
  |  Branch (265:40): [True: 9, False: 765]
  ------------------
  266|     16|                    throw scriptnum_error("non-minimally encoded script number");
  267|     16|                }
  268|    781|            }
  269|   110k|        }
  270|   110k|        m_value = set_vch(vch);
  271|   110k|    }
_ZN15scriptnum_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  224|    221|    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
_ZN10CScriptNum7set_vchERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  377|   110k|    {
  378|   110k|      if (vch.empty())
  ------------------
  |  Branch (378:11): [True: 0, False: 110k]
  ------------------
  379|      0|          return 0;
  380|       |
  381|   110k|      int64_t result = 0;
  382|   278k|      for (size_t i = 0; i != vch.size(); ++i)
  ------------------
  |  Branch (382:26): [True: 167k, False: 110k]
  ------------------
  383|   167k|          result |= static_cast<int64_t>(vch[i]) << 8*i;
  384|       |
  385|       |      // If the input vector's most significant byte is 0x80, remove it from
  386|       |      // the result's msb and return a negative.
  387|   110k|      if (vch.back() & 0x80)
  ------------------
  |  Branch (387:11): [True: 306, False: 109k]
  ------------------
  388|    306|          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
  389|       |
  390|   109k|      return result;
  391|   110k|    }
_ZN7CScriptlsENSt3__14spanIKhLm18446744073709551615EEE:
  493|  34.4k|    {
  494|  34.4k|        return *this << std::as_bytes(b);
  495|  34.4k|    }
_ZN7CScriptlsENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  485|  34.4k|    {
  486|  34.4k|        AppendDataSize(b.size());
  487|  34.4k|        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
  488|  34.4k|        return *this;
  489|  34.4k|    }
_ZN7CScript14AppendDataSizeEj:
  409|  34.4k|    {
  410|  34.4k|        if (size < OP_PUSHDATA1) {
  ------------------
  |  Branch (410:13): [True: 34.4k, False: 0]
  ------------------
  411|  34.4k|            insert(end(), static_cast<value_type>(size));
  412|  34.4k|        } else if (size <= 0xff) {
  ------------------
  |  Branch (412:20): [True: 0, False: 0]
  ------------------
  413|      0|            insert(end(), OP_PUSHDATA1);
  414|      0|            insert(end(), static_cast<value_type>(size));
  415|      0|        } else if (size <= 0xffff) {
  ------------------
  |  Branch (415:20): [True: 0, False: 0]
  ------------------
  416|      0|            insert(end(), OP_PUSHDATA2);
  417|      0|            value_type data[2];
  418|      0|            WriteLE16(data, size);
  419|      0|            insert(end(), std::cbegin(data), std::cend(data));
  420|      0|        } else {
  421|      0|            insert(end(), OP_PUSHDATA4);
  422|      0|            value_type data[4];
  423|      0|            WriteLE32(data, size);
  424|      0|            insert(end(), std::cbegin(data), std::cend(data));
  425|      0|        }
  426|  34.4k|    }
_ZN7CScript10AppendDataENSt3__14spanIKhLm18446744073709551615EEE:
  429|  34.4k|    {
  430|  34.4k|        insert(end(), data.begin(), data.end());
  431|  34.4k|    }
_ZN7CScriptlsE10opcodetype:
  471|   288k|    {
  472|   288k|        if (opcode < 0 || opcode > 0xff)
  ------------------
  |  Branch (472:13): [True: 0, False: 288k]
  |  Branch (472:27): [True: 0, False: 288k]
  ------------------
  473|      0|            throw std::runtime_error("CScript::operator<<(): invalid opcode");
  474|   288k|        insert(end(), (unsigned char)opcode);
  475|   288k|        return *this;
  476|   288k|    }
_ZN7CScript10DecodeOP_NE10opcodetype:
  509|   249k|    {
  510|   249k|        if (opcode == OP_0)
  ------------------
  |  Branch (510:13): [True: 0, False: 249k]
  ------------------
  511|      0|            return 0;
  512|   249k|        assert(opcode >= OP_1 && opcode <= OP_16);
  ------------------
  |  Branch (512:9): [True: 249k, False: 0]
  |  Branch (512:9): [True: 249k, False: 0]
  |  Branch (512:9): [True: 249k, False: 0]
  ------------------
  513|   249k|        return (int)opcode - (int)(OP_1 - 1);
  514|   249k|    }

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

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

_Z12IsPushdataOp10opcodetype:
   41|  22.9M|{
   42|  22.9M|    return opcode > OP_FALSE && opcode <= OP_PUSHDATA4;
  ------------------
  |  Branch (42:12): [True: 7.60M, False: 15.3M]
  |  Branch (42:33): [True: 178k, False: 7.42M]
  ------------------
   43|  22.9M|}

_Z11UnserializeI10SpanReaderR7CScriptQ14UnserializableIT0_T_EEvRS4_OS3_:
  776|  4.55k|{
  777|  4.55k|    a.Unserialize(is);
  778|  4.55k|}
_ZN7CScript11UnserializeI10SpanReaderEEvRT_:
  220|  4.55k|    {                                                                                               \
  221|  4.55k|        static_assert(std::is_same_v<cls&, decltype(*this)>, "Unserialize type mismatch");          \
  222|  4.55k|        Unser(s, *this);                                                                            \
  223|  4.55k|    }
_ZN7CScript5UnserI10SpanReaderEEvRT_RS_:
  172|  4.55k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10SpanReaderJR9prevectorILj36EhjiEEEEvRT_DpOT0_:
 1086|  4.55k|    {
 1087|  4.55k|        ::UnserializeMany(s, args...);
 1088|  4.55k|    }
_Z15UnserializeManyI10SpanReaderJR9prevectorILj36EhjiEEEvRT_DpOT0_:
 1054|  4.55k|{
 1055|  4.55k|    (::Unserialize(s, args), ...);
 1056|  4.55k|}
_Z11UnserializeI10SpanReaderLj36EhEvRT_R9prevectorIXT0_ET1_jiE:
  876|  4.55k|{
  877|  4.55k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  878|       |        // Limit size per read so bogus size value won't cause out of memory
  879|  4.55k|        v.clear();
  880|  4.55k|        unsigned int nSize = ReadCompactSize(is);
  881|  4.55k|        unsigned int i = 0;
  882|  8.95k|        while (i < nSize) {
  ------------------
  |  Branch (882:16): [True: 4.40k, False: 4.55k]
  ------------------
  883|  4.40k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  884|  4.40k|            v.resize_uninitialized(i + blk);
  885|  4.40k|            is.read(std::as_writable_bytes(std::span{&v[i], blk}));
  886|  4.40k|            i += blk;
  887|  4.40k|        }
  888|       |    } else {
  889|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  890|       |    }
  891|  4.55k|}
_Z13ser_readdata8I10SpanReaderEhRT_:
   82|  4.55k|{
   83|  4.55k|    uint8_t obj;
   84|  4.55k|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   85|  4.55k|    return obj;
   86|  4.55k|}
_Z15ReadCompactSizeI10SpanReaderEmRT_b:
  334|  4.55k|{
  335|  4.55k|    uint8_t chSize = ser_readdata8(is);
  336|  4.55k|    uint64_t nSizeRet = 0;
  337|  4.55k|    if (chSize < 253)
  ------------------
  |  Branch (337:9): [True: 3.03k, False: 1.52k]
  ------------------
  338|  3.03k|    {
  339|  3.03k|        nSizeRet = chSize;
  340|  3.03k|    }
  341|  1.52k|    else if (chSize == 253)
  ------------------
  |  Branch (341:14): [True: 1.18k, False: 339]
  ------------------
  342|  1.18k|    {
  343|  1.18k|        nSizeRet = ser_readdata16(is);
  344|  1.18k|        if (nSizeRet < 253)
  ------------------
  |  Branch (344:13): [True: 9, False: 1.17k]
  ------------------
  345|      9|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  346|  1.18k|    }
  347|    339|    else if (chSize == 254)
  ------------------
  |  Branch (347:14): [True: 243, False: 96]
  ------------------
  348|    243|    {
  349|    243|        nSizeRet = ser_readdata32(is);
  350|    243|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (350:13): [True: 16, False: 227]
  ------------------
  351|     16|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|    243|    }
  353|     96|    else
  354|     96|    {
  355|     96|        nSizeRet = ser_readdata64(is);
  356|     96|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (356:13): [True: 28, False: 68]
  ------------------
  357|     28|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|     96|    }
  359|  4.50k|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (359:9): [True: 4.49k, False: 12]
  |  Branch (359:24): [True: 77, False: 4.41k]
  ------------------
  360|     77|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  361|     77|    }
  362|  4.42k|    return nSizeRet;
  363|  4.50k|}
_Z14ser_readdata16I10SpanReaderEtRT_:
   88|  1.18k|{
   89|  1.18k|    uint16_t obj;
   90|  1.18k|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   91|  1.18k|    return le16toh_internal(obj);
   92|  1.18k|}
_Z14ser_readdata32I10SpanReaderEjRT_:
   94|    243|{
   95|    243|    uint32_t obj;
   96|    243|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
   97|    243|    return le32toh_internal(obj);
   98|    243|}
_Z14ser_readdata64I10SpanReaderEmRT_:
  106|     87|{
  107|     87|    uint64_t obj;
  108|     87|    s.read(std::as_writable_bytes(std::span{&obj, 1}));
  109|     87|    return le64toh_internal(obj);
  110|     87|}
_Z6AsBaseI9prevectorILj36EhjiE7CScriptERT_RT0_:
  137|  4.55k|{
  138|  4.55k|    static_assert(std::is_base_of_v<Out, In>);
  139|  4.55k|    return x;
  140|  4.55k|}
_Z20GetSizeOfCompactSizem:
  292|  36.3M|{
  293|  36.3M|    if (nSize < 253)             return sizeof(unsigned char);
  ------------------
  |  Branch (293:9): [True: 0, False: 36.3M]
  ------------------
  294|  36.3M|    else if (nSize <= std::numeric_limits<uint16_t>::max()) return sizeof(unsigned char) + sizeof(uint16_t);
  ------------------
  |  Branch (294:14): [True: 0, False: 36.3M]
  ------------------
  295|  36.3M|    else if (nSize <= std::numeric_limits<unsigned int>::max())  return sizeof(unsigned char) + sizeof(unsigned int);
  ------------------
  |  Branch (295:14): [True: 36.3M, False: 0]
  ------------------
  296|      0|    else                         return sizeof(unsigned char) + sizeof(uint64_t);
  297|  36.3M|}

_ZN10SpanReaderC2ENSt3__14spanIKhLm18446744073709551615EEE:
   91|  4.55k|    explicit SpanReader(std::span<const unsigned char> data) : m_data{std::as_bytes(data)} {}
_ZN10SpanReaderrsIR7CScriptEERS_OT_:
   96|  4.55k|    {
   97|  4.55k|        ::Unserialize(*this, obj);
   98|  4.55k|        return (*this);
   99|  4.55k|    }
_ZN10SpanReader4readENSt3__14spanISt4byteLm18446744073709551615EEE:
  105|  10.4k|    {
  106|  10.4k|        if (dst.size() == 0) {
  ------------------
  |  Branch (106:13): [True: 0, False: 10.4k]
  ------------------
  107|      0|            return;
  108|      0|        }
  109|       |
  110|       |        // Read from the beginning of the buffer
  111|  10.4k|        if (dst.size() > m_data.size()) {
  ------------------
  |  Branch (111:13): [True: 155, False: 10.3k]
  ------------------
  112|    155|            throw std::ios_base::failure("SpanReader::read(): end of data");
  113|    155|        }
  114|  10.3k|        memcpy(dst.data(), m_data.data(), dst.size());
  115|  10.3k|        m_data = m_data.subspan(dst.size());
  116|  10.3k|    }

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

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

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

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

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

_ZN18FuzzedDataProviderC2EPKhm:
   37|  4.55k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|  4.27k|inline bool FuzzedDataProvider::ConsumeBool() {
  290|  4.27k|  return 1 & ConsumeIntegral<uint8_t>();
  291|  4.27k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  4.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  4.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  4.27k|                                std::numeric_limits<T>::max());
  198|  4.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  4.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  4.27k|  static_assert(std::is_integral_v<T>, "An integral type is required.");
  207|  4.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  4.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 4.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  4.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  4.27k|  uint64_t result = 0;
  215|  4.27k|  size_t offset = 0;
  216|       |
  217|  4.80k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 4.27k, False: 531]
  |  Branch (217:43): [True: 4.27k, False: 0]
  ------------------
  218|  4.27k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 531, False: 3.73k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|    531|    --remaining_bytes_;
  226|    531|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|    531|    offset += CHAR_BIT;
  228|    531|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  4.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 4.27k, False: 0]
  ------------------
  232|  4.27k|    result = result % (range + 1);
  233|       |
  234|  4.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  4.27k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  4.55k|FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) {
  154|       |  // Reads bytes from the start of |data_ptr_|. Maps "\\" to "\", and maps "\"
  155|       |  // followed by anything else to the end of the string. As a result of this
  156|       |  // logic, a fuzzer can insert characters into the string, and the string
  157|       |  // will be lengthened to include those new characters, resulting in a more
  158|       |  // stable fuzzer than picking the length of a string independently from
  159|       |  // picking its contents.
  160|  4.55k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  4.55k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|  55.0M|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 55.0M, False: 3.96k]
  |  Branch (164:40): [True: 55.0M, False: 32]
  ------------------
  165|  55.0M|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|  55.0M|    Advance(1);
  167|  55.0M|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 2.09k, False: 55.0M]
  |  Branch (167:25): [True: 2.09k, False: 3]
  ------------------
  168|  2.09k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  2.09k|      Advance(1);
  170|  2.09k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 556, False: 1.54k]
  ------------------
  171|    556|        break;
  172|  2.09k|    }
  173|  55.0M|    result += next;
  174|  55.0M|  }
  175|       |
  176|  4.55k|  result.shrink_to_fit();
  177|  4.55k|  return result;
  178|  4.55k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEv:
  181|  4.55k|inline std::string FuzzedDataProvider::ConsumeRandomLengthString() {
  182|  4.55k|  return ConsumeRandomLengthString(remaining_bytes_);
  183|  4.55k|}
_ZN18FuzzedDataProvider7AdvanceEm:
  343|  55.0M|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  344|  55.0M|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (344:7): [True: 0, False: 55.0M]
  ------------------
  345|      0|    abort();
  346|       |
  347|  55.0M|  data_ptr_ += num_bytes;
  348|  55.0M|  remaining_bytes_ -= num_bytes;
  349|  55.0M|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  378|  55.0M|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  379|  55.0M|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  380|  55.0M|  static_assert(!std::numeric_limits<TU>::is_signed,
  381|  55.0M|                "Source type must be unsigned.");
  382|       |
  383|       |  if constexpr (std::numeric_limits<TS>::is_modulo)
  384|       |    return static_cast<TS>(value);
  385|       |
  386|       |  // Avoid using implementation-defined unsigned to signed conversions.
  387|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  388|  55.0M|  constexpr auto TS_max = static_cast<TU>(std::numeric_limits<TS>::max());
  389|  55.0M|  if (value <= TS_max) {
  ------------------
  |  Branch (389:7): [True: 43.5M, False: 11.5M]
  ------------------
  390|  43.5M|    return static_cast<TS>(value);
  391|  43.5M|  } else {
  392|  11.5M|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  393|  11.5M|    return TS_min + static_cast<TS>(value - TS_min);
  394|  11.5M|  }
  395|  55.0M|}

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

_Z29miniscript_script_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
 1256|  4.55k|{
 1257|  4.55k|    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
 1258|  4.55k|    const std::optional<CScript> script = ConsumeDeserializable<CScript>(fuzzed_data_provider);
 1259|  4.55k|    if (!script) return;
  ------------------
  |  Branch (1259:9): [True: 285, False: 4.27k]
  ------------------
 1260|       |
 1261|  4.27k|    const ScriptParserContext script_parser_ctx{(MsCtx)fuzzed_data_provider.ConsumeBool()};
 1262|  4.27k|    const auto ms = miniscript::FromScript(*script, script_parser_ctx);
 1263|  4.27k|    if (!ms) return;
  ------------------
  |  Branch (1263:9): [True: 3.06k, False: 1.20k]
  ------------------
 1264|       |
 1265|  4.27k|    assert(ms->ToScript(script_parser_ctx) == *script);
  ------------------
  |  Branch (1265:5): [True: 1.20k, False: 0]
  ------------------
 1266|  1.20k|}
miniscript.cpp:_ZN12_GLOBAL__N_119ScriptParserContextC2EN10miniscript17MiniscriptContextE:
  196|  4.27k|    constexpr ScriptParserContext(MsCtx ctx) noexcept : script_ctx(ctx) {}
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext9MsContextEv:
  239|  11.3M|    MsCtx MsContext() const {
  240|  11.3M|        return script_ctx;
  241|  11.3M|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext11FromPKBytesINSt3__111__wrap_iterIPhEEEENS2_8optionalINS0_3KeyEEET_S9_:
  223|  10.2k|    {
  224|  10.2k|        Key key;
  225|  10.2k|        key.data.assign(first, last);
  226|  10.2k|        key.is_hash = false;
  227|  10.2k|        return key;
  228|  10.2k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext12FromPKHBytesINSt3__111__wrap_iterIPhEEEENS2_8optionalINS0_3KeyEEET_S9_:
  232|  14.1k|    {
  233|  14.1k|        Key key;
  234|  14.1k|        key.data.assign(first, last);
  235|  14.1k|        key.is_hash = true;
  236|  14.1k|        return key;
  237|  14.1k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext10KeyCompareERKNS0_3KeyES3_:
  204|   104k|    bool KeyCompare(const Key& a, const Key& b) const {
  205|   104k|        return a.data < b.data;
  206|   104k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext9ToPKBytesERKNS0_3KeyE:
  209|  1.38k|    {
  210|  1.38k|        assert(!key.is_hash);
  ------------------
  |  Branch (210:9): [True: 1.38k, False: 0]
  ------------------
  211|  1.38k|        return key.data;
  212|  1.38k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext10ToPKHBytesERKNS0_3KeyE:
  215|  5.18k|    {
  216|  5.18k|        if (key.is_hash) return key.data;
  ------------------
  |  Branch (216:13): [True: 5.18k, False: 0]
  ------------------
  217|      0|        const auto h = Hash160(key.data);
  218|      0|        return {h.begin(), h.end()};
  219|  5.18k|    }

_Z21ConsumeDeserializableI7CScriptENSt3__18optionalIT_EER18FuzzedDataProviderRKNS2_ImEE:
  121|  4.55k|{
  122|  4.55k|    const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
  123|  4.55k|    SpanReader ds{buffer};
  124|  4.55k|    T obj;
  125|  4.55k|    try {
  126|  4.55k|        ds >> obj;
  127|  4.55k|    } catch (const std::ios_base::failure&) {
  128|    285|        return std::nullopt;
  129|    285|    }
  130|  4.27k|    return obj;
  131|  4.55k|}
_Z29ConsumeRandomLengthByteVectorIhENSt3__16vectorIT_NS0_9allocatorIS2_EEEER18FuzzedDataProviderRKNS0_8optionalImEE:
   64|  4.55k|{
   65|  4.55k|    static_assert(sizeof(B) == 1);
   66|  4.55k|    const std::string s = max_length ?
  ------------------
  |  Branch (66:27): [True: 0, False: 4.55k]
  ------------------
   67|      0|                              fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
   68|  4.55k|                              fuzzed_data_provider.ConsumeRandomLengthString();
   69|  4.55k|    std::vector<B> ret(s.size());
   70|  4.55k|    std::copy(s.begin(), s.end(), reinterpret_cast<char*>(ret.data()));
   71|  4.55k|    return ret;
   72|  4.55k|}

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

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

_ZN9base_blobILj256EE4dataEv:
   99|      2|    constexpr unsigned char* data() { return m_data.data(); }
_ZN9base_blobILj256EE4sizeEv:
  107|      2|    static constexpr unsigned int size() { return WIDTH; }

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

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

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

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

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

miniscript.cpp:_Z6VectorIJN12_GLOBAL__N_119ScriptParserContext3KeyEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  19.6k|{
   25|  19.6k|    std::vector<std::common_type_t<Args...>> ret;
   26|  19.6k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  19.6k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  19.6k|    return ret;
   30|  19.6k|}
miniscript.cpp:_Z6VectorIJN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEEEENSt3__16vectorINS6_11common_typeIJDpT_EE4typeENS6_9allocatorISC_EEEEDpOS9_:
   24|   948k|{
   25|   948k|    std::vector<std::common_type_t<Args...>> ret;
   26|   948k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|   948k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   948k|    return ret;
   30|   948k|}
miniscript.cpp:_Z6VectorIJN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEES5_EENSt3__16vectorINS6_11common_typeIJDpT_EE4typeENS6_9allocatorISC_EEEEDpOS9_:
   24|   171k|{
   25|   171k|    std::vector<std::common_type_t<Args...>> ret;
   26|   171k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|   171k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   171k|    return ret;
   30|   171k|}
miniscript.cpp:_Z6VectorIJN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEES5_S5_EENSt3__16vectorINS6_11common_typeIJDpT_EE4typeENS6_9allocatorISC_EEEEDpOS9_:
   24|  48.8k|{
   25|  48.8k|    std::vector<std::common_type_t<Args...>> ret;
   26|  48.8k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|  48.8k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  48.8k|    return ret;
   30|  48.8k|}
_Z6VectorIJN10miniscript8internal6MaxIntIjEEEENSt3__16vectorINS4_11common_typeIJDpT_EE4typeENS4_9allocatorISA_EEEEDpOS7_:
   24|   202k|{
   25|   202k|    std::vector<std::common_type_t<Args...>> ret;
   26|   202k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|   202k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   202k|    return ret;
   30|   202k|}
_Z6VectorIJN10miniscript8internal7SatInfoEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|   101k|{
   25|   101k|    std::vector<std::common_type_t<Args...>> ret;
   26|   101k|    ret.reserve(sizeof...(args));
   27|       |    // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
   28|   101k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   101k|    return ret;
   30|   101k|}

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

