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

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

_ZN9prevectorILj28EhjiE3endEv:
  304|   392k|    iterator end() { return iterator(item_ptr(size())); }
_ZN9prevectorILj28EhjiE8item_ptrEi:
  206|  1.19M|    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (206:47): [True: 545k, False: 650k]
  ------------------
_ZNK9prevectorILj28EhjiE9is_directEv:
  173|  30.9M|    bool is_direct() const { return _size <= N; }
_ZN9prevectorILj28EhjiE10direct_ptrEi:
  169|   554k|    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
_ZN9prevectorILj28EhjiE12indirect_ptrEi:
  171|   650k|    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
_ZN9prevectorILj28EhjiE6insertENS0_8iteratorERKh:
  359|   306k|    iterator insert(iterator pos, const T& value) {
  360|   306k|        size_type p = pos - begin();
  361|   306k|        size_type new_size = size() + 1;
  362|   306k|        if (capacity() < new_size) {
  ------------------
  |  Branch (362:13): [True: 2.68k, False: 304k]
  ------------------
  363|  2.68k|            change_capacity(new_size + (new_size >> 1));
  364|  2.68k|        }
  365|   306k|        T* ptr = item_ptr(p);
  366|   306k|        T* dst = ptr + 1;
  367|   306k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  368|   306k|        _size++;
  369|   306k|        new(static_cast<void*>(ptr)) T(value);
  370|   306k|        return iterator(ptr);
  371|   306k|    }
_ZN9prevectorILj28EhjiE5beginEv:
  302|   392k|    iterator begin() { return iterator(item_ptr(0)); }
_ZmiN9prevectorILj28EhjiE8iteratorES1_:
   66|   392k|        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
_ZNK9prevectorILj28EhjiE8iteratordeEv:
   59|  1.93M|        T& operator*() const { return *ptr; }
_ZNK9prevectorILj28EhjiE8capacityEv:
  312|   411k|    size_t capacity() const {
  313|   411k|        if (is_direct()) {
  ------------------
  |  Branch (313:13): [True: 197k, False: 213k]
  ------------------
  314|   197k|            return N;
  315|   213k|        } else {
  316|   213k|            return _union.indirect_contents.capacity;
  317|   213k|        }
  318|   411k|    }
_ZN9prevectorILj28EhjiE15change_capacityEj:
  175|  13.3k|    void change_capacity(size_type new_capacity) {
  176|  13.3k|        if (new_capacity <= N) {
  ------------------
  |  Branch (176:13): [True: 0, False: 13.3k]
  ------------------
  177|      0|            if (!is_direct()) {
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                T* indirect = indirect_ptr(0);
  179|      0|                T* src = indirect;
  180|      0|                T* dst = direct_ptr(0);
  181|      0|                memcpy(dst, src, size() * sizeof(T));
  182|      0|                free(indirect);
  183|      0|                _size -= N + 1;
  184|      0|            }
  185|  13.3k|        } else {
  186|  13.3k|            if (!is_direct()) {
  ------------------
  |  Branch (186:17): [True: 4.92k, False: 8.41k]
  ------------------
  187|       |                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
  188|       |                    success. These should instead use an allocator or new/delete so that handlers
  189|       |                    are called as necessary, but performance would be slightly degraded by doing so. */
  190|  4.92k|                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
  191|  4.92k|                assert(_union.indirect_contents.indirect);
  192|  4.92k|                _union.indirect_contents.capacity = new_capacity;
  193|  8.41k|            } else {
  194|  8.41k|                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
  195|  8.41k|                assert(new_indirect);
  196|  8.41k|                T* src = direct_ptr(0);
  197|  8.41k|                T* dst = reinterpret_cast<T*>(new_indirect);
  198|  8.41k|                memcpy(dst, src, size() * sizeof(T));
  199|  8.41k|                _union.indirect_contents.indirect = new_indirect;
  200|  8.41k|                _union.indirect_contents.capacity = new_capacity;
  201|  8.41k|                _size += N + 1;
  202|  8.41k|            }
  203|  13.3k|        }
  204|  13.3k|    }
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvNS0_8iteratorET_S8_:
  387|  17.8k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  17.8k|        size_type p = pos - begin();
  389|  17.8k|        difference_type count = last - first;
  390|  17.8k|        size_type new_size = size() + count;
  391|  17.8k|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 1.17k, False: 16.7k]
  ------------------
  392|  1.17k|            change_capacity(new_size + (new_size >> 1));
  393|  1.17k|        }
  394|  17.8k|        T* ptr = item_ptr(p);
  395|  17.8k|        T* dst = ptr + count;
  396|  17.8k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  17.8k|        _size += count;
  398|  17.8k|        fill(ptr, first, last);
  399|  17.8k|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS2_11__wrap_iterIPKhEEEEvPhT_S8_:
  214|  17.8k|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|   227k|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 209k, False: 17.8k]
  ------------------
  216|   209k|            new(static_cast<void*>(dst)) T(*first);
  217|   209k|            ++dst;
  218|   209k|            ++first;
  219|   209k|        }
  220|  17.8k|    }
_ZN9prevectorILj28EhjiE9push_backERKh:
  444|  48.4k|    void push_back(const T& value) {
  445|  48.4k|        emplace_back(value);
  446|  48.4k|    }
_ZN9prevectorILj28EhjiE12emplace_backIJRKhEEEvDpOT_:
  435|  48.4k|    void emplace_back(Args&&... args) {
  436|  48.4k|        size_type new_size = size() + 1;
  437|  48.4k|        if (capacity() < new_size) {
  ------------------
  |  Branch (437:13): [True: 239, False: 48.2k]
  ------------------
  438|    239|            change_capacity(new_size + (new_size >> 1));
  439|    239|        }
  440|  48.4k|        new(item_ptr(size())) T(std::forward<Args>(args)...);
  441|  48.4k|        _size++;
  442|  48.4k|    }
_ZNK9prevectorILj28EhjiE3endEv:
  305|  13.4M|    const_iterator end() const { return const_iterator(item_ptr(size())); }
_ZNK9prevectorILj28EhjiE8item_ptrEi:
  207|  13.4M|    const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); }
  ------------------
  |  Branch (207:59): [True: 16.2k, False: 13.4M]
  ------------------
_ZNK9prevectorILj28EhjiE10direct_ptrEi:
  170|  16.2k|    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
_ZNK9prevectorILj28EhjiE12indirect_ptrEi:
  172|  13.4M|    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
_ZNK9prevectorILj28EhjiE4sizeEv:
  294|  14.7M|    size_type size() const {
  295|  14.7M|        return is_direct() ? _size : _size - N - 1;
  ------------------
  |  Branch (295:16): [True: 640k, False: 14.0M]
  ------------------
  296|  14.7M|    }
_ZNK9prevectorILj28EhjiE5beginEv:
  303|  6.42k|    const_iterator begin() const { return const_iterator(item_ptr(0)); }
_ZNK9prevectorILj28EhjiE14const_iteratordeEv:
  111|  92.8M|        const T& operator*() const { return *ptr; }
_ZN9prevectorILj28EhjiE5clearEv:
  355|  4.30k|    void clear() {
  356|  4.30k|        resize(0);
  357|  4.30k|    }
_ZN9prevectorILj28EhjiE6resizeEj:
  328|  4.30k|    void resize(size_type new_size) {
  329|  4.30k|        size_type cur_size = size();
  330|  4.30k|        if (cur_size == new_size) {
  ------------------
  |  Branch (330:13): [True: 4.30k, False: 0]
  ------------------
  331|  4.30k|            return;
  332|  4.30k|        }
  333|      0|        if (cur_size > new_size) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            erase(item_ptr(new_size), end());
  335|      0|            return;
  336|      0|        }
  337|      0|        if (new_size > capacity()) {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  ------------------
  338|      0|            change_capacity(new_size);
  339|      0|        }
  340|      0|        ptrdiff_t increase = new_size - cur_size;
  341|      0|        fill(item_ptr(cur_size), increase);
  342|      0|        _size += increase;
  343|      0|    }
_ZNK9prevectorILj28EhjiE14const_iteratorneES1_:
  125|  26.5M|        bool operator!=(const_iterator x) const { return ptr != x.ptr; }
_ZN9prevectorILj28EhjiE14const_iteratorppEv:
  114|  14.4M|        const_iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj28EhjiEeqERKS0_:
  481|  1.22k|    bool operator==(const prevector<N, T, Size, Diff>& other) const {
  482|  1.22k|        if (other.size() != size()) {
  ------------------
  |  Branch (482:13): [True: 0, False: 1.22k]
  ------------------
  483|      0|            return false;
  484|      0|        }
  485|  1.22k|        const_iterator b1 = begin();
  486|  1.22k|        const_iterator b2 = other.begin();
  487|  1.22k|        const_iterator e1 = end();
  488|   487k|        while (b1 != e1) {
  ------------------
  |  Branch (488:16): [True: 485k, False: 1.22k]
  ------------------
  489|   485k|            if ((*b1) != (*b2)) {
  ------------------
  |  Branch (489:17): [True: 0, False: 485k]
  ------------------
  490|      0|                return false;
  491|      0|            }
  492|   485k|            ++b1;
  493|   485k|            ++b2;
  494|   485k|        }
  495|  1.22k|        return true;
  496|  1.22k|    }
_ZN9prevectorILj28EhjiED2Ev:
  474|   855k|    ~prevector() {
  475|   855k|        if (!is_direct()) {
  ------------------
  |  Branch (475:13): [True: 8.41k, False: 847k]
  ------------------
  476|  8.41k|            free(_union.indirect_contents.indirect);
  477|  8.41k|            _union.indirect_contents.indirect = nullptr;
  478|  8.41k|        }
  479|   855k|    }
_ZN9prevectorILj28EhjiEC2EOS0_:
  271|   538k|        : _union(std::move(other._union)), _size(other._size)
  272|   538k|    {
  273|   538k|        other._size = 0;
  274|   538k|    }
_ZN9prevectorILj28EhjiEC2Ev:
  243|   317k|    prevector() = default;
_ZN9prevectorILj28EhjiE8iteratorC2EPh:
   58|  1.09M|        iterator(T* ptr_) : ptr(ptr_) {}
_ZN9prevectorILj28EhjiE20resize_uninitializedEj:
  401|  4.13k|    inline void resize_uninitialized(size_type new_size) {
  402|       |        // resize_uninitialized changes the size of the prevector but does not initialize it.
  403|       |        // If size < new_size, the added elements must be initialized explicitly.
  404|  4.13k|        if (capacity() < new_size) {
  ------------------
  |  Branch (404:13): [True: 2.49k, False: 1.64k]
  ------------------
  405|  2.49k|            change_capacity(new_size);
  406|  2.49k|            _size += new_size - size();
  407|  2.49k|            return;
  408|  2.49k|        }
  409|  1.64k|        if (new_size < size()) {
  ------------------
  |  Branch (409:13): [True: 0, False: 1.64k]
  ------------------
  410|      0|            erase(item_ptr(new_size), end());
  411|  1.64k|        } else {
  412|  1.64k|            _size += new_size - size();
  413|  1.64k|        }
  414|  1.64k|    }
_ZN9prevectorILj28EhjiEixEj:
  320|  4.13k|    T& operator[](size_type pos) {
  321|  4.13k|        return *item_ptr(pos);
  322|  4.13k|    }
_ZN9prevectorILj28EhjiE14const_iteratorC2EPKh:
  109|  30.5M|        const_iterator(const T* ptr_) : ptr(ptr_) {}
_ZmiN9prevectorILj28EhjiE14const_iteratorES1_:
  118|  39.1M|        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
_ZN9prevectorILj28EhjiEaSEOS0_:
  284|   232k|    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
  285|   232k|        if (!is_direct()) {
  ------------------
  |  Branch (285:13): [True: 0, False: 232k]
  ------------------
  286|      0|            free(_union.indirect_contents.indirect);
  287|      0|        }
  288|   232k|        _union = std::move(other._union);
  289|   232k|        _size = other._size;
  290|   232k|        other._size = 0;
  291|   232k|        return *this;
  292|   232k|    }
_ZN9prevectorILj28EhjiE6insertITkNSt3__114input_iteratorENS0_8iteratorEEEvS3_T_S4_:
  387|  33.9k|    void insert(iterator pos, InputIterator first, InputIterator last) {
  388|  33.9k|        size_type p = pos - begin();
  389|  33.9k|        difference_type count = last - first;
  390|  33.9k|        size_type new_size = size() + count;
  391|  33.9k|        if (capacity() < new_size) {
  ------------------
  |  Branch (391:13): [True: 6.74k, False: 27.2k]
  ------------------
  392|  6.74k|            change_capacity(new_size + (new_size >> 1));
  393|  6.74k|        }
  394|  33.9k|        T* ptr = item_ptr(p);
  395|  33.9k|        T* dst = ptr + count;
  396|  33.9k|        memmove(dst, ptr, (size() - p) * sizeof(T));
  397|  33.9k|        _size += count;
  398|  33.9k|        fill(ptr, first, last);
  399|  33.9k|    }
_ZN9prevectorILj28EhjiE4fillITkNSt3__114input_iteratorENS0_8iteratorEEEvPhT_S5_:
  214|  33.9k|    void fill(T* dst, InputIterator first, InputIterator last) {
  215|  1.18M|        while (first != last) {
  ------------------
  |  Branch (215:16): [True: 1.15M, False: 33.9k]
  ------------------
  216|  1.15M|            new(static_cast<void*>(dst)) T(*first);
  217|  1.15M|            ++dst;
  218|  1.15M|            ++first;
  219|  1.15M|        }
  220|  33.9k|    }
_ZNK9prevectorILj28EhjiE8iteratorneES1_:
   73|  1.18M|        bool operator!=(iterator x) const { return ptr != x.ptr; }
_ZN9prevectorILj28EhjiE8iteratorppEv:
   62|  1.15M|        iterator& operator++() { ptr++; return *this; }
_ZNK9prevectorILj28EhjiE14const_iteratorptEv:
  112|  25.6M|        const T* operator->() const { return ptr; }
_ZNK9prevectorILj28EhjiE14const_iteratorplEj:
  119|  17.0M|        const_iterator operator+(size_type n) const { return const_iterator(ptr + n); }
_ZN9prevectorILj28EhjiE14const_iteratorpLEj:
  121|  8.57M|        const_iterator& operator+=(size_type n) { ptr += n; return *this; }
_ZNK9prevectorILj28EhjiE14const_iteratorixEj:
  113|    397|        const T& operator[](size_type pos) const { return ptr[pos]; }
_ZNK9prevectorILj28EhjiE14const_iteratorgeES1_:
  126|  13.4M|        bool operator>=(const_iterator x) const { return ptr >= x.ptr; }
_ZN9prevectorILj28EhjiE14const_iteratorppEi:
  116|  13.4M|        const_iterator operator++(int) { const_iterator copy(*this); ++(*this); return copy; }

_ZN10miniscript8internal12SanitizeTypeENS_4TypeE:
   19|  5.02M|Type SanitizeType(Type e) {
   20|  5.02M|    int num_types = (e << "K"_mst) + (e << "V"_mst) + (e << "B"_mst) + (e << "W"_mst);
   21|  5.02M|    if (num_types == 0) return ""_mst; // No valid type, don't care about the rest
  ------------------
  |  Branch (21:9): [True: 671, False: 5.02M]
  ------------------
   22|  5.02M|    assert(num_types == 1); // K, V, B, W all conflict with each other
   23|  5.02M|    assert(!(e << "z"_mst) || !(e << "o"_mst)); // z conflicts with o
   24|  5.02M|    assert(!(e << "n"_mst) || !(e << "z"_mst)); // n conflicts with z
   25|  5.02M|    assert(!(e << "n"_mst) || !(e << "W"_mst)); // n conflicts with W
   26|  5.02M|    assert(!(e << "V"_mst) || !(e << "d"_mst)); // V conflicts with d
   27|  5.02M|    assert(!(e << "K"_mst) ||  (e << "u"_mst)); // K implies u
   28|  5.02M|    assert(!(e << "V"_mst) || !(e << "u"_mst)); // V conflicts with u
   29|  5.02M|    assert(!(e << "e"_mst) || !(e << "f"_mst)); // e conflicts with f
   30|  5.02M|    assert(!(e << "e"_mst) ||  (e << "d"_mst)); // e implies d
   31|  5.02M|    assert(!(e << "V"_mst) || !(e << "e"_mst)); // V conflicts with e
   32|  5.02M|    assert(!(e << "d"_mst) || !(e << "f"_mst)); // d conflicts with f
   33|  5.02M|    assert(!(e << "V"_mst) ||  (e << "f"_mst)); // V implies f
   34|  5.02M|    assert(!(e << "K"_mst) ||  (e << "s"_mst)); // K implies s
   35|  5.02M|    assert(!(e << "z"_mst) ||  (e << "m"_mst)); // z implies m
   36|  5.02M|    return e;
   37|  5.02M|}
_ZN10miniscript8internal11ComputeTypeENS_8FragmentENS_4TypeES2_S2_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEjmmmNS_17MiniscriptContextE:
   40|  5.02M|                 size_t data_size, size_t n_subs, size_t n_keys, MiniscriptContext ms_ctx) {
   41|       |    // Sanity check on data
   42|  5.02M|    if (fragment == Fragment::SHA256 || fragment == Fragment::HASH256) {
  ------------------
  |  Branch (42:9): [True: 604, False: 5.02M]
  |  Branch (42:41): [True: 1.37k, False: 5.02M]
  ------------------
   43|  1.97k|        assert(data_size == 32);
   44|  5.02M|    } else if (fragment == Fragment::RIPEMD160 || fragment == Fragment::HASH160) {
  ------------------
  |  Branch (44:16): [True: 1.83k, False: 5.02M]
  |  Branch (44:51): [True: 1.12k, False: 5.02M]
  ------------------
   45|  2.95k|        assert(data_size == 20);
   46|  5.02M|    } else {
   47|  5.02M|        assert(data_size == 0);
   48|  5.02M|    }
   49|       |    // Sanity check on k
   50|  5.02M|    if (fragment == Fragment::OLDER || fragment == Fragment::AFTER) {
  ------------------
  |  Branch (50:9): [True: 9.13k, False: 5.01M]
  |  Branch (50:40): [True: 5.24k, False: 5.01M]
  ------------------
   51|  14.3k|        assert(k >= 1 && k < 0x80000000UL);
   52|  5.01M|    } else if (fragment == Fragment::MULTI || fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (52:16): [True: 702, False: 5.01M]
  |  Branch (52:47): [True: 56, False: 5.01M]
  ------------------
   53|    758|        assert(k >= 1 && k <= n_keys);
   54|  5.01M|    } else if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (54:16): [True: 33.9k, False: 4.97M]
  ------------------
   55|  33.9k|        assert(k >= 1 && k <= n_subs);
   56|  4.97M|    } else {
   57|  4.97M|        assert(k == 0);
   58|  4.97M|    }
   59|       |    // Sanity check on subs
   60|  5.02M|    if (fragment == Fragment::AND_V || fragment == Fragment::AND_B || fragment == Fragment::OR_B ||
  ------------------
  |  Branch (60:9): [True: 24.0k, False: 5.00M]
  |  Branch (60:40): [True: 6.56k, False: 4.99M]
  |  Branch (60:71): [True: 21.5k, False: 4.97M]
  ------------------
   61|  5.02M|        fragment == Fragment::OR_C || fragment == Fragment::OR_I || fragment == Fragment::OR_D) {
  ------------------
  |  Branch (61:9): [True: 4.82k, False: 4.96M]
  |  Branch (61:39): [True: 39.2k, False: 4.92M]
  |  Branch (61:69): [True: 10.9k, False: 4.91M]
  ------------------
   62|   107k|        assert(n_subs == 2);
   63|  4.91M|    } else if (fragment == Fragment::ANDOR) {
  ------------------
  |  Branch (63:16): [True: 16.5k, False: 4.90M]
  ------------------
   64|  16.5k|        assert(n_subs == 3);
   65|  4.90M|    } else if (fragment == Fragment::WRAP_A || fragment == Fragment::WRAP_S || fragment == Fragment::WRAP_C ||
  ------------------
  |  Branch (65:16): [True: 39.7k, False: 4.86M]
  |  Branch (65:48): [True: 13.6k, False: 4.84M]
  |  Branch (65:80): [True: 7.86k, False: 4.84M]
  ------------------
   66|  4.90M|               fragment == Fragment::WRAP_D || fragment == Fragment::WRAP_V || fragment == Fragment::WRAP_J ||
  ------------------
  |  Branch (66:16): [True: 9.93k, False: 4.83M]
  |  Branch (66:48): [True: 47.3k, False: 4.78M]
  |  Branch (66:80): [True: 6.36k, False: 4.77M]
  ------------------
   67|  4.90M|               fragment == Fragment::WRAP_N) {
  ------------------
  |  Branch (67:16): [True: 427k, False: 4.34M]
  ------------------
   68|   552k|        assert(n_subs == 1);
   69|  4.34M|    } else if (fragment != Fragment::THRESH) {
  ------------------
  |  Branch (69:16): [True: 4.31M, False: 33.9k]
  ------------------
   70|  4.31M|        assert(n_subs == 0);
   71|  4.31M|    }
   72|       |    // Sanity check on keys
   73|  5.02M|    if (fragment == Fragment::PK_K || fragment == Fragment::PK_H) {
  ------------------
  |  Branch (73:9): [True: 2.71k, False: 5.02M]
  |  Branch (73:39): [True: 10.6k, False: 5.01M]
  ------------------
   74|  13.3k|        assert(n_keys == 1);
   75|  5.01M|    } else if (fragment == Fragment::MULTI) {
  ------------------
  |  Branch (75:16): [True: 702, False: 5.01M]
  ------------------
   76|    702|        assert(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTISIG);
   77|    702|        assert(!IsTapscript(ms_ctx));
   78|  5.01M|    } else if (fragment == Fragment::MULTI_A) {
  ------------------
  |  Branch (78:16): [True: 56, False: 5.01M]
  ------------------
   79|     56|        assert(n_keys >= 1 && n_keys <= MAX_PUBKEYS_PER_MULTI_A);
   80|     56|        assert(IsTapscript(ms_ctx));
   81|  5.01M|    } else {
   82|  5.01M|        assert(n_keys == 0);
   83|  5.01M|    }
   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|  5.02M|    switch (fragment) {
  ------------------
  |  Branch (88:13): [True: 0, False: 5.02M]
  ------------------
   89|  2.71k|        case Fragment::PK_K: return "Konudemsxk"_mst;
  ------------------
  |  Branch (89:9): [True: 2.71k, False: 5.02M]
  ------------------
   90|  10.6k|        case Fragment::PK_H: return "Knudemsxk"_mst;
  ------------------
  |  Branch (90:9): [True: 10.6k, False: 5.01M]
  ------------------
   91|  9.13k|        case Fragment::OLDER: return
  ------------------
  |  Branch (91:9): [True: 9.13k, False: 5.01M]
  ------------------
   92|  9.13k|            "g"_mst.If(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) |
   93|  9.13k|            "h"_mst.If(!(k & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG)) |
   94|  9.13k|            "Bzfmxk"_mst;
   95|  5.24k|        case Fragment::AFTER: return
  ------------------
  |  Branch (95:9): [True: 5.24k, False: 5.02M]
  ------------------
   96|  5.24k|            "i"_mst.If(k >= LOCKTIME_THRESHOLD) |
   97|  5.24k|            "j"_mst.If(k < LOCKTIME_THRESHOLD) |
   98|  5.24k|            "Bzfmxk"_mst;
   99|    604|        case Fragment::SHA256: return "Bonudmk"_mst;
  ------------------
  |  Branch (99:9): [True: 604, False: 5.02M]
  ------------------
  100|  1.83k|        case Fragment::RIPEMD160: return "Bonudmk"_mst;
  ------------------
  |  Branch (100:9): [True: 1.83k, False: 5.02M]
  ------------------
  101|  1.37k|        case Fragment::HASH256: return "Bonudmk"_mst;
  ------------------
  |  Branch (101:9): [True: 1.37k, False: 5.02M]
  ------------------
  102|  1.12k|        case Fragment::HASH160: return "Bonudmk"_mst;
  ------------------
  |  Branch (102:9): [True: 1.12k, False: 5.02M]
  ------------------
  103|  74.7k|        case Fragment::JUST_1: return "Bzufmxk"_mst;
  ------------------
  |  Branch (103:9): [True: 74.7k, False: 4.95M]
  ------------------
  104|  4.20M|        case Fragment::JUST_0: return "Bzudemsxk"_mst;
  ------------------
  |  Branch (104:9): [True: 4.20M, False: 818k]
  ------------------
  105|  39.7k|        case Fragment::WRAP_A: return
  ------------------
  |  Branch (105:9): [True: 39.7k, False: 4.98M]
  ------------------
  106|  39.7k|            "W"_mst.If(x << "B"_mst) | // W=B_x
  107|  39.7k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  108|  39.7k|            (x & "udfems"_mst) | // u=u_x, d=d_x, f=f_x, e=e_x, m=m_x, s=s_x
  109|  39.7k|            "x"_mst; // x
  110|  13.6k|        case Fragment::WRAP_S: return
  ------------------
  |  Branch (110:9): [True: 13.6k, False: 5.01M]
  ------------------
  111|  13.6k|            "W"_mst.If(x << "Bo"_mst) | // W=B_x*o_x
  112|  13.6k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  113|  13.6k|            (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|  7.86k|        case Fragment::WRAP_C: return
  ------------------
  |  Branch (114:9): [True: 7.86k, False: 5.01M]
  ------------------
  115|  7.86k|            "B"_mst.If(x << "K"_mst) | // B=K_x
  116|  7.86k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  117|  7.86k|            (x & "ondfem"_mst) | // o=o_x, n=n_x, d=d_x, f=f_x, e=e_x, m=m_x
  118|  7.86k|            "us"_mst; // u, s
  119|  9.93k|        case Fragment::WRAP_D: return
  ------------------
  |  Branch (119:9): [True: 9.93k, False: 5.01M]
  ------------------
  120|  9.93k|            "B"_mst.If(x << "Vz"_mst) | // B=V_x*z_x
  121|  9.93k|            "o"_mst.If(x << "z"_mst) | // o=z_x
  122|  9.93k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  123|  9.93k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  124|  9.93k|            (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|  9.93k|            "u"_mst.If(IsTapscript(ms_ctx)) |
  127|  9.93k|            "ndx"_mst; // n, d, x
  128|  47.3k|        case Fragment::WRAP_V: return
  ------------------
  |  Branch (128:9): [True: 47.3k, False: 4.97M]
  ------------------
  129|  47.3k|            "V"_mst.If(x << "B"_mst) | // V=B_x
  130|  47.3k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  131|  47.3k|            (x & "zonms"_mst) | // z=z_x, o=o_x, n=n_x, m=m_x, s=s_x
  132|  47.3k|            "fx"_mst; // f, x
  133|  6.36k|        case Fragment::WRAP_J: return
  ------------------
  |  Branch (133:9): [True: 6.36k, False: 5.01M]
  ------------------
  134|  6.36k|            "B"_mst.If(x << "Bn"_mst) | // B=B_x*n_x
  135|  6.36k|            "e"_mst.If(x << "f"_mst) | // e=f_x
  136|  6.36k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  137|  6.36k|            (x & "oums"_mst) | // o=o_x, u=u_x, m=m_x, s=s_x
  138|  6.36k|            "ndx"_mst; // n, d, x
  139|   427k|        case Fragment::WRAP_N: return
  ------------------
  |  Branch (139:9): [True: 427k, False: 4.59M]
  ------------------
  140|   427k|            (x & "ghijk"_mst) | // g=g_x, h=h_x, i=i_x, j=j_x, k=k_x
  141|   427k|            (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|   427k|            "ux"_mst; // u, x
  143|  24.0k|        case Fragment::AND_V: return
  ------------------
  |  Branch (143:9): [True: 24.0k, False: 5.00M]
  ------------------
  144|  24.0k|            (y & "KVB"_mst).If(x << "V"_mst) | // B=V_x*B_y, V=V_x*V_y, K=V_x*K_y
  145|  24.0k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  146|  24.0k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  147|  24.0k|            (x & y & "dmz"_mst) | // d=d_x*d_y, m=m_x*m_y, z=z_x*z_y
  148|  24.0k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  149|  24.0k|            "f"_mst.If((y << "f"_mst) || (x << "s"_mst)) | // f=f_y+s_x
  ------------------
  |  Branch (149:24): [True: 15.7k, False: 8.26k]
  |  Branch (149:42): [True: 5.34k, False: 2.92k]
  ------------------
  150|  24.0k|            (y & "ux"_mst) | // u=u_y, x=x_y
  151|  24.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
  152|  24.0k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (152:24): [True: 20.7k, False: 3.21k]
  ------------------
  153|  24.0k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (153:20): [True: 2.17k, False: 18.6k]
  |  Branch (153:38): [True: 468, False: 1.70k]
  ------------------
  154|  20.7k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (154:18): [True: 2.78k, False: 17.5k]
  |  Branch (154:36): [True: 145, False: 2.64k]
  ------------------
  155|  20.7k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (155:18): [True: 893, False: 19.2k]
  |  Branch (155:36): [True: 595, False: 298]
  ------------------
  156|  20.7k|                ((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: 2.33k, False: 17.2k]
  |  Branch (156:36): [True: 84, False: 2.25k]
  ------------------
  157|  6.56k|        case Fragment::AND_B: return
  ------------------
  |  Branch (157:9): [True: 6.56k, False: 5.01M]
  ------------------
  158|  6.56k|            (x & "B"_mst).If(y << "W"_mst) | // B=B_x*W_y
  159|  6.56k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  160|  6.56k|            (x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
  161|  6.56k|            (x & y & "e"_mst).If((x & y) << "s"_mst) | // e=e_x*e_y*s_x*s_y
  162|  6.56k|            (x & y & "dzm"_mst) | // d=d_x*d_y, z=z_x*z_y, m=m_x*m_y
  163|  6.56k|            "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: 3.82k, False: 2.74k]
  |  Branch (163:48): [True: 335, False: 2.41k]
  |  Branch (163:67): [True: 421, False: 1.98k]
  ------------------
  164|  6.56k|            ((x | y) & "s"_mst) | // s=s_x+s_y
  165|  6.56k|            "ux"_mst | // u, x
  166|  6.56k|            ((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
  167|  6.56k|            "k"_mst.If(((x & y) << "k"_mst) &&
  ------------------
  |  Branch (167:24): [True: 6.06k, False: 501]
  ------------------
  168|  6.56k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (168:20): [True: 907, False: 5.15k]
  |  Branch (168:38): [True: 475, False: 432]
  ------------------
  169|  6.06k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (169:18): [True: 1.40k, False: 4.18k]
  |  Branch (169:36): [True: 100, False: 1.30k]
  ------------------
  170|  6.06k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (170:18): [True: 200, False: 5.29k]
  |  Branch (170:36): [True: 72, False: 128]
  ------------------
  171|  6.06k|                ((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: 389, False: 5.02k]
  |  Branch (171:36): [True: 5, False: 384]
  ------------------
  172|  21.5k|        case Fragment::OR_B: return
  ------------------
  |  Branch (172:9): [True: 21.5k, False: 5.00M]
  ------------------
  173|  21.5k|            "B"_mst.If(x << "Bd"_mst && y << "Wd"_mst) | // B=B_x*d_x*W_x*d_y
  ------------------
  |  Branch (173:24): [True: 21.5k, False: 15]
  |  Branch (173:41): [True: 21.4k, False: 6]
  ------------------
  174|  21.5k|            ((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
  175|  21.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.0k, False: 7.49k]
  |  Branch (175:56): [True: 13.1k, False: 891]
  ------------------
  176|  21.5k|            (x & y & "zse"_mst) | // z=z_x*z_y, s=s_x*s_y, e=e_x*e_y
  177|  21.5k|            "dux"_mst | // d, u, x
  178|  21.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|  21.5k|            (x & y & "k"_mst); // k=k_x*k_y
  180|  10.9k|        case Fragment::OR_D: return
  ------------------
  |  Branch (180:9): [True: 10.9k, False: 5.01M]
  ------------------
  181|  10.9k|            (y & "B"_mst).If(x << "Bdu"_mst) | // B=B_y*B_x*d_x*u_x
  182|  10.9k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  183|  10.9k|            (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: 10.3k, False: 609]
  |  Branch (183:50): [True: 9.27k, False: 1.05k]
  ------------------
  184|  10.9k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  185|  10.9k|            (y & "ufde"_mst) | // u=u_y, f=f_y, d=d_y, e=e_y
  186|  10.9k|            "x"_mst | // x
  187|  10.9k|            ((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.9k|            (x & y & "k"_mst); // k=k_x*k_y
  189|  4.82k|        case Fragment::OR_C: return
  ------------------
  |  Branch (189:9): [True: 4.82k, False: 5.02M]
  ------------------
  190|  4.82k|            (y & "V"_mst).If(x << "Bdu"_mst) | // V=V_y*B_x*u_x*d_x
  191|  4.82k|            (x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
  192|  4.82k|            (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: 3.86k, False: 953]
  |  Branch (192:50): [True: 2.09k, False: 1.77k]
  ------------------
  193|  4.82k|            (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
  194|  4.82k|            "fx"_mst | // f, x
  195|  4.82k|            ((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|  4.82k|            (x & y & "k"_mst); // k=k_x*k_y
  197|  39.2k|        case Fragment::OR_I: return
  ------------------
  |  Branch (197:9): [True: 39.2k, False: 4.98M]
  ------------------
  198|  39.2k|            (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|  39.2k|            "o"_mst.If((x & y) << "z"_mst) | // o=z_x*z_y
  200|  39.2k|            ((x | y) & "e"_mst).If((x | y) << "f"_mst) | // e=e_x*f_y+f_x*e_y
  201|  39.2k|            (x & y & "m"_mst).If((x | y) << "s"_mst) | // m=m_x*m_y*(s_x+s_y)
  202|  39.2k|            ((x | y) & "d"_mst) | // d=d_x+d_y
  203|  39.2k|            "x"_mst | // x
  204|  39.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
  205|  39.2k|            (x & y & "k"_mst); // k=k_x*k_y
  206|  16.5k|        case Fragment::ANDOR: return
  ------------------
  |  Branch (206:9): [True: 16.5k, False: 5.00M]
  ------------------
  207|  16.5k|            (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|  16.5k|            (x & y & z & "z"_mst) | // z=z_x*z_y*z_z
  209|  16.5k|            ((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|  16.5k|            (y & z & "u"_mst) | // u=u_y*u_z
  211|  16.5k|            (z & "f"_mst).If((x << "s"_mst) || (y << "f"_mst)) | // f=(s_x+f_y)*f_z
  ------------------
  |  Branch (211:30): [True: 13.7k, False: 2.78k]
  |  Branch (211:48): [True: 1.51k, False: 1.26k]
  ------------------
  212|  16.5k|            (z & "d"_mst) | // d=d_z
  213|  16.5k|            (z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_z*(s_x+f_y)
  ------------------
  |  Branch (213:30): [True: 13.7k, False: 2.78k]
  |  Branch (213:46): [True: 1.51k, False: 1.26k]
  ------------------
  214|  16.5k|            (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: 15.7k, False: 846]
  |  Branch (214:54): [True: 14.9k, False: 763]
  ------------------
  215|  16.5k|            (z & (x | y) & "s"_mst) | // s=s_z*(s_x+s_y)
  216|  16.5k|            "x"_mst | // x
  217|  16.5k|            ((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|  16.5k|            "k"_mst.If(((x & y & z) << "k"_mst) &&
  ------------------
  |  Branch (218:24): [True: 15.2k, False: 1.35k]
  ------------------
  219|  16.5k|                !(((x << "g"_mst) && (y << "h"_mst)) ||
  ------------------
  |  Branch (219:20): [True: 514, False: 14.6k]
  |  Branch (219:38): [True: 87, False: 427]
  ------------------
  220|  15.2k|                ((x << "h"_mst) && (y << "g"_mst)) ||
  ------------------
  |  Branch (220:18): [True: 1.74k, False: 13.3k]
  |  Branch (220:36): [True: 593, False: 1.15k]
  ------------------
  221|  15.2k|                ((x << "i"_mst) && (y << "j"_mst)) ||
  ------------------
  |  Branch (221:18): [True: 313, False: 14.2k]
  |  Branch (221:36): [True: 70, False: 243]
  ------------------
  222|  15.2k|                ((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: 356, False: 14.1k]
  |  Branch (222:36): [True: 0, False: 356]
  ------------------
  223|    702|        case Fragment::MULTI: {
  ------------------
  |  Branch (223:9): [True: 702, False: 5.02M]
  ------------------
  224|    702|            return "Bnudemsk"_mst;
  225|      0|        }
  226|     56|        case Fragment::MULTI_A: {
  ------------------
  |  Branch (226:9): [True: 56, False: 5.02M]
  ------------------
  227|     56|            return "Budemsk"_mst;
  228|      0|        }
  229|  33.9k|        case Fragment::THRESH: {
  ------------------
  |  Branch (229:9): [True: 33.9k, False: 4.99M]
  ------------------
  230|  33.9k|            bool all_e = true;
  231|  33.9k|            bool all_m = true;
  232|  33.9k|            uint32_t args = 0;
  233|  33.9k|            uint32_t num_s = 0;
  234|  33.9k|            Type acc_tl = "k"_mst;
  235|  86.8k|            for (size_t i = 0; i < sub_types.size(); ++i) {
  ------------------
  |  Branch (235:32): [True: 52.9k, False: 33.8k]
  ------------------
  236|  52.9k|                Type t = sub_types[i];
  237|  52.9k|                static constexpr auto WDU{"Wdu"_mst}, BDU{"Bdu"_mst};
  238|  52.9k|                if (!(t << (i ? WDU : BDU))) return ""_mst; // Require Bdu, Wdu, Wdu, ...
  ------------------
  |  Branch (238:21): [True: 70, False: 52.8k]
  |  Branch (238:29): [True: 19.0k, False: 33.9k]
  ------------------
  239|  52.8k|                if (!(t << "e"_mst)) all_e = false;
  ------------------
  |  Branch (239:21): [True: 1.71k, False: 51.1k]
  ------------------
  240|  52.8k|                if (!(t << "m"_mst)) all_m = false;
  ------------------
  |  Branch (240:21): [True: 1.64k, False: 51.2k]
  ------------------
  241|  52.8k|                if (t << "s"_mst) num_s += 1;
  ------------------
  |  Branch (241:21): [True: 40.8k, False: 12.0k]
  ------------------
  242|  52.8k|                args += (t << "z"_mst) ? 0 : (t << "o"_mst) ? 1 : 2;
  ------------------
  |  Branch (242:25): [True: 23.3k, False: 29.5k]
  |  Branch (242:46): [True: 1.62k, False: 27.9k]
  ------------------
  243|  52.8k|                acc_tl = ((acc_tl | t) & "ghij"_mst) |
  244|       |                    // Thresh contains a combination of timelocks if it has threshold > 1 and
  245|       |                    // it contains two different children that have different types of timelocks
  246|       |                    // Note how if any of the children don't have "k", the parent also does not have "k"
  247|  52.8k|                    "k"_mst.If(((acc_tl & t) << "k"_mst) && ((k <= 1) ||
  ------------------
  |  Branch (247:32): [True: 51.7k, False: 1.09k]
  |  Branch (247:62): [True: 41.4k, False: 10.3k]
  ------------------
  248|  51.7k|                        ((k > 1) && !(((acc_tl << "g"_mst) && (t << "h"_mst)) ||
  ------------------
  |  Branch (248:26): [True: 10.3k, False: 0]
  |  Branch (248:40): [True: 433, False: 9.88k]
  |  Branch (248:63): [True: 66, False: 367]
  ------------------
  249|  10.3k|                        ((acc_tl << "h"_mst) && (t << "g"_mst)) ||
  ------------------
  |  Branch (249:26): [True: 1.05k, False: 9.19k]
  |  Branch (249:49): [True: 262, False: 794]
  ------------------
  250|  10.3k|                        ((acc_tl << "i"_mst) && (t << "j"_mst)) ||
  ------------------
  |  Branch (250:26): [True: 297, False: 9.68k]
  |  Branch (250:49): [True: 67, False: 230]
  ------------------
  251|  10.3k|                        ((acc_tl << "j"_mst) && (t << "i"_mst))))));
  ------------------
  |  Branch (251:26): [True: 268, False: 9.65k]
  |  Branch (251:49): [True: 0, False: 268]
  ------------------
  252|  52.8k|            }
  253|  33.8k|            return "Bdu"_mst |
  254|  33.8k|                   "z"_mst.If(args == 0) | // z=all z
  255|  33.8k|                   "o"_mst.If(args == 1) | // o=all z except one o
  256|  33.8k|                   "e"_mst.If(all_e && num_s == n_subs) | // e=all e and all s
  ------------------
  |  Branch (256:31): [True: 32.1k, False: 1.68k]
  |  Branch (256:40): [True: 28.5k, False: 3.61k]
  ------------------
  257|  33.8k|                   "m"_mst.If(all_e && all_m && num_s >= n_subs - k) | // m=all e, >=(n-k) s
  ------------------
  |  Branch (257:31): [True: 32.1k, False: 1.68k]
  |  Branch (257:40): [True: 31.7k, False: 421]
  |  Branch (257:49): [True: 28.5k, False: 3.21k]
  ------------------
  258|  33.8k|                   "s"_mst.If(num_s >= n_subs - k + 1) |  // s= >=(n-k+1) s
  259|  33.8k|                   acc_tl; // timelock info
  260|  33.9k|            }
  261|  5.02M|    }
  262|      0|    assert(false);
  263|      0|}
_ZN10miniscript8internal16ComputeScriptLenENS_8FragmentENS_4TypeEmjmmNS_17MiniscriptContextE:
  266|  5.02M|                        size_t n_keys, MiniscriptContext ms_ctx) {
  267|  5.02M|    switch (fragment) {
  ------------------
  |  Branch (267:13): [True: 0, False: 5.02M]
  ------------------
  268|  74.7k|        case Fragment::JUST_1:
  ------------------
  |  Branch (268:9): [True: 74.7k, False: 4.95M]
  ------------------
  269|  4.28M|        case Fragment::JUST_0: return 1;
  ------------------
  |  Branch (269:9): [True: 4.20M, False: 818k]
  ------------------
  270|  2.71k|        case Fragment::PK_K: return IsTapscript(ms_ctx) ? 33 : 34;
  ------------------
  |  Branch (270:9): [True: 2.71k, False: 5.02M]
  |  Branch (270:37): [True: 1.52k, False: 1.18k]
  ------------------
  271|  10.6k|        case Fragment::PK_H: return 3 + 21;
  ------------------
  |  Branch (271:9): [True: 10.6k, False: 5.01M]
  ------------------
  272|  9.13k|        case Fragment::OLDER:
  ------------------
  |  Branch (272:9): [True: 9.13k, False: 5.01M]
  ------------------
  273|  14.3k|        case Fragment::AFTER: return 1 + BuildScript(k).size();
  ------------------
  |  Branch (273:9): [True: 5.24k, False: 5.02M]
  ------------------
  274|  1.37k|        case Fragment::HASH256:
  ------------------
  |  Branch (274:9): [True: 1.37k, False: 5.02M]
  ------------------
  275|  1.97k|        case Fragment::SHA256: return 4 + 2 + 33;
  ------------------
  |  Branch (275:9): [True: 604, False: 5.02M]
  ------------------
  276|  1.12k|        case Fragment::HASH160:
  ------------------
  |  Branch (276:9): [True: 1.12k, False: 5.02M]
  ------------------
  277|  2.95k|        case Fragment::RIPEMD160: return 4 + 2 + 21;
  ------------------
  |  Branch (277:9): [True: 1.83k, False: 5.02M]
  ------------------
  278|    702|        case Fragment::MULTI: return 1 + BuildScript(n_keys).size() + BuildScript(k).size() + 34 * n_keys;
  ------------------
  |  Branch (278:9): [True: 702, False: 5.02M]
  ------------------
  279|     56|        case Fragment::MULTI_A: return (1 + 32 + 1) * n_keys + BuildScript(k).size() + 1;
  ------------------
  |  Branch (279:9): [True: 56, False: 5.02M]
  ------------------
  280|  24.0k|        case Fragment::AND_V: return subsize;
  ------------------
  |  Branch (280:9): [True: 24.0k, False: 5.00M]
  ------------------
  281|  47.3k|        case Fragment::WRAP_V: return subsize + (sub0typ << "x"_mst);
  ------------------
  |  Branch (281:9): [True: 47.3k, False: 4.97M]
  ------------------
  282|  13.6k|        case Fragment::WRAP_S:
  ------------------
  |  Branch (282:9): [True: 13.6k, False: 5.01M]
  ------------------
  283|  21.5k|        case Fragment::WRAP_C:
  ------------------
  |  Branch (283:9): [True: 7.86k, False: 5.01M]
  ------------------
  284|   449k|        case Fragment::WRAP_N:
  ------------------
  |  Branch (284:9): [True: 427k, False: 4.59M]
  ------------------
  285|   455k|        case Fragment::AND_B:
  ------------------
  |  Branch (285:9): [True: 6.56k, False: 5.01M]
  ------------------
  286|   477k|        case Fragment::OR_B: return subsize + 1;
  ------------------
  |  Branch (286:9): [True: 21.5k, False: 5.00M]
  ------------------
  287|  39.7k|        case Fragment::WRAP_A:
  ------------------
  |  Branch (287:9): [True: 39.7k, False: 4.98M]
  ------------------
  288|  44.5k|        case Fragment::OR_C: return subsize + 2;
  ------------------
  |  Branch (288:9): [True: 4.82k, False: 5.02M]
  ------------------
  289|  9.93k|        case Fragment::WRAP_D:
  ------------------
  |  Branch (289:9): [True: 9.93k, False: 5.01M]
  ------------------
  290|  20.8k|        case Fragment::OR_D:
  ------------------
  |  Branch (290:9): [True: 10.9k, False: 5.01M]
  ------------------
  291|  60.0k|        case Fragment::OR_I:
  ------------------
  |  Branch (291:9): [True: 39.2k, False: 4.98M]
  ------------------
  292|  76.6k|        case Fragment::ANDOR: return subsize + 3;
  ------------------
  |  Branch (292:9): [True: 16.5k, False: 5.00M]
  ------------------
  293|  6.36k|        case Fragment::WRAP_J: return subsize + 4;
  ------------------
  |  Branch (293:9): [True: 6.36k, False: 5.01M]
  ------------------
  294|  33.9k|        case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
  ------------------
  |  Branch (294:9): [True: 33.9k, False: 4.99M]
  ------------------
  295|  5.02M|    }
  296|      0|    assert(false);
  297|      0|}
_ZN10miniscript8internal15DecomposeScriptERK7CScript:
  370|  3.97k|{
  371|  3.97k|    std::vector<Opcode> out;
  372|  3.97k|    CScript::const_iterator it = script.begin(), itend = script.end();
  373|  13.4M|    while (it != itend) {
  ------------------
  |  Branch (373:12): [True: 13.4M, False: 3.80k]
  ------------------
  374|  13.4M|        std::vector<unsigned char> push_data;
  375|  13.4M|        opcodetype opcode;
  376|  13.4M|        if (!script.GetOp(it, opcode, push_data)) {
  ------------------
  |  Branch (376:13): [True: 136, False: 13.4M]
  ------------------
  377|    136|            return {};
  378|  13.4M|        } else if (opcode >= OP_1 && opcode <= OP_16) {
  ------------------
  |  Branch (378:20): [True: 4.55M, False: 8.89M]
  |  Branch (378:38): [True: 317k, False: 4.24M]
  ------------------
  379|       |            // Deal with OP_n (GetOp does not turn them into pushes).
  380|   317k|            push_data.assign(1, CScript::DecodeOP_N(opcode));
  381|  13.1M|        } else if (opcode == OP_CHECKSIGVERIFY) {
  ------------------
  |  Branch (381:20): [True: 410k, False: 12.7M]
  ------------------
  382|       |            // Decompose OP_CHECKSIGVERIFY into OP_CHECKSIG OP_VERIFY
  383|   410k|            out.emplace_back(OP_CHECKSIG, std::vector<unsigned char>());
  384|   410k|            opcode = OP_VERIFY;
  385|  12.7M|        } else if (opcode == OP_CHECKMULTISIGVERIFY) {
  ------------------
  |  Branch (385:20): [True: 4.03k, False: 12.7M]
  ------------------
  386|       |            // Decompose OP_CHECKMULTISIGVERIFY into OP_CHECKMULTISIG OP_VERIFY
  387|  4.03k|            out.emplace_back(OP_CHECKMULTISIG, std::vector<unsigned char>());
  388|  4.03k|            opcode = OP_VERIFY;
  389|  12.7M|        } else if (opcode == OP_EQUALVERIFY) {
  ------------------
  |  Branch (389:20): [True: 43.7k, False: 12.6M]
  ------------------
  390|       |            // Decompose OP_EQUALVERIFY into OP_EQUAL OP_VERIFY
  391|  43.7k|            out.emplace_back(OP_EQUAL, std::vector<unsigned char>());
  392|  43.7k|            opcode = OP_VERIFY;
  393|  12.6M|        } else if (opcode == OP_NUMEQUALVERIFY) {
  ------------------
  |  Branch (393:20): [True: 1.69k, False: 12.6M]
  ------------------
  394|       |            // Decompose OP_NUMEQUALVERIFY into OP_NUMEQUAL OP_VERIFY
  395|  1.69k|            out.emplace_back(OP_NUMEQUAL, std::vector<unsigned char>());
  396|  1.69k|            opcode = OP_VERIFY;
  397|  12.6M|        } else if (IsPushdataOp(opcode)) {
  ------------------
  |  Branch (397:20): [True: 72.5k, False: 12.6M]
  ------------------
  398|  72.5k|            if (!CheckMinimalPush(push_data, opcode)) return {};
  ------------------
  |  Branch (398:17): [True: 27, False: 72.5k]
  ------------------
  399|  12.6M|        } else if (it != itend && (opcode == OP_CHECKSIG || opcode == OP_CHECKMULTISIG || opcode == OP_EQUAL || opcode == OP_NUMEQUAL) && (*it == OP_VERIFY)) {
  ------------------
  |  Branch (399:20): [True: 12.5M, False: 3.05k]
  |  Branch (399:36): [True: 10.6k, False: 12.5M]
  |  Branch (399:61): [True: 1.26k, False: 12.5M]
  |  Branch (399:91): [True: 54.1k, False: 12.5M]
  |  Branch (399:113): [True: 648, False: 12.5M]
  |  Branch (399:139): [True: 1, False: 66.7k]
  ------------------
  400|       |            // Rule out non minimal VERIFY sequences
  401|      1|            return {};
  402|      1|        }
  403|  13.4M|        out.emplace_back(opcode, std::move(push_data));
  404|  13.4M|    }
  405|  3.80k|    std::reverse(out.begin(), out.end());
  406|  3.80k|    return out;
  407|  3.97k|}
_ZN10miniscript8internal17ParseScriptNumberERKNSt3__14pairI10opcodetypeNS1_6vectorIhNS1_9allocatorIhEEEEEE:
  409|  68.1k|std::optional<int64_t> ParseScriptNumber(const Opcode& in) {
  410|  68.1k|    if (in.first == OP_0) {
  ------------------
  |  Branch (410:9): [True: 26, False: 68.1k]
  ------------------
  411|     26|        return 0;
  412|     26|    }
  413|  68.1k|    if (!in.second.empty()) {
  ------------------
  |  Branch (413:9): [True: 67.9k, False: 196]
  ------------------
  414|  67.9k|        if (IsPushdataOp(in.first) && !CheckMinimalPush(in.second, in.first)) return {};
  ------------------
  |  Branch (414:13): [True: 15.3k, False: 52.6k]
  |  Branch (414:39): [True: 0, False: 15.3k]
  ------------------
  415|  67.9k|        try {
  416|  67.9k|            return CScriptNum(in.second, true).GetInt64();
  417|  67.9k|        } catch(const scriptnum_error&) {}
  418|  67.9k|    }
  419|    405|    return {};
  420|  68.1k|}

_ZNK10miniscript4TypeorES0_:
  138|  3.11M|    constexpr Type operator|(Type x) const { return Type(m_flags | x.m_flags); }
_ZN10miniscript4TypeC2Ej:
  131|  6.62M|    explicit constexpr Type(uint32_t flags) noexcept : m_flags(flags) {}
_ZN10miniscript11IsTapscriptENS_17MiniscriptContextE:
  246|  25.6M|{
  247|  25.6M|    switch (ms_ctx) {
  ------------------
  |  Branch (247:13): [True: 0, False: 25.6M]
  ------------------
  248|  1.92M|        case MiniscriptContext::P2WSH: return false;
  ------------------
  |  Branch (248:9): [True: 1.92M, False: 23.7M]
  ------------------
  249|  23.7M|        case MiniscriptContext::TAPSCRIPT: return true;
  ------------------
  |  Branch (249:9): [True: 23.7M, False: 1.92M]
  ------------------
  250|  25.6M|    }
  251|      0|    assert(false);
  252|      0|}
_ZNK10miniscript4TypelsES0_:
  144|   110M|    constexpr bool operator<<(Type x) const { return (x.m_flags & ~m_flags) == 0; }
_ZNK10miniscript4TypeanES0_:
  141|  2.61M|    constexpr Type operator&(Type x) const { return Type(m_flags & x.m_flags); }
_ZN10miniscript8internal13MaxScriptSizeENS_17MiniscriptContextE:
  271|  15.5M|{
  272|  15.5M|    if (IsTapscript(ms_ctx)) {
  ------------------
  |  Branch (272:9): [True: 14.4M, False: 1.07M]
  ------------------
  273|       |        // Leaf scripts under Tapscript are not explicitly limited in size. They are only implicitly
  274|       |        // bounded by the maximum standard size of a spending transaction. Let the maximum script
  275|       |        // size conservatively be small enough such that even a maximum sized witness and a reasonably
  276|       |        // sized spending transaction can spend an output paying to this script without running into
  277|       |        // the maximum standard tx size limit.
  278|  14.4M|        constexpr auto max_size{MAX_STANDARD_TX_WEIGHT - TX_BODY_LEEWAY_WEIGHT - MAX_TAPSCRIPT_SAT_SIZE};
  279|  14.4M|        return max_size - GetSizeOfCompactSize(max_size);
  280|  14.4M|    }
  281|  1.07M|    return MAX_STANDARD_P2WSH_SCRIPT_SIZE;
  282|  15.5M|}
_ZN10miniscript8internal6MaxIntIjEC2Ej:
  356|  9.93M|    MaxInt(I val) : valid(true), value(val) {}
_ZN10miniscript8internal6MaxIntIjEC2Ev:
  355|  10.5M|    MaxInt() : valid(false), value(0) {}
_ZN10miniscript8internal3OpsC2EjNS0_6MaxIntIjEES3_:
  378|  5.02M|    Ops(uint32_t in_count, MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : count(in_count), sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internalplERKNS0_6MaxIntIjEES4_:
  358|  2.57M|    friend MaxInt<I> operator+(const MaxInt<I>& a, const MaxInt<I>& b) {
  359|  2.57M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (359:13): [True: 1.67M, False: 899k]
  |  Branch (359:25): [True: 148k, False: 750k]
  ------------------
  360|   750k|        return a.value + b.value;
  361|  2.57M|    }
_ZN10miniscript8internalorERKNS0_6MaxIntIjEES4_:
  363|  1.14M|    friend MaxInt<I> operator|(const MaxInt<I>& a, const MaxInt<I>& b) {
  364|  1.14M|        if (!a.valid) return b;
  ------------------
  |  Branch (364:13): [True: 857k, False: 286k]
  ------------------
  365|   286k|        if (!b.valid) return a;
  ------------------
  |  Branch (365:13): [True: 109k, False: 176k]
  ------------------
  366|   176k|        return std::max(a.value, b.value);
  367|   286k|    }
_ZN10miniscript8internal7SatInfoC2Ev:
  431|  5.75M|    constexpr SatInfo() noexcept : valid(false), netdiff(0), exec(0) {}
_ZN10miniscript8internal7SatInfo4PushEv:
  461|  4.38M|    static constexpr SatInfo Push() noexcept { return {-1, 0}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoES2_:
  485|  4.53M|    constexpr StackSize(SatInfo in_sat, SatInfo in_dsat) noexcept : sat(in_sat), dsat(in_dsat) {};
_ZN10miniscript8internalplERKNS0_7SatInfoES3_:
  449|  2.30M|    {
  450|       |        // Concatenation with an empty set yields an empty set.
  451|  2.30M|        if (!a.valid || !b.valid) return {};
  ------------------
  |  Branch (451:13): [True: 1.28M, False: 1.01M]
  |  Branch (451:25): [True: 89.1k, False: 928k]
  ------------------
  452|       |        // Otherwise, the maximum stack size difference for the combined scripts is the sum of the
  453|       |        // netdiffs, and the maximum stack size difference anywhere is either b.exec (if the
  454|       |        // maximum occurred in b) or b.netdiff+a.exec (if the maximum occurred in a).
  455|   928k|        return {a.netdiff + b.netdiff, std::max(b.exec, b.netdiff + a.exec)};
  456|  2.30M|    }
_ZN10miniscript8internal7SatInfo3NopEv:
  465|  14.3k|    static constexpr SatInfo Nop() noexcept { return {0, 0}; }
_ZN10miniscript8internal9StackSizeC2ENS0_7SatInfoE:
  486|  14.1k|    constexpr StackSize(SatInfo in_both) noexcept : sat(in_both), dsat(in_both) {};
_ZN10miniscript8internal7SatInfo6OP_DUPEv:
  472|  30.5k|    static constexpr SatInfo OP_DUP() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo4HashEv:
  463|  15.5k|    static constexpr SatInfo Hash() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo14OP_EQUALVERIFYEv:
  474|  15.5k|    static constexpr SatInfo OP_EQUALVERIFY() noexcept { return {2, 2}; }
_ZN10miniscript8internal7SatInfo7OP_SIZEEv:
  476|  17.6k|    static constexpr SatInfo OP_SIZE() noexcept { return {-1, 0}; }
_ZN10miniscript8internal7SatInfo8OP_EQUALEv:
  475|  72.7k|    static constexpr SatInfo OP_EQUAL() noexcept { return {1, 1}; }
_ZN10miniscript8internalorERKNS0_7SatInfoES3_:
  439|   572k|    {
  440|       |        // Union with an empty set is itself.
  441|   572k|        if (!a.valid) return b;
  ------------------
  |  Branch (441:13): [True: 430k, False: 141k]
  ------------------
  442|   141k|        if (!b.valid) return a;
  ------------------
  |  Branch (442:13): [True: 53.4k, False: 88.4k]
  ------------------
  443|       |        // Otherwise the netdiff and exec of the union is the maximum of the individual values.
  444|  88.4k|        return {std::max(a.netdiff, b.netdiff), std::max(a.exec, b.exec)};
  445|   141k|    }
_ZN10miniscript8internal7SatInfo2IfEv:
  467|   203k|    static constexpr SatInfo If() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8BinaryOpEv:
  469|  75.9k|    static constexpr SatInfo BinaryOp() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo8OP_IFDUPEb:
  473|  32.7k|    static constexpr SatInfo OP_IFDUP(bool nonzero) noexcept { return {nonzero ? -1 : 0, 0}; }
  ------------------
  |  Branch (473:72): [True: 10.9k, False: 21.8k]
  ------------------
_ZN10miniscript8internal7SatInfoC2Eii:
  435|  6.02M|        valid{true}, netdiff{in_netdiff}, exec{in_exec} {}
_ZN10miniscript8internal7SatInfo11OP_CHECKSIGEv:
  477|  15.7k|    static constexpr SatInfo OP_CHECKSIG() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo9OP_VERIFYEv:
  479|  47.3k|    static constexpr SatInfo OP_VERIFY() noexcept { return {1, 1}; }
_ZN10miniscript8internal7SatInfo12OP_0NOTEQUALEv:
  478|  12.7k|    static constexpr SatInfo OP_0NOTEQUAL() noexcept { return {0, 0}; }
_ZN10miniscript8internal7SatInfo5EmptyEv:
  459|  67.8k|    static constexpr SatInfo Empty() noexcept { return {0, 0}; }
_ZN10miniscript8internal11WitnessSizeC2ENS0_6MaxIntIjEES3_:
  495|  4.53M|    WitnessSize(MaxInt<uint32_t> in_sat, MaxInt<uint32_t> in_dsat) : sat(in_sat), dsat(in_dsat) {};
_ZNK10miniscript4TypeeqES0_:
  150|  15.5M|    constexpr bool operator==(Type x) const { return m_flags == x.m_flags; }
miniscript.cpp:_ZN10miniscript10FromScriptIN12_GLOBAL__N_119ScriptParserContextEEENSt3__110unique_ptrIKNS_4NodeINT_3KeyEEENS3_14default_deleteIS9_EEEERK7CScriptRKS6_:
 2645|  4.00k|inline NodeRef<typename Ctx::Key> FromScript(const CScript& script, const Ctx& ctx) {
 2646|  4.00k|    using namespace internal;
 2647|       |    // A too large Script is necessarily invalid, don't bother parsing it.
 2648|  4.00k|    if (script.size() > MaxScriptSize(ctx.MsContext())) return {};
  ------------------
  |  Branch (2648:9): [True: 35, False: 3.97k]
  ------------------
 2649|  3.97k|    auto decomposed = DecomposeScript(script);
 2650|  3.97k|    if (!decomposed) return {};
  ------------------
  |  Branch (2650:9): [True: 164, False: 3.80k]
  ------------------
 2651|  3.80k|    auto it = decomposed->begin();
 2652|  3.80k|    auto ret = DecodeScript<typename Ctx::Key>(it, decomposed->end(), ctx);
 2653|  3.80k|    if (!ret) return {};
  ------------------
  |  Branch (2653:9): [True: 2.44k, False: 1.36k]
  ------------------
 2654|  1.36k|    if (it != decomposed->end()) return {};
  ------------------
  |  Branch (2654:9): [True: 138, False: 1.22k]
  ------------------
 2655|  1.22k|    return ret;
 2656|  1.36k|}
miniscript.cpp:_ZN10miniscript8internal12DecodeScriptIN12_GLOBAL__N_119ScriptParserContext3KeyES3_NSt3__111__wrap_iterIPNS5_4pairI10opcodetypeNS5_6vectorIhNS5_9allocatorIhEEEEEEEEEENS5_10unique_ptrIKNS_4NodeIT_EENS5_14default_deleteISK_EEEERT1_SO_RKT0_:
 2252|  3.80k|{
 2253|       |    // The two integers are used to hold state for thresh()
 2254|  3.80k|    std::vector<std::tuple<DecodeContext, int64_t, int64_t>> to_parse;
 2255|  3.80k|    std::vector<NodeRef<Key>> constructed;
 2256|       |
 2257|       |    // This is the top level, so we assume the type is B
 2258|       |    // (in particular, disallowing top level W expressions)
 2259|  3.80k|    to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2260|       |
 2261|  15.7M|    while (!to_parse.empty()) {
  ------------------
  |  Branch (2261:12): [True: 15.7M, False: 1.65k]
  ------------------
 2262|       |        // Exit early if the Miniscript is not going to be valid.
 2263|  15.7M|        if (!constructed.empty() && !constructed.back()->IsValid()) return {};
  ------------------
  |  Branch (2263:13): [True: 15.5M, False: 194k]
  |  Branch (2263:37): [True: 450, False: 15.5M]
  ------------------
 2264|       |
 2265|       |        // Get the current context we are decoding within
 2266|  15.7M|        auto [cur_context, n, k] = to_parse.back();
 2267|  15.7M|        to_parse.pop_back();
 2268|       |
 2269|  15.7M|        switch(cur_context) {
  ------------------
  |  Branch (2269:16): [True: 0, False: 15.7M]
  ------------------
 2270|  5.43M|        case DecodeContext::SINGLE_BKV_EXPR: {
  ------------------
  |  Branch (2270:9): [True: 5.43M, False: 10.3M]
  ------------------
 2271|  5.43M|            if (in >= last) return {};
  ------------------
  |  Branch (2271:17): [True: 106, False: 5.43M]
  ------------------
 2272|       |
 2273|       |            // Constants
 2274|  5.43M|            if (in[0].first == OP_1) {
  ------------------
  |  Branch (2274:17): [True: 74.7k, False: 5.36M]
  ------------------
 2275|  74.7k|                ++in;
 2276|  74.7k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_1));
 2277|  74.7k|                break;
 2278|  74.7k|            }
 2279|  5.36M|            if (in[0].first == OP_0) {
  ------------------
  |  Branch (2279:17): [True: 4.20M, False: 1.15M]
  ------------------
 2280|  4.20M|                ++in;
 2281|  4.20M|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::JUST_0));
 2282|  4.20M|                break;
 2283|  4.20M|            }
 2284|       |            // Public keys
 2285|  1.15M|            if (in[0].second.size() == 33 || in[0].second.size() == 32) {
  ------------------
  |  Branch (2285:17): [True: 2.23k, False: 1.15M]
  |  Branch (2285:46): [True: 476, False: 1.15M]
  ------------------
 2286|  2.71k|                auto key = ctx.FromPKBytes(in[0].second.begin(), in[0].second.end());
 2287|  2.71k|                if (!key) return {};
  ------------------
  |  Branch (2287:21): [True: 0, False: 2.71k]
  ------------------
 2288|  2.71k|                ++in;
 2289|  2.71k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_K, Vector(std::move(*key))));
 2290|  2.71k|                break;
 2291|  2.71k|            }
 2292|  1.15M|            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 (2292:17): [True: 1.14M, False: 3.64k]
  |  Branch (2292:35): [True: 64.6k, False: 1.08M]
  |  Branch (2292:63): [True: 22.3k, False: 42.3k]
  |  Branch (2292:90): [True: 11.1k, False: 11.2k]
  |  Branch (2292:119): [True: 10.6k, False: 443]
  |  Branch (2292:144): [True: 10.6k, False: 6]
  ------------------
 2293|  10.6k|                auto key = ctx.FromPKHBytes(in[2].second.begin(), in[2].second.end());
 2294|  10.6k|                if (!key) return {};
  ------------------
  |  Branch (2294:21): [True: 0, False: 10.6k]
  ------------------
 2295|  10.6k|                in += 5;
 2296|  10.6k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::PK_H, Vector(std::move(*key))));
 2297|  10.6k|                break;
 2298|  10.6k|            }
 2299|       |            // Time locks
 2300|  1.14M|            std::optional<int64_t> num;
 2301|  1.14M|            if (last - in >= 2 && in[0].first == OP_CHECKSEQUENCEVERIFY && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2301:17): [True: 1.14M, False: 261]
  |  Branch (2301:17): [True: 9.17k, False: 1.13M]
  |  Branch (2301:35): [True: 9.19k, False: 1.13M]
  |  Branch (2301:76): [True: 9.17k, False: 17]
  ------------------
 2302|  9.17k|                in += 2;
 2303|  9.17k|                if (*num < 1 || *num > 0x7FFFFFFFL) return {};
  ------------------
  |  Branch (2303:21): [True: 40, False: 9.13k]
  |  Branch (2303:33): [True: 0, False: 9.13k]
  ------------------
 2304|  9.13k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OLDER, *num));
 2305|  9.13k|                break;
 2306|  9.17k|            }
 2307|  1.13M|            if (last - in >= 2 && in[0].first == OP_CHECKLOCKTIMEVERIFY && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2307:17): [True: 1.13M, False: 261]
  |  Branch (2307:17): [True: 5.29k, False: 1.12M]
  |  Branch (2307:35): [True: 5.30k, False: 1.12M]
  |  Branch (2307:76): [True: 5.29k, False: 10]
  ------------------
 2308|  5.29k|                in += 2;
 2309|  5.29k|                if (num < 1 || num > 0x7FFFFFFFL) return {};
  ------------------
  |  Branch (2309:21): [True: 47, False: 5.24k]
  |  Branch (2309:21): [True: 47, False: 5.24k]
  |  Branch (2309:32): [True: 0, False: 5.24k]
  ------------------
 2310|  5.24k|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AFTER, *num));
 2311|  5.24k|                break;
 2312|  5.29k|            }
 2313|       |            // Hashes
 2314|  1.12M|            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 (2314:17): [True: 1.12M, False: 5.02k]
  |  Branch (2314:17): [True: 4.96k, False: 1.12M]
  |  Branch (2314:35): [True: 43.7k, False: 1.07M]
  |  Branch (2314:62): [True: 12.9k, False: 30.7k]
  |  Branch (2314:90): [True: 12.6k, False: 289]
  |  Branch (2314:117): [True: 12.5k, False: 149]
  |  Branch (2314:153): [True: 5.21k, False: 7.31k]
  |  Branch (2314:166): [True: 4.96k, False: 248]
  ------------------
 2315|  4.96k|                if (in[2].first == OP_SHA256 && in[1].second.size() == 32) {
  ------------------
  |  Branch (2315:21): [True: 609, False: 4.35k]
  |  Branch (2315:49): [True: 604, False: 5]
  ------------------
 2316|    604|                    constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::SHA256, in[1].second));
 2317|    604|                    in += 7;
 2318|    604|                    break;
 2319|  4.35k|                } else if (in[2].first == OP_RIPEMD160 && in[1].second.size() == 20) {
  ------------------
  |  Branch (2319:28): [True: 1.83k, False: 2.51k]
  |  Branch (2319:59): [True: 1.83k, False: 6]
  ------------------
 2320|  1.83k|                    constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::RIPEMD160, in[1].second));
 2321|  1.83k|                    in += 7;
 2322|  1.83k|                    break;
 2323|  2.52k|                } else if (in[2].first == OP_HASH256 && in[1].second.size() == 32) {
  ------------------
  |  Branch (2323:28): [True: 1.38k, False: 1.14k]
  |  Branch (2323:57): [True: 1.37k, False: 5]
  ------------------
 2324|  1.37k|                    constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH256, in[1].second));
 2325|  1.37k|                    in += 7;
 2326|  1.37k|                    break;
 2327|  1.37k|                } else if (in[2].first == OP_HASH160 && in[1].second.size() == 20) {
  ------------------
  |  Branch (2327:28): [True: 1.12k, False: 29]
  |  Branch (2327:57): [True: 1.12k, False: 1]
  ------------------
 2328|  1.12k|                    constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::HASH160, in[1].second));
 2329|  1.12k|                    in += 7;
 2330|  1.12k|                    break;
 2331|  1.12k|                }
 2332|  4.96k|            }
 2333|       |            // Multi
 2334|  1.12M|            if (last - in >= 3 && in[0].first == OP_CHECKMULTISIG) {
  ------------------
  |  Branch (2334:17): [True: 1.11M, False: 1.10k]
  |  Branch (2334:35): [True: 920, False: 1.11M]
  ------------------
 2335|    920|                if (IsTapscript(ctx.MsContext())) return {};
  ------------------
  |  Branch (2335:21): [True: 11, False: 909]
  ------------------
 2336|    909|                std::vector<Key> keys;
 2337|    909|                const auto n = ParseScriptNumber(in[1]);
 2338|    909|                if (!n || last - in < 3 + *n) return {};
  ------------------
  |  Branch (2338:21): [True: 30, False: 879]
  |  Branch (2338:27): [True: 24, False: 855]
  ------------------
 2339|    855|                if (*n < 1 || *n > 20) return {};
  ------------------
  |  Branch (2339:21): [True: 50, False: 805]
  |  Branch (2339:31): [True: 5, False: 800]
  ------------------
 2340|  4.13k|                for (int i = 0; i < *n; ++i) {
  ------------------
  |  Branch (2340:33): [True: 3.35k, False: 781]
  ------------------
 2341|  3.35k|                    if (in[2 + i].second.size() != 33) return {};
  ------------------
  |  Branch (2341:25): [True: 19, False: 3.33k]
  ------------------
 2342|  3.33k|                    auto key = ctx.FromPKBytes(in[2 + i].second.begin(), in[2 + i].second.end());
 2343|  3.33k|                    if (!key) return {};
  ------------------
  |  Branch (2343:25): [True: 0, False: 3.33k]
  ------------------
 2344|  3.33k|                    keys.push_back(std::move(*key));
 2345|  3.33k|                }
 2346|    781|                const auto k = ParseScriptNumber(in[2 + *n]);
 2347|    781|                if (!k || *k < 1 || *k > *n) return {};
  ------------------
  |  Branch (2347:21): [True: 2, False: 779]
  |  Branch (2347:27): [True: 39, False: 740]
  |  Branch (2347:37): [True: 38, False: 702]
  ------------------
 2348|    702|                in += 3 + *n;
 2349|    702|                std::reverse(keys.begin(), keys.end());
 2350|    702|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI, std::move(keys), *k));
 2351|    702|                break;
 2352|    781|            }
 2353|       |            // Tapscript's equivalent of multi
 2354|  1.12M|            if (last - in >= 4 && in[0].first == OP_NUMEQUAL) {
  ------------------
  |  Branch (2354:17): [True: 1.11M, False: 2.03k]
  |  Branch (2354:35): [True: 210, False: 1.11M]
  ------------------
 2355|    210|                if (!IsTapscript(ctx.MsContext())) return {};
  ------------------
  |  Branch (2355:21): [True: 17, False: 193]
  ------------------
 2356|       |                // The necessary threshold of signatures.
 2357|    193|                const auto k = ParseScriptNumber(in[1]);
 2358|    193|                if (!k) return {};
  ------------------
  |  Branch (2358:21): [True: 2, False: 191]
  ------------------
 2359|    191|                if (*k < 1 || *k > MAX_PUBKEYS_PER_MULTI_A) return {};
  ------------------
  |  Branch (2359:21): [True: 42, False: 149]
  |  Branch (2359:31): [True: 22, False: 127]
  ------------------
 2360|    127|                if (last - in < 2 + *k * 2) return {};
  ------------------
  |  Branch (2360:21): [True: 7, False: 120]
  ------------------
 2361|    120|                std::vector<Key> keys;
 2362|    120|                keys.reserve(*k);
 2363|       |                // Walk through the expected (pubkey, CHECKSIG[ADD]) pairs.
 2364|    131|                for (int pos = 2;; pos += 2) {
 2365|    131|                    if (last - in < pos + 2) return {};
  ------------------
  |  Branch (2365:25): [True: 2, False: 129]
  ------------------
 2366|       |                    // Make sure it's indeed an x-only pubkey and a CHECKSIG[ADD], then parse the key.
 2367|    129|                    if (in[pos].first != OP_CHECKSIGADD && in[pos].first != OP_CHECKSIG) return {};
  ------------------
  |  Branch (2367:25): [True: 116, False: 13]
  |  Branch (2367:60): [True: 55, False: 61]
  ------------------
 2368|     74|                    if (in[pos + 1].second.size() != 32) return {};
  ------------------
  |  Branch (2368:25): [True: 6, False: 68]
  ------------------
 2369|     68|                    auto key = ctx.FromPKBytes(in[pos + 1].second.begin(), in[pos + 1].second.end());
 2370|     68|                    if (!key) return {};
  ------------------
  |  Branch (2370:25): [True: 0, False: 68]
  ------------------
 2371|     68|                    keys.push_back(std::move(*key));
 2372|       |                    // Make sure early we don't parse an arbitrary large expression.
 2373|     68|                    if (keys.size() > MAX_PUBKEYS_PER_MULTI_A) return {};
  ------------------
  |  Branch (2373:25): [True: 0, False: 68]
  ------------------
 2374|       |                    // OP_CHECKSIG means it was the last one to parse.
 2375|     68|                    if (in[pos].first == OP_CHECKSIG) break;
  ------------------
  |  Branch (2375:25): [True: 57, False: 11]
  ------------------
 2376|     68|                }
 2377|     57|                if (keys.size() < (size_t)*k) return {};
  ------------------
  |  Branch (2377:21): [True: 1, False: 56]
  ------------------
 2378|     56|                in += 2 + keys.size() * 2;
 2379|     56|                std::reverse(keys.begin(), keys.end());
 2380|     56|                constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::MULTI_A, std::move(keys), *k));
 2381|     56|                break;
 2382|     57|            }
 2383|       |            /** In the following wrappers, we only need to push SINGLE_BKV_EXPR rather
 2384|       |             * than BKV_EXPR, because and_v commutes with these wrappers. For example,
 2385|       |             * c:and_v(X,Y) produces the same script as and_v(X,c:Y). */
 2386|       |            // c: wrapper
 2387|  1.11M|            if (in[0].first == OP_CHECKSIG) {
  ------------------
  |  Branch (2387:17): [True: 9.58k, False: 1.11M]
  ------------------
 2388|  9.58k|                ++in;
 2389|  9.58k|                to_parse.emplace_back(DecodeContext::CHECK, -1, -1);
 2390|  9.58k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2391|  9.58k|                break;
 2392|  9.58k|            }
 2393|       |            // v: wrapper
 2394|  1.11M|            if (in[0].first == OP_VERIFY) {
  ------------------
  |  Branch (2394:17): [True: 54.5k, False: 1.05M]
  ------------------
 2395|  54.5k|                ++in;
 2396|  54.5k|                to_parse.emplace_back(DecodeContext::VERIFY, -1, -1);
 2397|  54.5k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2398|  54.5k|                break;
 2399|  54.5k|            }
 2400|       |            // n: wrapper
 2401|  1.05M|            if (in[0].first == OP_0NOTEQUAL) {
  ------------------
  |  Branch (2401:17): [True: 458k, False: 597k]
  ------------------
 2402|   458k|                ++in;
 2403|   458k|                to_parse.emplace_back(DecodeContext::ZERO_NOTEQUAL, -1, -1);
 2404|   458k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2405|   458k|                break;
 2406|   458k|            }
 2407|       |            // Thresh
 2408|   597k|            if (last - in >= 3 && in[0].first == OP_EQUAL && (num = ParseScriptNumber(in[1]))) {
  ------------------
  |  Branch (2408:17): [True: 596k, False: 323]
  |  Branch (2408:17): [True: 38.8k, False: 558k]
  |  Branch (2408:35): [True: 39.0k, False: 557k]
  |  Branch (2408:62): [True: 38.8k, False: 195]
  ------------------
 2409|  38.8k|                if (*num < 1) return {};
  ------------------
  |  Branch (2409:21): [True: 59, False: 38.8k]
  ------------------
 2410|  38.8k|                in += 2;
 2411|  38.8k|                to_parse.emplace_back(DecodeContext::THRESH_W, 0, *num);
 2412|  38.8k|                break;
 2413|  38.8k|            }
 2414|       |            // OP_ENDIF can be WRAP_J, WRAP_D, ANDOR, OR_C, OR_D, or OR_I
 2415|   558k|            if (in[0].first == OP_ENDIF) {
  ------------------
  |  Branch (2415:17): [True: 352k, False: 205k]
  ------------------
 2416|   352k|                ++in;
 2417|   352k|                to_parse.emplace_back(DecodeContext::ENDIF, -1, -1);
 2418|   352k|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2419|   352k|                break;
 2420|   352k|            }
 2421|       |            /** In and_b and or_b nodes, we only look for SINGLE_BKV_EXPR, because
 2422|       |             * or_b(and_v(X,Y),Z) has script [X] [Y] [Z] OP_BOOLOR, the same as
 2423|       |             * and_v(X,or_b(Y,Z)). In this example, the former of these is invalid as
 2424|       |             * miniscript, while the latter is valid. So we leave the and_v "outside"
 2425|       |             * while decoding. */
 2426|       |            // and_b
 2427|   205k|            if (in[0].first == OP_BOOLAND) {
  ------------------
  |  Branch (2427:17): [True: 10.7k, False: 194k]
  ------------------
 2428|  10.7k|                ++in;
 2429|  10.7k|                to_parse.emplace_back(DecodeContext::AND_B, -1, -1);
 2430|  10.7k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2431|  10.7k|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2432|  10.7k|                break;
 2433|  10.7k|            }
 2434|       |            // or_b
 2435|   194k|            if (in[0].first == OP_BOOLOR) {
  ------------------
  |  Branch (2435:17): [True: 193k, False: 834]
  ------------------
 2436|   193k|                ++in;
 2437|   193k|                to_parse.emplace_back(DecodeContext::OR_B, -1, -1);
 2438|   193k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2439|   193k|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2440|   193k|                break;
 2441|   193k|            }
 2442|       |            // Unrecognised expression
 2443|    834|            return {};
 2444|   194k|        }
 2445|  4.81M|        case DecodeContext::BKV_EXPR: {
  ------------------
  |  Branch (2445:9): [True: 4.81M, False: 10.9M]
  ------------------
 2446|  4.81M|            to_parse.emplace_back(DecodeContext::MAYBE_AND_V, -1, -1);
 2447|  4.81M|            to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2448|  4.81M|            break;
 2449|   194k|        }
 2450|   230k|        case DecodeContext::W_EXPR: {
  ------------------
  |  Branch (2450:9): [True: 230k, False: 15.5M]
  ------------------
 2451|       |            // a: wrapper
 2452|   230k|            if (in >= last) return {};
  ------------------
  |  Branch (2452:17): [True: 36, False: 230k]
  ------------------
 2453|   230k|            if (in[0].first == OP_FROMALTSTACK) {
  ------------------
  |  Branch (2453:17): [True: 48.6k, False: 181k]
  ------------------
 2454|  48.6k|                ++in;
 2455|  48.6k|                to_parse.emplace_back(DecodeContext::ALT, -1, -1);
 2456|   181k|            } else {
 2457|   181k|                to_parse.emplace_back(DecodeContext::SWAP, -1, -1);
 2458|   181k|            }
 2459|   230k|            to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2460|   230k|            break;
 2461|   230k|        }
 2462|  4.37M|        case DecodeContext::MAYBE_AND_V: {
  ------------------
  |  Branch (2462:9): [True: 4.37M, False: 11.3M]
  ------------------
 2463|       |            // If we reach a potential AND_V top-level, check if the next part of the script could be another AND_V child
 2464|       |            // These op-codes cannot end any well-formed miniscript so cannot be used in an and_v node.
 2465|  4.37M|            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 (2465:17): [True: 4.36M, False: 1.60k]
  |  Branch (2465:30): [True: 4.31M, False: 55.6k]
  |  Branch (2465:54): [True: 4.24M, False: 64.1k]
  |  Branch (2465:80): [True: 4.21M, False: 34.3k]
  |  Branch (2465:107): [True: 4.17M, False: 39.8k]
  |  Branch (2465:139): [True: 4.16M, False: 13.7k]
  ------------------
 2466|  4.16M|                to_parse.emplace_back(DecodeContext::AND_V, -1, -1);
 2467|       |                // BKV_EXPR can contain more AND_V nodes
 2468|  4.16M|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2469|  4.16M|            }
 2470|  4.37M|            break;
 2471|   230k|        }
 2472|  13.7k|        case DecodeContext::SWAP: {
  ------------------
  |  Branch (2472:9): [True: 13.7k, False: 15.7M]
  ------------------
 2473|  13.7k|            if (in >= last || in[0].first != OP_SWAP || constructed.empty()) return {};
  ------------------
  |  Branch (2473:17): [True: 13, False: 13.7k]
  |  Branch (2473:31): [True: 12, False: 13.6k]
  |  Branch (2473:57): [True: 0, False: 13.6k]
  ------------------
 2474|  13.6k|            ++in;
 2475|  13.6k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_S, Vector(std::move(constructed.back())));
 2476|  13.6k|            break;
 2477|  13.7k|        }
 2478|  39.7k|        case DecodeContext::ALT: {
  ------------------
  |  Branch (2478:9): [True: 39.7k, False: 15.7M]
  ------------------
 2479|  39.7k|            if (in >= last || in[0].first != OP_TOALTSTACK || constructed.empty()) return {};
  ------------------
  |  Branch (2479:17): [True: 6, False: 39.7k]
  |  Branch (2479:31): [True: 7, False: 39.7k]
  |  Branch (2479:63): [True: 0, False: 39.7k]
  ------------------
 2480|  39.7k|            ++in;
 2481|  39.7k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_A, Vector(std::move(constructed.back())));
 2482|  39.7k|            break;
 2483|  39.7k|        }
 2484|  7.86k|        case DecodeContext::CHECK: {
  ------------------
  |  Branch (2484:9): [True: 7.86k, False: 15.7M]
  ------------------
 2485|  7.86k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2485:17): [True: 0, False: 7.86k]
  ------------------
 2486|  7.86k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_C, Vector(std::move(constructed.back())));
 2487|  7.86k|            break;
 2488|  7.86k|        }
 2489|  9.93k|        case DecodeContext::DUP_IF: {
  ------------------
  |  Branch (2489:9): [True: 9.93k, False: 15.7M]
  ------------------
 2490|  9.93k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2490:17): [True: 0, False: 9.93k]
  ------------------
 2491|  9.93k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_D, Vector(std::move(constructed.back())));
 2492|  9.93k|            break;
 2493|  9.93k|        }
 2494|  47.3k|        case DecodeContext::VERIFY: {
  ------------------
  |  Branch (2494:9): [True: 47.3k, False: 15.7M]
  ------------------
 2495|  47.3k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2495:17): [True: 0, False: 47.3k]
  ------------------
 2496|  47.3k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_V, Vector(std::move(constructed.back())));
 2497|  47.3k|            break;
 2498|  47.3k|        }
 2499|  6.36k|        case DecodeContext::NON_ZERO: {
  ------------------
  |  Branch (2499:9): [True: 6.36k, False: 15.7M]
  ------------------
 2500|  6.36k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2500:17): [True: 0, False: 6.36k]
  ------------------
 2501|  6.36k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_J, Vector(std::move(constructed.back())));
 2502|  6.36k|            break;
 2503|  6.36k|        }
 2504|   427k|        case DecodeContext::ZERO_NOTEQUAL: {
  ------------------
  |  Branch (2504:9): [True: 427k, False: 15.3M]
  ------------------
 2505|   427k|            if (constructed.empty()) return {};
  ------------------
  |  Branch (2505:17): [True: 0, False: 427k]
  ------------------
 2506|   427k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::WRAP_N, Vector(std::move(constructed.back())));
 2507|   427k|            break;
 2508|   427k|        }
 2509|  24.0k|        case DecodeContext::AND_V: {
  ------------------
  |  Branch (2509:9): [True: 24.0k, False: 15.7M]
  ------------------
 2510|  24.0k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2510:17): [True: 0, False: 24.0k]
  ------------------
 2511|  24.0k|            BuildBack(ctx.MsContext(), Fragment::AND_V, constructed, /*reverse=*/true);
 2512|  24.0k|            break;
 2513|  24.0k|        }
 2514|  6.56k|        case DecodeContext::AND_B: {
  ------------------
  |  Branch (2514:9): [True: 6.56k, False: 15.7M]
  ------------------
 2515|  6.56k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2515:17): [True: 0, False: 6.56k]
  ------------------
 2516|  6.56k|            BuildBack(ctx.MsContext(), Fragment::AND_B, constructed, /*reverse=*/true);
 2517|  6.56k|            break;
 2518|  6.56k|        }
 2519|  21.5k|        case DecodeContext::OR_B: {
  ------------------
  |  Branch (2519:9): [True: 21.5k, False: 15.7M]
  ------------------
 2520|  21.5k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2520:17): [True: 0, False: 21.5k]
  ------------------
 2521|  21.5k|            BuildBack(ctx.MsContext(), Fragment::OR_B, constructed, /*reverse=*/true);
 2522|  21.5k|            break;
 2523|  21.5k|        }
 2524|  4.82k|        case DecodeContext::OR_C: {
  ------------------
  |  Branch (2524:9): [True: 4.82k, False: 15.7M]
  ------------------
 2525|  4.82k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2525:17): [True: 0, False: 4.82k]
  ------------------
 2526|  4.82k|            BuildBack(ctx.MsContext(), Fragment::OR_C, constructed, /*reverse=*/true);
 2527|  4.82k|            break;
 2528|  4.82k|        }
 2529|  10.9k|        case DecodeContext::OR_D: {
  ------------------
  |  Branch (2529:9): [True: 10.9k, False: 15.7M]
  ------------------
 2530|  10.9k|            if (constructed.size() < 2) return {};
  ------------------
  |  Branch (2530:17): [True: 0, False: 10.9k]
  ------------------
 2531|  10.9k|            BuildBack(ctx.MsContext(), Fragment::OR_D, constructed, /*reverse=*/true);
 2532|  10.9k|            break;
 2533|  10.9k|        }
 2534|  16.5k|        case DecodeContext::ANDOR: {
  ------------------
  |  Branch (2534:9): [True: 16.5k, False: 15.7M]
  ------------------
 2535|  16.5k|            if (constructed.size() < 3) return {};
  ------------------
  |  Branch (2535:17): [True: 0, False: 16.5k]
  ------------------
 2536|  16.5k|            NodeRef<Key> left = std::move(constructed.back());
 2537|  16.5k|            constructed.pop_back();
 2538|  16.5k|            NodeRef<Key> right = std::move(constructed.back());
 2539|  16.5k|            constructed.pop_back();
 2540|  16.5k|            NodeRef<Key> mid = std::move(constructed.back());
 2541|  16.5k|            constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::ANDOR, Vector(std::move(left), std::move(mid), std::move(right)));
 2542|  16.5k|            break;
 2543|  16.5k|        }
 2544|  61.9k|        case DecodeContext::THRESH_W: {
  ------------------
  |  Branch (2544:9): [True: 61.9k, False: 15.6M]
  ------------------
 2545|  61.9k|            if (in >= last) return {};
  ------------------
  |  Branch (2545:17): [True: 2, False: 61.9k]
  ------------------
 2546|  61.9k|            if (in[0].first == OP_ADD) {
  ------------------
  |  Branch (2546:17): [True: 25.9k, False: 35.9k]
  ------------------
 2547|  25.9k|                ++in;
 2548|  25.9k|                to_parse.emplace_back(DecodeContext::THRESH_W, n+1, k);
 2549|  25.9k|                to_parse.emplace_back(DecodeContext::W_EXPR, -1, -1);
 2550|  35.9k|            } else {
 2551|  35.9k|                to_parse.emplace_back(DecodeContext::THRESH_E, n+1, k);
 2552|       |                // All children of thresh have type modifier d, so cannot be and_v
 2553|  35.9k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2554|  35.9k|            }
 2555|  61.9k|            break;
 2556|  61.9k|        }
 2557|  33.9k|        case DecodeContext::THRESH_E: {
  ------------------
  |  Branch (2557:9): [True: 33.9k, False: 15.7M]
  ------------------
 2558|  33.9k|            if (k < 1 || k > n || constructed.size() < static_cast<size_t>(n)) return {};
  ------------------
  |  Branch (2558:17): [True: 0, False: 33.9k]
  |  Branch (2558:26): [True: 49, False: 33.9k]
  |  Branch (2558:35): [True: 0, False: 33.9k]
  ------------------
 2559|  33.9k|            std::vector<NodeRef<Key>> subs;
 2560|  87.6k|            for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (2560:29): [True: 53.7k, False: 33.9k]
  ------------------
 2561|  53.7k|                NodeRef<Key> sub = std::move(constructed.back());
 2562|  53.7k|                constructed.pop_back();
 2563|  53.7k|                subs.push_back(std::move(sub));
 2564|  53.7k|            }
 2565|  33.9k|            constructed.push_back(MakeNodeRef<Key>(internal::NoDupCheck{}, ctx.MsContext(), Fragment::THRESH, std::move(subs), k));
 2566|  33.9k|            break;
 2567|  33.9k|        }
 2568|  97.6k|        case DecodeContext::ENDIF: {
  ------------------
  |  Branch (2568:9): [True: 97.6k, False: 15.6M]
  ------------------
 2569|  97.6k|            if (in >= last) return {};
  ------------------
  |  Branch (2569:17): [True: 23, False: 97.5k]
  ------------------
 2570|       |
 2571|       |            // could be andor or or_i
 2572|  97.5k|            if (in[0].first == OP_ELSE) {
  ------------------
  |  Branch (2572:17): [True: 64.1k, False: 33.4k]
  ------------------
 2573|  64.1k|                ++in;
 2574|  64.1k|                to_parse.emplace_back(DecodeContext::ENDIF_ELSE, -1, -1);
 2575|  64.1k|                to_parse.emplace_back(DecodeContext::BKV_EXPR, -1, -1);
 2576|  64.1k|            }
 2577|       |            // could be j: or d: wrapper
 2578|  33.4k|            else if (in[0].first == OP_IF) {
  ------------------
  |  Branch (2578:22): [True: 16.3k, False: 17.1k]
  ------------------
 2579|  16.3k|                if (last - in >= 2 && in[1].first == OP_DUP) {
  ------------------
  |  Branch (2579:21): [True: 16.3k, False: 7]
  |  Branch (2579:39): [True: 9.93k, False: 6.42k]
  ------------------
 2580|  9.93k|                    in += 2;
 2581|  9.93k|                    to_parse.emplace_back(DecodeContext::DUP_IF, -1, -1);
 2582|  9.93k|                } else if (last - in >= 3 && in[1].first == OP_0NOTEQUAL && in[2].first == OP_SIZE) {
  ------------------
  |  Branch (2582:28): [True: 6.41k, False: 17]
  |  Branch (2582:46): [True: 6.37k, False: 34]
  |  Branch (2582:77): [True: 6.36k, False: 13]
  ------------------
 2583|  6.36k|                    in += 3;
 2584|  6.36k|                    to_parse.emplace_back(DecodeContext::NON_ZERO, -1, -1);
 2585|  6.36k|                }
 2586|     64|                else {
 2587|     64|                    return {};
 2588|     64|                }
 2589|       |            // could be or_c or or_d
 2590|  17.1k|            } else if (in[0].first == OP_NOTIF) {
  ------------------
  |  Branch (2590:24): [True: 17.1k, False: 5]
  ------------------
 2591|  17.1k|                ++in;
 2592|  17.1k|                to_parse.emplace_back(DecodeContext::ENDIF_NOTIF, -1, -1);
 2593|  17.1k|            }
 2594|      5|            else {
 2595|      5|                return {};
 2596|      5|            }
 2597|  97.5k|            break;
 2598|  97.5k|        }
 2599|  97.5k|        case DecodeContext::ENDIF_NOTIF: {
  ------------------
  |  Branch (2599:9): [True: 17.1k, False: 15.7M]
  ------------------
 2600|  17.1k|            if (in >= last) return {};
  ------------------
  |  Branch (2600:17): [True: 6, False: 17.1k]
  ------------------
 2601|  17.1k|            if (in[0].first == OP_IFDUP) {
  ------------------
  |  Branch (2601:17): [True: 11.8k, False: 5.27k]
  ------------------
 2602|  11.8k|                ++in;
 2603|  11.8k|                to_parse.emplace_back(DecodeContext::OR_D, -1, -1);
 2604|  11.8k|            } else {
 2605|  5.27k|                to_parse.emplace_back(DecodeContext::OR_C, -1, -1);
 2606|  5.27k|            }
 2607|       |            // or_c and or_d both require X to have type modifier d so, can't contain and_v
 2608|  17.1k|            to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2609|  17.1k|            break;
 2610|  17.1k|        }
 2611|  56.3k|        case DecodeContext::ENDIF_ELSE: {
  ------------------
  |  Branch (2611:9): [True: 56.3k, False: 15.6M]
  ------------------
 2612|  56.3k|            if (in >= last) return {};
  ------------------
  |  Branch (2612:17): [True: 16, False: 56.3k]
  ------------------
 2613|  56.3k|            if (in[0].first == OP_IF) {
  ------------------
  |  Branch (2613:17): [True: 39.2k, False: 17.1k]
  ------------------
 2614|  39.2k|                ++in;
 2615|  39.2k|                BuildBack(ctx.MsContext(), Fragment::OR_I, constructed, /*reverse=*/true);
 2616|  39.2k|            } else if (in[0].first == OP_NOTIF) {
  ------------------
  |  Branch (2616:24): [True: 17.1k, False: 9]
  ------------------
 2617|  17.1k|                ++in;
 2618|  17.1k|                to_parse.emplace_back(DecodeContext::ANDOR, -1, -1);
 2619|       |                // andor requires X to have type modifier d, so it can't be and_v
 2620|  17.1k|                to_parse.emplace_back(DecodeContext::SINGLE_BKV_EXPR, -1, -1);
 2621|  17.1k|            } else {
 2622|      9|                return {};
 2623|      9|            }
 2624|  56.3k|            break;
 2625|  56.3k|        }
 2626|  15.7M|        }
 2627|  15.7M|    }
 2628|  1.65k|    if (constructed.size() != 1) return {};
  ------------------
  |  Branch (2628:9): [True: 0, False: 1.65k]
  ------------------
 2629|  1.65k|    NodeRef<Key> tl_node = std::move(constructed.front());
 2630|  1.65k|    tl_node->DuplicateKeyCheck(ctx);
 2631|       |    // Note that due to how ComputeType works (only assign the type to the node if the
 2632|       |    // subs' types are valid) this would fail if any node of tree is badly typed.
 2633|  1.65k|    if (!tl_node->IsValidTopLevel()) return {};
  ------------------
  |  Branch (2633:9): [True: 290, False: 1.36k]
  ------------------
 2634|  1.36k|    return tl_node;
 2635|  1.65k|}
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE7IsValidEv:
 1614|  15.5M|    bool IsValid() const {
 1615|  15.5M|        if (GetType() == ""_mst) return false;
  ------------------
  |  Branch (1615:13): [True: 671, False: 15.5M]
  ------------------
 1616|  15.5M|        return ScriptSize() <= internal::MaxScriptSize(m_script_ctx);
 1617|  15.5M|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE7GetTypeEv:
 1557|  17.2M|    Type GetType() const { return typ; }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE10ScriptSizeEv:
 1499|  16.4M|    size_t ScriptSize() const { return scriptlen; }
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEEEENSt3__110unique_ptrIKNS_4NodeIT_EENS8_14default_deleteISD_EEEEDpOT0_:
  196|  4.28M|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentEj:
 1670|  4.29M|        : 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:
  944|  5.02M|    internal::Ops CalcOps() const {
  945|  5.02M|        switch (fragment) {
  ------------------
  |  Branch (945:17): [True: 0, False: 5.02M]
  ------------------
  946|  74.7k|            case Fragment::JUST_1: return {0, 0, {}};
  ------------------
  |  Branch (946:13): [True: 74.7k, False: 4.95M]
  ------------------
  947|  4.20M|            case Fragment::JUST_0: return {0, {}, 0};
  ------------------
  |  Branch (947:13): [True: 4.20M, False: 818k]
  ------------------
  948|  2.71k|            case Fragment::PK_K: return {0, 0, 0};
  ------------------
  |  Branch (948:13): [True: 2.71k, False: 5.02M]
  ------------------
  949|  10.6k|            case Fragment::PK_H: return {3, 0, 0};
  ------------------
  |  Branch (949:13): [True: 10.6k, False: 5.01M]
  ------------------
  950|  9.13k|            case Fragment::OLDER:
  ------------------
  |  Branch (950:13): [True: 9.13k, False: 5.01M]
  ------------------
  951|  14.3k|            case Fragment::AFTER: return {1, 0, {}};
  ------------------
  |  Branch (951:13): [True: 5.24k, False: 5.02M]
  ------------------
  952|    604|            case Fragment::SHA256:
  ------------------
  |  Branch (952:13): [True: 604, False: 5.02M]
  ------------------
  953|  2.43k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (953:13): [True: 1.83k, False: 5.02M]
  ------------------
  954|  3.81k|            case Fragment::HASH256:
  ------------------
  |  Branch (954:13): [True: 1.37k, False: 5.02M]
  ------------------
  955|  4.93k|            case Fragment::HASH160: return {4, 0, {}};
  ------------------
  |  Branch (955:13): [True: 1.12k, False: 5.02M]
  ------------------
  956|  24.0k|            case Fragment::AND_V: return {subs[0]->ops.count + subs[1]->ops.count, subs[0]->ops.sat + subs[1]->ops.sat, {}};
  ------------------
  |  Branch (956:13): [True: 24.0k, False: 5.00M]
  ------------------
  957|  6.56k|            case Fragment::AND_B: {
  ------------------
  |  Branch (957:13): [True: 6.56k, False: 5.01M]
  ------------------
  958|  6.56k|                const auto count{1 + subs[0]->ops.count + subs[1]->ops.count};
  959|  6.56k|                const auto sat{subs[0]->ops.sat + subs[1]->ops.sat};
  960|  6.56k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  961|  6.56k|                return {count, sat, dsat};
  962|  3.81k|            }
  963|  21.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (963:13): [True: 21.5k, False: 5.00M]
  ------------------
  964|  21.5k|                const auto count{1 + subs[0]->ops.count + subs[1]->ops.count};
  965|  21.5k|                const auto sat{(subs[0]->ops.sat + subs[1]->ops.dsat) | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  966|  21.5k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  967|  21.5k|                return {count, sat, dsat};
  968|  3.81k|            }
  969|  10.9k|            case Fragment::OR_D: {
  ------------------
  |  Branch (969:13): [True: 10.9k, False: 5.01M]
  ------------------
  970|  10.9k|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count};
  971|  10.9k|                const auto sat{subs[0]->ops.sat | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  972|  10.9k|                const auto dsat{subs[0]->ops.dsat + subs[1]->ops.dsat};
  973|  10.9k|                return {count, sat, dsat};
  974|  3.81k|            }
  975|  4.82k|            case Fragment::OR_C: {
  ------------------
  |  Branch (975:13): [True: 4.82k, False: 5.02M]
  ------------------
  976|  4.82k|                const auto count{2 + subs[0]->ops.count + subs[1]->ops.count};
  977|  4.82k|                const auto sat{subs[0]->ops.sat | (subs[1]->ops.sat + subs[0]->ops.dsat)};
  978|  4.82k|                return {count, sat, {}};
  979|  3.81k|            }
  980|  39.2k|            case Fragment::OR_I: {
  ------------------
  |  Branch (980:13): [True: 39.2k, False: 4.98M]
  ------------------
  981|  39.2k|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count};
  982|  39.2k|                const auto sat{subs[0]->ops.sat | subs[1]->ops.sat};
  983|  39.2k|                const auto dsat{subs[0]->ops.dsat | subs[1]->ops.dsat};
  984|  39.2k|                return {count, sat, dsat};
  985|  3.81k|            }
  986|  16.5k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (986:13): [True: 16.5k, False: 5.00M]
  ------------------
  987|  16.5k|                const auto count{3 + subs[0]->ops.count + subs[1]->ops.count + subs[2]->ops.count};
  988|  16.5k|                const auto sat{(subs[1]->ops.sat + subs[0]->ops.sat) | (subs[0]->ops.dsat + subs[2]->ops.sat)};
  989|  16.5k|                const auto dsat{subs[0]->ops.dsat + subs[2]->ops.dsat};
  990|  16.5k|                return {count, sat, dsat};
  991|  3.81k|            }
  992|    702|            case Fragment::MULTI: return {1, (uint32_t)keys.size(), (uint32_t)keys.size()};
  ------------------
  |  Branch (992:13): [True: 702, False: 5.02M]
  ------------------
  993|     56|            case Fragment::MULTI_A: return {(uint32_t)keys.size() + 1, 0, 0};
  ------------------
  |  Branch (993:13): [True: 56, False: 5.02M]
  ------------------
  994|  13.6k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (994:13): [True: 13.6k, False: 5.01M]
  ------------------
  995|  21.5k|            case Fragment::WRAP_C:
  ------------------
  |  Branch (995:13): [True: 7.86k, False: 5.01M]
  ------------------
  996|   449k|            case Fragment::WRAP_N: return {1 + subs[0]->ops.count, subs[0]->ops.sat, subs[0]->ops.dsat};
  ------------------
  |  Branch (996:13): [True: 427k, False: 4.59M]
  ------------------
  997|  39.7k|            case Fragment::WRAP_A: return {2 + subs[0]->ops.count, subs[0]->ops.sat, subs[0]->ops.dsat};
  ------------------
  |  Branch (997:13): [True: 39.7k, False: 4.98M]
  ------------------
  998|  9.93k|            case Fragment::WRAP_D: return {3 + subs[0]->ops.count, subs[0]->ops.sat, 0};
  ------------------
  |  Branch (998:13): [True: 9.93k, False: 5.01M]
  ------------------
  999|  6.36k|            case Fragment::WRAP_J: return {4 + subs[0]->ops.count, subs[0]->ops.sat, 0};
  ------------------
  |  Branch (999:13): [True: 6.36k, False: 5.01M]
  ------------------
 1000|  47.3k|            case Fragment::WRAP_V: return {subs[0]->ops.count + (subs[0]->GetType() << "x"_mst), subs[0]->ops.sat, {}};
  ------------------
  |  Branch (1000:13): [True: 47.3k, False: 4.97M]
  ------------------
 1001|  33.9k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1001:13): [True: 33.9k, False: 4.99M]
  ------------------
 1002|  33.9k|                uint32_t count = 0;
 1003|  33.9k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1004|  53.7k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1004:38): [True: 53.7k, False: 33.9k]
  ------------------
 1005|  53.7k|                    count += sub->ops.count + 1;
 1006|  53.7k|                    auto next_sats = Vector(sats[0] + sub->ops.dsat);
 1007|   493k|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub->ops.dsat) | (sats[j - 1] + sub->ops.sat));
  ------------------
  |  Branch (1007:40): [True: 439k, False: 53.7k]
  ------------------
 1008|  53.7k|                    next_sats.push_back(sats[sats.size() - 1] + sub->ops.sat);
 1009|  53.7k|                    sats = std::move(next_sats);
 1010|  53.7k|                }
 1011|  33.9k|                assert(k <= sats.size());
 1012|  33.9k|                return {count, sats[k], sats[0]};
 1013|  33.9k|            }
 1014|  5.02M|        }
 1015|      0|        assert(false);
 1016|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13CalcStackSizeEv:
 1018|  5.02M|    internal::StackSize CalcStackSize() const {
 1019|  5.02M|        using namespace internal;
 1020|  5.02M|        switch (fragment) {
  ------------------
  |  Branch (1020:17): [True: 0, False: 5.02M]
  ------------------
 1021|  4.20M|            case Fragment::JUST_0: return {{}, SatInfo::Push()};
  ------------------
  |  Branch (1021:13): [True: 4.20M, False: 818k]
  ------------------
 1022|  74.7k|            case Fragment::JUST_1: return {SatInfo::Push(), {}};
  ------------------
  |  Branch (1022:13): [True: 74.7k, False: 4.95M]
  ------------------
 1023|  9.13k|            case Fragment::OLDER:
  ------------------
  |  Branch (1023:13): [True: 9.13k, False: 5.01M]
  ------------------
 1024|  14.3k|            case Fragment::AFTER: return {SatInfo::Push() + SatInfo::Nop(), {}};
  ------------------
  |  Branch (1024:13): [True: 5.24k, False: 5.02M]
  ------------------
 1025|  2.71k|            case Fragment::PK_K: return {SatInfo::Push()};
  ------------------
  |  Branch (1025:13): [True: 2.71k, False: 5.02M]
  ------------------
 1026|  10.6k|            case Fragment::PK_H: return {SatInfo::OP_DUP() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY()};
  ------------------
  |  Branch (1026:13): [True: 10.6k, False: 5.01M]
  ------------------
 1027|    604|            case Fragment::SHA256:
  ------------------
  |  Branch (1027:13): [True: 604, False: 5.02M]
  ------------------
 1028|  2.43k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1028:13): [True: 1.83k, False: 5.02M]
  ------------------
 1029|  3.81k|            case Fragment::HASH256:
  ------------------
  |  Branch (1029:13): [True: 1.37k, False: 5.02M]
  ------------------
 1030|  4.93k|            case Fragment::HASH160: return {
  ------------------
  |  Branch (1030:13): [True: 1.12k, False: 5.02M]
  ------------------
 1031|  4.93k|                SatInfo::OP_SIZE() + SatInfo::Push() + SatInfo::OP_EQUALVERIFY() + SatInfo::Hash() + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1032|  4.93k|                {}
 1033|  4.93k|            };
 1034|  16.5k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1034:13): [True: 16.5k, False: 5.00M]
  ------------------
 1035|  16.5k|                const auto& x{subs[0]->ss};
 1036|  16.5k|                const auto& y{subs[1]->ss};
 1037|  16.5k|                const auto& z{subs[2]->ss};
 1038|  16.5k|                return {
 1039|  16.5k|                    (x.sat + SatInfo::If() + y.sat) | (x.dsat + SatInfo::If() + z.sat),
 1040|  16.5k|                    x.dsat + SatInfo::If() + z.dsat
 1041|  16.5k|                };
 1042|  3.81k|            }
 1043|  24.0k|            case Fragment::AND_V: {
  ------------------
  |  Branch (1043:13): [True: 24.0k, False: 5.00M]
  ------------------
 1044|  24.0k|                const auto& x{subs[0]->ss};
 1045|  24.0k|                const auto& y{subs[1]->ss};
 1046|  24.0k|                return {x.sat + y.sat, {}};
 1047|  3.81k|            }
 1048|  6.56k|            case Fragment::AND_B: {
  ------------------
  |  Branch (1048:13): [True: 6.56k, False: 5.01M]
  ------------------
 1049|  6.56k|                const auto& x{subs[0]->ss};
 1050|  6.56k|                const auto& y{subs[1]->ss};
 1051|  6.56k|                return {x.sat + y.sat + SatInfo::BinaryOp(), x.dsat + y.dsat + SatInfo::BinaryOp()};
 1052|  3.81k|            }
 1053|  21.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1053:13): [True: 21.5k, False: 5.00M]
  ------------------
 1054|  21.5k|                const auto& x{subs[0]->ss};
 1055|  21.5k|                const auto& y{subs[1]->ss};
 1056|  21.5k|                return {
 1057|  21.5k|                    ((x.sat + y.dsat) | (x.dsat + y.sat)) + SatInfo::BinaryOp(),
 1058|  21.5k|                    x.dsat + y.dsat + SatInfo::BinaryOp()
 1059|  21.5k|                };
 1060|  3.81k|            }
 1061|  4.82k|            case Fragment::OR_C: {
  ------------------
  |  Branch (1061:13): [True: 4.82k, False: 5.02M]
  ------------------
 1062|  4.82k|                const auto& x{subs[0]->ss};
 1063|  4.82k|                const auto& y{subs[1]->ss};
 1064|  4.82k|                return {(x.sat + SatInfo::If()) | (x.dsat + SatInfo::If() + y.sat), {}};
 1065|  3.81k|            }
 1066|  10.9k|            case Fragment::OR_D: {
  ------------------
  |  Branch (1066:13): [True: 10.9k, False: 5.01M]
  ------------------
 1067|  10.9k|                const auto& x{subs[0]->ss};
 1068|  10.9k|                const auto& y{subs[1]->ss};
 1069|  10.9k|                return {
 1070|  10.9k|                    (x.sat + SatInfo::OP_IFDUP(true) + SatInfo::If()) | (x.dsat + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.sat),
 1071|  10.9k|                    x.dsat + SatInfo::OP_IFDUP(false) + SatInfo::If() + y.dsat
 1072|  10.9k|                };
 1073|  3.81k|            }
 1074|  39.2k|            case Fragment::OR_I: {
  ------------------
  |  Branch (1074:13): [True: 39.2k, False: 4.98M]
  ------------------
 1075|  39.2k|                const auto& x{subs[0]->ss};
 1076|  39.2k|                const auto& y{subs[1]->ss};
 1077|  39.2k|                return {SatInfo::If() + (x.sat | y.sat), SatInfo::If() + (x.dsat | y.dsat)};
 1078|  3.81k|            }
 1079|       |            // multi(k, key1, key2, ..., key_n) starts off with k+1 stack elements (a 0, plus k
 1080|       |            // signatures), then reaches n+k+3 stack elements after pushing the n keys, plus k and
 1081|       |            // n itself, and ends with 1 stack element (success or failure). Thus, it net removes
 1082|       |            // k elements (from k+1 to 1), while reaching k+n+2 more than it ends with.
 1083|    702|            case Fragment::MULTI: return {SatInfo(k, k + keys.size() + 2)};
  ------------------
  |  Branch (1083:13): [True: 702, False: 5.02M]
  ------------------
 1084|       |            // multi_a(k, key1, key2, ..., key_n) starts off with n stack elements (the
 1085|       |            // signatures), reaches 1 more (after the first key push), and ends with 1. Thus it net
 1086|       |            // removes n-1 elements (from n to 1) while reaching n more than it ends with.
 1087|     56|            case Fragment::MULTI_A: return {SatInfo(keys.size() - 1, keys.size())};
  ------------------
  |  Branch (1087:13): [True: 56, False: 5.02M]
  ------------------
 1088|  39.7k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1088:13): [True: 39.7k, False: 4.98M]
  ------------------
 1089|   467k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1089:13): [True: 427k, False: 4.59M]
  ------------------
 1090|   480k|            case Fragment::WRAP_S: return subs[0]->ss;
  ------------------
  |  Branch (1090:13): [True: 13.6k, False: 5.01M]
  ------------------
 1091|  7.86k|            case Fragment::WRAP_C: return {
  ------------------
  |  Branch (1091:13): [True: 7.86k, False: 5.01M]
  ------------------
 1092|  7.86k|                subs[0]->ss.sat + SatInfo::OP_CHECKSIG(),
 1093|  7.86k|                subs[0]->ss.dsat + SatInfo::OP_CHECKSIG()
 1094|  7.86k|            };
 1095|  9.93k|            case Fragment::WRAP_D: return {
  ------------------
  |  Branch (1095:13): [True: 9.93k, False: 5.01M]
  ------------------
 1096|  9.93k|                SatInfo::OP_DUP() + SatInfo::If() + subs[0]->ss.sat,
 1097|  9.93k|                SatInfo::OP_DUP() + SatInfo::If()
 1098|  9.93k|            };
 1099|  47.3k|            case Fragment::WRAP_V: return {subs[0]->ss.sat + SatInfo::OP_VERIFY(), {}};
  ------------------
  |  Branch (1099:13): [True: 47.3k, False: 4.97M]
  ------------------
 1100|  6.36k|            case Fragment::WRAP_J: return {
  ------------------
  |  Branch (1100:13): [True: 6.36k, False: 5.01M]
  ------------------
 1101|  6.36k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If() + subs[0]->ss.sat,
 1102|  6.36k|                SatInfo::OP_SIZE() + SatInfo::OP_0NOTEQUAL() + SatInfo::If()
 1103|  6.36k|            };
 1104|  33.9k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1104:13): [True: 33.9k, False: 4.99M]
  ------------------
 1105|       |                // sats[j] is the SatInfo corresponding to all traces reaching j satisfactions.
 1106|  33.9k|                auto sats = Vector(SatInfo::Empty());
 1107|  87.6k|                for (size_t i = 0; i < subs.size(); ++i) {
  ------------------
  |  Branch (1107:36): [True: 53.7k, False: 33.9k]
  ------------------
 1108|       |                    // Loop over the subexpressions, processing them one by one. After adding
 1109|       |                    // element i we need to add OP_ADD (if i>0).
 1110|  53.7k|                    auto add = i ? SatInfo::BinaryOp() : SatInfo::Empty();
  ------------------
  |  Branch (1110:32): [True: 19.7k, False: 33.9k]
  ------------------
 1111|       |                    // Construct a variable that will become the next sats, starting with index 0.
 1112|  53.7k|                    auto next_sats = Vector(sats[0] + subs[i]->ss.dsat + add);
 1113|       |                    // Then loop to construct next_sats[1..i].
 1114|   493k|                    for (size_t j = 1; j < sats.size(); ++j) {
  ------------------
  |  Branch (1114:40): [True: 439k, False: 53.7k]
  ------------------
 1115|   439k|                        next_sats.push_back(((sats[j] + subs[i]->ss.dsat) | (sats[j - 1] + subs[i]->ss.sat)) + add);
 1116|   439k|                    }
 1117|       |                    // Finally construct next_sats[i+1].
 1118|  53.7k|                    next_sats.push_back(sats[sats.size() - 1] + subs[i]->ss.sat + add);
 1119|       |                    // Switch over.
 1120|  53.7k|                    sats = std::move(next_sats);
 1121|  53.7k|                }
 1122|       |                // To satisfy thresh we need k satisfactions; to dissatisfy we need 0. In both
 1123|       |                // cases a push of k and an OP_EQUAL follow.
 1124|  33.9k|                return {
 1125|  33.9k|                    sats[k] + SatInfo::Push() + SatInfo::OP_EQUAL(),
 1126|  33.9k|                    sats[0] + SatInfo::Push() + SatInfo::OP_EQUAL()
 1127|  33.9k|                };
 1128|   467k|            }
 1129|  5.02M|        }
 1130|      0|        assert(false);
 1131|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE15CalcWitnessSizeEv:
 1133|  5.02M|    internal::WitnessSize CalcWitnessSize() const {
 1134|  5.02M|        const uint32_t sig_size = IsTapscript(m_script_ctx) ? 1 + 65 : 1 + 72;
  ------------------
  |  Branch (1134:35): [True: 4.60M, False: 423k]
  ------------------
 1135|  5.02M|        const uint32_t pubkey_size = IsTapscript(m_script_ctx) ? 1 + 32 : 1 + 33;
  ------------------
  |  Branch (1135:38): [True: 4.60M, False: 423k]
  ------------------
 1136|  5.02M|        switch (fragment) {
  ------------------
  |  Branch (1136:17): [True: 0, False: 5.02M]
  ------------------
 1137|  4.20M|            case Fragment::JUST_0: return {{}, 0};
  ------------------
  |  Branch (1137:13): [True: 4.20M, False: 818k]
  ------------------
 1138|  74.7k|            case Fragment::JUST_1:
  ------------------
  |  Branch (1138:13): [True: 74.7k, False: 4.95M]
  ------------------
 1139|  83.8k|            case Fragment::OLDER:
  ------------------
  |  Branch (1139:13): [True: 9.13k, False: 5.01M]
  ------------------
 1140|  89.1k|            case Fragment::AFTER: return {0, {}};
  ------------------
  |  Branch (1140:13): [True: 5.24k, False: 5.02M]
  ------------------
 1141|  2.71k|            case Fragment::PK_K: return {sig_size, 1};
  ------------------
  |  Branch (1141:13): [True: 2.71k, False: 5.02M]
  ------------------
 1142|  10.6k|            case Fragment::PK_H: return {sig_size + pubkey_size, 1 + pubkey_size};
  ------------------
  |  Branch (1142:13): [True: 10.6k, False: 5.01M]
  ------------------
 1143|    604|            case Fragment::SHA256:
  ------------------
  |  Branch (1143:13): [True: 604, False: 5.02M]
  ------------------
 1144|  2.43k|            case Fragment::RIPEMD160:
  ------------------
  |  Branch (1144:13): [True: 1.83k, False: 5.02M]
  ------------------
 1145|  3.81k|            case Fragment::HASH256:
  ------------------
  |  Branch (1145:13): [True: 1.37k, False: 5.02M]
  ------------------
 1146|  4.93k|            case Fragment::HASH160: return {1 + 32, {}};
  ------------------
  |  Branch (1146:13): [True: 1.12k, False: 5.02M]
  ------------------
 1147|  16.5k|            case Fragment::ANDOR: {
  ------------------
  |  Branch (1147:13): [True: 16.5k, False: 5.00M]
  ------------------
 1148|  16.5k|                const auto sat{(subs[0]->ws.sat + subs[1]->ws.sat) | (subs[0]->ws.dsat + subs[2]->ws.sat)};
 1149|  16.5k|                const auto dsat{subs[0]->ws.dsat + subs[2]->ws.dsat};
 1150|  16.5k|                return {sat, dsat};
 1151|  3.81k|            }
 1152|  24.0k|            case Fragment::AND_V: return {subs[0]->ws.sat + subs[1]->ws.sat, {}};
  ------------------
  |  Branch (1152:13): [True: 24.0k, False: 5.00M]
  ------------------
 1153|  6.56k|            case Fragment::AND_B: return {subs[0]->ws.sat + subs[1]->ws.sat, subs[0]->ws.dsat + subs[1]->ws.dsat};
  ------------------
  |  Branch (1153:13): [True: 6.56k, False: 5.01M]
  ------------------
 1154|  21.5k|            case Fragment::OR_B: {
  ------------------
  |  Branch (1154:13): [True: 21.5k, False: 5.00M]
  ------------------
 1155|  21.5k|                const auto sat{(subs[0]->ws.dsat + subs[1]->ws.sat) | (subs[0]->ws.sat + subs[1]->ws.dsat)};
 1156|  21.5k|                const auto dsat{subs[0]->ws.dsat + subs[1]->ws.dsat};
 1157|  21.5k|                return {sat, dsat};
 1158|  3.81k|            }
 1159|  4.82k|            case Fragment::OR_C: return {subs[0]->ws.sat | (subs[0]->ws.dsat + subs[1]->ws.sat), {}};
  ------------------
  |  Branch (1159:13): [True: 4.82k, False: 5.02M]
  ------------------
 1160|  10.9k|            case Fragment::OR_D: return {subs[0]->ws.sat | (subs[0]->ws.dsat + subs[1]->ws.sat), subs[0]->ws.dsat + subs[1]->ws.dsat};
  ------------------
  |  Branch (1160:13): [True: 10.9k, False: 5.01M]
  ------------------
 1161|  39.2k|            case Fragment::OR_I: return {(subs[0]->ws.sat + 1 + 1) | (subs[1]->ws.sat + 1), (subs[0]->ws.dsat + 1 + 1) | (subs[1]->ws.dsat + 1)};
  ------------------
  |  Branch (1161:13): [True: 39.2k, False: 4.98M]
  ------------------
 1162|    702|            case Fragment::MULTI: return {k * sig_size + 1, k + 1};
  ------------------
  |  Branch (1162:13): [True: 702, False: 5.02M]
  ------------------
 1163|     56|            case Fragment::MULTI_A: return {k * sig_size + static_cast<uint32_t>(keys.size()) - k, static_cast<uint32_t>(keys.size())};
  ------------------
  |  Branch (1163:13): [True: 56, False: 5.02M]
  ------------------
 1164|  39.7k|            case Fragment::WRAP_A:
  ------------------
  |  Branch (1164:13): [True: 39.7k, False: 4.98M]
  ------------------
 1165|   467k|            case Fragment::WRAP_N:
  ------------------
  |  Branch (1165:13): [True: 427k, False: 4.59M]
  ------------------
 1166|   480k|            case Fragment::WRAP_S:
  ------------------
  |  Branch (1166:13): [True: 13.6k, False: 5.01M]
  ------------------
 1167|   488k|            case Fragment::WRAP_C: return subs[0]->ws;
  ------------------
  |  Branch (1167:13): [True: 7.86k, False: 5.01M]
  ------------------
 1168|  9.93k|            case Fragment::WRAP_D: return {1 + 1 + subs[0]->ws.sat, 1};
  ------------------
  |  Branch (1168:13): [True: 9.93k, False: 5.01M]
  ------------------
 1169|  47.3k|            case Fragment::WRAP_V: return {subs[0]->ws.sat, {}};
  ------------------
  |  Branch (1169:13): [True: 47.3k, False: 4.97M]
  ------------------
 1170|  6.36k|            case Fragment::WRAP_J: return {subs[0]->ws.sat, 1};
  ------------------
  |  Branch (1170:13): [True: 6.36k, False: 5.01M]
  ------------------
 1171|  33.9k|            case Fragment::THRESH: {
  ------------------
  |  Branch (1171:13): [True: 33.9k, False: 4.99M]
  ------------------
 1172|  33.9k|                auto sats = Vector(internal::MaxInt<uint32_t>(0));
 1173|  53.7k|                for (const auto& sub : subs) {
  ------------------
  |  Branch (1173:38): [True: 53.7k, False: 33.9k]
  ------------------
 1174|  53.7k|                    auto next_sats = Vector(sats[0] + sub->ws.dsat);
 1175|   493k|                    for (size_t j = 1; j < sats.size(); ++j) next_sats.push_back((sats[j] + sub->ws.dsat) | (sats[j - 1] + sub->ws.sat));
  ------------------
  |  Branch (1175:40): [True: 439k, False: 53.7k]
  ------------------
 1176|  53.7k|                    next_sats.push_back(sats[sats.size() - 1] + sub->ws.sat);
 1177|  53.7k|                    sats = std::move(next_sats);
 1178|  53.7k|                }
 1179|  33.9k|                assert(k <= sats.size());
 1180|  33.9k|                return {sats[k], sats[0]};
 1181|  33.9k|            }
 1182|  5.02M|        }
 1183|      0|        assert(false);
 1184|      0|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8CalcTypeEv:
  731|  5.02M|    Type CalcType() const {
  732|  5.02M|        using namespace internal;
  733|       |
  734|       |        // THRESH has a variable number of subexpressions
  735|  5.02M|        std::vector<Type> sub_types;
  736|  5.02M|        if (fragment == Fragment::THRESH) {
  ------------------
  |  Branch (736:13): [True: 33.9k, False: 4.99M]
  ------------------
  737|  53.7k|            for (const auto& sub : subs) sub_types.push_back(sub->GetType());
  ------------------
  |  Branch (737:34): [True: 53.7k, False: 33.9k]
  ------------------
  738|  33.9k|        }
  739|       |        // All other nodes than THRESH can be computed just from the types of the 0-3 subexpressions.
  740|  5.02M|        static constexpr auto NONE_MST{""_mst};
  741|  5.02M|        Type x = subs.size() > 0 ? subs[0]->GetType() : NONE_MST;
  ------------------
  |  Branch (741:18): [True: 710k, False: 4.31M]
  ------------------
  742|  5.02M|        Type y = subs.size() > 1 ? subs[1]->GetType() : NONE_MST;
  ------------------
  |  Branch (742:18): [True: 128k, False: 4.89M]
  ------------------
  743|  5.02M|        Type z = subs.size() > 2 ? subs[2]->GetType() : NONE_MST;
  ------------------
  |  Branch (743:18): [True: 20.7k, False: 5.00M]
  ------------------
  744|       |
  745|  5.02M|        return SanitizeType(ComputeType(fragment, x, y, z, sub_types, k, data.size(), subs.size(), keys.size(), m_script_ctx));
  746|  5.02M|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13CalcScriptLenEv:
  570|  5.02M|    size_t CalcScriptLen() const {
  571|  5.02M|        size_t subsize = 0;
  572|  5.02M|        for (const auto& sub : subs) {
  ------------------
  |  Branch (572:30): [True: 869k, False: 5.02M]
  ------------------
  573|   869k|            subsize += sub->ScriptSize();
  574|   869k|        }
  575|  5.02M|        static constexpr auto NONE_MST{""_mst};
  576|  5.02M|        Type sub0type = subs.size() > 0 ? subs[0]->GetType() : NONE_MST;
  ------------------
  |  Branch (576:25): [True: 710k, False: 4.31M]
  ------------------
  577|  5.02M|        return internal::ComputeScriptLen(fragment, sub0type, subsize, k, subs.size(), keys.size(), m_script_ctx);
  578|  5.02M|    }
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS3_NS8_9allocatorIS3_EEEEEEENS8_10unique_ptrIKNS_4NodeIT_EENS8_14default_deleteISH_EEEEDpOT0_:
  196|  13.3k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS3_NS9_9allocatorIS3_EEEEj:
 1666|  14.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:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentERlEEENSt3__110unique_ptrIKNS_4NodeIT_EENS9_14default_deleteISE_EEEEDpOT0_:
  196|  14.3k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentERNSt3__16vectorIhNS8_9allocatorIhEEEEEEENS8_10unique_ptrIKNS_4NodeIT_EENS8_14default_deleteISI_EEEEDpOT0_:
  196|  4.93k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIhNS9_9allocatorIhEEEEj:
 1662|  4.93k|        : 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:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorIS3_NS8_9allocatorIS3_EEEERKlEEENS8_10unique_ptrIKNS_4NodeIT_EENS8_14default_deleteISJ_EEEEDpOT0_:
  196|    758|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS8_10unique_ptrIKNS_4NodeIS3_EENS8_14default_deleteISD_EEEENS8_9allocatorISG_EEEEEEENSA_IKNSB_IT_EENSE_ISM_EEEEDpOT0_:
  196|   569k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEC2ENS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS9_10unique_ptrIKS4_NS9_14default_deleteISC_EEEENS9_9allocatorISF_EEEEj:
 1668|   710k|        : 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_119ScriptParserContext3KeyEED2Ev:
  520|  5.02M|    ~Node() {
  521|  5.89M|        while (!subs.empty()) {
  ------------------
  |  Branch (521:16): [True: 869k, False: 5.02M]
  ------------------
  522|   869k|            auto node = std::move(subs.back());
  523|   869k|            subs.pop_back();
  524|  1.67M|            while (!node->subs.empty()) {
  ------------------
  |  Branch (524:20): [True: 808k, False: 869k]
  ------------------
  525|   808k|                subs.push_back(std::move(node->subs.back()));
  526|   808k|                node->subs.pop_back();
  527|   808k|            }
  528|   869k|        }
  529|  5.02M|    }
miniscript.cpp:_ZN10miniscript8internal9BuildBackIN12_GLOBAL__N_119ScriptParserContext3KeyEEEvNS_17MiniscriptContextENS_8FragmentERNSt3__16vectorINS7_10unique_ptrIKNS_4NodeIT_EENS7_14default_deleteISD_EEEENS7_9allocatorISG_EEEEb:
 1777|   107k|{
 1778|   107k|    NodeRef<Key> child = std::move(constructed.back());
 1779|   107k|    constructed.pop_back();
 1780|   107k|    if (reverse) {
  ------------------
  |  Branch (1780:9): [True: 107k, False: 0]
  ------------------
 1781|   107k|        constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(child), std::move(constructed.back())));
 1782|   107k|    } else {
 1783|      0|        constructed.back() = MakeNodeRef<Key>(internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(constructed.back()), std::move(child)));
 1784|      0|    }
 1785|   107k|}
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckERKNS_17MiniscriptContextERNS_8FragmentENSt3__16vectorINSB_10unique_ptrIKNS_4NodeIS3_EENSB_14default_deleteISG_EEEENSB_9allocatorISJ_EEEEEEENSD_IKNSE_IT_EENSH_ISP_EEEEDpOT0_:
  196|   107k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZN10miniscript11MakeNodeRefIN12_GLOBAL__N_119ScriptParserContext3KeyEJNS_8internal10NoDupCheckENS_17MiniscriptContextENS_8FragmentENSt3__16vectorINS8_10unique_ptrIKNS_4NodeIS3_EENS8_14default_deleteISD_EEEENS8_9allocatorISG_EEEERlEEENSA_IKNSB_IT_EENSE_ISN_EEEEDpOT0_:
  196|  33.9k|NodeRef<Key> MakeNodeRef(Args&&... args) { return std::make_unique<const Node<Key>>(std::forward<Args>(args)...); }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_:
 1441|  1.65k|    {
 1442|       |        // We cannot use a lambda here, as lambdas are non assignable, and the set operations
 1443|       |        // below require moving the comparators around.
 1444|  1.65k|        struct Comp {
 1445|  1.65k|            const Ctx* ctx_ptr;
 1446|  1.65k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
 1447|  1.65k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
 1448|  1.65k|        };
 1449|       |
 1450|       |        // state in the recursive computation:
 1451|       |        // - std::nullopt means "this node has duplicates"
 1452|       |        // - an std::set means "this node has no duplicate keys, and they are: ...".
 1453|  1.65k|        using keyset = std::set<Key, Comp>;
 1454|  1.65k|        using state = std::optional<keyset>;
 1455|       |
 1456|  1.65k|        auto upfn = [&ctx](const Node& node, Span<state> subs) -> state {
 1457|       |            // If this node is already known to have duplicates, nothing left to do.
 1458|  1.65k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
 1459|       |
 1460|       |            // Check if one of the children is already known to have duplicates.
 1461|  1.65k|            for (auto& sub : subs) {
 1462|  1.65k|                if (!sub.has_value()) {
 1463|  1.65k|                    node.has_duplicate_keys = true;
 1464|  1.65k|                    return {};
 1465|  1.65k|                }
 1466|  1.65k|            }
 1467|       |
 1468|       |            // Start building the set of keys involved in this node and children.
 1469|       |            // Start by keys in this node directly.
 1470|  1.65k|            size_t keys_count = node.keys.size();
 1471|  1.65k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1472|  1.65k|            if (key_set.size() != keys_count) {
 1473|       |                // It already has duplicates; bail out.
 1474|  1.65k|                node.has_duplicate_keys = true;
 1475|  1.65k|                return {};
 1476|  1.65k|            }
 1477|       |
 1478|       |            // Merge the keys from the children into this set.
 1479|  1.65k|            for (auto& sub : subs) {
 1480|  1.65k|                keys_count += sub->size();
 1481|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1482|       |                // logarithmic in the size of the first.
 1483|  1.65k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
 1484|  1.65k|                key_set.merge(*sub);
 1485|  1.65k|                if (key_set.size() != keys_count) {
 1486|  1.65k|                    node.has_duplicate_keys = true;
 1487|  1.65k|                    return {};
 1488|  1.65k|                }
 1489|  1.65k|            }
 1490|       |
 1491|  1.65k|            node.has_duplicate_keys = false;
 1492|  1.65k|            return key_set;
 1493|  1.65k|        };
 1494|       |
 1495|  1.65k|        TreeEval<state>(upfn);
 1496|  1.65k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS9_IS2_EEvSC_EUlRKS4_4SpanISH_EE_EESA_T0_:
  699|  1.65k|    {
  700|  1.65k|        struct DummyState {};
  701|  1.65k|        return std::move(*TreeEvalMaybe<Result>(DummyState{},
  702|  1.65k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
  703|  1.65k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|  1.65k|                Result res{upfn(node, subs)};
  705|  1.65k|                return std::optional<Result>(std::move(res));
  706|  1.65k|            }
  707|  1.65k|        ));
  708|  1.65k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS4_8TreeEvalISH_ZNKS9_IS2_EEvSC_EUlRKS4_4SpanISH_EE_EESA_T0_E10DummyStateZNKSI_ISH_SN_EESA_SO_EUlSP_SK_mE_ZNKSI_ISH_SN_EESA_SO_EUlSP_SK_SM_E_EENS7_ISA_EESO_T1_T2_:
  605|  1.65k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  1.65k|        struct StackElem
  608|  1.65k|        {
  609|  1.65k|            const Node& node; //!< The node being evaluated.
  610|  1.65k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  1.65k|            State state; //!< The state for that node.
  612|       |
  613|  1.65k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  1.65k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  1.65k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  1.65k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  1.65k|        std::vector<Result> results;
  621|  1.65k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   723k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 721k, False: 1.65k]
  ------------------
  640|   721k|            const Node& node = stack.back().node;
  641|   721k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 360k, False: 361k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|   360k|                size_t child_index = stack.back().expanded++;
  646|   360k|                State child_state = downfn(stack.back().state, node, child_index);
  647|   360k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|   360k|                continue;
  649|   360k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|   361k|            assert(results.size() >= node.subs.size());
  652|   361k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|   361k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|   361k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 361k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|   361k|            results.erase(results.end() - node.subs.size(), results.end());
  658|   361k|            results.push_back(std::move(*result));
  659|   361k|            stack.pop_back();
  660|   361k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  1.65k|        assert(results.size() == 1);
  663|  1.65k|        return std::move(results[0]);
  664|  1.65k|    }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS4_8TreeEvalISH_ZNKS9_IS2_EEvSC_EUlRKS4_4SpanISH_EE_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_:
  614|   361k|                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_4SpanISH_EE_EESA_T0_ENKUlZNKS5_ISH_SM_EESA_SN_E10DummyStateSJ_mE_clESO_SJ_m:
  702|   360k|            [](DummyState, const Node&, size_t) { return DummyState{}; },
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalINSt3__18optionalINS6_3setIS3_ZNKS4_17DuplicateKeyCheckIS2_EEvRKT_E4CompNS6_9allocatorIS3_EEEEEEZNKS9_IS2_EEvSC_EUlRKS4_4SpanISH_EE_EESA_T0_ENKUlZNKS5_ISH_SM_EESA_SN_E10DummyStateSJ_SL_E_clESO_SJ_SL_:
  703|   361k|            [&upfn](DummyState, const Node& node, Span<Result> subs) {
  704|   361k|                Result res{upfn(node, subs)};
  705|   361k|                return std::optional<Result>(std::move(res));
  706|   361k|            }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_ENKUlRKS4_4SpanINSt3__18optionalINSC_3setIS3_ZNKS5_IS2_EEvS8_E4CompNSC_9allocatorIS3_EEEEEEEE_clESA_SK_:
 1456|   361k|        auto upfn = [&ctx](const Node& node, Span<state> subs) -> state {
 1457|       |            // If this node is already known to have duplicates, nothing left to do.
 1458|   361k|            if (node.has_duplicate_keys.has_value() && *node.has_duplicate_keys) return {};
  ------------------
  |  Branch (1458:17): [True: 0, False: 361k]
  |  Branch (1458:56): [True: 0, False: 0]
  ------------------
 1459|       |
 1460|       |            // Check if one of the children is already known to have duplicates.
 1461|   361k|            for (auto& sub : subs) {
  ------------------
  |  Branch (1461:28): [True: 359k, False: 352k]
  ------------------
 1462|   359k|                if (!sub.has_value()) {
  ------------------
  |  Branch (1462:21): [True: 9.49k, False: 349k]
  ------------------
 1463|  9.49k|                    node.has_duplicate_keys = true;
 1464|  9.49k|                    return {};
 1465|  9.49k|                }
 1466|   359k|            }
 1467|       |
 1468|       |            // Start building the set of keys involved in this node and children.
 1469|       |            // Start by keys in this node directly.
 1470|   352k|            size_t keys_count = node.keys.size();
 1471|   352k|            keyset key_set{node.keys.begin(), node.keys.end(), Comp(ctx)};
 1472|   352k|            if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1472:17): [True: 53, False: 352k]
  ------------------
 1473|       |                // It already has duplicates; bail out.
 1474|     53|                node.has_duplicate_keys = true;
 1475|     53|                return {};
 1476|     53|            }
 1477|       |
 1478|       |            // Merge the keys from the children into this set.
 1479|   352k|            for (auto& sub : subs) {
  ------------------
  |  Branch (1479:28): [True: 349k, False: 351k]
  ------------------
 1480|   349k|                keys_count += sub->size();
 1481|       |                // Small optimization: std::set::merge is linear in the size of the second arg but
 1482|       |                // logarithmic in the size of the first.
 1483|   349k|                if (key_set.size() < sub->size()) std::swap(key_set, *sub);
  ------------------
  |  Branch (1483:21): [True: 77.2k, False: 272k]
  ------------------
 1484|   349k|                key_set.merge(*sub);
 1485|   349k|                if (key_set.size() != keys_count) {
  ------------------
  |  Branch (1485:21): [True: 217, False: 349k]
  ------------------
 1486|    217|                    node.has_duplicate_keys = true;
 1487|    217|                    return {};
 1488|    217|                }
 1489|   349k|            }
 1490|       |
 1491|   351k|            node.has_duplicate_keys = false;
 1492|   351k|            return key_set;
 1493|   352k|        };
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_EN4CompC2ERKS2_:
 1446|   352k|            Comp(const Ctx& ctx) : ctx_ptr(&ctx) {}
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE17DuplicateKeyCheckIS2_EEvRKT_ENK4CompclERKS3_SB_:
 1447|  97.9k|            bool operator()(const Key& a, const Key& b) const { return ctx_ptr->KeyCompare(a, b); }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE15IsValidTopLevelEv:
 1620|  1.65k|    bool IsValidTopLevel() const { return IsValid() && GetType() << "B"_mst; }
  ------------------
  |  Branch (1620:43): [True: 1.43k, False: 221]
  |  Branch (1620:56): [True: 1.36k, False: 69]
  ------------------
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_:
  751|  1.22k|    {
  752|       |        // To construct the CScript for a Miniscript object, we use the TreeEval algorithm.
  753|       |        // The State is a boolean: whether or not the node's script expansion is followed
  754|       |        // by an OP_VERIFY (which may need to be combined with the last script opcode).
  755|  1.22k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  756|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  757|  1.22k|            if (node.fragment == Fragment::WRAP_V) return true;
  758|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  759|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  760|  1.22k|            if (node.fragment == Fragment::WRAP_S ||
  761|  1.22k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  762|  1.22k|            return false;
  763|  1.22k|        };
  764|       |        // The upward function computes for a node, given its followed-by-OP_VERIFY status
  765|       |        // and the CScripts of its child nodes, the CScript of the node.
  766|  1.22k|        const bool is_tapscript{IsTapscript(m_script_ctx)};
  767|  1.22k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, Span<CScript> subs) -> CScript {
  768|  1.22k|            switch (node.fragment) {
  769|  1.22k|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  770|  1.22k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  771|  1.22k|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  772|  1.22k|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  773|  1.22k|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  774|  1.22k|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  775|  1.22k|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  776|  1.22k|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  777|  1.22k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  778|  1.22k|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  779|  1.22k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  780|  1.22k|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  781|  1.22k|                case Fragment::WRAP_V: {
  782|  1.22k|                    if (node.subs[0]->GetType() << "x"_mst) {
  783|  1.22k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  784|  1.22k|                    } else {
  785|  1.22k|                        return std::move(subs[0]);
  786|  1.22k|                    }
  787|  1.22k|                }
  788|  1.22k|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  789|  1.22k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  790|  1.22k|                case Fragment::JUST_1: return BuildScript(OP_1);
  791|  1.22k|                case Fragment::JUST_0: return BuildScript(OP_0);
  792|  1.22k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  793|  1.22k|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  794|  1.22k|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  795|  1.22k|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  796|  1.22k|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  797|  1.22k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  798|  1.22k|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  799|  1.22k|                case Fragment::MULTI: {
  800|  1.22k|                    CHECK_NONFATAL(!is_tapscript);
  801|  1.22k|                    CScript script = BuildScript(node.k);
  802|  1.22k|                    for (const auto& key : node.keys) {
  803|  1.22k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  804|  1.22k|                    }
  805|  1.22k|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  806|  1.22k|                }
  807|  1.22k|                case Fragment::MULTI_A: {
  808|  1.22k|                    CHECK_NONFATAL(is_tapscript);
  809|  1.22k|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  810|  1.22k|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  811|  1.22k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  812|  1.22k|                    }
  813|  1.22k|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  814|  1.22k|                }
  815|  1.22k|                case Fragment::THRESH: {
  816|  1.22k|                    CScript script = std::move(subs[0]);
  817|  1.22k|                    for (size_t i = 1; i < subs.size(); ++i) {
  818|  1.22k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  819|  1.22k|                    }
  820|  1.22k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  821|  1.22k|                }
  822|  1.22k|            }
  823|  1.22k|            assert(false);
  824|  1.22k|        };
  825|  1.22k|        return TreeEval<CScript>(false, downfn, upfn);
  826|  1.22k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalI7CScriptbRZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS7_IS2_EES6_SA_EUlbSC_4SpanIS6_EE_EES8_T0_OT1_T2_:
  683|  1.22k|    {
  684|       |        // Invoke TreeEvalMaybe with upfn wrapped to return std::optional<Result>, and then
  685|       |        // unconditionally dereference the result (it cannot be std::nullopt).
  686|  1.22k|        return std::move(*TreeEvalMaybe<Result>(std::move(root_state),
  687|  1.22k|            std::forward<DownFn>(downfn),
  688|  1.22k|            [&upfn](State&& state, const Node& node, Span<Result> subs) {
  689|  1.22k|                Result res{upfn(std::move(state), node, subs)};
  690|  1.22k|                return std::optional<Result>(std::move(res));
  691|  1.22k|            }
  692|  1.22k|        ));
  693|  1.22k|    }
miniscript.cpp:_ZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeI7CScriptbZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS4_8TreeEvalIS6_bRSD_ZNKS7_IS2_EES6_SA_EUlbSC_4SpanIS6_EE_EES8_T0_OT1_T2_EUlObSC_SH_E_EENSt3__18optionalIS8_EESJ_SK_SM_:
  605|  1.22k|    {
  606|       |        /** Entries of the explicit stack tracked in this algorithm. */
  607|  1.22k|        struct StackElem
  608|  1.22k|        {
  609|  1.22k|            const Node& node; //!< The node being evaluated.
  610|  1.22k|            size_t expanded; //!< How many children of this node have been expanded.
  611|  1.22k|            State state; //!< The state for that node.
  612|       |
  613|  1.22k|            StackElem(const Node& node_, size_t exp_, State&& state_) :
  614|  1.22k|                node(node_), expanded(exp_), state(std::move(state_)) {}
  615|  1.22k|        };
  616|       |        /* Stack of tree nodes being explored. */
  617|  1.22k|        std::vector<StackElem> stack;
  618|       |        /* Results of subtrees so far. Their order and mapping to tree nodes
  619|       |         * is implicitly defined by stack. */
  620|  1.22k|        std::vector<Result> results;
  621|  1.22k|        stack.emplace_back(*this, 0, std::move(root_state));
  622|       |
  623|       |        /* Here is a demonstration of the algorithm, for an example tree A(B,C(D,E),F).
  624|       |         * State variables are omitted for simplicity.
  625|       |         *
  626|       |         * First: stack=[(A,0)] results=[]
  627|       |         *        stack=[(A,1),(B,0)] results=[]
  628|       |         *        stack=[(A,1)] results=[B]
  629|       |         *        stack=[(A,2),(C,0)] results=[B]
  630|       |         *        stack=[(A,2),(C,1),(D,0)] results=[B]
  631|       |         *        stack=[(A,2),(C,1)] results=[B,D]
  632|       |         *        stack=[(A,2),(C,2),(E,0)] results=[B,D]
  633|       |         *        stack=[(A,2),(C,2)] results=[B,D,E]
  634|       |         *        stack=[(A,2)] results=[B,C]
  635|       |         *        stack=[(A,3),(F,0)] results=[B,C]
  636|       |         *        stack=[(A,3)] results=[B,C,F]
  637|       |         * Final: stack=[] results=[A]
  638|       |         */
  639|   517k|        while (stack.size()) {
  ------------------
  |  Branch (639:16): [True: 516k, False: 1.22k]
  ------------------
  640|   516k|            const Node& node = stack.back().node;
  641|   516k|            if (stack.back().expanded < node.subs.size()) {
  ------------------
  |  Branch (641:17): [True: 257k, False: 258k]
  ------------------
  642|       |                /* We encounter a tree node with at least one unexpanded child.
  643|       |                 * Expand it. By the time we hit this node again, the result of
  644|       |                 * that child (and all earlier children) will be at the end of `results`. */
  645|   257k|                size_t child_index = stack.back().expanded++;
  646|   257k|                State child_state = downfn(stack.back().state, node, child_index);
  647|   257k|                stack.emplace_back(*node.subs[child_index], 0, std::move(child_state));
  648|   257k|                continue;
  649|   257k|            }
  650|       |            // Invoke upfn with the last node.subs.size() elements of results as input.
  651|   258k|            assert(results.size() >= node.subs.size());
  652|   258k|            std::optional<Result> result{upfn(std::move(stack.back().state), node,
  653|   258k|                Span<Result>{results}.last(node.subs.size()))};
  654|       |            // If evaluation returns std::nullopt, abort immediately.
  655|   258k|            if (!result) return {};
  ------------------
  |  Branch (655:17): [True: 0, False: 258k]
  ------------------
  656|       |            // Replace the last node.subs.size() elements of results with the new result.
  657|   258k|            results.erase(results.end() - node.subs.size(), results.end());
  658|   258k|            results.push_back(std::move(*result));
  659|   258k|            stack.pop_back();
  660|   258k|        }
  661|       |        // The final remaining results element is the root result, return it.
  662|  1.22k|        assert(results.size() == 1);
  663|  1.22k|        return std::move(results[0]);
  664|  1.22k|    }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE13TreeEvalMaybeI7CScriptbZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS4_8TreeEvalIS6_bRSD_ZNKS7_IS2_EES6_SA_EUlbSC_4SpanIS6_EE_EES8_T0_OT1_T2_EUlObSC_SH_E_EENSt3__18optionalIS8_EESJ_SK_SM_EN9StackElemC2ESC_mSN_:
  614|   258k|                node(node_), expanded(exp_), state(std::move(state_)) {}
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_ENKUlbRKS4_mE_clEbSB_m:
  755|   257k|        auto downfn = [](bool verify, const Node& node, size_t index) {
  756|       |            // For WRAP_V, the subexpression is certainly followed by OP_VERIFY.
  757|   257k|            if (node.fragment == Fragment::WRAP_V) return true;
  ------------------
  |  Branch (757:17): [True: 7.10k, False: 250k]
  ------------------
  758|       |            // The subexpression of WRAP_S, and the last subexpression of AND_V
  759|       |            // inherit the followed-by-OP_VERIFY property from the parent.
  760|   250k|            if (node.fragment == Fragment::WRAP_S ||
  ------------------
  |  Branch (760:17): [True: 861, False: 249k]
  ------------------
  761|   250k|                (node.fragment == Fragment::AND_V && index == 1)) return verify;
  ------------------
  |  Branch (761:18): [True: 13.3k, False: 236k]
  |  Branch (761:54): [True: 6.68k, False: 6.68k]
  ------------------
  762|   242k|            return false;
  763|   250k|        };
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8TreeEvalI7CScriptbRZNKS4_8ToScriptIS2_EES6_RKT_EUlbRKS4_mE_ZNKS7_IS2_EES6_SA_EUlbSC_4SpanIS6_EE_EES8_T0_OT1_T2_ENKUlObSC_SG_E_clESM_SC_SG_:
  688|   258k|            [&upfn](State&& state, const Node& node, Span<Result> subs) {
  689|   258k|                Result res{upfn(std::move(state), node, subs)};
  690|   258k|                return std::optional<Result>(std::move(res));
  691|   258k|            }
miniscript.cpp:_ZZNK10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEE8ToScriptIS2_EE7CScriptRKT_ENKUlbRKS4_4SpanIS6_EE_clEbSB_SD_:
  767|   258k|        auto upfn = [&ctx, is_tapscript](bool verify, const Node& node, Span<CScript> subs) -> CScript {
  768|   258k|            switch (node.fragment) {
  ------------------
  |  Branch (768:21): [True: 0, False: 258k]
  ------------------
  769|    361|                case Fragment::PK_K: return BuildScript(ctx.ToPKBytes(node.keys[0]));
  ------------------
  |  Branch (769:17): [True: 361, False: 258k]
  ------------------
  770|  5.21k|                case Fragment::PK_H: return BuildScript(OP_DUP, OP_HASH160, ctx.ToPKHBytes(node.keys[0]), OP_EQUALVERIFY);
  ------------------
  |  Branch (770:17): [True: 5.21k, False: 253k]
  ------------------
  771|  1.40k|                case Fragment::OLDER: return BuildScript(node.k, OP_CHECKSEQUENCEVERIFY);
  ------------------
  |  Branch (771:17): [True: 1.40k, False: 257k]
  ------------------
  772|    762|                case Fragment::AFTER: return BuildScript(node.k, OP_CHECKLOCKTIMEVERIFY);
  ------------------
  |  Branch (772:17): [True: 762, False: 258k]
  ------------------
  773|     54|                case Fragment::SHA256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_SHA256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (773:17): [True: 54, False: 258k]
  |  Branch (773:110): [True: 4, False: 50]
  ------------------
  774|    115|                case Fragment::RIPEMD160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_RIPEMD160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (774:17): [True: 115, False: 258k]
  |  Branch (774:116): [True: 1, False: 114]
  ------------------
  775|     76|                case Fragment::HASH256: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH256, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (775:17): [True: 76, False: 258k]
  |  Branch (775:112): [True: 5, False: 71]
  ------------------
  776|     88|                case Fragment::HASH160: return BuildScript(OP_SIZE, 32, OP_EQUALVERIFY, OP_HASH160, node.data, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (776:17): [True: 88, False: 258k]
  |  Branch (776:112): [True: 3, False: 85]
  ------------------
  777|  4.74k|                case Fragment::WRAP_A: return BuildScript(OP_TOALTSTACK, subs[0], OP_FROMALTSTACK);
  ------------------
  |  Branch (777:17): [True: 4.74k, False: 254k]
  ------------------
  778|    861|                case Fragment::WRAP_S: return BuildScript(OP_SWAP, subs[0]);
  ------------------
  |  Branch (778:17): [True: 861, False: 257k]
  ------------------
  779|  3.26k|                case Fragment::WRAP_C: return BuildScript(std::move(subs[0]), verify ? OP_CHECKSIGVERIFY : OP_CHECKSIG);
  ------------------
  |  Branch (779:17): [True: 3.26k, False: 255k]
  |  Branch (779:79): [True: 19, False: 3.24k]
  ------------------
  780|    230|                case Fragment::WRAP_D: return BuildScript(OP_DUP, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (780:17): [True: 230, False: 258k]
  ------------------
  781|  7.10k|                case Fragment::WRAP_V: {
  ------------------
  |  Branch (781:17): [True: 7.10k, False: 251k]
  ------------------
  782|  7.10k|                    if (node.subs[0]->GetType() << "x"_mst) {
  ------------------
  |  Branch (782:25): [True: 6.56k, False: 532]
  ------------------
  783|  6.56k|                        return BuildScript(std::move(subs[0]), OP_VERIFY);
  784|  6.56k|                    } else {
  785|    532|                        return std::move(subs[0]);
  786|    532|                    }
  787|  7.10k|                }
  788|    206|                case Fragment::WRAP_J: return BuildScript(OP_SIZE, OP_0NOTEQUAL, OP_IF, subs[0], OP_ENDIF);
  ------------------
  |  Branch (788:17): [True: 206, False: 258k]
  ------------------
  789|   190k|                case Fragment::WRAP_N: return BuildScript(std::move(subs[0]), OP_0NOTEQUAL);
  ------------------
  |  Branch (789:17): [True: 190k, False: 68.3k]
  ------------------
  790|  3.72k|                case Fragment::JUST_1: return BuildScript(OP_1);
  ------------------
  |  Branch (790:17): [True: 3.72k, False: 255k]
  ------------------
  791|  15.4k|                case Fragment::JUST_0: return BuildScript(OP_0);
  ------------------
  |  Branch (791:17): [True: 15.4k, False: 243k]
  ------------------
  792|  6.68k|                case Fragment::AND_V: return BuildScript(std::move(subs[0]), subs[1]);
  ------------------
  |  Branch (792:17): [True: 6.68k, False: 252k]
  ------------------
  793|  1.47k|                case Fragment::AND_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLAND);
  ------------------
  |  Branch (793:17): [True: 1.47k, False: 257k]
  ------------------
  794|  1.03k|                case Fragment::OR_B: return BuildScript(std::move(subs[0]), subs[1], OP_BOOLOR);
  ------------------
  |  Branch (794:17): [True: 1.03k, False: 257k]
  ------------------
  795|  1.62k|                case Fragment::OR_D: return BuildScript(std::move(subs[0]), OP_IFDUP, OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (795:17): [True: 1.62k, False: 257k]
  ------------------
  796|  1.02k|                case Fragment::OR_C: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[1], OP_ENDIF);
  ------------------
  |  Branch (796:17): [True: 1.02k, False: 257k]
  ------------------
  797|  1.60k|                case Fragment::OR_I: return BuildScript(OP_IF, subs[0], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (797:17): [True: 1.60k, False: 257k]
  ------------------
  798|  4.89k|                case Fragment::ANDOR: return BuildScript(std::move(subs[0]), OP_NOTIF, subs[2], OP_ELSE, subs[1], OP_ENDIF);
  ------------------
  |  Branch (798:17): [True: 4.89k, False: 253k]
  ------------------
  799|    261|                case Fragment::MULTI: {
  ------------------
  |  Branch (799:17): [True: 261, False: 258k]
  ------------------
  800|    261|                    CHECK_NONFATAL(!is_tapscript);
  ------------------
  |  |   82|    261|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  801|    261|                    CScript script = BuildScript(node.k);
  802|  1.54k|                    for (const auto& key : node.keys) {
  ------------------
  |  Branch (802:42): [True: 1.54k, False: 261]
  ------------------
  803|  1.54k|                        script = BuildScript(std::move(script), ctx.ToPKBytes(key));
  804|  1.54k|                    }
  805|    261|                    return BuildScript(std::move(script), node.keys.size(), verify ? OP_CHECKMULTISIGVERIFY : OP_CHECKMULTISIG);
  ------------------
  |  Branch (805:77): [True: 44, False: 217]
  ------------------
  806|  7.10k|                }
  807|     21|                case Fragment::MULTI_A: {
  ------------------
  |  Branch (807:17): [True: 21, False: 258k]
  ------------------
  808|     21|                    CHECK_NONFATAL(is_tapscript);
  ------------------
  |  |   82|     21|    inline_check_non_fatal(condition, __FILE__, __LINE__, __func__, #condition)
  ------------------
  809|     21|                    CScript script = BuildScript(ctx.ToPKBytes(*node.keys.begin()), OP_CHECKSIG);
  810|     21|                    for (auto it = node.keys.begin() + 1; it != node.keys.end(); ++it) {
  ------------------
  |  Branch (810:59): [True: 0, False: 21]
  ------------------
  811|      0|                        script = BuildScript(std::move(script), ctx.ToPKBytes(*it), OP_CHECKSIGADD);
  812|      0|                    }
  813|     21|                    return BuildScript(std::move(script), node.k, verify ? OP_NUMEQUALVERIFY : OP_NUMEQUAL);
  ------------------
  |  Branch (813:67): [True: 18, False: 3]
  ------------------
  814|  7.10k|                }
  815|  6.06k|                case Fragment::THRESH: {
  ------------------
  |  Branch (815:17): [True: 6.06k, False: 252k]
  ------------------
  816|  6.06k|                    CScript script = std::move(subs[0]);
  817|  9.16k|                    for (size_t i = 1; i < subs.size(); ++i) {
  ------------------
  |  Branch (817:40): [True: 3.10k, False: 6.06k]
  ------------------
  818|  3.10k|                        script = BuildScript(std::move(script), subs[i], OP_ADD);
  819|  3.10k|                    }
  820|  6.06k|                    return BuildScript(std::move(script), node.k, verify ? OP_EQUALVERIFY : OP_EQUAL);
  ------------------
  |  Branch (820:67): [True: 438, False: 5.62k]
  ------------------
  821|  7.10k|                }
  822|   258k|            }
  823|      0|            assert(false);
  824|      0|        };
_ZNK10miniscript4Type2IfEb:
  153|   900k|    constexpr Type If(bool x) const { return Type(x ? m_flags : 0); }
  ------------------
  |  Branch (153:51): [True: 719k, False: 180k]
  ------------------

_Z11GetScriptOpRN9prevectorILj28EhjiE14const_iteratorES1_R10opcodetypePNSt3__16vectorIhNS5_9allocatorIhEEEE:
  307|  13.4M|{
  308|  13.4M|    opcodeRet = OP_INVALIDOPCODE;
  309|  13.4M|    if (pvchRet)
  ------------------
  |  Branch (309:9): [True: 13.4M, False: 0]
  ------------------
  310|  13.4M|        pvchRet->clear();
  311|  13.4M|    if (pc >= end)
  ------------------
  |  Branch (311:9): [True: 0, False: 13.4M]
  ------------------
  312|      0|        return false;
  313|       |
  314|       |    // Read instruction
  315|  13.4M|    if (end - pc < 1)
  ------------------
  |  Branch (315:9): [True: 0, False: 13.4M]
  ------------------
  316|      0|        return false;
  317|  13.4M|    unsigned int opcode = *pc++;
  318|       |
  319|       |    // Immediate operand
  320|  13.4M|    if (opcode <= OP_PUSHDATA4)
  ------------------
  |  Branch (320:9): [True: 8.57M, False: 4.87M]
  ------------------
  321|  8.57M|    {
  322|  8.57M|        unsigned int nSize = 0;
  323|  8.57M|        if (opcode < OP_PUSHDATA1)
  ------------------
  |  Branch (323:13): [True: 8.57M, False: 1.61k]
  ------------------
  324|  8.57M|        {
  325|  8.57M|            nSize = opcode;
  326|  8.57M|        }
  327|  1.61k|        else if (opcode == OP_PUSHDATA1)
  ------------------
  |  Branch (327:18): [True: 1.21k, False: 400]
  ------------------
  328|  1.21k|        {
  329|  1.21k|            if (end - pc < 1)
  ------------------
  |  Branch (329:17): [True: 1, False: 1.21k]
  ------------------
  330|      1|                return false;
  331|  1.21k|            nSize = *pc++;
  332|  1.21k|        }
  333|    400|        else if (opcode == OP_PUSHDATA2)
  ------------------
  |  Branch (333:18): [True: 332, False: 68]
  ------------------
  334|    332|        {
  335|    332|            if (end - pc < 2)
  ------------------
  |  Branch (335:17): [True: 2, False: 330]
  ------------------
  336|      2|                return false;
  337|    330|            nSize = ReadLE16(&pc[0]);
  338|    330|            pc += 2;
  339|    330|        }
  340|     68|        else if (opcode == OP_PUSHDATA4)
  ------------------
  |  Branch (340:18): [True: 68, False: 0]
  ------------------
  341|     68|        {
  342|     68|            if (end - pc < 4)
  ------------------
  |  Branch (342:17): [True: 1, False: 67]
  ------------------
  343|      1|                return false;
  344|     67|            nSize = ReadLE32(&pc[0]);
  345|     67|            pc += 4;
  346|     67|        }
  347|  8.57M|        if (end - pc < 0 || (unsigned int)(end - pc) < nSize)
  ------------------
  |  Branch (347:13): [True: 0, False: 8.57M]
  |  Branch (347:29): [True: 132, False: 8.57M]
  ------------------
  348|    132|            return false;
  349|  8.57M|        if (pvchRet)
  ------------------
  |  Branch (349:13): [True: 8.57M, False: 0]
  ------------------
  350|  8.57M|            pvchRet->assign(pc, pc + nSize);
  351|  8.57M|        pc += nSize;
  352|  8.57M|    }
  353|       |
  354|  13.4M|    opcodeRet = static_cast<opcodetype>(opcode);
  355|  13.4M|    return true;
  356|  13.4M|}
_Z16CheckMinimalPushRKNSt3__16vectorIhNS_9allocatorIhEEEE10opcodetype:
  366|  87.9k|bool CheckMinimalPush(const std::vector<unsigned char>& data, opcodetype opcode) {
  367|       |    // Excludes OP_1NEGATE, OP_1-16 since they are by definition minimal
  368|  87.9k|    assert(0 <= opcode && opcode <= OP_PUSHDATA4);
  369|  87.9k|    if (data.size() == 0) {
  ------------------
  |  Branch (369:9): [True: 4, False: 87.8k]
  ------------------
  370|       |        // Should have used OP_0.
  371|      4|        return opcode == OP_0;
  372|  87.8k|    } else if (data.size() == 1 && data[0] >= 1 && data[0] <= 16) {
  ------------------
  |  Branch (372:16): [True: 17.3k, False: 70.5k]
  |  Branch (372:36): [True: 16.5k, False: 775]
  |  Branch (372:52): [True: 7, False: 16.5k]
  ------------------
  373|       |        // Should have used OP_1 .. OP_16.
  374|      7|        return false;
  375|  87.8k|    } else if (data.size() == 1 && data[0] == 0x81) {
  ------------------
  |  Branch (375:16): [True: 17.3k, False: 70.5k]
  |  Branch (375:36): [True: 1, False: 17.3k]
  ------------------
  376|       |        // Should have used OP_1NEGATE.
  377|      1|        return false;
  378|  87.8k|    } else if (data.size() <= 75) {
  ------------------
  |  Branch (378:16): [True: 86.3k, False: 1.56k]
  ------------------
  379|       |        // Must have used a direct push (opcode indicating number of bytes pushed + those bytes).
  380|  86.3k|        return opcode == data.size();
  381|  86.3k|    } else if (data.size() <= 255) {
  ------------------
  |  Branch (381:16): [True: 1.20k, False: 351]
  ------------------
  382|       |        // Must have used OP_PUSHDATA.
  383|  1.20k|        return opcode == OP_PUSHDATA1;
  384|  1.20k|    } else if (data.size() <= 65535) {
  ------------------
  |  Branch (384:16): [True: 335, False: 16]
  ------------------
  385|       |        // Must have used OP_PUSHDATA2.
  386|    335|        return opcode == OP_PUSHDATA2;
  387|    335|    }
  388|     16|    return true;
  389|  87.9k|}

_ZN15scriptnum_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  223|    209|    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
_ZN10CScriptNumC2ERKNSt3__16vectorIhNS0_9allocatorIhEEEEbm:
  247|  67.9k|    {
  248|  67.9k|        if (vch.size() > nMaxNumSize) {
  ------------------
  |  Branch (248:13): [True: 189, False: 67.7k]
  ------------------
  249|    189|            throw scriptnum_error("script number overflow");
  250|    189|        }
  251|  67.7k|        if (fRequireMinimal && vch.size() > 0) {
  ------------------
  |  Branch (251:13): [True: 67.7k, False: 0]
  |  Branch (251:32): [True: 67.7k, False: 0]
  ------------------
  252|       |            // Check that the number is encoded with the minimum possible
  253|       |            // number of bytes.
  254|       |            //
  255|       |            // If the most-significant-byte - excluding the sign bit - is zero
  256|       |            // then we're not minimal. Note how this test also rejects the
  257|       |            // negative-zero encoding, 0x80.
  258|  67.7k|            if ((vch.back() & 0x7f) == 0) {
  ------------------
  |  Branch (258:17): [True: 1.01k, False: 66.7k]
  ------------------
  259|       |                // One exception: if there's more than one byte and the most
  260|       |                // significant bit of the second-most-significant-byte is set
  261|       |                // it would conflict with the sign bit. An example of this case
  262|       |                // is +-255, which encode to 0xff00 and 0xff80 respectively.
  263|       |                // (big-endian).
  264|  1.01k|                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
  ------------------
  |  Branch (264:21): [True: 10, False: 1.00k]
  |  Branch (264:40): [True: 10, False: 996]
  ------------------
  265|     20|                    throw scriptnum_error("non-minimally encoded script number");
  266|     20|                }
  267|  1.01k|            }
  268|  67.7k|        }
  269|  67.7k|        m_value = set_vch(vch);
  270|  67.7k|    }
_ZNK10CScriptNum8GetInt64Ev:
  342|  67.7k|    int64_t GetInt64() const { return m_value; }
_ZN10CScriptNum9serializeERKl:
  350|  10.4k|    {
  351|  10.4k|        if(value == 0)
  ------------------
  |  Branch (351:12): [True: 0, False: 10.4k]
  ------------------
  352|      0|            return std::vector<unsigned char>();
  353|       |
  354|  10.4k|        std::vector<unsigned char> result;
  355|  10.4k|        const bool neg = value < 0;
  356|  10.4k|        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
  ------------------
  |  Branch (356:29): [True: 0, False: 10.4k]
  ------------------
  357|       |
  358|  42.8k|        while(absvalue)
  ------------------
  |  Branch (358:15): [True: 32.4k, False: 10.4k]
  ------------------
  359|  32.4k|        {
  360|  32.4k|            result.push_back(absvalue & 0xff);
  361|  32.4k|            absvalue >>= 8;
  362|  32.4k|        }
  363|       |
  364|       |//    - If the most significant byte is >= 0x80 and the value is positive, push a
  365|       |//    new zero-byte to make the significant byte < 0x80 again.
  366|       |
  367|       |//    - If the most significant byte is >= 0x80 and the value is negative, push a
  368|       |//    new 0x80 byte that will be popped off when converting to an integral.
  369|       |
  370|       |//    - If the most significant byte is < 0x80 and the value is negative, add
  371|       |//    0x80 to it, since it will be subtracted and interpreted as a negative when
  372|       |//    converting to an integral.
  373|       |
  374|  10.4k|        if (result.back() & 0x80)
  ------------------
  |  Branch (374:13): [True: 1.14k, False: 9.26k]
  ------------------
  375|  1.14k|            result.push_back(neg ? 0x80 : 0);
  ------------------
  |  Branch (375:30): [True: 0, False: 1.14k]
  ------------------
  376|  9.26k|        else if (neg)
  ------------------
  |  Branch (376:18): [True: 0, False: 9.26k]
  ------------------
  377|      0|            result.back() |= 0x80;
  378|       |
  379|  10.4k|        return result;
  380|  10.4k|    }
_ZN10CScriptNum7set_vchERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  384|  67.7k|    {
  385|  67.7k|      if (vch.empty())
  ------------------
  |  Branch (385:11): [True: 0, False: 67.7k]
  ------------------
  386|      0|          return 0;
  387|       |
  388|  67.7k|      int64_t result = 0;
  389|   156k|      for (size_t i = 0; i != vch.size(); ++i)
  ------------------
  |  Branch (389:26): [True: 88.8k, False: 67.7k]
  ------------------
  390|  88.8k|          result |= static_cast<int64_t>(vch[i]) << 8*i;
  391|       |
  392|       |      // If the input vector's most significant byte is 0x80, remove it from
  393|       |      // the result's msb and return a negative.
  394|  67.7k|      if (vch.back() & 0x80)
  ------------------
  |  Branch (394:11): [True: 304, False: 67.4k]
  ------------------
  395|    304|          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
  396|       |
  397|  67.4k|      return result;
  398|  67.7k|    }
_ZN7CScript14AppendDataSizeEj:
  418|  17.8k|    {
  419|  17.8k|        if (size < OP_PUSHDATA1) {
  ------------------
  |  Branch (419:13): [True: 17.8k, False: 0]
  ------------------
  420|  17.8k|            insert(end(), static_cast<value_type>(size));
  421|  17.8k|        } else if (size <= 0xff) {
  ------------------
  |  Branch (421:20): [True: 0, False: 0]
  ------------------
  422|      0|            insert(end(), OP_PUSHDATA1);
  423|      0|            insert(end(), static_cast<value_type>(size));
  424|      0|        } else if (size <= 0xffff) {
  ------------------
  |  Branch (424:20): [True: 0, False: 0]
  ------------------
  425|      0|            insert(end(), OP_PUSHDATA2);
  426|      0|            value_type data[2];
  427|      0|            WriteLE16(data, size);
  428|      0|            insert(end(), std::cbegin(data), std::cend(data));
  429|      0|        } else {
  430|      0|            insert(end(), OP_PUSHDATA4);
  431|      0|            value_type data[4];
  432|      0|            WriteLE32(data, size);
  433|      0|            insert(end(), std::cbegin(data), std::cend(data));
  434|      0|        }
  435|  17.8k|    }
_ZN7CScript10AppendDataENSt3__14spanIKhLm18446744073709551615EEE:
  438|  17.8k|    {
  439|  17.8k|        insert(end(), data.begin(), data.end());
  440|  17.8k|    }
_ZN7CScript10push_int64El:
  444|  58.8k|    {
  445|  58.8k|        if (n == -1 || (n >= 1 && n <= 16))
  ------------------
  |  Branch (445:13): [True: 0, False: 58.8k]
  |  Branch (445:25): [True: 58.8k, False: 0]
  |  Branch (445:35): [True: 48.4k, False: 10.4k]
  ------------------
  446|  48.4k|        {
  447|  48.4k|            push_back(n + (OP_1 - 1));
  448|  48.4k|        }
  449|  10.4k|        else if (n == 0)
  ------------------
  |  Branch (449:18): [True: 0, False: 10.4k]
  ------------------
  450|      0|        {
  451|      0|            push_back(OP_0);
  452|      0|        }
  453|  10.4k|        else
  454|  10.4k|        {
  455|  10.4k|            *this << CScriptNum::serialize(n);
  456|  10.4k|        }
  457|  58.8k|        return *this;
  458|  58.8k|    }
_ZN7CScriptlsEl:
  477|  58.8k|    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
_ZN7CScriptlsE10opcodetype:
  480|   288k|    {
  481|   288k|        if (opcode < 0 || opcode > 0xff)
  ------------------
  |  Branch (481:13): [True: 0, False: 288k]
  |  Branch (481:27): [True: 0, False: 288k]
  ------------------
  482|      0|            throw std::runtime_error("CScript::operator<<(): invalid opcode");
  483|   288k|        insert(end(), (unsigned char)opcode);
  484|   288k|        return *this;
  485|   288k|    }
_ZN7CScriptlsENSt3__14spanIKSt4byteLm18446744073709551615EEE:
  494|  17.8k|    {
  495|  17.8k|        AppendDataSize(b.size());
  496|  17.8k|        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
  497|  17.8k|        return *this;
  498|  17.8k|    }
_ZN7CScriptlsENSt3__14spanIKhLm18446744073709551615EEE:
  502|  17.8k|    {
  503|  17.8k|        return *this << std::as_bytes(b);
  504|  17.8k|    }
_ZNK7CScript5GetOpERN9prevectorILj28EhjiE14const_iteratorER10opcodetypeRNSt3__16vectorIhNS6_9allocatorIhEEEE:
  507|  13.4M|    {
  508|  13.4M|        return GetScriptOp(pc, end(), opcodeRet, &vchRet);
  509|  13.4M|    }
_ZN7CScript10DecodeOP_NE10opcodetype:
  518|   317k|    {
  519|   317k|        if (opcode == OP_0)
  ------------------
  |  Branch (519:13): [True: 0, False: 317k]
  ------------------
  520|      0|            return 0;
  521|   317k|        assert(opcode >= OP_1 && opcode <= OP_16);
  522|   317k|        return (int)opcode - (int)(OP_1 - 1);
  523|   317k|    }
_ZN7CScriptC2Ev:
  461|   317k|    CScript() = default;
_ZN7CScript16SerializationOpsI10DataStreamS_17ActionUnserializeEEvRT0_RT_T1_:
  465|  4.30k|    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
  ------------------
  |  |  156|  4.30k|#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
  ------------------
_Z11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  617|  5.21k|{
  618|  5.21k|    CScript ret;
  619|  5.21k|    int cnt{0};
  620|       |
  621|  5.21k|    ([&ret, &cnt] (Ts&& input) {
  622|  5.21k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  5.21k|            if (cnt == 0) {
  625|  5.21k|                ret = std::forward<Ts>(input);
  626|  5.21k|            } else {
  627|  5.21k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  5.21k|            }
  629|  5.21k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.21k|            ret << input;
  632|  5.21k|        }
  633|  5.21k|        cnt++;
  634|  5.21k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  5.21k|    return ret;
  637|  5.21k|}
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESA_:
  621|  5.21k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  5.21k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.21k|            ret << input;
  632|  5.21k|        }
  633|  5.21k|        cnt++;
  634|  5.21k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESA_:
  621|  5.21k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  5.21k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.21k|            ret << input;
  632|  5.21k|        }
  633|  5.21k|        cnt++;
  634|  5.21k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS5_E_clESA_:
  621|  5.21k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  5.21k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.21k|            ret << input;
  632|  5.21k|        }
  633|  5.21k|        cnt++;
  634|  5.21k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_NSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESA_:
  621|  5.21k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  5.21k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.21k|            ret << input;
  632|  5.21k|        }
  633|  5.21k|        cnt++;
  634|  5.21k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_:
  617|  2.16k|{
  618|  2.16k|    CScript ret;
  619|  2.16k|    int cnt{0};
  620|       |
  621|  2.16k|    ([&ret, &cnt] (Ts&& input) {
  622|  2.16k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  2.16k|            if (cnt == 0) {
  625|  2.16k|                ret = std::forward<Ts>(input);
  626|  2.16k|            } else {
  627|  2.16k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  2.16k|            }
  629|  2.16k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  2.16k|            ret << input;
  632|  2.16k|        }
  633|  2.16k|        cnt++;
  634|  2.16k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  2.16k|    return ret;
  637|  2.16k|}
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlS1_E_clES1_:
  621|  2.16k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  2.16k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  2.16k|            ret << input;
  632|  2.16k|        }
  633|  2.16k|        cnt++;
  634|  2.16k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJRKj10opcodetypeEE7CScriptDpOT_ENKUlOS2_E_clES7_:
  621|  2.16k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  2.16k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  2.16k|            ret << input;
  632|  2.16k|        }
  633|  2.16k|        cnt++;
  634|  2.16k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_:
  617|    333|{
  618|    333|    CScript ret;
  619|    333|    int cnt{0};
  620|       |
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|    333|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    333|            if (cnt == 0) {
  625|    333|                ret = std::forward<Ts>(input);
  626|    333|            } else {
  627|    333|                ret.insert(ret.end(), input.begin(), input.end());
  628|    333|            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    333|    return ret;
  637|    333|}
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E2_clESC_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOiE_clESC_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E1_clESC_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E0_clESC_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlS7_E_clES7_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeiS0_S0_RKNSt3__16vectorIhNS1_9allocatorIhEEEES0_EE7CScriptDpOT_ENKUlOS0_E_clESC_:
  621|    333|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    333|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    333|            ret << input;
  632|    333|        }
  633|    333|        cnt++;
  634|    333|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_:
  617|  4.74k|{
  618|  4.74k|    CScript ret;
  619|  4.74k|    int cnt{0};
  620|       |
  621|  4.74k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.74k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.74k|            if (cnt == 0) {
  625|  4.74k|                ret = std::forward<Ts>(input);
  626|  4.74k|            } else {
  627|  4.74k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  4.74k|            }
  629|  4.74k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.74k|            ret << input;
  632|  4.74k|        }
  633|  4.74k|        cnt++;
  634|  4.74k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  4.74k|    return ret;
  637|  4.74k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|  4.74k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  4.74k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.74k|            ret << input;
  632|  4.74k|        }
  633|  4.74k|        cnt++;
  634|  4.74k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|  4.74k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.74k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.74k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 4.74k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  4.74k|            } else {
  627|  4.74k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  4.74k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  4.74k|        cnt++;
  634|  4.74k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|  4.74k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  4.74k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.74k|            ret << input;
  632|  4.74k|        }
  633|  4.74k|        cnt++;
  634|  4.74k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_:
  617|    861|{
  618|    861|    CScript ret;
  619|    861|    int cnt{0};
  620|       |
  621|    861|    ([&ret, &cnt] (Ts&& input) {
  622|    861|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    861|            if (cnt == 0) {
  625|    861|                ret = std::forward<Ts>(input);
  626|    861|            } else {
  627|    861|                ret.insert(ret.end(), input.begin(), input.end());
  628|    861|            }
  629|    861|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    861|            ret << input;
  632|    861|        }
  633|    861|        cnt++;
  634|    861|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    861|    return ret;
  637|    861|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlOS0_E_clES6_:
  621|    861|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    861|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    861|            ret << input;
  632|    861|        }
  633|    861|        cnt++;
  634|    861|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptEES1_DpOT_ENKUlS2_E_clES2_:
  621|    861|    ([&ret, &cnt] (Ts&& input) {
  622|    861|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    861|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 861]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|    861|            } else {
  627|    861|                ret.insert(ret.end(), input.begin(), input.end());
  628|    861|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|    861|        cnt++;
  634|    861|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_:
  617|   200k|{
  618|   200k|    CScript ret;
  619|   200k|    int cnt{0};
  620|       |
  621|   200k|    ([&ret, &cnt] (Ts&& input) {
  622|   200k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|   200k|            if (cnt == 0) {
  625|   200k|                ret = std::forward<Ts>(input);
  626|   200k|            } else {
  627|   200k|                ret.insert(ret.end(), input.begin(), input.end());
  628|   200k|            }
  629|   200k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|   200k|            ret << input;
  632|   200k|        }
  633|   200k|        cnt++;
  634|   200k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|   200k|    return ret;
  637|   200k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  621|   200k|    ([&ret, &cnt] (Ts&& input) {
  622|   200k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|   200k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 200k, False: 0]
  ------------------
  625|   200k|                ret = std::forward<Ts>(input);
  626|   200k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|   200k|        cnt++;
  634|   200k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  621|   200k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|   200k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|   200k|            ret << input;
  632|   200k|        }
  633|   200k|        cnt++;
  634|   200k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_:
  617|    230|{
  618|    230|    CScript ret;
  619|    230|    int cnt{0};
  620|       |
  621|    230|    ([&ret, &cnt] (Ts&& input) {
  622|    230|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    230|            if (cnt == 0) {
  625|    230|                ret = std::forward<Ts>(input);
  626|    230|            } else {
  627|    230|                ret.insert(ret.end(), input.begin(), input.end());
  628|    230|            }
  629|    230|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    230|            ret << input;
  632|    230|        }
  633|    230|        cnt++;
  634|    230|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    230|    return ret;
  637|    230|}
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  621|    230|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    230|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    230|            ret << input;
  632|    230|        }
  633|    230|        cnt++;
  634|    230|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|    230|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    230|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    230|            ret << input;
  632|    230|        }
  633|    230|        cnt++;
  634|    230|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|    230|    ([&ret, &cnt] (Ts&& input) {
  622|    230|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    230|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 230]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|    230|            } else {
  627|    230|                ret.insert(ret.end(), input.begin(), input.end());
  628|    230|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|    230|        cnt++;
  634|    230|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|    230|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    230|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    230|            ret << input;
  632|    230|        }
  633|    230|        cnt++;
  634|    230|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_:
  617|    206|{
  618|    206|    CScript ret;
  619|    206|    int cnt{0};
  620|       |
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|    206|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    206|            if (cnt == 0) {
  625|    206|                ret = std::forward<Ts>(input);
  626|    206|            } else {
  627|    206|                ret.insert(ret.end(), input.begin(), input.end());
  628|    206|            }
  629|    206|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    206|            ret << input;
  632|    206|        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    206|    return ret;
  637|    206|}
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E2_clES6_:
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    206|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    206|            ret << input;
  632|    206|        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    206|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    206|            ret << input;
  632|    206|        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    206|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    206|            ret << input;
  632|    206|        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|    206|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    206|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 206]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|    206|            } else {
  627|    206|                ret.insert(ret.end(), input.begin(), input.end());
  628|    206|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeS0_S0_R7CScriptS0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|    206|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    206|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    206|            ret << input;
  632|    206|        }
  633|    206|        cnt++;
  634|    206|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeEE7CScriptDpOT_:
  617|  19.1k|{
  618|  19.1k|    CScript ret;
  619|  19.1k|    int cnt{0};
  620|       |
  621|  19.1k|    ([&ret, &cnt] (Ts&& input) {
  622|  19.1k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  19.1k|            if (cnt == 0) {
  625|  19.1k|                ret = std::forward<Ts>(input);
  626|  19.1k|            } else {
  627|  19.1k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  19.1k|            }
  629|  19.1k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  19.1k|            ret << input;
  632|  19.1k|        }
  633|  19.1k|        cnt++;
  634|  19.1k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  19.1k|    return ret;
  637|  19.1k|}
_ZZ11BuildScriptIJ10opcodetypeEE7CScriptDpOT_ENKUlOS0_E_clES5_:
  621|  19.1k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  19.1k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  19.1k|            ret << input;
  632|  19.1k|        }
  633|  19.1k|        cnt++;
  634|  19.1k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_EES0_DpOT_:
  617|  6.68k|{
  618|  6.68k|    CScript ret;
  619|  6.68k|    int cnt{0};
  620|       |
  621|  6.68k|    ([&ret, &cnt] (Ts&& input) {
  622|  6.68k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  6.68k|            if (cnt == 0) {
  625|  6.68k|                ret = std::forward<Ts>(input);
  626|  6.68k|            } else {
  627|  6.68k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  6.68k|            }
  629|  6.68k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  6.68k|            ret << input;
  632|  6.68k|        }
  633|  6.68k|        cnt++;
  634|  6.68k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  6.68k|    return ret;
  637|  6.68k|}
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlOS0_E_clES5_:
  621|  6.68k|    ([&ret, &cnt] (Ts&& input) {
  622|  6.68k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  6.68k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 6.68k, False: 0]
  ------------------
  625|  6.68k|                ret = std::forward<Ts>(input);
  626|  6.68k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  6.68k|        cnt++;
  634|  6.68k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_EES0_DpOT_ENKUlS1_E_clES1_:
  621|  6.68k|    ([&ret, &cnt] (Ts&& input) {
  622|  6.68k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  6.68k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 6.68k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  6.68k|            } else {
  627|  6.68k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  6.68k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  6.68k|        cnt++;
  634|  6.68k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_:
  617|  5.60k|{
  618|  5.60k|    CScript ret;
  619|  5.60k|    int cnt{0};
  620|       |
  621|  5.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  5.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  5.60k|            if (cnt == 0) {
  625|  5.60k|                ret = std::forward<Ts>(input);
  626|  5.60k|            } else {
  627|  5.60k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  5.60k|            }
  629|  5.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.60k|            ret << input;
  632|  5.60k|        }
  633|  5.60k|        cnt++;
  634|  5.60k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  5.60k|    return ret;
  637|  5.60k|}
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS0_E_clES6_:
  621|  5.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  5.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  5.60k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 5.60k, False: 0]
  ------------------
  625|  5.60k|                ret = std::forward<Ts>(input);
  626|  5.60k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  5.60k|        cnt++;
  634|  5.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlS1_E_clES1_:
  621|  5.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  5.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  5.60k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 5.60k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  5.60k|            } else {
  627|  5.60k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  5.60k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  5.60k|        cnt++;
  634|  5.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRS0_10opcodetypeEES0_DpOT_ENKUlOS2_E_clES6_:
  621|  5.60k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  5.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  5.60k|            ret << input;
  632|  5.60k|        }
  633|  5.60k|        cnt++;
  634|  5.60k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_:
  617|  1.62k|{
  618|  1.62k|    CScript ret;
  619|  1.62k|    int cnt{0};
  620|       |
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  625|  1.62k|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|  1.62k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.62k|            }
  629|  1.62k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.62k|            ret << input;
  632|  1.62k|        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.62k|    return ret;
  637|  1.62k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1.62k, False: 0]
  ------------------
  625|  1.62k|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.62k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.62k|            ret << input;
  632|  1.62k|        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.62k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.62k|            ret << input;
  632|  1.62k|        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.62k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.62k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.62k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.62k|            } else {
  627|  1.62k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.62k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeS1_RS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  621|  1.62k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.62k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.62k|            ret << input;
  632|  1.62k|        }
  633|  1.62k|        cnt++;
  634|  1.62k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_:
  617|  1.02k|{
  618|  1.02k|    CScript ret;
  619|  1.02k|    int cnt{0};
  620|       |
  621|  1.02k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.02k|            if (cnt == 0) {
  625|  1.02k|                ret = std::forward<Ts>(input);
  626|  1.02k|            } else {
  627|  1.02k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.02k|            }
  629|  1.02k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.02k|            ret << input;
  632|  1.02k|        }
  633|  1.02k|        cnt++;
  634|  1.02k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.02k|    return ret;
  637|  1.02k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  621|  1.02k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.02k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1.02k, False: 0]
  ------------------
  625|  1.02k|                ret = std::forward<Ts>(input);
  626|  1.02k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.02k|        cnt++;
  634|  1.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  621|  1.02k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.02k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.02k|            ret << input;
  632|  1.02k|        }
  633|  1.02k|        cnt++;
  634|  1.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  621|  1.02k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.02k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.02k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.02k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.02k|            } else {
  627|  1.02k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.02k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.02k|        cnt++;
  634|  1.02k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  621|  1.02k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.02k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.02k|            ret << input;
  632|  1.02k|        }
  633|  1.02k|        cnt++;
  634|  1.02k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_:
  617|  1.60k|{
  618|  1.60k|    CScript ret;
  619|  1.60k|    int cnt{0};
  620|       |
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.60k|            if (cnt == 0) {
  625|  1.60k|                ret = std::forward<Ts>(input);
  626|  1.60k|            } else {
  627|  1.60k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.60k|            }
  629|  1.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.60k|            ret << input;
  632|  1.60k|        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.60k|    return ret;
  637|  1.60k|}
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E1_clES6_:
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.60k|            ret << input;
  632|  1.60k|        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E0_clES2_:
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.60k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.60k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.60k|            } else {
  627|  1.60k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.60k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E0_clES6_:
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.60k|            ret << input;
  632|  1.60k|        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlS2_E_clES2_:
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.60k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.60k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 1.60k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  1.60k|            } else {
  627|  1.60k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.60k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ10opcodetypeR7CScriptS0_S2_S0_EES1_DpOT_ENKUlOS0_E_clES6_:
  621|  1.60k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.60k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.60k|            ret << input;
  632|  1.60k|        }
  633|  1.60k|        cnt++;
  634|  1.60k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_:
  617|  4.89k|{
  618|  4.89k|    CScript ret;
  619|  4.89k|    int cnt{0};
  620|       |
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.89k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.89k|            if (cnt == 0) {
  625|  4.89k|                ret = std::forward<Ts>(input);
  626|  4.89k|            } else {
  627|  4.89k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  4.89k|            }
  629|  4.89k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.89k|            ret << input;
  632|  4.89k|        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  4.89k|    return ret;
  637|  4.89k|}
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS0_E_clES6_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.89k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.89k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 4.89k, False: 0]
  ------------------
  625|  4.89k|                ret = std::forward<Ts>(input);
  626|  4.89k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E1_clES6_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  4.89k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.89k|            ret << input;
  632|  4.89k|        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E0_clES2_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.89k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.89k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 4.89k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  4.89k|            } else {
  627|  4.89k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  4.89k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E0_clES6_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  4.89k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.89k|            ret << input;
  632|  4.89k|        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlS2_E_clES2_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|  4.89k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  4.89k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 0, False: 4.89k]
  ------------------
  625|      0|                ret = std::forward<Ts>(input);
  626|  4.89k|            } else {
  627|  4.89k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  4.89k|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScript10opcodetypeRS0_S1_S2_S1_EES0_DpOT_ENKUlOS1_E_clES6_:
  621|  4.89k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  4.89k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  4.89k|            ret << input;
  632|  4.89k|        }
  633|  4.89k|        cnt++;
  634|  4.89k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKjEE7CScriptDpOT_:
  617|    261|{
  618|    261|    CScript ret;
  619|    261|    int cnt{0};
  620|       |
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|    261|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    261|            if (cnt == 0) {
  625|    261|                ret = std::forward<Ts>(input);
  626|    261|            } else {
  627|    261|                ret.insert(ret.end(), input.begin(), input.end());
  628|    261|            }
  629|    261|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    261|            ret << input;
  632|    261|        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    261|    return ret;
  637|    261|}
_ZZ11BuildScriptIJRKjEE7CScriptDpOT_ENKUlS1_E_clES1_:
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    261|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    261|            ret << input;
  632|    261|        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_:
  617|    261|{
  618|    261|    CScript ret;
  619|    261|    int cnt{0};
  620|       |
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|    261|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    261|            if (cnt == 0) {
  625|    261|                ret = std::forward<Ts>(input);
  626|    261|            } else {
  627|    261|                ret.insert(ret.end(), input.begin(), input.end());
  628|    261|            }
  629|    261|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    261|            ret << input;
  632|    261|        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    261|    return ret;
  637|    261|}
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS0_E_clES5_:
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|    261|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    261|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 261, False: 0]
  ------------------
  625|    261|                ret = std::forward<Ts>(input);
  626|    261|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOmE_clES5_:
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    261|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    261|            ret << input;
  632|    261|        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptm10opcodetypeEES0_DpOT_ENKUlOS1_E_clES5_:
  621|    261|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    261|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    261|            ret << input;
  632|    261|        }
  633|    261|        cnt++;
  634|    261|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_:
  617|  6.08k|{
  618|  6.08k|    CScript ret;
  619|  6.08k|    int cnt{0};
  620|       |
  621|  6.08k|    ([&ret, &cnt] (Ts&& input) {
  622|  6.08k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  6.08k|            if (cnt == 0) {
  625|  6.08k|                ret = std::forward<Ts>(input);
  626|  6.08k|            } else {
  627|  6.08k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  6.08k|            }
  629|  6.08k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  6.08k|            ret << input;
  632|  6.08k|        }
  633|  6.08k|        cnt++;
  634|  6.08k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  6.08k|    return ret;
  637|  6.08k|}
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS0_E_clES7_:
  621|  6.08k|    ([&ret, &cnt] (Ts&& input) {
  622|  6.08k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  6.08k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 6.08k, False: 0]
  ------------------
  625|  6.08k|                ret = std::forward<Ts>(input);
  626|  6.08k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  6.08k|        cnt++;
  634|  6.08k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlS2_E_clES2_:
  621|  6.08k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  6.08k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  6.08k|            ret << input;
  632|  6.08k|        }
  633|  6.08k|        cnt++;
  634|  6.08k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKj10opcodetypeEES0_DpOT_ENKUlOS3_E_clES7_:
  621|  6.08k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  6.08k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  6.08k|            ret << input;
  632|  6.08k|        }
  633|  6.08k|        cnt++;
  634|  6.08k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_:
  617|    361|{
  618|    361|    CScript ret;
  619|    361|    int cnt{0};
  620|       |
  621|    361|    ([&ret, &cnt] (Ts&& input) {
  622|    361|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    361|            if (cnt == 0) {
  625|    361|                ret = std::forward<Ts>(input);
  626|    361|            } else {
  627|    361|                ret.insert(ret.end(), input.begin(), input.end());
  628|    361|            }
  629|    361|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    361|            ret << input;
  632|    361|        }
  633|    361|        cnt++;
  634|    361|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    361|    return ret;
  637|    361|}
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEEEE7CScriptDpOT_ENKUlS6_E_clES6_:
  621|    361|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    361|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    361|            ret << input;
  632|    361|        }
  633|    361|        cnt++;
  634|    361|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_:
  617|  1.54k|{
  618|  1.54k|    CScript ret;
  619|  1.54k|    int cnt{0};
  620|       |
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.54k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.54k|            if (cnt == 0) {
  625|  1.54k|                ret = std::forward<Ts>(input);
  626|  1.54k|            } else {
  627|  1.54k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  1.54k|            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  1.54k|    return ret;
  637|  1.54k|}
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlOS0_E_clESB_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|  1.54k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  1.54k|            if (cnt == 0) {
  ------------------
  |  Branch (624:17): [True: 1.54k, False: 0]
  ------------------
  625|  1.54k|                ret = std::forward<Ts>(input);
  626|  1.54k|            } else {
  627|      0|                ret.insert(ret.end(), input.begin(), input.end());
  628|      0|            }
  629|       |        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|       |            ret << input;
  632|       |        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJ7CScriptRKNSt3__16vectorIhNS1_9allocatorIhEEEEEES0_DpOT_ENKUlS7_E_clES7_:
  621|  1.54k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  1.54k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  1.54k|            ret << input;
  632|  1.54k|        }
  633|  1.54k|        cnt++;
  634|  1.54k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_:
  617|     21|{
  618|     21|    CScript ret;
  619|     21|    int cnt{0};
  620|       |
  621|     21|    ([&ret, &cnt] (Ts&& input) {
  622|     21|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|     21|            if (cnt == 0) {
  625|     21|                ret = std::forward<Ts>(input);
  626|     21|            } else {
  627|     21|                ret.insert(ret.end(), input.begin(), input.end());
  628|     21|            }
  629|     21|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     21|            ret << input;
  632|     21|        }
  633|     21|        cnt++;
  634|     21|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|     21|    return ret;
  637|     21|}
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlS6_E_clES6_:
  621|     21|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     21|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     21|            ret << input;
  632|     21|        }
  633|     21|        cnt++;
  634|     21|    } (std::forward<Ts>(inputs)), ...);
_ZZ11BuildScriptIJRKNSt3__16vectorIhNS0_9allocatorIhEEEE10opcodetypeEE7CScriptDpOT_ENKUlOS7_E_clESC_:
  621|     21|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|     21|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|     21|            ret << input;
  632|     21|        }
  633|     21|        cnt++;
  634|     21|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRjEE7CScriptDpOT_:
  617|  49.0k|{
  618|  49.0k|    CScript ret;
  619|  49.0k|    int cnt{0};
  620|       |
  621|  49.0k|    ([&ret, &cnt] (Ts&& input) {
  622|  49.0k|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|  49.0k|            if (cnt == 0) {
  625|  49.0k|                ret = std::forward<Ts>(input);
  626|  49.0k|            } else {
  627|  49.0k|                ret.insert(ret.end(), input.begin(), input.end());
  628|  49.0k|            }
  629|  49.0k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  49.0k|            ret << input;
  632|  49.0k|        }
  633|  49.0k|        cnt++;
  634|  49.0k|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|  49.0k|    return ret;
  637|  49.0k|}
_ZZ11BuildScriptIJRjEE7CScriptDpOT_ENKUlS0_E_clES0_:
  621|  49.0k|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|  49.0k|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|  49.0k|            ret << input;
  632|  49.0k|        }
  633|  49.0k|        cnt++;
  634|  49.0k|    } (std::forward<Ts>(inputs)), ...);
_Z11BuildScriptIJRmEE7CScriptDpOT_:
  617|    702|{
  618|    702|    CScript ret;
  619|    702|    int cnt{0};
  620|       |
  621|    702|    ([&ret, &cnt] (Ts&& input) {
  622|    702|        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|    702|            if (cnt == 0) {
  625|    702|                ret = std::forward<Ts>(input);
  626|    702|            } else {
  627|    702|                ret.insert(ret.end(), input.begin(), input.end());
  628|    702|            }
  629|    702|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    702|            ret << input;
  632|    702|        }
  633|    702|        cnt++;
  634|    702|    } (std::forward<Ts>(inputs)), ...);
  635|       |
  636|    702|    return ret;
  637|    702|}
_ZZ11BuildScriptIJRmEE7CScriptDpOT_ENKUlS0_E_clES0_:
  621|    702|    ([&ret, &cnt] (Ts&& input) {
  622|       |        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
  623|       |            // If it is a CScript, extend ret with it. Move or copy the first element instead.
  624|       |            if (cnt == 0) {
  625|       |                ret = std::forward<Ts>(input);
  626|       |            } else {
  627|       |                ret.insert(ret.end(), input.begin(), input.end());
  628|       |            }
  629|    702|        } else {
  630|       |            // Otherwise invoke CScript::operator<<.
  631|    702|            ret << input;
  632|    702|        }
  633|    702|        cnt++;
  634|    702|    } (std::forward<Ts>(inputs)), ...);

_Z12IsPushdataOp10opcodetype:
   41|  12.7M|{
   42|  12.7M|    return opcode > OP_FALSE && opcode <= OP_PUSHDATA4;
  ------------------
  |  Branch (42:12): [True: 4.23M, False: 8.50M]
  |  Branch (42:33): [True: 87.9k, False: 4.15M]
  ------------------
   43|  12.7M|}

_Z20GetSizeOfCompactSizem:
  298|  14.4M|{
  299|  14.4M|    if (nSize < 253)             return sizeof(unsigned char);
  ------------------
  |  Branch (299:9): [True: 0, False: 14.4M]
  ------------------
  300|  14.4M|    else if (nSize <= std::numeric_limits<uint16_t>::max()) return sizeof(unsigned char) + sizeof(uint16_t);
  ------------------
  |  Branch (300:14): [True: 0, False: 14.4M]
  ------------------
  301|  14.4M|    else if (nSize <= std::numeric_limits<unsigned int>::max())  return sizeof(unsigned char) + sizeof(unsigned int);
  ------------------
  |  Branch (301:14): [True: 14.4M, False: 0]
  ------------------
  302|      0|    else                         return sizeof(unsigned char) + sizeof(uint64_t);
  303|  14.4M|}
_Z6AsBaseI9prevectorILj28EhjiE7CScriptERT_RT0_:
  145|  4.30k|{
  146|  4.30k|    static_assert(std::is_base_of_v<Out, In>);
  147|  4.30k|    return x;
  148|  4.30k|}
_Z14ser_readdata32I10DataStreamEjRT_:
  102|    190|{
  103|    190|    uint32_t obj;
  104|    190|    s.read(AsWritableBytes(Span{&obj, 1}));
  105|    190|    return le32toh_internal(obj);
  106|    190|}
_Z15ReadCompactSizeI10DataStreamEmRT_b:
  340|  4.30k|{
  341|  4.30k|    uint8_t chSize = ser_readdata8(is);
  342|  4.30k|    uint64_t nSizeRet = 0;
  343|  4.30k|    if (chSize < 253)
  ------------------
  |  Branch (343:9): [True: 2.92k, False: 1.38k]
  ------------------
  344|  2.92k|    {
  345|  2.92k|        nSizeRet = chSize;
  346|  2.92k|    }
  347|  1.38k|    else if (chSize == 253)
  ------------------
  |  Branch (347:14): [True: 1.09k, False: 293]
  ------------------
  348|  1.09k|    {
  349|  1.09k|        nSizeRet = ser_readdata16(is);
  350|  1.09k|        if (nSizeRet < 253)
  ------------------
  |  Branch (350:13): [True: 8, False: 1.08k]
  ------------------
  351|      8|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  352|  1.09k|    }
  353|    293|    else if (chSize == 254)
  ------------------
  |  Branch (353:14): [True: 190, False: 103]
  ------------------
  354|    190|    {
  355|    190|        nSizeRet = ser_readdata32(is);
  356|    190|        if (nSizeRet < 0x10000u)
  ------------------
  |  Branch (356:13): [True: 20, False: 170]
  ------------------
  357|     20|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  358|    190|    }
  359|    103|    else
  360|    103|    {
  361|    103|        nSizeRet = ser_readdata64(is);
  362|    103|        if (nSizeRet < 0x100000000ULL)
  ------------------
  |  Branch (362:13): [True: 38, False: 65]
  ------------------
  363|     38|            throw std::ios_base::failure("non-canonical ReadCompactSize()");
  364|    103|    }
  365|  4.24k|    if (range_check && nSizeRet > MAX_SIZE) {
  ------------------
  |  Branch (365:9): [True: 4.22k, False: 14]
  |  Branch (365:24): [True: 72, False: 4.15k]
  ------------------
  366|     72|        throw std::ios_base::failure("ReadCompactSize(): size too large");
  367|     72|    }
  368|  4.16k|    return nSizeRet;
  369|  4.24k|}
_Z13ser_readdata8I10DataStreamEhRT_:
   84|  4.30k|{
   85|  4.30k|    uint8_t obj;
   86|  4.30k|    s.read(AsWritableBytes(Span{&obj, 1}));
   87|  4.30k|    return obj;
   88|  4.30k|}
_Z14ser_readdata16I10DataStreamEtRT_:
   90|  1.09k|{
   91|  1.09k|    uint16_t obj;
   92|  1.09k|    s.read(AsWritableBytes(Span{&obj, 1}));
   93|  1.09k|    return le16toh_internal(obj);
   94|  1.09k|}
_Z14ser_readdata64I10DataStreamEmRT_:
  114|     92|{
  115|     92|    uint64_t obj;
  116|     92|    s.read(AsWritableBytes(Span{&obj, 1}));
  117|     92|    return le64toh_internal(obj);
  118|     92|}
_Z11UnserializeI10DataStreamR7CScriptQ14UnserializableIT0_T_EEvRS4_OS3_:
  762|  4.30k|{
  763|  4.30k|    a.Unserialize(is);
  764|  4.30k|}
_ZN7CScript11UnserializeI10DataStreamEEvRT_:
  228|  4.30k|    {                                                                                               \
  229|  4.30k|        static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch");     \
  230|  4.30k|        Unser(s, *this);                                                                            \
  231|  4.30k|    }
_ZN7CScript5UnserI10DataStreamEEvRT_RS_:
  180|  4.30k|    static void Unser(Stream& s, cls& obj) { SerializationOps(obj, s, ActionUnserialize{}); } \
_ZN17ActionUnserialize16SerReadWriteManyI10DataStreamJR9prevectorILj28EhjiEEEEvRT_DpOT0_:
 1033|  4.30k|    {
 1034|  4.30k|        ::UnserializeMany(s, args...);
 1035|  4.30k|    }
_Z15UnserializeManyI10DataStreamJR9prevectorILj28EhjiEEEvRT_DpOT0_:
 1001|  4.30k|{
 1002|  4.30k|    (::Unserialize(s, args), ...);
 1003|  4.30k|}
_Z11UnserializeI10DataStreamLj28EhEvRT_R9prevectorIXT0_ET1_jiE:
  823|  4.30k|{
  824|  4.30k|    if constexpr (BasicByte<T>) { // Use optimized version for unformatted basic bytes
  825|       |        // Limit size per read so bogus size value won't cause out of memory
  826|  4.30k|        v.clear();
  827|  4.30k|        unsigned int nSize = ReadCompactSize(is);
  828|  4.30k|        unsigned int i = 0;
  829|  8.44k|        while (i < nSize) {
  ------------------
  |  Branch (829:16): [True: 4.13k, False: 4.30k]
  ------------------
  830|  4.13k|            unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
  831|  4.13k|            v.resize_uninitialized(i + blk);
  832|  4.13k|            is.read(AsWritableBytes(Span{&v[i], blk}));
  833|  4.13k|            i += blk;
  834|  4.13k|        }
  835|       |    } else {
  836|       |        Unserialize(is, Using<VectorFormatter<DefaultFormatter>>(v));
  837|       |    }
  838|  4.30k|}

_ZNK4SpanIKSt4byteE4sizeEv:
  187|  4.30k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKSt4byteE4dataEv:
  174|  8.61k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIhE4dataEv:
  174|  8.44k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE4dataEv:
  174|  4.30k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanISt4byteE4sizeEv:
  187|  29.2k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanISt4byteE4dataEv:
  174|  9.65k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIKhE10size_bytesEv:
  188|  4.30k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_Z7AsBytesIKhE4SpanIKSt4byteES1_IT_E:
  259|  4.30k|{
  260|  4.30k|    return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  261|  4.30k|}
_ZN4SpanIKhEC2INSt3__16vectorIhNS3_9allocatorIhEEEEEERKT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalISA_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISA_EE4sizeEEmEE5valueEDnE4typeE:
  172|  4.30k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanIKSt4byteEC2IS1_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S1_EE5valueEiE4typeELi0EEEPS6_m:
  119|  4.30k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanIjE4dataEv:
  174|    190|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanIjE10size_bytesEv:
  188|    190|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZNK4SpanIhE10size_bytesEv:
  188|  8.44k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZNK4SpanItE4dataEv:
  174|  1.09k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanItE10size_bytesEv:
  188|  1.09k|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZNK4SpanImE4dataEv:
  174|     92|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanImE10size_bytesEv:
  188|     92|    constexpr std::size_t size_bytes() const noexcept { return sizeof(C) * m_size; }
_ZN4SpanISt4byteEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|  9.81k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIhE4SpanISt4byteES0_IT_E:
  264|  8.44k|{
  265|  8.44k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|  8.44k|}
_ZN4SpanIhEC2IhTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_hEE5valueEiE4typeELi0EEEPS4_m:
  119|  8.44k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesItE4SpanISt4byteES0_IT_E:
  264|  1.09k|{
  265|  1.09k|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|  1.09k|}
_ZN4SpanItEC2ItTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_tEE5valueEiE4typeELi0EEEPS4_m:
  119|  1.09k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesIjE4SpanISt4byteES0_IT_E:
  264|    190|{
  265|    190|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|    190|}
_ZN4SpanIjEC2IjTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_jEE5valueEiE4typeELi0EEEPS4_m:
  119|    190|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_Z15AsWritableBytesImE4SpanISt4byteES0_IT_E:
  264|     92|{
  265|     92|    return {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()};
  266|     92|}
_ZN4SpanImEC2ImTnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_mEE5valueEiE4typeELi0EEEPS4_m:
  119|     92|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
_ZNK4SpanI7CScriptEixEm:
  191|   257k|    {
  192|   257k|        ASSERT_IF_DEBUG(size() > pos);
  193|   257k|        return m_data[pos];
  194|   257k|    }
_ZNK4SpanI7CScriptE4sizeEv:
  187|  9.16k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZN4SpanI7CScriptEC2INSt3__16vectorIS0_NS3_9allocatorIS0_EEEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS8_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS9_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS9_EE4sizeEEmEE5valueEDnE4typeE:
  165|   258k|        : m_data(other.data()), m_size(other.size()){}
_ZNK4SpanI7CScriptE4lastEm:
  211|   258k|    {
  212|   258k|         ASSERT_IF_DEBUG(size() >= count);
  213|   258k|         return Span<C>(m_data + m_size - count, count);
  214|   258k|    }
_ZN4SpanI7CScriptEC2IS0_TnNSt3__19enable_ifIXsr3std14is_convertibleIPA_T_PA_S0_EE5valueEiE4typeELi0EEEPS5_m:
  119|   258k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}
miniscript.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIN12_GLOBAL__N_119ScriptParserContext3KeyEZNK10miniscript4NodeIS5_E17DuplicateKeyCheckIS4_EEvRKT_E4CompNS0_9allocatorIS5_EEEEEEE5beginEv:
  175|   713k|    constexpr C* begin() const noexcept { return m_data; }
miniscript.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIN12_GLOBAL__N_119ScriptParserContext3KeyEZNK10miniscript4NodeIS5_E17DuplicateKeyCheckIS4_EEvRKT_E4CompNS0_9allocatorIS5_EEEEEEE3endEv:
  176|   713k|    constexpr C* end() const noexcept { return m_data + m_size; }
miniscript.cpp:_ZN4SpanINSt3__18optionalINS0_3setIN12_GLOBAL__N_119ScriptParserContext3KeyEZNK10miniscript4NodeIS5_E17DuplicateKeyCheckIS4_EEvRKT_E4CompNS0_9allocatorIS5_EEEEEEEC2INS0_6vectorISH_NSE_ISH_EEEEEERSA_NS0_9enable_ifIXaaaantsr7is_SpanISA_EE5valuesr3std14is_convertibleIPA_NS0_14remove_pointerIDTcldtclsr3stdE7declvalISN_EE4dataEEE4typeEPA_SH_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISN_EE4sizeEEmEE5valueEDnE4typeE:
  165|   361k|        : m_data(other.data()), m_size(other.size()){}
miniscript.cpp:_ZNK4SpanINSt3__18optionalINS0_3setIN12_GLOBAL__N_119ScriptParserContext3KeyEZNK10miniscript4NodeIS5_E17DuplicateKeyCheckIS4_EEvRKT_E4CompNS0_9allocatorIS5_EEEEEEE4lastEm:
  211|   361k|    {
  212|   361k|         ASSERT_IF_DEBUG(size() >= count);
  213|   361k|         return Span<C>(m_data + m_size - count, count);
  214|   361k|    }
miniscript.cpp:_ZN4SpanINSt3__18optionalINS0_3setIN12_GLOBAL__N_119ScriptParserContext3KeyEZNK10miniscript4NodeIS5_E17DuplicateKeyCheckIS4_EEvRKT_E4CompNS0_9allocatorIS5_EEEEEEEC2ISH_TnNS0_9enable_ifIXsr3std14is_convertibleIPA_SA_PA_SH_EE5valueEiE4typeELi0EEEPSA_m:
  119|   361k|    constexpr Span(T* begin, std::size_t size) noexcept : m_data(begin), m_size(size) {}

_ZN10DataStreamC2E4SpanIKhE:
  165|  4.30k|    explicit DataStream(Span<const uint8_t> sp) : DataStream{AsBytes(sp)} {}
_ZN10DataStreamC2E4SpanIKSt4byteE:
  166|  4.30k|    explicit DataStream(Span<const value_type> sp) : vch(sp.data(), sp.data() + sp.size()) {}
_ZN10DataStream4readE4SpanISt4byteE:
  219|  9.81k|    {
  220|  9.81k|        if (dst.size() == 0) return;
  ------------------
  |  Branch (220:13): [True: 0, False: 9.81k]
  ------------------
  221|       |
  222|       |        // Read from the beginning of the buffer
  223|  9.81k|        auto next_read_pos{CheckedAdd(m_read_pos, dst.size())};
  224|  9.81k|        if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
  ------------------
  |  Branch (224:13): [True: 0, False: 9.81k]
  |  Branch (224:43): [True: 160, False: 9.65k]
  ------------------
  225|    160|            throw std::ios_base::failure("DataStream::read(): end of data");
  226|    160|        }
  227|  9.65k|        memcpy(dst.data(), &vch[m_read_pos], dst.size());
  228|  9.65k|        if (next_read_pos.value() == vch.size()) {
  ------------------
  |  Branch (228:13): [True: 3.40k, False: 6.25k]
  ------------------
  229|  3.40k|            m_read_pos = 0;
  230|  3.40k|            vch.clear();
  231|  3.40k|            return;
  232|  3.40k|        }
  233|  6.25k|        m_read_pos = next_read_pos.value();
  234|  6.25k|    }
_ZN10DataStreamrsIR7CScriptEERS_OT_:
  266|  4.30k|    {
  267|  4.30k|        ::Unserialize(*this, obj);
  268|  4.30k|        return (*this);
  269|  4.30k|    }

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

_Z14memory_cleansePvm:
   15|  4.29k|{
   16|       |#if defined(WIN32)
   17|       |    /* SecureZeroMemory is guaranteed not to be optimized out. */
   18|       |    SecureZeroMemory(ptr, len);
   19|       |#else
   20|  4.29k|    std::memset(ptr, 0, len);
   21|       |
   22|       |    /* Memory barrier that scares the compiler away from optimizing out the memset.
   23|       |     *
   24|       |     * Quoting Adam Langley <agl@google.com> in commit ad1907fe73334d6c696c8539646c21b11178f20f
   25|       |     * in BoringSSL (ISC License):
   26|       |     *    As best as we can tell, this is sufficient to break any optimisations that
   27|       |     *    might try to eliminate "superfluous" memsets.
   28|       |     * This method is used in memzero_explicit() the Linux kernel, too. Its advantage is that it
   29|       |     * is pretty efficient because the compiler can still implement the memset() efficiently,
   30|       |     * just not remove it entirely. See "Dead Store Elimination (Still) Considered Harmful" by
   31|       |     * Yang et al. (USENIX Security 2017) for more background.
   32|       |     */
   33|  4.29k|    __asm__ __volatile__("" : : "r"(ptr) : "memory");
   34|  4.29k|#endif
   35|  4.29k|}

_ZN18FuzzedDataProviderC2EPKhm:
   37|  4.30k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  4.00k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  4.00k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  4.00k|                                std::numeric_limits<T>::max());
  198|  4.00k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  4.00k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  4.00k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  4.00k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  4.00k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 4.00k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  4.00k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  4.00k|  uint64_t result = 0;
  215|  4.00k|  size_t offset = 0;
  216|       |
  217|  4.42k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 4.00k, False: 414]
  |  Branch (217:43): [True: 4.00k, False: 0]
  ------------------
  218|  4.42k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 414, False: 3.59k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|    414|    --remaining_bytes_;
  226|    414|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|    414|    offset += CHAR_BIT;
  228|    414|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  4.00k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 4.00k, False: 0]
  ------------------
  232|  4.00k|    result = result % (range + 1);
  233|       |
  234|  4.00k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  4.00k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  4.30k|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.30k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  4.30k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|  45.6M|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 45.6M, False: 3.83k]
  |  Branch (164:40): [True: 45.6M, False: 31]
  ------------------
  165|  45.6M|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|  45.6M|    Advance(1);
  167|  45.6M|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 3.07k, False: 45.6M]
  |  Branch (167:25): [True: 3.07k, False: 2]
  ------------------
  168|  3.07k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  3.07k|      Advance(1);
  170|  3.07k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 440, False: 2.63k]
  ------------------
  171|    440|        break;
  172|  3.07k|    }
  173|  45.6M|    result += next;
  174|  45.6M|  }
  175|       |
  176|  4.30k|  result.shrink_to_fit();
  177|  4.30k|  return result;
  178|  4.30k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEv:
  181|  4.30k|inline std::string FuzzedDataProvider::ConsumeRandomLengthString() {
  182|  4.30k|  return ConsumeRandomLengthString(remaining_bytes_);
  183|  4.30k|}
_ZN18FuzzedDataProvider11ConsumeBoolEv:
  289|  4.00k|inline bool FuzzedDataProvider::ConsumeBool() {
  290|  4.00k|  return 1 & ConsumeIntegral<uint8_t>();
  291|  4.00k|}
_ZN18FuzzedDataProvider7AdvanceEm:
  344|  45.6M|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  345|  45.6M|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (345:7): [True: 0, False: 45.6M]
  ------------------
  346|      0|    abort();
  347|       |
  348|  45.6M|  data_ptr_ += num_bytes;
  349|  45.6M|  remaining_bytes_ -= num_bytes;
  350|  45.6M|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  379|  45.6M|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  380|  45.6M|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  381|  45.6M|  static_assert(!std::numeric_limits<TU>::is_signed,
  382|  45.6M|                "Source type must be unsigned.");
  383|       |
  384|       |  // TODO(Dor1s): change to `if constexpr` once C++17 becomes mainstream.
  385|  45.6M|  if (std::numeric_limits<TS>::is_modulo)
  ------------------
  |  Branch (385:7): [Folded - Ignored]
  ------------------
  386|      0|    return static_cast<TS>(value);
  387|       |
  388|       |  // Avoid using implementation-defined unsigned to signed conversions.
  389|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  390|  45.6M|  if (value <= std::numeric_limits<TS>::max()) {
  ------------------
  |  Branch (390:7): [True: 40.1M, False: 5.52M]
  ------------------
  391|  40.1M|    return static_cast<TS>(value);
  392|  40.1M|  } else {
  393|  5.52M|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  394|  5.52M|    return TS_min + static_cast<TS>(value - TS_min);
  395|  5.52M|  }
  396|  45.6M|}

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

_Z29miniscript_script_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
 1257|  4.30k|{
 1258|  4.30k|    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
 1259|  4.30k|    const std::optional<CScript> script = ConsumeDeserializable<CScript>(fuzzed_data_provider);
 1260|  4.30k|    if (!script) return;
  ------------------
  |  Branch (1260:9): [True: 298, False: 4.00k]
  ------------------
 1261|       |
 1262|  4.00k|    const ScriptParserContext script_parser_ctx{(MsCtx)fuzzed_data_provider.ConsumeBool()};
 1263|  4.00k|    const auto ms = miniscript::FromScript(*script, script_parser_ctx);
 1264|  4.00k|    if (!ms) return;
  ------------------
  |  Branch (1264:9): [True: 2.78k, False: 1.22k]
  ------------------
 1265|       |
 1266|  1.22k|    assert(ms->ToScript(script_parser_ctx) == *script);
 1267|  1.22k|}
miniscript.cpp:_ZN12_GLOBAL__N_119ScriptParserContextC2EN10miniscript17MiniscriptContextE:
  192|  4.00k|    constexpr ScriptParserContext(MsCtx ctx) noexcept : script_ctx(ctx) {}
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext9MsContextEv:
  235|  5.03M|    MsCtx MsContext() const {
  236|  5.03M|        return script_ctx;
  237|  5.03M|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext11FromPKBytesINSt3__111__wrap_iterIPhEEEENS2_8optionalINS0_3KeyEEET_S9_:
  219|  6.11k|    {
  220|  6.11k|        Key key;
  221|  6.11k|        key.data.assign(first, last);
  222|  6.11k|        key.is_hash = false;
  223|  6.11k|        return key;
  224|  6.11k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext12FromPKHBytesINSt3__111__wrap_iterIPhEEEENS2_8optionalINS0_3KeyEEET_S9_:
  228|  10.6k|    {
  229|  10.6k|        Key key;
  230|  10.6k|        key.data.assign(first, last);
  231|  10.6k|        key.is_hash = true;
  232|  10.6k|        return key;
  233|  10.6k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext10KeyCompareERKNS0_3KeyES3_:
  200|  97.9k|    bool KeyCompare(const Key& a, const Key& b) const {
  201|  97.9k|        return a.data < b.data;
  202|  97.9k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext9ToPKBytesERKNS0_3KeyE:
  205|  1.92k|    {
  206|  1.92k|        assert(!key.is_hash);
  207|  1.92k|        return key.data;
  208|  1.92k|    }
miniscript.cpp:_ZNK12_GLOBAL__N_119ScriptParserContext10ToPKHBytesERKNS0_3KeyE:
  211|  5.21k|    {
  212|  5.21k|        if (key.is_hash) return key.data;
  ------------------
  |  Branch (212:13): [True: 5.21k, False: 0]
  ------------------
  213|      0|        const auto h = Hash160(key.data);
  214|      0|        return {h.begin(), h.end()};
  215|  5.21k|    }

_Z29ConsumeRandomLengthByteVectorIhENSt3__16vectorIT_NS0_9allocatorIS2_EEEER18FuzzedDataProviderRKNS0_8optionalImEE:
   58|  4.30k|{
   59|  4.30k|    static_assert(sizeof(B) == 1);
   60|  4.30k|    const std::string s = max_length ?
  ------------------
  |  Branch (60:27): [True: 0, False: 4.30k]
  ------------------
   61|      0|                              fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
   62|  4.30k|                              fuzzed_data_provider.ConsumeRandomLengthString();
   63|  4.30k|    std::vector<B> ret(s.size());
   64|  4.30k|    std::copy(s.begin(), s.end(), reinterpret_cast<char*>(ret.data()));
   65|  4.30k|    return ret;
   66|  4.30k|}
_Z21ConsumeDeserializableI7CScriptENSt3__18optionalIT_EER18FuzzedDataProviderRKNS2_ImEE:
  120|  4.30k|{
  121|  4.30k|    const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
  122|  4.30k|    DataStream ds{buffer};
  123|  4.30k|    T obj;
  124|  4.30k|    try {
  125|  4.30k|        ds >> obj;
  126|  4.30k|    } catch (const std::ios_base::failure&) {
  127|    298|        return std::nullopt;
  128|    298|    }
  129|  4.00k|    return obj;
  130|  4.30k|}

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

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

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

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

_Z6VectorIJN10miniscript8internal6MaxIntIjEEEENSt3__16vectorINS4_11common_typeIJDpT_EE4typeENS4_9allocatorISA_EEEEDpOS7_:
   24|   175k|{
   25|   175k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|   175k|    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|   175k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   175k|    return ret;
   30|   175k|}
_Z6VectorIJN10miniscript8internal7SatInfoEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  87.6k|{
   25|  87.6k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  87.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|  87.6k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  87.6k|    return ret;
   30|  87.6k|}
miniscript.cpp:_Z6VectorIJN12_GLOBAL__N_119ScriptParserContext3KeyEEENSt3__16vectorINS3_11common_typeIJDpT_EE4typeENS3_9allocatorIS9_EEEEDpOS6_:
   24|  13.3k|{
   25|  13.3k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  13.3k|    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|  13.3k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  13.3k|    return ret;
   30|  13.3k|}
miniscript.cpp:_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEENS0_14default_deleteIS8_EEEEEENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISH_EEEEDpOSE_:
   24|   552k|{
   25|   552k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|   552k|    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|   552k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   552k|    return ret;
   30|   552k|}
miniscript.cpp:_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEENS0_14default_deleteIS8_EEEESB_EENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISH_EEEEDpOSE_:
   24|   107k|{
   25|   107k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|   107k|    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|   107k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|   107k|    return ret;
   30|   107k|}
miniscript.cpp:_Z6VectorIJNSt3__110unique_ptrIKN10miniscript4NodeIN12_GLOBAL__N_119ScriptParserContext3KeyEEENS0_14default_deleteIS8_EEEESB_SB_EENS0_6vectorINS0_11common_typeIJDpT_EE4typeENS0_9allocatorISH_EEEEDpOSE_:
   24|  16.5k|{
   25|  16.5k|    std::vector<typename std::common_type<Args...>::type> ret;
   26|  16.5k|    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|  16.5k|    (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
   29|  16.5k|    return ret;
   30|  16.5k|}

